Elastica\Param::getParam PHP Method

getParam() public method

Returns a specific param.
public getParam ( string $key ) : mixed
$key string Key to return
return mixed Key value
    public function getParam($key)
    {
        if (!$this->hasParam($key)) {
            throw new InvalidException('Param ' . $key . ' does not exist');
        }
        return $this->_params[$key];
    }

Usage Example

 /**
  * @group unit
  * @expectedException \Elastica\Exception\InvalidException
  */
 public function testGetParamInvalid()
 {
     $param = new Param();
     $param->getParam('notest');
 }