public function hydrate(\stdClass $orientObject, Proxy $proxy = null)
    {
        $classProperty = static::ORIENT_PROPERTY_CLASS;

        if ($proxy) {
            $this->fill($proxy, $orientObject);

            return $proxy;

        } elseif (property_exists($orientObject, $classProperty)) {
            $orientClass = $orientObject->$classProperty;

            if ($orientClass) {
                $class       = $this->getMetadataFactory()->findClassMappingInDirectories($orientClass);
                $document    = $this->createDocument($class, $orientObject);

                return $document;
            }

            throw new DocumentNotFoundException(self::ORIENT_PROPERTY_CLASS.' property empty.');
        }

        throw new DocumentNotFoundException(self::ORIENT_PROPERTY_CLASS.' property not found.');
    }
public function hydrate(\stdClass $orientObject, Proxy $proxy = null)
    {
        $classProperty = static::ORIENT_PROPERTY_CLASS;

        if ($proxy) {
            $this->fill($proxy, $orientObject);

            return $proxy;

        } elseif (property_exists($orientObject, $classProperty)) {
            $orientClass = $orientObject->$classProperty;

            if ($orientClass) {
                $class       = $this->getMetadataFactory()->findClassMappingInDirectories($orientClass);
                $document    = $this->createDocument($class, $orientObject);

                return $document;
            }

            throw new DocumentNotFoundException(self::ORIENT_PROPERTY_CLASS.' property empty.');
        }

        throw new DocumentNotFoundException(self::ORIENT_PROPERTY_CLASS.' property not found.');
    }
public function hydrate ( \ stdClass $ orientObject , Proxy $ proxy = null ) { $ classProperty = static :: ORIENT_PROPERTY_CLASS ; if ( $ proxy ) { $ this -> fill ( $ proxy , $ orientObject ) ; return $ proxy ; } elseif ( property_exists ( $ orientObject , $ classProperty ) ) { $ orientClass = $ orientObject -> $ classProperty ; if ( $ orientClass ) { $ class = $ this -> getMetadataFactory ( ) -> findClassMappingInDirectories ( $ orientClass ) ; $ document = $ this -> createDocument ( $ class , $ orientObject ) ; return $ document ; } throw new DocumentNotFoundException ( self :: ORIENT_PROPERTY_CLASS . ' property empty.' ) ; } throw new DocumentNotFoundException ( self :: ORIENT_PROPERTY_CLASS . ' property not found.' ) ; }
Takes an Doctrine\OrientDB JSON object and finds the class responsible to map that
object.
If the class is found, a new POPO is instantiated and the properties inside the
JSON object are filled accordingly.

@param  \stdClass $orientObject
@param  Proxy     $proxy
@return Result
@throws DocumentNotFoundException
Takes an Doctrine \ OrientDB JSON object and finds the class responsible to map that object . If the class is found a new POPO is instantiated and the properties inside the JSON object are filled accordingly .