Initiates Symfony Console Application.

@param string $name
@param string $version
768752
private function initConsole(string $name, string $version)
    {
        $this->console = $this->container->get(SymfonyConsoleApplication::class);
        $this->console->setName($name);
        $this->console->setVersion($version);
        $this->console->setCatchExceptions(false);
        $this->console->setAutoExit(false);

        /** @var CommandCollectionContract $commands */
        $commands = $this->container->get(CommandCollectionContract::class);
        foreach ($commands as $command) {
            $this->console->add($this->resolveCommand($command));
        }
    }
795350
public function activate($versionNumber, $oldVersionNumber = '')
    {
        $templatesManager = $this->framework->getInstance('\\Zepi\\Web\\General\\Manager\\TemplatesManager');
        
        // Form
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Form', $this->directory . '/templates/Form/form.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Group', $this->directory . '/templates/Form/group.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\ButtonGroup', $this->directory . '/templates/Form/button-group.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\ErrorBox', $this->directory . '/templates/Form/error-box.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Base', $this->directory . '/templates/Form/Field/base.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\NoSpace', $this->directory . '/templates/Form/Field/no-space.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Blank', $this->directory . '/templates/Form/Field/blank.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Abstract', $this->directory . '/templates/Form/Field/abstract.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Text', $this->directory . '/templates/Form/Field/text.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Email', $this->directory . '/templates/Form/Field/email.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Hidden', $this->directory . '/templates/Form/Field/hidden.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Number', $this->directory . '/templates/Form/Field/number.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\UnitNumber', $this->directory . '/templates/Form/Field/unitnumber.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\IpField', $this->directory . '/templates/Form/Field/ip-field.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Price', $this->directory . '/templates/Form/Field/price.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Select', $this->directory . '/templates/Form/Field/select.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Checkbox', $this->directory . '/templates/Form/Field/checkbox.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Textarea', $this->directory . '/templates/Form/Field/textarea.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Password', $this->directory . '/templates/Form/Field/password.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Button', $this->directory . '/templates/Form/Field/button.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\Selector', $this->directory . '/templates/Form/Field/selector.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\DynamicZone', $this->directory . '/templates/Form/Field/dynamic-zone.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Field\\EntitySelect', $this->directory . '/templates/Form/Field/entity-select.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Form\\Snippet\\SelectorItem', $this->directory . '/templates/Form/Snippet/selector-item.phtml');
        
        // Table
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Table', $this->directory . '/templates/table.phtml');
        
        // Overview page
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\OverviewPageSection', $this->directory . '/templates/overviewpage.section.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\OverviewPageItems', $this->directory . '/templates/overviewpage.items.phtml');
        
        // Pagination
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Pagination', $this->directory . '/templates/pagination.phtml');
        
        // Layouts
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Layout\\Page', $this->directory . '/templates/Layout/page.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Layout\\Row', $this->directory . '/templates/Layout/row.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Layout\\Column', $this->directory . '/templates/Layout/column.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Layout\\Tabs', $this->directory . '/templates/Layout/tabs.phtml');
        $templatesManager->addTemplate('\\Zepi\\Web\\UserInterface\\Templates\\Layout\\Tab', $this->directory . '/templates/Layout/tab.phtml');
        
        // Add the assets
        $assetManager = $this->framework->getInstance('\\Zepi\\Web\\General\\Manager\\AssetManager');
        $assetManager->addAsset(AssetManager::JS, 'ui-tabs', $this->directory . '/assets/js/tabs.js', array('zt-main'));
        $assetManager->addAsset(AssetManager::JS, 'ui-responsive-tabs', $this->directory . '/assets/vendor/bootstrap-responsive-tabs/js/responsive-tabs.js', array('ui-tabs'));
        $assetManager->addAsset(AssetManager::JS, 'ui-form-fields', $this->directory . '/assets/js/form-fields.js', array('zt-main'));
        $assetManager->addAsset(AssetManager::JS, 'ui-dynamic-zone', $this->directory . '/assets/js/dynamicZone.js', array('zt-main'));
        $assetManager->addAsset(AssetManager::JS, 'ui-jquery-mask', $this->directory . '/assets/vendor/jquery-maskmoney/jquery.maskMoney.js', array('zt-main'));
        
        $assetManager->addAsset(AssetManager::CSS, 'ui-form', $this->directory . '/assets/css/form.css', array('zt-form'));
        $assetManager->addAsset(AssetManager::JS, 'ui-selector', $this->directory . '/assets/js/selector.js', array('zt-main'));
        $assetManager->addAsset(AssetManager::JS, 'ui-ip-field', $this->directory . '/assets/js/ip-field.js', array('zt-main'));
        
        $assetManager->addAsset(AssetManager::CSS, 'ui-spin', $this->directory . '/assets/css/spin.css', array('zt-form'));

        $assetManager->addAsset(AssetManager::CSS, 'ui-jquery-is-loading-css', $this->directory . '/assets/css/is-loading.css', array('ui-form'));
        $assetManager->addAsset(AssetManager::JS, 'ui-jquery-is-loading', $this->directory . '/assets/vendor/is-loading/jquery.isloading.js', array('zt-main'));
        $assetManager->addAsset(AssetManager::JS, 'ui-loading-helper', $this->directory . '/assets/js/loadingHelper.js', array('ui-jquery-is-loading'));
        
        $assetManager->addAsset(AssetManager::CSS, 'ui-datatables-css', 'vendor/datatables/datatables/media/css/dataTables.bootstrap.min.css', array('ui-form'));
        $assetManager->addAsset(AssetManager::CSS, 'ui-datatables-responsive-css', 'vendor/drmonty/datatables-responsive/css/dataTables.responsive.min.css', array('ui-datatables-css'));
        $assetManager->addAsset(AssetManager::CSS, 'ui-datatables-responsive-bootstrap-css', 'vendor/drmonty/datatables-responsive/css/responsive.bootstrap.min.css', array('ui-datatables-responsive-css'));
        $assetManager->addAsset(AssetManager::JS, 'ui-datatables-js', 'vendor/datatables/datatables/media/js/jquery.dataTables.js', array('zt-main'));
        $assetManager->addAsset(AssetManager::JS, 'ui-datatables-bootstrap-js', 'vendor/datatables/datatables/media/js/dataTables.bootstrap.js', array('ui-datatables-js'));
        $assetManager->addAsset(AssetManager::JS, 'ui-datatables-responsive-js', 'vendor/drmonty/datatables-responsive/js/dataTables.responsive.js', array('ui-datatables-bootstrap-js'));
        $assetManager->addAsset(AssetManager::JS, 'ui-datatables-responsive-bootstrap-js', 'vendor/drmonty/datatables-responsive/js/responsive.bootstrap.js', array('ui-datatables-responsive-js'));
        $assetManager->addAsset(AssetManager::JS, 'ui-datatables-initialization-js', $this->directory . '/assets/js/dataTables.js', array('ui-datatables-js'));
        
        $assetManager->addAsset(AssetManager::CSS, 'ui-selectize-bootstrap-css', 'vendor/grimmlink/selectize/dist/css/selectize.bootstrap3.css', array('ui-form'));
        $assetManager->addAsset(AssetManager::JS, 'ui-selectize-js', 'vendor/grimmlink/selectize/dist/js/standalone/selectize.js', array('zt-main'));
        
        // Register the event handler
        $runtimeManager = $this->framework->getRuntimeManager();
        $runtimeManager->addEventHandler('\\Zepi\\Web\\UserInterface\\Event\\LoadData', '\\Zepi\\Web\\UserInterface\\EventHandler\\LoadData');
        
        // Register the route
        $routeManager = $this->framework->getRouteManager();
        $routeManager->addRoute('user-interface|load-data|[s:token]', '\\Zepi\\Web\\UserInterface\\Event\\LoadData');
    }
2687
public function enable($name)
    {
        // Check if exists
        if (!$this->downloaded($name)) {
            throw new Exceptions\HookNotFoundException("Hook [{$name}] not found.");
        }

        if (!$this->installed($name)) {
            throw new Exceptions\HookNotInstalledException("Hook [{$name}] not installed.");
        }

        if ($this->enabled($name)) {
            throw new Exceptions\HookAlreadyEnabledException("Hook [{$name}] already enabled.");
        }

        $hook = $this->hook($name);

        $hook->loadJson();

        event(new Events\EnablingHook($hook));

        $this->hooks[$name]->update(['enabled' => true]);

        $this->remakeJson();

        event(new Events\EnabledHook($hook));
    }
613040
public function main(string $name = '')
    {
        parent::main();

        $path = Configure::readOrFail('CsvMigrations.modules.path');
        Utility::validatePath($path);

        $selection = $this->selection($path);
        $selection = $this->normalize($selection);
        $this->validate(implode('', $selection), $path);

        $this->bakeModuleConfig($selection, $path);
        $this->bakeDatabaseConfig($selection, $path);
    }
165945
public function recordInstall($package, $version)
    {
        $url = sprintf($this->extendSite . $this->urls['install'], $package, $version);

        try {
            $this->client->head($url);
        } catch (RequestException $e) {
            $this->loggerSystem->critical($e->getMessage(), ['event' => 'exception', 'exception' => $e]);
        }
    }
1221830
public static function call($name, $arguments = []) {
		if (self::exists($name)) {
			$application = Application::get();
			$classname = 'Hook_' . ucfirst($application->name);
			call_user_func_array([$classname, $name], $arguments);
		} else {
			throw new \Exception('Hook is not defined');
		}
	}
1282737
public function execUp(string $name): void{
        DB::connection('default')->table('migrations')->insert(['name' => $name]);
        $this->up();
    }
1012625
private function loadLanguageFile($name)
    {
        /** @var System $system */
        $system = $this->framework->getAdapter(System::class);
        $system->loadLanguageFile($name);
    }
312850
protected function postProcess($packageName, Version $version)
    {
        $this->comment('Processing package...');

        $specials = $this->resolver->specials($packageName, $version);

        if ($specials === false) {
            $this->info("No Service Providers and Facades found. Assuming that package is not designed for Laravel");
            $this->info('Finishing');
            exit;
        }

        if ($this->resolver->isProvidesJsonDetected()) {
            $this->comment('provides.json detected');
        }

        if (count($specials['providers'])) {
            $this->comment('Found ' . count($specials['providers']) . ' service providers:');
            foreach ($specials['providers'] as $i => $p) {
                $this->info("[" . ($i + 1) . "] {$p}");
                $this->config->addProvider($p);
            }
        }
        if (count($specials['aliases'])) {
            $this->comment('Found ' . count($specials['aliases']) . ' aliases:');
            foreach ($specials['aliases'] as $i => $alias) {
                $this->info("[" . ($i + 1) . "] {$alias['facade']} [{$alias['alias']}]");
                $this->config->addAlias($alias['alias'], $alias['facade']);
            }
        }

        // publish configs and assets
        try {
            $this->call('config:publish', array('package' => $packageName));
        } catch (Exception $e) {
            $this->comment($e->getMessage());
        }
        try {
            $this->call('asset:publish', array('package' => $packageName));
        } catch (Exception $e) {
            $this->comment($e->getMessage());
        }

    }
594274
public function skip(AssetTypeInterface $assetType, $name, $version)
    {
        try {
            $cVersion = $assetType->getVersionConverter()->convertVersion($version);
            $normalizedVersion = $this->versionParser->normalize($cVersion);
        } catch (\Exception $ex) {
            return true;
        }

        if (false !== $this->skipByPattern() && $this->forceSkipVersion($normalizedVersion)) {
            return true;
        }

        return $this->doSkip($name, $normalizedVersion);
    }
333294
public function js($name,$version = false) {
		$cdn = false;
		if ($name[0] === '>') {
			$name[0] = '';
			$name = trim($name);
			$cdn = true;		
		}
		if(strpos($name, '::')=== false){
			$name .='::';
		} 
		list($name,$ver) = explode('::',$name); 
		
		
		
		$name = call_user_func(RitaTools::libRepo($name),$cdn, $name[1]);
	
		pr($name);	
	
		//	return LibRepo::$name(RitaTools::inLocalhost(),$version);	
	}
43864
public function activate($versionNumber, $oldVersionNumber = '')
    {
        // Configuration
        $configurationManager = $this->framework->getInstance('\\Zepi\\Core\\Utils\\Manager\\ConfigurationManager');
        $configurationManager->addSettingIfNotSet('mailer.type', 'sendmail');
        $configurationManager->addSettingIfNotSet('mailer.sendmailCommand', '/usr/sbin/sendmail -bs');
        $configurationManager->addSettingIfNotSet('mailer.smtpHost', '');
        $configurationManager->addSettingIfNotSet('mailer.smtpPort', 25);
        $configurationManager->addSettingIfNotSet('mailer.smtpUsername', '');
        $configurationManager->addSettingIfNotSet('mailer.smtpPassword', '');
        $configurationManager->addSettingIfNotSet('mailer.sendFrom', 'info@turbo.local');
        $configurationManager->addSettingIfNotSet('mailer.sendFromName', 'zepi Turbo');
        $configurationManager->saveConfigurationFile();
    }
799042
public static function run($version, $deployFile)
    {
        // Init Deployer
        $console = new Application('Deployer', $version);
        $input = new ArgvInput();
        $output = new ConsoleOutput();
        $deployer = new self($console);

        // Pretty-print uncaught exceptions in symfony-console
        set_exception_handler(function ($e) use ($input, $output, $deployer) {
            $io = new SymfonyStyle($input, $output);
            $io->block($e->getMessage(), get_class($e), 'fg=white;bg=red', ' ', true);
            $io->block($e->getTraceAsString());

            $deployer->logger->log('['. get_class($e) .'] '. $e->getMessage());
            $deployer->logger->log($e->getTraceAsString());
            exit(1);
        });

        // Require deploy.php file
        if (is_readable($deployFile)) {
            // Prevent variable leak into deploy.php file
            call_user_func(function () use ($deployFile) {
                require $deployFile;
            });
        }

        // Run Deployer
        $deployer->init();
        $console->run($input, $output);
    }
785499
public static function init(EntityManagerInterface $entityManager, $name = '') {
        Debugger::getBar()->addPanel(new static($entityManager->getConnection()->getConfiguration(), $name));
    }
947042
public static function build($name, $version, $description)
    {
        $api = new static();
        $api->name = $name;
        $api->apiVersion = $version;
        $api->description = $description;

        return $api;
    }
1355398
public function activate($versionNumber, $oldVersionNumber = '')
    {
        $runtimeManager = $this->framework->getRuntimeManager();
        $runtimeManager->addEventHandler('\\Zepi\\Turbo\\Event\\FinalizeOutput', '\\Zepi\\Core\\Defaults\\EventHandler\\DefaultOutputRenderer', 9999);
        $runtimeManager->addEventHandler('\\Zepi\\Turbo\\Event\\RouteNotFound', '\\Zepi\\Core\\Defaults\\EventHandler\\DefaultRouteNotFound', 9999);
    }
768125
public function install($name, $version = 'dev-master', $type = 'composer', $subtree = false)
    {
        $installer = new Installer($name, $version, $type, $subtree);

        return $installer->run();
    }