_base = $base; } $options = PEAR::getStaticProperty('LDAP_DataObject','options'); if (isset($options['base'])) { $this->_base = 'ou=attributes,ou=Schema,'.$options['base']; } return $this->_base; } var $syntaxObject = false; function getSyntax() { if (empty($this->syntax)) { return; } require_once 'DataObjects/LDAPsyntax.php'; $this->syntaxObject = new DataObjects_LDAPsyntax; $this->syntaxObject->get($this->syntax[0]); } var $matchingObject = false; var $equalityObject = false; function getMatching() { require_once 'DataObjects/LDAPmatching.php'; if (!empty($this->equality)) { //echo "LOOKING FOR EQU: {$this->equality[0]}"; $this->equalityObject = new DataObjects_LDAPmatching; $this->equalityObject->get($this->equality[0]); //$this->equalityObject->getSyntax(); } if (!empty($this->substr)) { $this->substrObject = new DataObjects_LDAPmatching; $this->substrObject->get( $this->substr[0]); //$this->substrObject->getSyntax(); } } function getSup() { // get inherited values if (empty($this->sup[0])) { return; } //echo "GETTING SUP {$this->sup[0]}"; $child = new DataObjects_LDAPattribute; $child->get($this->sup[0]); $child->getSup(); // it can inherit.. foreach(array('equality','substr','syntax','singleValue') as $k) { //echo "check $k"; if (empty($this->$k) && !empty($child->$k)) { //echo "using $k"; $this->$k = $child->$k; } } } function toBNC() { $sup = $this->sup[0] ? "\nSUP {$this->sup[0]}" : ''; $st = $this->structural[0] ? "\nSTRUCTURAL" : ''; $ax = $this->auxiliary[0] ? "\nAUXILARY" : ''; $may = $this->may[0] ? ("\nMAY ( ". implode(' $ ',$this->may) . ' )') : ''; $must = $this->must[0] ? ("\nMUST ( ". implode(' $ ',$this->must) . ' )') : ''; return "{$this->uid[0]} NAME '{$this->cn[0]}' {$sup} {$st} {$ax} {$may} {$must}"; } } ?>