components/Interpreter.php
public function interpretAttribute($attribute, $index = null)
    {
        if ($index) {
            $availables = $this->getInterpretations();

            if (isset($availables[$index])) {
                return $availables[$index]->{$attribute};
            }
        }

        $current = $this->getCurrentInterpretation();

        if ($current) {
            return $current->{$attribute};
        }

        return null;
    }
public function interpretAttribute($attribute, $index = null)
    {
        if ($index) {
            $availables = $this->getInterpretations();

            if (isset($availables[$index])) {
                return $availables[$index]->{$attribute};
            }
        }

        $current = $this->getCurrentInterpretation();

        if ($current) {
            return $current->{$attribute};
        }

        return null;
    }
public function interpretAttribute ( $ attribute , $ index = null ) { if ( $ index ) { $ availables = $ this -> getInterpretations ( ) ; if ( isset ( $ availables [ $ index ] ) ) { return $ availables [ $ index ] -> { $ attribute } ; } } $ current = $ this -> getCurrentInterpretation ( ) ; if ( $ current ) { return $ current -> { $ attribute } ; } return null ; }
Retrieves attribute interpretation for current hasMany relation
@param string $attribute attribute name
@return mixed Attribute value if interpretation exists otherwise NULL
Retrieves attribute interpretation for current hasMany relation