示例#1
0
 /**
  * Closes all clients
  */
 public function closeAll()
 {
     /** @var Client $client */
     foreach ($this->clients as $client) {
         $client->close();
     }
     $this->clients->removeAll($this->clients);
 }
示例#2
0
 /**
  * Remove all objects from this storage, which contained in another storage
  * @param  \SplObjectStorage $obj
  * @return void
  */
 public function removeAll($obj = null)
 {
     if ($obj === null) {
         $this->removeAllExcept(new \SplObjectStorage());
     }
     parent::removeAll($obj);
 }
示例#3
0
 /**
  * @param \SplObjectStorage $object
  * @throws Exception\WrongArgument
  */
 public function removeAll($object)
 {
     if (!$object instanceof SMSCollection) {
         throw new Exception\WrongArgument();
     }
     parent::removeAll($object);
 }
 public function removeAll($storage)
 {
     $this->initialize();
     parent::removeAll($storage);
 }
示例#5
0
文件: Crawler.php 项目: 0mars/symfony
 /**
  * @deprecated Using the SplObjectStorage API on the Crawler is deprecated as of 2.8 and will be removed in 3.0.
  */
 public function removeAll($storage)
 {
     @trigger_error('The ' . __METHOD__ . ' method is deprecated as of 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
     parent::removeAll($storage);
 }
示例#6
0
 /**
  * Detach all documents from pool
  * @return \Sokil\Mongo\Persistence
  */
 public function clear()
 {
     $this->pool->removeAll($this->pool);
     return $this;
 }
示例#7
0
 /**
  * @deprecated Using the SplObjectStorage API on the Crawler is deprecated as of 2.8 and will be removed in 3.0.
  */
 public function removeAll($storage)
 {
     $this->triggerDeprecation(__METHOD__);
     parent::removeAll($storage);
 }
示例#8
0
 /**
  * @param \SplObjectStorage $storage
  */
 public function removeAll($storage)
 {
     parent::removeAll($storage);
     $this->unreferenced->removeAll($storage);
 }
示例#9
0
 /**
  * {@inheritdoc}
  */
 public function removeAll()
 {
     $this->pool->removeAll($this->pool);
     return true;
 }
<?php

$data_provider = array(array(), true, "string", 12345, 1.2345, NULL);
foreach ($data_provider as $input) {
    $s = new SplObjectStorage();
    var_dump($s->removeAll($input));
}
示例#11
0
 /**
  * @param  string $event
  * @return void
  */
 public function clearListeners($event)
 {
     $this->listeners = new \SplPriorityQueue();
     $this->commands->removeAll();
 }