Ejemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     $this->_root = $config->root;
     $this->_property = $config->property;
     $config->object = $config->service_container->get($config->repository->getEntityset(), $config->toArray());
     parent::__construct($config);
 }
Ejemplo n.º 2
0
 /**
  * (non-PHPdoc)
  * @see KObjectSet::extract()
  */
 public function extract($component)
 {
     if (is_string($component)) {
         $component = $this->getRepository()->fetch(array('component' => $component));
     }
     if ($component->isAssignable()) {
         $assignment = $component->assignments->find(array('actor' => $this->_actor));
         if ($assignment) {
             $assignment->delete();
         }
     }
     if ($this->isLoaded()) {
         parent::extract($component);
     }
 }