getBatchCollection() public method

The batch modifications array for a modify operation.
public getBatchCollection ( ) : BatchCollection | null
return LdapTools\BatchModify\BatchCollection | null
コード例 #1
0
 /**
  * @param BatchModifyOperation $operation
  * @return BatchModifyOperation
  */
 protected function hydrateModifyOperation(BatchModifyOperation $operation)
 {
     $batches = $this->convertValuesToLdap($operation->getBatchCollection(), $operation->getDn());
     foreach ($batches as $batch) {
         /** @var \LdapTools\BatchModify\Batch $batch */
         $batch->setAttribute($this->schema->getAttributeToLdap($batch->getAttribute()));
     }
     return $operation;
 }
コード例 #2
0
 /**
  * Workaround AD special cases with the unicodePwd attribute...
  *
  * @link https://support.microsoft.com/en-us/kb/263991
  * @param BatchModifyOperation $operation
  */
 protected function unicodePwdHack(BatchModifyOperation $operation)
 {
     if (!$this->isUnicodePwdHackNeeded()) {
         return;
     }
     foreach ($operation->getBatchCollection() as $batch) {
         if (strtolower($batch->getAttribute()) !== 'unicodepwd') {
             continue;
         }
         $values = $batch->getValues();
         $batch->setValues(base64_encode(reset($values)));
     }
 }