src/Mouf/MoufManager.php
public function createInstance($className, $mode = self::DECLARE_ON_EXIST_EXCEPTION) {
		// FIXME: mode is useless here! We are creating an anonymous instance!
		$className = ltrim($className, "\\");
		$name = $this->getFreeAnonymousName();
		$this->declareComponent($name, $className, false, $mode);
		$this->setInstanceAnonymousness($name, true);
		return $this->getInstanceDescriptor($name);
	}
public function createInstance($className, $mode = self::DECLARE_ON_EXIST_EXCEPTION) {
		// FIXME: mode is useless here! We are creating an anonymous instance!
		$className = ltrim($className, "\\");
		$name = $this->getFreeAnonymousName();
		$this->declareComponent($name, $className, false, $mode);
		$this->setInstanceAnonymousness($name, true);
		return $this->getInstanceDescriptor($name);
	}
public function createInstance ( $ className , $ mode = self :: DECLARE_ON_EXIST_EXCEPTION ) { // FIXME: mode is useless here! We are creating an anonymous instance!
 $ className = ltrim ( $ className , "\\" ) ; $ name = $ this -> getFreeAnonymousName ( ) ; $ this -> declareComponent ( $ name , $ className , false , $ mode ) ; $ this -> setInstanceAnonymousness ( $ name , true ) ; return $ this -> getInstanceDescriptor ( $ name ) ; }
Creates a new instance and returns the instance descriptor.
@param string $className The name of the class of the instance.
@param int $mode Depending on the mode, the behaviour will be different if an instance with the same name already exists.
@return MoufInstanceDescriptor
Creates a new instance and returns the instance descriptor .