当前位置: 首页>>代码示例>>PHP>>正文


PHP Factory::clear方法代码示例

本文整理汇总了PHP中Aimeos\Controller\Frontend\Factory::clear方法的典型用法代码示例。如果您正苦于以下问题:PHP Factory::clear方法的具体用法?PHP Factory::clear怎么用?PHP Factory::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Aimeos\Controller\Frontend\Factory的用法示例。


在下文中一共展示了Factory::clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testClearSpecific

 public function testClearSpecific()
 {
     $cache = \Aimeos\Controller\Frontend\Factory::setCache(true);
     $context = \TestHelperFrontend::getContext();
     $basket1 = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket');
     $catalog1 = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog');
     \Aimeos\Controller\Frontend\Factory::clear((string) $context, 'basket');
     $basket2 = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket');
     $catalog2 = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog');
     \Aimeos\Controller\Frontend\Factory::setCache($cache);
     $this->assertNotSame($basket1, $basket2);
     $this->assertSame($catalog1, $catalog2);
 }
开发者ID:aimeos,项目名称:ai-controller-frontend,代码行数:13,代码来源:FactoryTest.php

示例2: tearDown

 /**
  * Tears down the fixture, for example, closes a network connection.
  * This method is called after a test is executed.
  *
  * @access protected
  */
 protected function tearDown()
 {
     unset($this->object);
     \Aimeos\Controller\Frontend\Factory::clear();
     \Aimeos\MShop\Factory::clear();
 }
开发者ID:mvnp,项目名称:aimeos-core,代码行数:12,代码来源:DemoTest.php


注:本文中的Aimeos\Controller\Frontend\Factory::clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。