示例#1
0
 /**
  * Get the add operation and take care of the hydration process.
  *
  * @return AddOperation
  */
 protected function getAddOperation()
 {
     $operation = new AddOperation($this->dn, $this->attributes);
     $operation->setLocation($this->container);
     foreach ($this->parameters as $parameter => $value) {
         $this->hydrator->setParameter($parameter, $value);
     }
     $this->hydrator->setLdapObjectSchema($this->schema);
     $this->hydrator->setLdapConnection($this->connection);
     $this->hydrator->setOperationType(AttributeConverterInterface::TYPE_CREATE);
     return $this->hydrator->hydrateToLdap($operation);
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function toOperation()
 {
     $hydrator = new OperationHydrator();
     $hydrator->setOperationType(AttributeConverterInterface::TYPE_CREATE);
     $operation = new AddOperation($this->dn, $this->attributes);
     $operation->setLocation($this->location);
     return $this->hydrateOperation($hydrator, $operation);
 }
示例#3
0
 /**
  * {@inheritdoc}
  */
 public function toOperation()
 {
     $hydrator = new OperationHydrator();
     $hydrator->setOperationType(AttributeConverterInterface::TYPE_MODIFY);
     $operation = new BatchModifyOperation($this->dn, clone $this->batches);
     return $this->hydrateOperation($hydrator, $operation);
 }