src/xPDO/xPDO.php
public function getFieldAliases($className) {
        $fieldAliases= array ();
        if ($className= $this->loadClass($className)) {
            if ($ancestry= $this->getAncestry($className)) {
                for ($i= count($ancestry) - 1; $i >= 0; $i--) {
                    if (isset ($this->map[$ancestry[$i]]['fieldAliases'])) {
                        $fieldAliases= array_merge($fieldAliases, $this->map[$ancestry[$i]]['fieldAliases']);
                    }
                }
            }
            if ($this->getInherit($className) === 'single') {
                $descendants= $this->getDescendants($className);
                if ($descendants) {
                    foreach ($descendants as $descendant) {
                        $descendantClass= $this->loadClass($descendant);
                        if ($descendantClass && isset($this->map[$descendantClass]['fieldAliases'])) {
                            $fieldAliases= array_merge($fieldAliases, array_diff_key($this->map[$descendantClass]['fieldAliases'], $fieldAliases));
                        }
                    }
                }
            }
        }
        return $fieldAliases;
    }
public function getFieldAliases($className) {
        $fieldAliases= array ();
        if ($className= $this->loadClass($className)) {
            if ($ancestry= $this->getAncestry($className)) {
                for ($i= count($ancestry) - 1; $i >= 0; $i--) {
                    if (isset ($this->map[$ancestry[$i]]['fieldAliases'])) {
                        $fieldAliases= array_merge($fieldAliases, $this->map[$ancestry[$i]]['fieldAliases']);
                    }
                }
            }
            if ($this->getInherit($className) === 'single') {
                $descendants= $this->getDescendants($className);
                if ($descendants) {
                    foreach ($descendants as $descendant) {
                        $descendantClass= $this->loadClass($descendant);
                        if ($descendantClass && isset($this->map[$descendantClass]['fieldAliases'])) {
                            $fieldAliases= array_merge($fieldAliases, array_diff_key($this->map[$descendantClass]['fieldAliases'], $fieldAliases));
                        }
                    }
                }
            }
        }
        return $fieldAliases;
    }
public function getFieldAliases ( $ className ) { $ fieldAliases = array ( ) ; if ( $ className = $ this -> loadClass ( $ className ) ) { if ( $ ancestry = $ this -> getAncestry ( $ className ) ) { for ( $ i = count ( $ ancestry ) - 1 ; $ i >= 0 ; $ i -- ) { if ( isset ( $ this -> map [ $ ancestry [ $ i ] ] [ 'fieldAliases' ] ) ) { $ fieldAliases = array_merge ( $ fieldAliases , $ this -> map [ $ ancestry [ $ i ] ] [ 'fieldAliases' ] ) ; } } } if ( $ this -> getInherit ( $ className ) === 'single' ) { $ descendants = $ this -> getDescendants ( $ className ) ; if ( $ descendants ) { foreach ( $ descendants as $ descendant ) { $ descendantClass = $ this -> loadClass ( $ descendant ) ; if ( $ descendantClass && isset ( $ this -> map [ $ descendantClass ] [ 'fieldAliases' ] ) ) { $ fieldAliases = array_merge ( $ fieldAliases , array_diff_key ( $ this -> map [ $ descendantClass ] [ 'fieldAliases' ] , $ fieldAliases ) ) ; } } } } } return $ fieldAliases ; }
Gets a collection of field aliases for an object by class name.

@param string $className The name of the class to lookup field aliases for.
@return array An array of field aliases with aliases as keys and actual field names as values.
Gets a collection of field aliases for an object by class name .