[HttpFoundation] added a keys() method to *Bag classes
This commit is contained in:
parent
5a87f81a79
commit
086708003a
@ -48,6 +48,16 @@ class HeaderBag
|
|||||||
return $this->headers;
|
return $this->headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the parameter keys.
|
||||||
|
*
|
||||||
|
* @return array An array of parameter keys
|
||||||
|
*/
|
||||||
|
public function keys()
|
||||||
|
{
|
||||||
|
return array_keys($this->headers);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces the current HTTP headers by a new set.
|
* Replaces the current HTTP headers by a new set.
|
||||||
*
|
*
|
||||||
|
@ -40,6 +40,16 @@ class ParameterBag
|
|||||||
return $this->parameters;
|
return $this->parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the parameter keys.
|
||||||
|
*
|
||||||
|
* @return array An array of parameter keys
|
||||||
|
*/
|
||||||
|
public function keys()
|
||||||
|
{
|
||||||
|
return array_keys($this->parameters);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces the current parameters by a new set.
|
* Replaces the current parameters by a new set.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user