Merge pull request #220 from meadsteve/master

remove callable typehint as this is not in php 5.3
This commit is contained in:
Steve B 2013-11-27 00:58:31 -08:00
commit 5b2f66565c

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;