Skip to content

Commit

Permalink
[HttpFoundation] added a keys() method to *Bag classes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Aug 26, 2010
1 parent 5a87f81 commit 0867080
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Symfony/Component/HttpFoundation/HeaderBag.php
Expand Up @@ -48,6 +48,16 @@ public function all()
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.
*
Expand Down
10 changes: 10 additions & 0 deletions src/Symfony/Component/HttpFoundation/ParameterBag.php
Expand Up @@ -40,6 +40,16 @@ public function all()
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.
*
Expand Down

0 comments on commit 0867080

Please sign in to comment.