name; } /** * Gets the objectClass OID * * @return string */ public function getOid() { return $this->oid; } /** * Gets the attributes that this objectClass must contain * * @return array */ public function getMustContain() { if ($this->_inheritedMust === null) { $this->_resolveInheritance(); } return $this->_inheritedMust; } /** * Gets the attributes that this objectClass may contain * * @return array */ public function getMayContain() { if ($this->_inheritedMay === null) { $this->_resolveInheritance(); } return $this->_inheritedMay; } /** * Resolves the inheritance tree * * @return void */ protected function _resolveInheritance() { $must = $this->must; $may = $this->may; foreach ($this->getParents() as $p) { $must = array_merge($must, $p->getMustContain()); $may = array_merge($may, $p->getMayContain()); } $must = array_unique($must); $may = array_unique($may); $may = array_diff($may, $must); sort($must, SORT_STRING); sort($may, SORT_STRING); $this->_inheritedMust = $must; $this->_inheritedMay = $may; } /** * Gets the objectClass description * * @return string */ public function getDescription() { return $this->desc; } /** * Gets the objectClass type * * @return integer */ public function getType() { if ($this->structural) { return Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_STRUCTURAL; } else if ($this->abstract) { return Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_ABSTRACT; } else if ($this->auxiliary) { return Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_AUXILIARY; } else { return Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_UNKNOWN; } } /** * Returns the parent objectClasses of this class. * This includes structural, abstract and auxiliary objectClasses * * @return array */ public function getParentClasses() { return $this->sup; } /** * Returns the parent object classes in the inhertitance tree if one exists * * @return array of Zend_Ldap_Node_Schema_ObjectClass_OpenLdap */ public function getParents() { return $this->_parents; } }