getType() public method

Get the LDAP type for this object.
public getType ( ) : string
return string
Ejemplo n.º 1
0
 /**
  * @param LdapObject $ldapObject
  * @param string|null $dn The DN to use for the batch operation to LDAP.
  */
 protected function executeBatchOperation(LdapObject $ldapObject, $dn = null)
 {
     $dn = $dn ?: $ldapObject->get('dn');
     $operation = new BatchModifyOperation($dn, $ldapObject->getBatchCollection());
     $this->hydrateOperation($operation, $ldapObject->getType());
     $this->connection->execute($operation);
     $ldapObject->setBatchCollection(new BatchCollection($ldapObject->get('dn')));
 }
Ejemplo n.º 2
0
 /**
  * Temporary BC method for LdapObject construction.
  * 
  * @todo remove this at some point. This is to check for instances where the class/category was in the constructor.
  * @param LdapObject $ldapObject
  * @return array
  */
 protected function getParentArgs(LdapObject $ldapObject)
 {
     $constructor = (new \ReflectionClass(get_parent_class()))->getConstructor();
     if ($constructor->getNumberOfParameters() == 2) {
         $args = [$ldapObject->toArray(), $ldapObject->getType()];
     } else {
         $args = [$ldapObject->toArray(), [], '', $ldapObject->getType()];
     }
     return $args;
 }