コード例 #1
0
 private function _boot(tubepress_spi_addon_Addon $addon)
 {
     $files = $addon->getBootstrapFiles();
     $services = $addon->getBootstrapServices();
     $classes = $addon->getBootstrapClasses();
     if ($this->_shouldLog) {
         if (count($files) > 0) {
             $this->_logger->debug(sprintf('%s add-on defined boot files: %s', $addon->getName(), json_encode($files)));
         }
         if (count($services) > 0) {
             $this->_logger->debug(sprintf('%s add-on defined boot services: %s', $addon->getName(), json_encode($services)));
         }
         if (count($classes) > 0) {
             $this->_logger->debug(sprintf('%s add-on defined boot classes: %s', $addon->getName(), json_encode($classes)));
         }
     }
     foreach ($files as $file) {
         $this->_includeFile($file, $addon);
     }
     foreach ($classes as $class) {
         $this->_bootClass($class, $addon);
     }
     foreach ($services as $service) {
         $this->_bootService($service, $addon);
     }
 }