src/xPDO/Om/xPDOObject.php
public function addFieldAlias($field, $alias) {
        $added = false;
        if (array_key_exists($field, $this->_fields)) {
            if (!array_key_exists($alias, $this->_fields)) {
                $this->_fields[$alias] =& $this->_fields[$field];
                if (!array_key_exists($alias, $this->_fieldAliases)) {
                    $this->_fieldAliases[$alias] = $field;
                    if (!array_key_exists($alias, $this->xpdo->map[$this->_class]['fieldAliases'])) {
                        $this->xpdo->map[$this->_class]['fieldAliases'][$alias]= $field;
                    }
                }
                $added = true;
            } else {
                $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, "The alias {$alias} is already in use as a field name in objects of class {$this->_class}", '', __METHOD__, __FILE__, __LINE__);
            }
        }
        return $added;
    }
public function addFieldAlias($field, $alias) {
        $added = false;
        if (array_key_exists($field, $this->_fields)) {
            if (!array_key_exists($alias, $this->_fields)) {
                $this->_fields[$alias] =& $this->_fields[$field];
                if (!array_key_exists($alias, $this->_fieldAliases)) {
                    $this->_fieldAliases[$alias] = $field;
                    if (!array_key_exists($alias, $this->xpdo->map[$this->_class]['fieldAliases'])) {
                        $this->xpdo->map[$this->_class]['fieldAliases'][$alias]= $field;
                    }
                }
                $added = true;
            } else {
                $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, "The alias {$alias} is already in use as a field name in objects of class {$this->_class}", '', __METHOD__, __FILE__, __LINE__);
            }
        }
        return $added;
    }
public function addFieldAlias ( $ field , $ alias ) { $ added = false ; if ( array_key_exists ( $ field , $ this -> _fields ) ) { if ( ! array_key_exists ( $ alias , $ this -> _fields ) ) { $ this -> _fields [ $ alias ] = & $ this -> _fields [ $ field ] ; if ( ! array_key_exists ( $ alias , $ this -> _fieldAliases ) ) { $ this -> _fieldAliases [ $ alias ] = $ field ; if ( ! array_key_exists ( $ alias , $ this -> xpdo -> map [ $ this -> _class ] [ 'fieldAliases' ] ) ) { $ this -> xpdo -> map [ $ this -> _class ] [ 'fieldAliases' ] [ $ alias ] = $ field ; } } $ added = true ; } else { $ this -> xpdo -> log ( xPDO :: LOG_LEVEL_ERROR , "The alias {$alias} is already in use as a field name in objects of class {$this->_class}" , '' , __METHOD__ , __FILE__ , __LINE__ ) ; } } return $ added ; }
Add an alias as a reference to an actual field of the object.

@param string $field The field name to create a reference to.
@param string $alias The name of the reference.
@return bool True if the reference is added successfully.
Add an alias as a reference to an actual field of the object .