| 1234567891011121314151617181920212223242526272829303132 | <?php namespace System\Session;class Factory {	/**	 * Create a session driver instance.	 *	 * @param  string  $driver	 * @return Driver	 */	public static function make($driver)	{		switch ($driver)		{			case 'file':				return new Driver\File;			case 'db':				return new Driver\DB;			case 'memcached':				return new Driver\Memcached;			case 'apc':				return new Driver\APC;			default:				throw new \Exception("Session driver [$driver] is not supported.");		}	}}
 |