Neos\Flow\Persistence\Aspect\PersistenceMagicAspect::cloneObject PHP Метод

cloneObject() публичный Метод

Note: this is not used by anything in the Flow base distribution, but might be needed by custom backends (like Neos.CouchDB).
public cloneObject ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : void
$joinPoint Neos\Flow\Aop\JoinPointInterface
Результат void
    public function cloneObject(JoinPointInterface $joinPoint)
    {
        $joinPoint->getProxy()->Flow_Persistence_clone = true;
    }

Usage Example

 /**
  * @test
  * @return void
  */
 public function cloneObjectMarksTheObjectAsCloned()
 {
     $object = new \stdClass();
     $this->mockJoinPoint->expects($this->any())->method('getProxy')->will($this->returnValue($object));
     $this->persistenceMagicAspect->cloneObject($this->mockJoinPoint);
     $this->assertTrue($object->Flow_Persistence_clone);
 }