public function has($key)
    {
        foreach ($this->collection as $prototype) {
            if ($key == $prototype->getKey()) {
                return true;
            }
        }

        return false;
    }
public function has($key)
    {
        foreach ($this->collection as $prototype) {
            if ($key == $prototype->getKey()) {
                return true;
            }
        }

        return false;
    }
public function has ( $ key ) { foreach ( $ this -> collection as $ prototype ) { if ( $ key == $ prototype -> getKey ( ) ) { return true ; } } return false ; }
Check if the collection has a prototype with the given key.

@param string $key

@return bool
Check if the collection has a prototype with the given key .