add() public method

Adds an object to this repository.
public add ( object $object ) : void
$object object The object to add
return void
 /**
  * @param object $object
  * @throws IllegalObjectTypeException
  */
 public function add($object)
 {
     $this->persistenceManager->whitelistObject($object);
     if ($this->removedResources->contains($object)) {
         $this->removedResources->detach($object);
     }
     if (!$this->addedResources->contains($object)) {
         $this->addedResources->attach($object);
         parent::add($object);
     }
 }
 /**
  * Adds a NodeData object to this repository.
  *
  * This repository keeps track of added and removed nodes (additionally to the other Unit of Work)
  * in order to find in-memory nodes.
  *
  * @param object $object The object to add
  * @return void
  * @api
  */
 public function add($object)
 {
     if ($this->removedNodes->contains($object)) {
         $this->removedNodes->detach($object);
     }
     if (!$this->addedNodes->contains($object)) {
         $this->addedNodes->attach($object);
     }
     parent::add($object);
 }
 /**
  * @param AssetInterface $object
  */
 public function add($object)
 {
     parent::add($object);
     $this->assetService->emitAssetCreated($object);
 }