芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/airport-back/vendor/codeception/codeception/src/Codeception/Command/Build.php
output = $output; $this->buildActorsForConfig(); return 0; } private function buildActor(array $settings) { $actorGenerator = new ActorGenerator($settings); $this->output->writeln( '
' . Configuration::config()['namespace'] . '\\' . $actorGenerator->getActorName() . "
includes modules: " . implode(', ', $actorGenerator->getModules()) ); $content = $actorGenerator->produce(); $file = $this->createDirectoryFor( Configuration::supportDir(), $settings['actor'] ) . $this->getShortClassName($settings['actor']); $file .= '.php'; return $this->createFile($file, $content); } private function buildActions(array $settings) { $actionsGenerator = new ActionsGenerator($settings); $content = $actionsGenerator->produce(); $this->output->writeln( " -> {$settings['actor']}Actions.php generated successfully. " . $actionsGenerator->getNumMethods() . " methods added" ); $file = $this->createDirectoryFor(Configuration::supportDir() . '_generated', $settings['actor']); $file .= $this->getShortClassName($settings['actor']) . 'Actions.php'; return $this->createFile($file, $content, true); } private function buildSuiteActors() { $suites = $this->getSuites(); if (!empty($suites)) { $this->output->writeln("
Building Actor classes for suites: " . implode(', ', $suites) . '
'); } foreach ($suites as $suite) { $settings = $this->getSuiteConfig($suite); if (!$settings['actor']) { continue; // no actor } $this->buildActions($settings); $actorBuilt = $this->buildActor($settings); if ($actorBuilt) { $this->output->writeln("{$settings['actor']}.php created."); } } } protected function buildActorsForConfig($configFile = null) { $config = $this->getGlobalConfig($configFile); $dir = Configuration::projectDir(); $this->buildSuiteActors(); foreach ($config['include'] as $subConfig) { $this->output->writeln("\n
Included Configuration: $subConfig
"); $this->buildActorsForConfig($dir . DIRECTORY_SEPARATOR . $subConfig); } } }