public function fromArray(array $object = array())
    {
        if (count($object) > 0) {
            $reflector = new \ReflectionClass($this);
            $properties = InjectorHelper::extractProperties($reflector, \ReflectionProperty::IS_PUBLIC, InjectorHelper::VAR_PATTERN);
            unset($reflector);
            foreach ($object as $key => $value) {
                if (property_exists($this, $key) && null !== $value) {
                    $this->parseDtoField($properties, $key, $value);
                }
            }
        }
    }
public function fromArray(array $object = array())
    {
        if (count($object) > 0) {
            $reflector = new \ReflectionClass($this);
            $properties = InjectorHelper::extractProperties($reflector, \ReflectionProperty::IS_PUBLIC, InjectorHelper::VAR_PATTERN);
            unset($reflector);
            foreach ($object as $key => $value) {
                if (property_exists($this, $key) && null !== $value) {
                    $this->parseDtoField($properties, $key, $value);
                }
            }
        }
    }
public function fromArray ( array $ object = array ( ) ) { if ( count ( $ object ) > 0 ) { $ reflector = new \ ReflectionClass ( $ this ) ; $ properties = InjectorHelper :: extractProperties ( $ reflector , \ ReflectionProperty :: IS_PUBLIC , InjectorHelper :: VAR_PATTERN ) ; unset ( $ reflector ) ; foreach ( $ object as $ key => $ value ) { if ( property_exists ( $ this , $ key ) && null !== $ value ) { $ this -> parseDtoField ( $ properties , $ key , $ value ) ; } } } }
Hydrate object from array
@param array $object
Hydrate object from array