コード例 #1
0
ファイル: Kumite.php プロジェクト: lwc/kumite
 public static function setup($configuration)
 {
     if (!isset($configuration['storageAdapter'])) {
         throw new Exception('Missing storageAdapter configuration');
     }
     if (!isset($configuration['tests'])) {
         throw new Exception('Missing tests configuration');
     }
     $cookieAdapter = new Kumite\Adapters\PhpCookieAdapter();
     if (isset($configuration['cookieAdapter'])) {
         $cookieAdapter = $configuration['cookieAdapter'];
     }
     $storageAdapter = $configuration['storageAdapter'];
     $testConfig = $configuration['tests'];
     self::$instance = new Kumite\Controller($cookieAdapter, $storageAdapter, $testConfig);
 }