public function registerNewObject(Aspect\PersistenceMagicInterface $object)
    {
        $identifier = ObjectAccess::getProperty($object, 'Persistence_Object_Identifier', true);
        $this->newObjects[$identifier] = $object;
    }
public function registerNewObject(Aspect\PersistenceMagicInterface $object)
    {
        $identifier = ObjectAccess::getProperty($object, 'Persistence_Object_Identifier', true);
        $this->newObjects[$identifier] = $object;
    }
public function registerNewObject ( Aspect \ PersistenceMagicInterface $ object ) { $ identifier = ObjectAccess :: getProperty ( $ object , 'Persistence_Object_Identifier' , true ) ; $ this -> newObjects [ $ identifier ] = $ object ; }
Registers an object which has been created or cloned during this request.

The given object must contain the Persistence_Object_Identifier property, thus
the PersistenceMagicInterface type hint. A "new" object does not necessarily
have to be known by any repository or be persisted in the end.

Objects registered with this method must be known to the getObjectByIdentifier()
method.

@param Aspect\PersistenceMagicInterface $object The new object to register
@return void
Registers an object which has been created or cloned during this request .