public function create($sMethod = null) {
		
		/*
		 * If no method passed, use default
		 */
		if (empty($sMethod)) {
			$sMethod = self::$sDefaultMechanism;
		}

		/*
		 * check if passed name is an registered method
		 */
		if (array_search($sMethod, $this->aRegisteredMechanisms) === false) {
			throw new Exception('Unknown caching mechanism');
		}
		
		/*
		 * If caching mechanism not initialised, create new
		 */
		if (!isset($this->aCacheInstance[$sMethod])) {

            /** @noinspection PhpIncludeInspection */
            require_once dirname ( __FILE__ ) . '/' . $sMethod . '.php';
			
			$sClassName = '\phpCache\\' . $sMethod;

            /** @noinspection PhpUndefinedMethodInspection */
            $this->aCacheInstance[$sMethod] = new $sClassName();
			
		} 
		
		return $this->aCacheInstance[$sMethod];
	}
public function create($sMethod = null) {
		
		/*
		 * If no method passed, use default
		 */
		if (empty($sMethod)) {
			$sMethod = self::$sDefaultMechanism;
		}

		/*
		 * check if passed name is an registered method
		 */
		if (array_search($sMethod, $this->aRegisteredMechanisms) === false) {
			throw new Exception('Unknown caching mechanism');
		}
		
		/*
		 * If caching mechanism not initialised, create new
		 */
		if (!isset($this->aCacheInstance[$sMethod])) {

            /** @noinspection PhpIncludeInspection */
            require_once dirname ( __FILE__ ) . '/' . $sMethod . '.php';
			
			$sClassName = '\phpCache\\' . $sMethod;

            /** @noinspection PhpUndefinedMethodInspection */
            $this->aCacheInstance[$sMethod] = new $sClassName();
			
		} 
		
		return $this->aCacheInstance[$sMethod];
	}
public function create ( $ sMethod = null ) { /*
		 * If no method passed, use default
		 */ if ( empty ( $ sMethod ) ) { $ sMethod = self :: $ sDefaultMechanism ; } /*
		 * check if passed name is an registered method
		 */ if ( array_search ( $ sMethod , $ this -> aRegisteredMechanisms ) === false ) { throw new Exception ( 'Unknown caching mechanism' ) ; } /*
		 * If caching mechanism not initialised, create new
		 */ if ( ! isset ( $ this -> aCacheInstance [ $ sMethod ] ) ) { /** @noinspection PhpIncludeInspection */ require_once dirname ( __FILE__ ) . '/' . $ sMethod . '.php' ; $ sClassName = '\phpCache\\' . $ sMethod ; /** @noinspection PhpUndefinedMethodInspection */ $ this -> aCacheInstance [ $ sMethod ] = new $ sClassName ( ) ; } return $ this -> aCacheInstance [ $ sMethod ] ; }
Create and return caching mechanism object according to passed name
@param string $sMethod
@return Apc,File,Memcached,Session,Variable
@throws Exception
Create and return caching mechanism object according to passed name