Ejemplo n.º 1
0
 /**
  * Filter methods
  */
 private function filterMethods()
 {
     foreach ($this->context->getReflection()->getMethods() as $method) {
         if (strpos($method, "SystemContainer") !== FALSE) {
             $match = Strings::match($method, "#.+::([a-zA-Z0-9_]+)#");
             $res = Arrays::get((array) $match, 1, NULL);
             $parameters = $this->getMethodParameters($method->getParameters());
             if (strpos($res, "createServiceNette") !== FALSE) {
                 $this->netteServices[] = $this->buildFunction($res, $parameters);
             } else {
                 if (strpos($res, "createService") !== FALSE) {
                     $this->services[] = $this->buildFunction($res, $parameters);
                 } else {
                     if (strpos($res, "createNette") !== FALSE) {
                         $this->netteServices[] = $this->buildFunction($res, $parameters);
                     } else {
                         if (strpos($res, "create") !== FALSE) {
                             $this->factories[] = $this->buildFunction($res, $parameters);
                         }
                     }
                 }
             }
         }
     }
 }