Download the PHP package lukaszmakuch/property-setter without Composer
On this page you can find all versions of the php package lukaszmakuch/property-setter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lukaszmakuch/property-setter
More information about lukaszmakuch/property-setter
Files in lukaszmakuch/property-setter
Package property-setter
Short Description Sets properties of already existing objects.
License MIT
Informations about the package property-setter
PropertySetter
Sets properties of already existing objects.
Usage
Different setters
PropertySetter
Describes how to use any property setter.
SimplePropertySetter
Injects values obtained from a value source to objects described by a target specifier using some property setting strategy.
SilentPropertySetter
It's a decorator that prevents the decorated setter from throwing the UnsupportedTarget exception if some object is not supported.
SimpleChainOfPropertySetters
It tries to set properties of an object using all of its setters. It doesn't prevent any exceptions.
SilentChainOfPropertySetters
It's a decorator that ignores a situation when some setter doesn't support objects of some type. It prevents throwing the UnsupportedTarget exception. When one of its setter throws an exception, it keeps trying to use other setters.
Setting strategies
CallSetterMethod
Calls a setter in order to set a property.
CallOnlyMethodAsSetter
Calls a setter in order to set a property.
Target specifiers
PickByClass
Selects targets by their classes.
Value Sources
UseDirectly
Simply holds some value without modyfing it before it's returned.
Exceptions
UnableToSetProperty
\lukaszmakuch\PropertySetter\Exception\UnableToSetProperty
It's the parent of any exception that may be thrown by the setPropertiesOf method. When the setter method throws an exception, it's wrapped in this one (and becomes available by calling the getPrevious method).
UnableToGetValue
\lukaszmakuch\PropertySetter\Exception\UnableToGetValue
Thrown when it's impossible to get a value (from a value source). It inherits from the UnableToSetProperty exception.
UnableToGetValue
\lukaszmakuch\PropertySetter\Exception\UnsupportedTarget
Thrown when trying to set properties of an object that is not supported. It inherits from the UnableToSetProperty exception.
Installation
Use composer to get the latest version: