src/Charcoal/Model/Collection.php
public function get($key)
    {
        if ($this->isAcceptable($key)) {
            $key = $this->modelKey($key);
        }

        if ($this->has($key)) {
            return $this->objects[$key];
        }

        return null;
    }
public function get($key)
    {
        if ($this->isAcceptable($key)) {
            $key = $this->modelKey($key);
        }

        if ($this->has($key)) {
            return $this->objects[$key];
        }

        return null;
    }
public function get ( $ key ) { if ( $ this -> isAcceptable ( $ key ) ) { $ key = $ this -> modelKey ( $ key ) ; } if ( $ this -> has ( $ key ) ) { return $ this -> objects [ $ key ] ; } return null ; }
Retrieve the object by primary key.

@param  mixed $key The primary key.
@return object|null Returns the requested object or NULL if not in the collection.
Retrieve the object by primary key .