Skip to content

Commit

Permalink
Remove Closure version and update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 26, 2013
1 parent 92fdf77 commit c07d4b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Cache/CacheRegistry.php
Expand Up @@ -58,7 +58,7 @@ protected function _throwMissingClassError($class, $plugin) {
* Create the cache engine instance.
*
* Part of the template method for Cake\Utility\ObjectRegistry::load()
* @param string|CacheEngine $class The classname or object to make, or a closure factory.
* @param string|CacheEngine $class The classname or object to make.
* @param array $settings An array of settings to use for the cache engine.
* @return CacheEngine The constructed CacheEngine class.
* @throws Cake\Error\Exception when an object doesn't implement
Expand Down
7 changes: 2 additions & 5 deletions lib/Cake/Log/LogEngineRegistry.php
Expand Up @@ -57,17 +57,14 @@ protected function _throwMissingClassError($class, $plugin) {
* Create the logger instance.
*
* Part of the template method for Cake\Utility\ObjectRegistry::load()
* @param string|LogInterface|Closure $class The classname or object to make, or a closure factory
* @param string|LogInterface $class The classname or object to make.
* @param array $settings An array of settings to use for the logger.
* @return LogEngine The constructed logger class.
* @throws Cake\Error\Exception when an object doesn't implement
* the correct interface.
*/
protected function _create($class, $settings) {
$isObject = is_object($class);
if ($isObject && $class instanceof \Closure) {
$instance = $class();
} elseif ($isObject) {
if (is_object($class)) {
$instance = $class;
}

Expand Down

0 comments on commit c07d4b2

Please sign in to comment.