本文整理汇总了PHP中Eccube\Application::boot方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::boot方法的具体用法?PHP Application::boot怎么用?PHP Application::boot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Eccube\Application
的用法示例。
在下文中一共展示了Application::boot方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
$this->app = new \Eccube\Application(array('env' => 'test'));
$this->app->initialize();
$this->app->boot();
// CSRF tokenを無効にしてFormを作成
$this->form = $this->app['form.factory']->createBuilder('form', null, array('csrf_protection' => false))->add('tel', 'tel')->getForm();
}
示例2: createApplication
/**
* {@inheritdoc}
*/
public function createApplication()
{
$app = new Application();
$app->initialize();
$app['session.test'] = true;
$app['exception_handler']->disable();
$app->boot();
return $app;
}
示例3: __construct
public function __construct(\Eccube\Application $app, $name = null)
{
parent::__construct($name);
$app['debug'] = true;
$app->initialize();
// executeでdump($app)を使いたいので.
$dumper = new \Sorien\Provider\PimpleDumpProvider();
$app->register($dumper, array('dumper' => $dumper));
$app->boot();
$this->app = $app;
}
示例4: createApplication
/**
* {@inheritdoc}
*/
public function createApplication()
{
$app = new Application();
$app->initialize();
$app->initPluginEventDispatcher();
$app['session.test'] = true;
$app['exception_handler']->disable();
$app['form.csrf_provider'] = $app->share(function () {
return new CsrfTokenMock();
});
$app->boot();
return $app;
}
示例5: setUpBeforeClass
public static function setUpBeforeClass()
{
// TODO Abstract にしたい.
$app = new Application();
$app['debug'] = true;
$app->initialize();
$app->initPluginEventDispatcher();
$app['session.test'] = true;
$app['exception_handler']->disable();
$app->boot();
$softDeleteFilter = $app['orm.em']->getFilters()->getFilter('soft_delete');
$softDeleteFilter->setExcludes(array('Eccube\\Entity\\ProductClass'));
// soft_delete filter を有効にする
$config = $app['orm.em']->getConfiguration();
$config->addFilter("soft_delete", '\\Eccube\\Doctrine\\Filter\\SoftDeleteFilter');
$app['orm.em']->getFilters()->enable('soft_delete');
self::$app = $app;
}
示例6: testInstallPluginWithConst
public function testInstallPluginWithConst()
{
#self::markTestSkipped();
// インストールするプラグインを作成する
$tmpname = "dummy" . sha1(mt_rand());
$config = array();
$config['name'] = $tmpname . "_name";
$config['code'] = $tmpname;
$config['version'] = $tmpname . "_version";
$config['const']['A'] = 'A';
$config['const']['C'] = 1;
$tmpdir = $this->createTempDir();
$tmpfile = $tmpdir . '/plugin.tar';
$tar = new \PharData($tmpfile);
$tar->addFromString('config.yml', Yaml::dump($config));
$service = $this->app['eccube.service.plugin'];
// インストールできるか
$this->assertTrue($service->install($tmpfile));
$this->assertTrue((bool) ($plugin = $this->app['eccube.repository.plugin']->findOneBy(array('code' => $tmpname))));
// インストール後disable状態でもconstがロードされているか
$app = new Application();
$app->initialize();
$app->initializePlugin();
$app->boot();
$this->assertEquals('A', $app['config'][$tmpname]['const']['A']);
$this->assertEquals('1', $app['config'][$tmpname]['const']['C']);
// アンインストールできるか
$this->assertTrue($service->uninstall($plugin));
}