src/Axolotl/Model.php
public function get_attribute( $name ) {
		if ( $method = $this->has_map_method( $name ) ) {
			return $this->attributes[ self::OBJECT_KEY ]->{$this->{$method}()};
		}

		if ( $method = $this->has_compute_method( $name ) ) {
			return $this->{$method}();
		}

		if ( isset( $this->attributes[ self::TABLE_KEY ][ $name ] ) ) {
			return $this->attributes[ self::TABLE_KEY ][ $name ];
		}

		if ( isset( $this->defaults[ $name ] ) ) {
			return $this->defaults[ $name ];
		}

		return null;
	}
public function get_attribute( $name ) {
		if ( $method = $this->has_map_method( $name ) ) {
			return $this->attributes[ self::OBJECT_KEY ]->{$this->{$method}()};
		}

		if ( $method = $this->has_compute_method( $name ) ) {
			return $this->{$method}();
		}

		if ( isset( $this->attributes[ self::TABLE_KEY ][ $name ] ) ) {
			return $this->attributes[ self::TABLE_KEY ][ $name ];
		}

		if ( isset( $this->defaults[ $name ] ) ) {
			return $this->defaults[ $name ];
		}

		return null;
	}
public function get_attribute ( $ name ) { if ( $ method = $ this -> has_map_method ( $ name ) ) { return $ this -> attributes [ self :: OBJECT_KEY ] -> { $ this -> { $ method } ( ) } ; } if ( $ method = $ this -> has_compute_method ( $ name ) ) { return $ this -> { $ method } ( ) ; } if ( isset ( $ this -> attributes [ self :: TABLE_KEY ] [ $ name ] ) ) { return $ this -> attributes [ self :: TABLE_KEY ] [ $ name ] ; } if ( isset ( $ this -> defaults [ $ name ] ) ) { return $ this -> defaults [ $ name ] ; } return null ; }
Retrieves the model attribute.

@param string $name

@return mixed

@throws PropertyDoesNotExistException If property isn't found.
Retrieves the model attribute .