OWeb/manage/SubViews.php
public function getNewSubView($name){
		try{
			$controller = new $name();

			if(! ($controller instanceof \OWeb\types\Controller))
				throw new \OWeb\manage\exceptions\Controller("The class \"".$name."\" isn't an instance of \OWeb\Types\Controller");	
			
			if(!isset($this->subViews[$name]))
				$this->subViews[$name] = $controller;
				
			\OWeb\manage\Events::getInstance()->sendEvent('loaded@OWeb\manage\SubViews',$controller);
			$controller->init();
			return $controller;
			
		}catch(\Exception $ex){
			throw new \OWeb\manage\exceptions\Controller("The SubView : \"".$name."\"couldn't be loaded due to Errors",0,$ex);
		}
	}
public function getNewSubView($name){
		try{
			$controller = new $name();

			if(! ($controller instanceof \OWeb\types\Controller))
				throw new \OWeb\manage\exceptions\Controller("The class \"".$name."\" isn't an instance of \OWeb\Types\Controller");	
			
			if(!isset($this->subViews[$name]))
				$this->subViews[$name] = $controller;
				
			\OWeb\manage\Events::getInstance()->sendEvent('loaded@OWeb\manage\SubViews',$controller);
			$controller->init();
			return $controller;
			
		}catch(\Exception $ex){
			throw new \OWeb\manage\exceptions\Controller("The SubView : \"".$name."\"couldn't be loaded due to Errors",0,$ex);
		}
	}
public function getNewSubView ( $ name ) { try { $ controller = new $ name ( ) ; if ( ! ( $ controller instanceof \ OWeb \ types \ Controller ) ) throw new \ OWeb \ manage \ exceptions \ Controller ( "The class \"" . $ name . "\" isn't an instance of \OWeb\Types\Controller" ) ; if ( ! isset ( $ this -> subViews [ $ name ] ) ) $ this -> subViews [ $ name ] = $ controller ; \ OWeb \ manage \ Events :: getInstance ( ) -> sendEvent ( 'loaded@OWeb\manage\SubViews' , $ controller ) ; $ controller -> init ( ) ; return $ controller ; } catch ( \ Exception $ ex ) { throw new \ OWeb \ manage \ exceptions \ Controller ( "The SubView : \"" . $ name . "\"couldn't be loaded due to Errors" , 0 , $ ex ) ; } }
Will return a new instance of the Controller required as a subview. After
having initialized it.

!! A controller can also be initiated throught manually with new <name> but
it might then need manual initialisation

@param type $name Name of the controller you want to use as a sub view.
@return \Controller The controller that was asked.
@throws \OWeb\manage\exceptions\Controller
Will return a new instance of the Controller required as a subview . After having initialized it .