remove callable typehint as this is not in php 5.3

This commit is contained in:
steve.brazier 2013-11-27 08:49:03 +00:00
commit db3fcb45d6

View file

@ -75,7 +75,7 @@ class Factory {
* @throws \InvalidArgumentException
* @internal param mixed $resource
*/
public function registerResource(callable $loader,
public function registerResource($loader,
$name = null,
$type = null
)
@ -86,6 +86,12 @@ class Factory {
);
}
if (!($loader instanceof \Closure)) {
throw new \InvalidArgumentException(
'$loader is expected to be a function'
);
}
$resourceID = $this->getInternalID($type, $name);
$this->container[$resourceID] = $loader;