protected function processResourceToAttribute($object, ResourceObject $resource, Attribute $definition)
    {
        $name = $definition->getName();

        if (! $resource->hasAttribute($name)) {
            return;
        }

        $value = $resource->getAttribute($name);

        if ($value === null && ! $definition->getProcessNull()) {
            return;
        }

        $value  = $this->typeManager->fromResource($definition, $value);
        $setter = $definition->getSetter();

        $object->$setter($value);
    }
protected function processResourceToAttribute($object, ResourceObject $resource, Attribute $definition)
    {
        $name = $definition->getName();

        if (! $resource->hasAttribute($name)) {
            return;
        }

        $value = $resource->getAttribute($name);

        if ($value === null && ! $definition->getProcessNull()) {
            return;
        }

        $value  = $this->typeManager->fromResource($definition, $value);
        $setter = $definition->getSetter();

        $object->$setter($value);
    }
protected function processResourceToAttribute ( $ object , ResourceObject $ resource , Attribute $ definition ) { $ name = $ definition -> getName ( ) ; if ( ! $ resource -> hasAttribute ( $ name ) ) { return ; } $ value = $ resource -> getAttribute ( $ name ) ; if ( $ value === null && ! $ definition -> getProcessNull ( ) ) { return ; } $ value = $ this -> typeManager -> fromResource ( $ definition , $ value ) ; $ setter = $ definition -> getSetter ( ) ; $ object -> $ setter ( $ value ) ; }
Process resource to attribute mapping

@param mixed          $object
@param ResourceObject $resource
@param Attribute      $definition
Process resource to attribute mapping