當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Definition::removeMethodCall方法代碼示例

本文整理匯總了PHP中Symfony\Component\DependencyInjection\Definition::removeMethodCall方法的典型用法代碼示例。如果您正苦於以下問題:PHP Definition::removeMethodCall方法的具體用法?PHP Definition::removeMethodCall怎麽用?PHP Definition::removeMethodCall使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\DependencyInjection\Definition的用法示例。


在下文中一共展示了Definition::removeMethodCall方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: clearMethodCalls

 /**
  * @param Definition $definition
  */
 private function clearMethodCalls(Definition $definition)
 {
     $methodCall = 'offsetSet';
     while ($definition->hasMethodCall($methodCall)) {
         $definition->removeMethodCall($methodCall);
     }
 }
開發者ID:blazarecki,項目名稱:lug,代碼行數:10,代碼來源:ConvertServiceRegistryPass.php

示例2: loadDocumentManagerBundlesMappingInformation

 /**
  * Loads an ODM document managers bundle mapping information.
  *
  * There are two distinct configuration possibilities for mapping information:
  *
  * 1. Specify a bundle and optionally details where the entity and mapping information reside.
  * 2. Specify an arbitrary mapping location.
  *
  * @example
  *
  *  doctrine.orm:
  *     mappings:
  *         MyBundle1: ~
  *         MyBundle2: yml
  *         MyBundle3: { type: annotation, dir: Documents/ }
  *         MyBundle4: { type: xml, dir: Resources/config/doctrine/mapping }
  *         MyBundle5:
  *             type: yml
  *             dir: [bundle-mappings1/, bundle-mappings2/]
  *             alias: BundleAlias
  *         arbitrary_key:
  *             type: xml
  *             dir: %kernel.dir%/../src/vendor/DoctrineExtensions/lib/DoctrineExtensions/Documents
  *             prefix: DoctrineExtensions\Documents\
  *             alias: DExt
  *
  * In the case of bundles everything is really optional (which leads to autodetection for this bundle) but
  * in the mappings key everything except alias is a required argument.
  *
  * @param array $documentManager A configured ODM entity manager.
  * @param Definition A Definition instance
  * @param ContainerBuilder $container A ContainerBuilder instance
  */
 protected function loadDocumentManagerBundlesMappingInformation(array $documentManager, Definition $odmConfigDef, ContainerBuilder $container)
 {
     // reset state of drivers and alias map. They are only used by this methods and children.
     $this->drivers = array();
     $this->aliasMap = array();
     $this->loadMappingInformation($documentManager, $container);
     $this->registerMappingDrivers($documentManager, $container);
     if ($odmConfigDef->hasMethodCall('setDocumentNamespaces')) {
         // TODO: Can we make a method out of it on Definition? replaceMethodArguments() or something.
         $calls = $odmConfigDef->getMethodCalls();
         foreach ($calls as $call) {
             if ($call[0] == 'setDocumentNamespaces') {
                 $this->aliasMap = array_merge($call[1][0], $this->aliasMap);
             }
         }
         $method = $odmConfigDef->removeMethodCall('setDocumentNamespaces');
     }
     $odmConfigDef->addMethodCall('setDocumentNamespaces', array($this->aliasMap));
 }
開發者ID:hellovic,項目名稱:symfony,代碼行數:52,代碼來源:DoctrineMongoDBExtension.php

示例3: removeMethodCall

 /**
  * Remove a method to call after service initialization.
  *
  * @param string $method The method name to remove
  *
  * @return tubepress_api_ioc_DefinitionInterface The current instance
  *
  * @api
  * @since 4.0.0
  */
 public function removeMethodCall($method)
 {
     $this->_underlyingSymfonyDefinition->removeMethodCall($method);
     return $this;
 }
開發者ID:tubepress,項目名稱:tubepress,代碼行數:15,代碼來源:Definition.php

示例4: processBootstrapProfileConfigurationScalarReplacementElement

 /**
  * @param array      $bootstrapProfileConfig
  * @param string     $key
  * @param Definition $bootstrapProfileDefinition
  * @param string     $method
  */
 private static function processBootstrapProfileConfigurationScalarReplacementElement(array $bootstrapProfileConfig, $key, Definition $bootstrapProfileDefinition, $method)
 {
     if (isset($bootstrapProfileConfig[$key])) {
         $bootstrapProfileDefinition->removeMethodCall($method);
         $bootstrapProfileDefinition->addMethodCall($method, [$bootstrapProfileConfig[$key]]);
     }
 }
開發者ID:EXSyst,項目名稱:WorkerBundle,代碼行數:13,代碼來源:EXSystWorkerExtension.php


注:本文中的Symfony\Component\DependencyInjection\Definition::removeMethodCall方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。