index = $ldapserver->server_id; $this->visit_attributes = true; $this->context = 0; } public function getLDAPServer() { static $CACHE; if (! isset($CACHE[$this->index])) $CACHE[$this->index] = $_SESSION[APPCONFIG]->ldapservers->Instance($this->index); return $CACHE[$this->index]; } /**************************/ /* Paint an Entry */ /**************************/ public function visitEntryStart($entry) { if (DEBUG_ENABLED) debug_log('Entered with (%s)',1,__FILE__,__LINE__,__METHOD__,$entry->getDn()); // init $this->init('Visit', $entry); } public function visitEntryEnd($entry) { if (DEBUG_ENABLED) debug_log('Entered with (%s)',1,__FILE__,__LINE__,__METHOD__,$entry->getDn()); } protected function initEntryVisit($entry) { $this->internal_attributes = array(); $this->shown_attributes = array(); $this->hidden_attributes = array(); } /********************************/ /* Paint a DefaultCreatingEntry */ /********************************/ protected function initDefaultCreatingEntryVisit($entry) { $this->context = ENTRY_WRITER_CREATION_CONTEXT; $this->init('Entry::Visit', $entry); } /*******************************/ /* Paint a DefaultEditingEntry */ /*******************************/ protected function initDefaultEditingEntryVisit($entry) { $this->context = ENTRY_WRITER_EDITING_CONTEXT; $this->init('Entry::Visit', $entry); } /*********************************/ /* Paint a TemplateCreatingEntry */ /*********************************/ /********************************/ /* Paint a TemplateEditingEntry */ /********************************/ /**************************/ /* Paint an Attribute */ /**************************/ public function visitAttribute($attribute) { if (DEBUG_ENABLED) debug_log('Entered with (%s,%s)',1,__FILE__,__LINE__,__METHOD__,$attribute->getName(),$this->visit_attributes); if (!$this->visit_attributes) return; if ($attribute->isInternal()) $this->internal_attributes[] = $attribute; elseif ($attribute->isVisible()) $this->shown_attributes[] = $attribute; else $this->hidden_attributes[] = $attribute; } } ?>