コード例 #1
0
 public function setUp()
 {
     $container = new phpbb_mock_container_builder();
     $container->set('foo', new StdClass());
     $container->set('bar', new StdClass());
     $this->service_collection = new \phpbb\di\service_collection($container);
     $this->service_collection->add('foo');
     $this->service_collection->add('bar');
     parent::setUp();
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function offsetGet($index)
 {
     if (!$this->is_ordered) {
         $this->sort_services();
     }
     return parent::offsetGet($index);
 }
コード例 #3
0
ファイル: manager.php プロジェクト: phpbb/phpbb
 /**
  * Sets the interval for all text_reparser cron tasks
  *
  * @param int	$interval	Interval in seconds, 0 to disable the cron task
  */
 public function schedule_all($interval)
 {
     // This way we don't construct every registered reparser
     $reparser_array = array_keys($this->reparsers->getArrayCopy());
     foreach ($reparser_array as $reparser) {
         $this->schedule($reparser, $interval);
     }
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  */
 public function current()
 {
     return $this->collection->offsetGet($this->key());
 }