Symfony\Component\DependencyInjection\Definition::removeMethodCall PHP 메소드

removeMethodCall() 공개 메소드

Removes a method to call after service initialization.
public removeMethodCall ( string $method ) : Definition
$method string The method name to remove
리턴 Definition The current instance
    public function removeMethodCall($method)
    {
        foreach ($this->calls as $i => $call) {
            if ($call[0] === $method) {
                unset($this->calls[$i]);
                break;
            }
        }

        return $this;
    }

Usage Example

예제 #1
0
 /**
  * @param Definition $definition
  */
 private function clearMethodCalls(Definition $definition)
 {
     $methodCall = 'offsetSet';
     while ($definition->hasMethodCall($methodCall)) {
         $definition->removeMethodCall($methodCall);
     }
 }
All Usage Examples Of Symfony\Component\DependencyInjection\Definition::removeMethodCall