public function getOrFail($key)
    {
        $value = $this->get($key, new None());
        if (!$value instanceof None) {
            return $value;
        }
        throw new KeyNotFoundException("Key '$key' not found'");
    }
public function getOrFail($key)
    {
        $value = $this->get($key, new None());
        if (!$value instanceof None) {
            return $value;
        }
        throw new KeyNotFoundException("Key '$key' not found'");
    }
public function getOrFail ( $ key ) { $ value = $ this -> get ( $ key , new None ( ) ) ; if ( ! $ value instanceof None ) { return $ value ; } throw new KeyNotFoundException ( "Key '$key' not found'" ) ; }
Get a named object by its id or throw an exception if it cant be found.

@param mixed $key

@throws \Ems\Contracts\Core\Errors\NotFound

@return mixed
Get a named object by its id or throw an exception if it cant be found .