LdapTools\Hydrator\ArrayHydrator::hydrateFromLdap PHP Method

hydrateFromLdap() public method

public hydrateFromLdap ( array $entry )
$entry array
    public function hydrateFromLdap(array $entry)
    {
        $attributes = [];
        foreach ($entry as $key => $value) {
            if (is_string($key)) {
                $attributes = $this->setAttributeFromLdap($attributes, $key, $value);
            }
        }
        $attributes = $this->convertNamesFromLdap($attributes);
        $attributes = $this->convertValuesFromLdap($attributes);
        return $attributes;
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function hydrateFromLdap(array $entry)
 {
     $entry = parent::hydrateFromLdap($entry);
     return new LdapObject($entry, $this->schema ? $this->schema->getObjectType() : '');
 }