system/classes/Model.php
public function getAttributeValueExtended($name, $convertDates = true)
    {
        if (isset($this->model_data[$name])) {
            $result = $this->model_data[$name];
            if ($result instanceof \DateTime && $convertDates == true) {
                $result = $result->format('Y-m-d H:i:s');
            }
            return $result;
        }
        if (isset($this->data->{$name})) {
            return $this->data->{$name};
        }
        else if (isset($this->model_extends) && isset($this->model_attributes[$this->model_extends])) {
            $extendedModel = $this->{$this->model_extends};
            if ($extendedModel && $result = $extendedModel->getAttributeValue($name)) {
                return $result;
            }
        }
        return null;
    }
public function getAttributeValueExtended($name, $convertDates = true)
    {
        if (isset($this->model_data[$name])) {
            $result = $this->model_data[$name];
            if ($result instanceof \DateTime && $convertDates == true) {
                $result = $result->format('Y-m-d H:i:s');
            }
            return $result;
        }
        if (isset($this->data->{$name})) {
            return $this->data->{$name};
        }
        else if (isset($this->model_extends) && isset($this->model_attributes[$this->model_extends])) {
            $extendedModel = $this->{$this->model_extends};
            if ($extendedModel && $result = $extendedModel->getAttributeValue($name)) {
                return $result;
            }
        }
        return null;
    }
public function getAttributeValueExtended ( $ name , $ convertDates = true ) { if ( isset ( $ this -> model_data [ $ name ] ) ) { $ result = $ this -> model_data [ $ name ] ; if ( $ result instanceof \ DateTime && $ convertDates == true ) { $ result = $ result -> format ( 'Y-m-d H:i:s' ) ; } return $ result ; } if ( isset ( $ this -> data -> { $ name } ) ) { return $ this -> data -> { $ name } ; } else if ( isset ( $ this -> model_extends ) && isset ( $ this -> model_attributes [ $ this -> model_extends ] ) ) { $ extendedModel = $ this -> { $ this -> model_extends } ; if ( $ extendedModel && $ result = $ extendedModel -> getAttributeValue ( $ name ) ) { return $ result ; } } return null ; }
For getting model data without triggering unnecessary dynamic data fetching.
Will trigger load of extended object, but not on any ID being referenced.

If EMPLOYEE extends USER and each user has a reference to another user who is their boss,
you may want to grab $employee->boss->id, but not want to load the info for their boss.
$employee->getAttributeValueExtended('boss') allows you to do that.

This method is different from getAttributeValue in that this one checks extended relationships
and the other doesn't. They could theoretically be combined, but some places seem to use
getAttributeValue as an "issetAttribute" check, so if it returns any value for stuff not
on the model's immediate table, it screws stuff up.
For getting model data without triggering unnecessary dynamic data fetching . Will trigger load of extended object but not on any ID being referenced .