src/Collection/Habit/AttributeTrait.php
public function get($attribute, $arrayAsMap = true)
    {
        if ($this->has($attribute)) {
            $value = $this->attributes[$attribute];

            if ($arrayAsMap === true && is_array($value)) {
                $value = new self($value);
            }

            return $value;
        }

        throw new \OutOfBoundsException("Attribute '{$attribute}' does not exist");
    }
public function get($attribute, $arrayAsMap = true)
    {
        if ($this->has($attribute)) {
            $value = $this->attributes[$attribute];

            if ($arrayAsMap === true && is_array($value)) {
                $value = new self($value);
            }

            return $value;
        }

        throw new \OutOfBoundsException("Attribute '{$attribute}' does not exist");
    }
public function get ( $ attribute , $ arrayAsMap = true ) { if ( $ this -> has ( $ attribute ) ) { $ value = $ this -> attributes [ $ attribute ] ; if ( $ arrayAsMap === true && is_array ( $ value ) ) { $ value = new self ( $ value ) ; } return $ value ; } throw new \ OutOfBoundsException ( "Attribute '{$attribute}' does not exist" ) ; }
Returns value of given attribute name or throws an exception if the attribute does not exist

@param $attribute
@param bool $arrayAsMap
@return \Collection\MutableMap
@throws \OutOfBoundsException
Returns value of given attribute name or throws an exception if the attribute does not exist