getClass() public method

Returns the interface name
public getClass ( ) : string
return string
Example #1
0
 protected function addInterfaceInjector(InterfaceInjector $injector, \DOMElement $parent)
 {
     $interface = $this->document->createElement('interface');
     $interface->setAttribute('class', $injector->getClass());
     $this->addMethodCalls($injector->getMethodCalls(), $interface);
     $parent->appendChild($interface);
 }
Example #2
0
 protected function addInterfaceInjector(InterfaceInjector $injector)
 {
     $code = \sprintf("    <interface class=\"%s\">\n", $injector->getClass());
     foreach ($injector->getMethodCalls() as $call) {
         if (count($call[1])) {
             $code .= sprintf("      <call method=\"%s\">\n%s      </call>\n", $call[0], $this->convertParameters($call[1], 'argument', 8));
         } else {
             $code .= sprintf("      <call method=\"%s\" />\n", $call[0]);
         }
     }
     $code .= "    </interface>\n";
     return $code;
 }
Example #3
0
 /**
  * Merges another InterfaceInjector
  *
  * @param InterfaceInjector $injector
  */
 public function merge(InterfaceInjector $injector)
 {
     if ($this->class === $injector->getClass()) {
         foreach ($injector->getMethodCalls() as $call) {
             list($method, $arguments) = $call;
             $this->addMethodCall($method, $arguments);
         }
     }
 }
Example #4
0
 public function addInterfaceInjector(InterfaceInjector $injector)
 {
     $class = $injector->getClass();
     if (isset($this->injectors[$class])) {
         return $this->injectors[$class]->merge($injector);
     }
     $this->injectors[$class] = $injector;
 }