private function buildRegistryFromObject()
    {
        if (!($this->entity instanceof DomainObjectInterface)) {
            throw new \Exception('EntityRegistry have to implement DomainObjectInterface', 1);
        }
        $this->classname = get_class($this->entity);

        $identifier = new Registry();
        $this->registries[] = $identifier->setType($this->classname)->setKey('identifier')->setValue($this->entity->getObjectIdentifier());

        foreach ($this->entity->getObjectProperties() as $key => $value) {
            $registry = new Registry();
            $this->registries[] = $registry->setType($this->classname)->setKey($key)->setValue($value)->setScope($this->entity->getObjectIdentifier());
        }
    }
private function buildRegistryFromObject()
    {
        if (!($this->entity instanceof DomainObjectInterface)) {
            throw new \Exception('EntityRegistry have to implement DomainObjectInterface', 1);
        }
        $this->classname = get_class($this->entity);

        $identifier = new Registry();
        $this->registries[] = $identifier->setType($this->classname)->setKey('identifier')->setValue($this->entity->getObjectIdentifier());

        foreach ($this->entity->getObjectProperties() as $key => $value) {
            $registry = new Registry();
            $this->registries[] = $registry->setType($this->classname)->setKey($key)->setValue($value)->setScope($this->entity->getObjectIdentifier());
        }
    }
private function buildRegistryFromObject ( ) { if ( ! ( $ this -> entity instanceof DomainObjectInterface ) ) { throw new \ Exception ( 'EntityRegistry have to implement DomainObjectInterface' , 1 ) ; } $ this -> classname = get_class ( $ this -> entity ) ; $ identifier = new Registry ( ) ; $ this -> registries [ ] = $ identifier -> setType ( $ this -> classname ) -> setKey ( 'identifier' ) -> setValue ( $ this -> entity -> getObjectIdentifier ( ) ) ; foreach ( $ this -> entity -> getObjectProperties ( ) as $ key => $ value ) { $ registry = new Registry ( ) ; $ this -> registries [ ] = $ registry -> setType ( $ this -> classname ) -> setKey ( $ key ) -> setValue ( $ value ) -> setScope ( $ this -> entity -> getObjectIdentifier ( ) ) ; } }
Automatique registry builder from the current entity object.
Automatique registry builder from the current entity object .