protected function populate(AbstractResponse $object, array $data)
    {
        $reflect = new ReflectionClass($object);

        $properties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);

        foreach ($properties as $property) {
            if (array_key_exists($property->name, $data)) {
                $object->{$property->name} = $this->getValueByAnnotatedType($property, $data[$property->name]);
            }
        }

        return $object;
    }
protected function populate(AbstractResponse $object, array $data)
    {
        $reflect = new ReflectionClass($object);

        $properties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);

        foreach ($properties as $property) {
            if (array_key_exists($property->name, $data)) {
                $object->{$property->name} = $this->getValueByAnnotatedType($property, $data[$property->name]);
            }
        }

        return $object;
    }
protected function populate ( AbstractResponse $ object , array $ data ) { $ reflect = new ReflectionClass ( $ object ) ; $ properties = $ reflect -> getProperties ( ReflectionProperty :: IS_PUBLIC ) ; foreach ( $ properties as $ property ) { if ( array_key_exists ( $ property -> name , $ data ) ) { $ object -> { $ property -> name } = $ this -> getValueByAnnotatedType ( $ property , $ data [ $ property -> name ] ) ; } } return $ object ; }
Populates object with data.

@param AbstractResponse $object
@param array $data
@return AbstractResponse
Populates object with data .