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

        $value = $object->$getter();

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

        $value = $this->typeManager->toResource($definition, $value);

        $resource->setAttribute($name, $value);
    }
protected function processAttributeToResource($object, ResourceObject $resource, Attribute $definition)
    {
        $name   = $definition->getName();
        $getter = $definition->getGetter();

        $value = $object->$getter();

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

        $value = $this->typeManager->toResource($definition, $value);

        $resource->setAttribute($name, $value);
    }
protected function processAttributeToResource ( $ object , ResourceObject $ resource , Attribute $ definition ) { $ name = $ definition -> getName ( ) ; $ getter = $ definition -> getGetter ( ) ; $ value = $ object -> $ getter ( ) ; if ( $ value === null && ! $ definition -> getProcessNull ( ) ) { return ; } $ value = $ this -> typeManager -> toResource ( $ definition , $ value ) ; $ resource -> setAttribute ( $ name , $ value ) ; }
Process attribute to resource mapping

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