classes/Factory/Definition.php
public static function getDefaultForCallable($callable, array $params = array())
	{
		if ($callable instanceof Closure) {
			$factory = new static($callable, 'closure');
			$factory->addOptionalClassArgument('$container', 'Autarky\Container\ContainerInterface');
			return $factory->getFactory($params);
		}

		return static::getFromReflection($callable, null)
			->getFactory($params);
	}
public static function getDefaultForCallable($callable, array $params = array())
	{
		if ($callable instanceof Closure) {
			$factory = new static($callable, 'closure');
			$factory->addOptionalClassArgument('$container', 'Autarky\Container\ContainerInterface');
			return $factory->getFactory($params);
		}

		return static::getFromReflection($callable, null)
			->getFactory($params);
	}
Get a default factory for a callable.

@param  callable $callable
@param  array    $params   Optional

@return FactoryInterface