本文整理汇总了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);
}
}
示例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));
}
示例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;
}
示例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]]);
}
}