toTurbaKeys() public method

Translates a hash from being keyed on driver-specific fields to being keyed on the generalized Turba attributes. The translation is based on the contents of $this->map.
public toTurbaKeys ( array $entry ) : array
$entry array A hash using driver-specific keys.
return array Translated version of $entry.
Ejemplo n.º 1
0
 /**
  * Translates a hash from being keyed on driver-specific fields to being
  * keyed on the generalized Turba attributes. The translation is based on
  * the contents of $this->map.
  *
  * @param array $entry  A hash using driver-specific keys.
  *
  * @return array  Translated version of $entry.
  */
 public function toTurbaKeys(array $entry)
 {
     if (isset($entry['__type']) && $entry['__type'] == 'Group' && isset($entry['display-name'])) {
         $entry['last-name'] = $entry['display-name'];
     }
     return parent::toTurbaKeys($entry);
 }
Ejemplo n.º 2
0
 /**
  * Translates a hash from being keyed on driver-specific fields to being
  * keyed on the generalized Turba attributes. The translation is based on
  * the contents of $this->map.
  *
  * @param array $entry  A hash using driver-specific keys.
  *
  * @return array  Translated version of $entry.
  */
 public function toTurbaKeys(array $entry)
 {
     return $this->_driver->toTurbaKeys($entry);
 }