/** * Reads values of attribute. * * @param integer $atIndex 0-based index of value to read from set of values * @return array set of attribute's values */ public function read($atIndex = null) { if ($this->faking) { return $atIndex === null ? array() : null; } $values = @ldap_get_values($this->node->getLink(), $this->node->getID(), $this->name); if (is_array($values) && array_key_exists('count', $values)) { unset($values['count']); } return $atIndex === null ? $values : $values[$atIndex]; }