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


PHP SplObjectStorage::setInfo方法代码示例

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


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

示例1: clearAllCaches

 public static function clearAllCaches()
 {
     self::clearCache();
     self::$__caches->rewind();
     while (self::$__caches->valid()) {
         self::$__caches->setInfo([]);
         self::$__caches->next();
     }
 }
开发者ID:pp3345,项目名称:ppframework,代码行数:9,代码来源:Model.php

示例2: publishEvents

 /**
  * Publishes all registered events to their respective event bus.
  */
 protected function publishEvents()
 {
     $this->logger->debug("Publishing events to the event bus");
     if ($this->dispatcherStatus == self::STATUS_DISPATCHING) {
         // this prevents events from overtaking each other
         $this->logger->debug("UnitOfWork is already in the dispatch process. " . "That process will publish events instead. Aborting...");
         return;
     }
     $this->dispatcherStatus = self::STATUS_DISPATCHING;
     $this->eventsToPublish->rewind();
     while ($this->eventsToPublish->valid()) {
         $bus = $this->eventsToPublish->current();
         $events = $this->eventsToPublish->getInfo();
         foreach ($events as $event) {
             $this->logger->debug("Publishing event [{event}] to event bus [{bus}]", array('event' => $event->getPayloadType(), 'bus' => get_class($bus)));
         }
         // clear and send
         $this->eventsToPublish->setInfo(array());
         $bus->publish($events);
         $this->eventsToPublish->next();
     }
     $this->logger->debug("All events successfully published.");
     $this->dispatcherStatus = self::STATUS_READY;
 }
开发者ID:fcm,项目名称:GovernorFramework,代码行数:27,代码来源:DefaultUnitOfWork.php

示例3: setInfo

 public function setInfo($data)
 {
     $this->initialize();
     parent::setInfo($data);
 }
开发者ID:patrickreck,项目名称:flow-development-collection,代码行数:5,代码来源:LazySplObjectStorage.php

示例4: setInfo

 /**
  * @deprecated Using the SplObjectStorage API on the Crawler is deprecated as of 2.8 and will be removed in 3.0.
  */
 public function setInfo($data)
 {
     @trigger_error('The ' . __METHOD__ . ' method is deprecated as of 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
     parent::setInfo($data);
 }
开发者ID:0mars,项目名称:symfony,代码行数:8,代码来源:Crawler.php

示例5: setInfo

 /**
  * @deprecated Using the SplObjectStorage API on the Crawler is deprecated as of 2.8 and will be removed in 3.0.
  */
 public function setInfo($data)
 {
     $this->triggerDeprecation(__METHOD__);
     parent::setInfo($data);
 }
开发者ID:hudsonventura,项目名称:ModularCore,代码行数:8,代码来源:Crawler.php

示例6: SplObjectStorage

<?php

$s = new SplObjectStorage();
var_dump($s->setInfo('some_value'));
开发者ID:badlamer,项目名称:hhvm,代码行数:4,代码来源:SplObjectStorage_setInfo_empty_storage.php

示例7:

// false
// count()
// 获得映射对象中的对象数量
$obj->count();
// valid()
// 判断对象容器当前指针后面是否有值
$obj->valid();
// key()
// 返回对象容器当前节点的索引
$obj->key();
// rewind()
// 返回并指向第一个节点元素
$obj->rewind();
// setInfo(mixed $data)
// 给当前节点赋值。必须是调用rewind后,才可以用setInfo赋值,否则找不到对象。
$obj->setInfo('AAA');
// getInfo()
// 获得当前节点的值。也必须是调用rewind后,才可以调用getInfo。
$obj->getInfo();
// current()
// 获得当前节点对象
$obj->current();
// getHash()
// 获得参数的hash值
$obj->getHash($a2);
// next()
// 指针移到下一个节点
$obj->next();
// offsetExists
// 判断对象容器中是否存在该对象
$obj->offsetExists($a2);
开发者ID:ray0916,项目名称:learn,代码行数:31,代码来源:splObjectStorage.php

示例8: SplObjectStorage

<?php

$s = new SplObjectStorage();
var_dump($s->setInfo());
开发者ID:badlamer,项目名称:hhvm,代码行数:4,代码来源:SplObjectStorage_setInfo_invalid_parameter.php

示例9: setInfo

 /**
  * Sets the data associated with the current iterator entry
  * 
  * @param mixed $data
  */
 protected function setInfo($data)
 {
     $this->filled = true;
     parent::setInfo($data);
 }
开发者ID:jasny,项目名称:social,代码行数:10,代码来源:Result.php


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