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


PHP SplObjectStorage::detach方法代码示例

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


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

示例1: removeValidator

 /**
  * Removes the specified validator.
  *
  * @param \TYPO3\FLOW3\Validation\Validator\ValidatorInterface $validator The validator to remove
  * @throws \TYPO3\FLOW3\Validation\Exception\NoSuchValidatorException
  * @api
  */
 public function removeValidator(\TYPO3\FLOW3\Validation\Validator\ValidatorInterface $validator)
 {
     if (!$this->validators->contains($validator)) {
         throw new \TYPO3\FLOW3\Validation\Exception\NoSuchValidatorException('Cannot remove validator because its not in the conjunction.', 1207020177);
     }
     $this->validators->detach($validator);
 }
开发者ID:nxpthx,项目名称:FLOW3,代码行数:14,代码来源:AbstractCompositeValidator.php

示例2: remove

 /**
  * @param ConnectionInterface $connection
  */
 public function remove(ConnectionInterface $connection)
 {
     Debug::line(__CLASS__ . ': Remove [');
     $this->storage->detach($connection);
     Debug::line('-- WebSocket connection removed');
     Debug::line(']');
 }
开发者ID:iiifx,项目名称:websocket-connect,代码行数:10,代码来源:WebSocketConnections.php

示例3: handleClose

 /**
  * Handle process on close transport
  *
  * @param \React\Socket\Connection $conn
  */
 public function handleClose(Connection $conn)
 {
     Logger::debug($this, "Raw socket closed " . $conn->getRemoteAddress());
     $session = $this->sessions[$conn];
     $this->sessions->detach($conn);
     $this->router->getEventDispatcher()->dispatch('connection_close', new ConnectionCloseEvent($session));
 }
开发者ID:voryx,项目名称:thruway,代码行数:12,代码来源:RawSocketTransportProvider.php

示例4: removeComparison

 /**
  * Removes the given comparison
  *
  * @param PropertyComparisonInterface $comparison
  * @throws Exception\InvalidComparisonException if the given comparison is not in the list
  * @return $this
  */
 public function removeComparison($comparison)
 {
     if (!$this->comparisons->contains($comparison)) {
         throw new InvalidComparisonException('Can not remove given comparison because it is not in the list', 1409600320);
     }
     $this->comparisons->detach($comparison);
 }
开发者ID:marviktintor,项目名称:pos-1,代码行数:14,代码来源:Filter.php

示例5: detach

 /**
  * 移除观察者
  * @param \SplObserver $observer
  */
 public function detach(\SplObserver $observer)
 {
     if ($this->_observers == null) {
         return;
     }
     $this->_observers->detach($observer);
 }
开发者ID:matyhtf,项目名称:swoole_framework,代码行数:11,代码来源:Observer.php

示例6: removeHandler

 /**
  * Remove the given log message handler if it is registered.
  * 
  * @param LogHandler $handler
  */
 public function removeHandler(LogHandler $handler)
 {
     if ($this->handlers->contains($handler)) {
         $this->handlers->detach($handler);
         $this->enabled = $this->handlers->count() ? true : false;
     }
 }
开发者ID:koolkode,项目名称:async,代码行数:12,代码来源:Logger.php

示例7: detach

 /**
  * 移除监听
  * @param ListenerInterface $listener
  */
 function detach(ListenerInterface $listener)
 {
     if ($this->storage->contains($listener)) {
         $this->storage->detach($listener);
         $this->refreshQueue();
     }
 }
开发者ID:slince,项目名称:event,代码行数:11,代码来源:ListenerPriorityQueue.php

示例8: remove

 /**
  * {@inheritdoc}
  */
 public function remove(TokenInterface $token)
 {
     if ($this->has($token)) {
         $this->pool->detach($token);
         return true;
     }
     return false;
 }
开发者ID:zientalak,项目名称:devicedetector,代码行数:11,代码来源:TokenPool.php

示例9: detach

 /**
  * @param MailboxService $mailbox
  *
  * @return bool
  */
 public function detach(MailboxService $mailbox)
 {
     if ($this->contains($mailbox) === true) {
         $this->mailboxes->detach($mailbox);
         return true;
     }
     return false;
 }
开发者ID:xpwales,项目名称:xpwales-hosting-service,代码行数:13,代码来源:MailboxServiceCollection.php

示例10: removeConnection

 /**
  * @param   string $name
  * @throws  ConnectionException
  */
 public function removeConnection($name)
 {
     if (false !== ($obj = $this->findByName($name))) {
         $this->connections->detach($obj);
     } else {
         throw ConnectionException::NoConnectionDefinedByName($name);
     }
 }
开发者ID:pbergman,项目名称:beanstalk-bundle,代码行数:12,代码来源:Manager.php

示例11: removeBackend

 /**
  * Runs the close() method of a backend and removes the backend
  * from the logger.
  *
  * @param Backend\BackendInterface $backend The backend to remove
  * @return void
  * @throws NoSuchBackendException if the given backend is unknown to this logger
  * @api
  */
 public function removeBackend(Backend\BackendInterface $backend)
 {
     if (!$this->backends->contains($backend)) {
         throw new NoSuchBackendException('Backend is unknown to this logger.', 1229430381);
     }
     $backend->close();
     $this->backends->detach($backend);
 }
开发者ID:cerlestes,项目名称:flow-development-collection,代码行数:17,代码来源:Logger.php

示例12: detach

 /**
  * Detach a autoloadiable
  *
  * @param \Attw\Autoloader\AutoloadableInterface
  */
 public function detach(AutoloadableInterface $autoloadable)
 {
     if (!$this->autoloadables->contains($autoloadable)) {
         throw new \Exception('The autoload hasn\'t been duplicated');
     }
     $this->autoloadables->detach($autoloadable);
     spl_autoload_unregister($autoloadable->getCallable());
 }
开发者ID:attwframework,项目名称:framework,代码行数:13,代码来源:Autoloader.php

示例13: vertices

 /**
  * {@inheritdoc}
  */
 public function vertices()
 {
     $set = $this->getTraversableSplos($this->vertices);
     foreach ($set as $vertex) {
         (yield $vertex);
     }
     $this->walking->detach($set);
 }
开发者ID:sdboyer,项目名称:gliph,代码行数:11,代码来源:AdjacencyList.php

示例14: remove

 /**
  * {@inheritdoc}
  */
 public function remove(ItemInterface $item)
 {
     if ($this->has($item)) {
         $this->children->detach($item);
         $item->setParent(null);
     }
     return $this;
 }
开发者ID:rybakit,项目名称:RybakitNavigationBundle,代码行数:11,代码来源:AbstractItem.php

示例15: stopVisiting

 public function stopVisiting($object)
 {
     $this->visitingSet->detach($object);
     $poppedObject = $this->visitingStack->pop();
     if ($object !== $poppedObject) {
         throw new RuntimeException('Context visitingStack not working well');
     }
 }
开发者ID:ygeneration666,项目名称:ma,代码行数:8,代码来源:SerializationContext.php


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