本文整理匯總了PHP中Eccube\Application::initPluginEventDispatcher方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::initPluginEventDispatcher方法的具體用法?PHP Application::initPluginEventDispatcher怎麽用?PHP Application::initPluginEventDispatcher使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Eccube\Application
的用法示例。
在下文中一共展示了Application::initPluginEventDispatcher方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createApplication
/**
* {@inheritdoc}
*/
public function createApplication()
{
$app = new Application();
$app->initialize();
$app->initPluginEventDispatcher();
$app['session.test'] = true;
$app['exception_handler']->disable();
$app->boot();
return $app;
}
示例2: 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;
}
示例3: 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;
}