code: public function define($class, $factory, array $params = array())
  	{
  		if ($params) {
  			$this->params($class, $params);
  		}
  
  		if (!$factory instanceof FactoryInterface) {
  			$factory = Definition::getDefaultForCallable($factory);
  		}
  
  		return $this->factories[$class] = $factory;
  	}
docs: {@inheritdoc}