… variables are of the form HTTP_USER_AGENT. I do not know if this is the right way to do it, but line 19 won't validate as the headers are cleaned up for the HTTP_ prefix but the _ signs are never replaced by -, hence the validation fail. I took the str_replace(array('_', ' ', '.'), '-', strtolower($name)) idea from the file Zend/Http/Headers.php on line 284 as this is the way the $key variable is created. If anyone finds a better way to do it please message me.
… exception when an ACL resource does not exist.
Noticed by @Danielss89 on IRC, it appears that glob() will return boolean false in some cases. To quote a comment from php.net/glob: "If you have open_basedir set in php.ini to limit which files php can execute, glob(...) will return false when there are no matching files. If open_basedir is not set, the very same code will return an empty array in the same situation."
…pleDb + Rackspace
When printing definitions, we should only print the classes, methods, and parameters provided by the current definition. For example, if a DefinitionList has two definitions -- a RuntimeDefinition and an ArrayDefinition loaded from an out-of-date compiled definition -- we should print the good info under the RuntimeDefinition and the stale info under the ArrayDefinition. Passing the current definition into renderClassDefinition() makes this possible. The current implementation (before this patch) ignores the current definition and always queries the DefinitionList for the first definition that has the class defined. In the earlier example, this would print the good info under the ArrayDefinition, which is misleading. This patch also fixes a subtle bug caused by nested calls to the SplDoublyLinkedList iterator. In the current implementation, the render() method iterates over the DefinitionList (which extends SplDoublyLinkedList). In the loop, it calls renderClassDefinition(), which calls the DefinitionList's getMethods() and getMethodParameters() methods. These methods also iterate over the DefinitionList, resetting the current position and causing the outer loop to lose its place. As a result, render() would fail to print all configured definitions in some cases. This patch doesn't query the DefinitionList in renderClassDefinition(), so the outer loop should behave as expected.