protected function castProperty($annotation, $propertyValue)
    {
        $propertyId = $this->getCastedPropertyCacheKey($annotation->type, $propertyValue);

        if (!isset($this->castedProperties[$propertyId])) {
            $method = 'cast' . $this->inflector->camelize($annotation->type);

            $this->getCaster()->setValue($propertyValue);
            $this->getCaster()->setProperty('annotation', $annotation);
            $this->verifyCastingSupport($this->getCaster(), $method, $annotation->type);

            $this->castedProperties[$propertyId] = $this->getCaster()->$method();
        }

        return $this->castedProperties[$propertyId];
    }
protected function castProperty($annotation, $propertyValue)
    {
        $propertyId = $this->getCastedPropertyCacheKey($annotation->type, $propertyValue);

        if (!isset($this->castedProperties[$propertyId])) {
            $method = 'cast' . $this->inflector->camelize($annotation->type);

            $this->getCaster()->setValue($propertyValue);
            $this->getCaster()->setProperty('annotation', $annotation);
            $this->verifyCastingSupport($this->getCaster(), $method, $annotation->type);

            $this->castedProperties[$propertyId] = $this->getCaster()->$method();
        }

        return $this->castedProperties[$propertyId];
    }
protected function castProperty ( $ annotation , $ propertyValue ) { $ propertyId = $ this -> getCastedPropertyCacheKey ( $ annotation -> type , $ propertyValue ) ; if ( ! isset ( $ this -> castedProperties [ $ propertyId ] ) ) { $ method = 'cast' . $ this -> inflector -> camelize ( $ annotation -> type ) ; $ this -> getCaster ( ) -> setValue ( $ propertyValue ) ; $ this -> getCaster ( ) -> setProperty ( 'annotation' , $ annotation ) ; $ this -> verifyCastingSupport ( $ this -> getCaster ( ) , $ method , $ annotation -> type ) ; $ this -> castedProperties [ $ propertyId ] = $ this -> getCaster ( ) -> $ method ( ) ; } return $ this -> castedProperties [ $ propertyId ] ; }
Casts a value according to how it was annotated.

@param  \Doctrine\ODM\OrientDB\Mapper\Annotations\Property  $annotation
@param  mixed                                               $propertyValue
@return mixed
Casts a value according to how it was annotated .