/** * Execute the components * * @var string $typeOf */ private function execComponents($typeOf) { $routing = new PWEL_ROUTING(); $components = $this->prepareComponent($typeOf); //Execute components at start of function if (!empty($components['start'])) { foreach ($components['start'] as $component) { $component->_execute(); if ($component->_standAlone == false) { $func = self::$componentCalls[$typeOf]; $routing->{$func}(); } else { if (PWEL_ROUTING::$routed == false) { $routing->routeCurrentDir(); } } } } ///////////////////////////////////////// //Execute components at end of function if (!empty($components['end'])) { foreach ($components['end'] as $component) { if ($component->_standAlone == false) { $func = self::$componentCalls[$typeOf]; $routing->{$func}(); } else { if (PWEL_ROUTING::$routed == false) { $routing->routeCurrentDir(); } } $component->_execute(); } } /////////////////////////////////////// }