Exemplo n.º 1
0
 /**
  * Consolidate the methods of the prototype.
  *
  * The method creates a single array from the prototype methods and those of its parents.
  *
  * @return array[string]callable
  */
 protected function getConsolidatedMethods()
 {
     if ($this->consolidatedMethods !== null) {
         return $this->consolidatedMethods;
     }
     $methods = $this->methods;
     if ($this->parent) {
         $methods += $this->parent->getConsolidatedMethods();
     }
     return $this->consolidatedMethods = $methods;
 }