Check data existence

This commit is contained in:
Dennis Eichhorn 2018-01-07 16:40:16 +01:00
parent 7b212fb8c4
commit 12b750b66a

View File

@ -217,6 +217,20 @@ abstract class RequestAbstract implements MessageInterface
return $this->data[$key] ?? null;
}
/**
* Check if has data.
*
* @param mixed $key Data key
*
* @return bool
*
* @since 1.0.0
*/
public function hasData($key) : bool
{
return isset($this->data[$key]);
}
/**
* Set request data.
*