Main method for this task (call default).

@return void
343933
public function execute() {
		$this->out(__d('cake_notify', 'Clear notifications in progress...'), 1, Shell::NORMAL);
		if ($this->Notification->clearNotifications()) {
			$this->out('<success>' . __d('cake_notify', 'Notifications clear successfully.') . '</success>', 1, Shell::NORMAL);
		} else {
			$this->out('<error>' . __d('cake_notify', 'Notifications clear unsuccessfully.') . '</error>');
		}
	}
794533
public static function start() : void
  {
    $required = Config::$environment;
    $dotenv   = new Dotenv(Config::$root);

    $dotenv->overload();
    $dotenv->required($required);
  }
203298
public function main()
    {
        $this->loadModel('CakeManager.Users');

        $email = $this->in('Enter the e-mailaddress');

        $password = $this->in('Enter the password');

        $data = [
            'email' => $email,
            'password' => $password,
        ];

        $new = $this->Users->newEntity($data);

        $new->set('role_id', 1);
        $new->set('active', 1);

        if ($this->Users->save($new)) {
            $this->out('The user "' . $email . '" has been created.');
            return true;
        }

        $this->out('Someting went wrong. The user could not be saved. We will debug the validation errors...');

        if ($new->errors()) {
            $errors = $new->errors();
            foreach ($errors as $key => $error) {
                foreach ($error as $message) {
                    $this->out($key . ': ' . ($message));
                }
            }
        }

        return false;
    }
728231
public static function main()
    {
        $cli = new static();
        
        // Initialize arguments from factory method.
        $arguments = $cli->setupArguments();
        
        // Add help flag.
        $arguments->addFlag(array('help', 'h'), 'Show help screen.');
        
        // Add verbose flag.
        $arguments->addFlag(array('verbose', 'v'), 'Verbose mode.');
        
        // Parse arguments and provide to implementation.
        $arguments->parse();
        $cli->setArguments($arguments);
        
        if ($arguments['help'] === true) {
            echo $arguments->getHelpScreen() . "\n\n";
        } else {
            // Perform arguments check.
            $cli->checkArguments();
            
            // Run the CLI Module implementation.
            $cli->run();
        }
    }
1271483
public function main()
    {
        $this->checkRequirements();
        $this->getBuildList($this->_buildFile);
        $this->parseTargets();
        $this->buildMarkup();
        $this->buildMarkupFull();
    }
503474
public function main()
    {
        $filesAdded = false;
        $clone = $this->getFactoryInstance('add');
        $clone->setQuiet($this->getQuiet());

        $cwd = getcwd();
        $project = $this->getProject();
        if ($this->repository === '') {
            $dir = $project->getProperty('application.startdir');
        } else {
            $dir = $this->repository;
        }

        if (!file_exists($dir)) {
            throw new BuildException("\"$dir\" does not exist.");
        } elseif (!is_dir($dir)) {
            throw new BuildException("\"$dir\" is not a directory.");
        }

        chdir($dir);

        if (file_exists('.hgignore')) {
            $this->loadIgnoreFile();
        }
        if (count($this->filesets)) {
            $this->log('filesets set', Project::MSG_DEBUG);
            /**
             * $fs is a FileSet
             *
             * @var $fs FileSet
             */
            foreach ($this->filesets as $fs) {
                $ds = $fs->getDirectoryScanner($project);
                $fromDir = $fs->getDir($project);
                if ($fromDir->getName() === '.') {
                    $statusClone = $this->getFactoryInstance('status');
                    $statusClone->setUnknown(true);
                    $statusClone->setNoStatus(true);
                    $statusClone->setRepository($this->getRepository());
                    $statusOut = $statusClone->execute();
                    if ($statusOut !== '') {
                        $files = explode(PHP_EOL, $statusOut);
                        foreach ($files as $file) {
                            if ($file != '') {
                                $clone->addFile($file);
                                $filesAdded = true;
                            }
                        }
                    }
                }
            }
        }

        if ($filesAdded) {
            try {
                $this->log("Executing: " . $clone->asString(), Project::MSG_INFO);
                $output = $clone->execute();
                if ($output !== '') {
                    $this->log($output);
                }
            } catch (Exception $ex) {
                $msg = $ex->getMessage();
                $this->log("Exception: $msg", Project::MSG_INFO);
                $p = strpos($msg, 'hg returned:');
                if ($p !== false) {
                    $msg = substr($msg, $p + 13);
                }
                chdir($cwd);
                throw new BuildException($msg);
            }
        }
        chdir($cwd);
    }
877503
public function main()
    {
        $gitignoreFiles     = $this->gitignoreFiles;
        $gitignoreMerged    = array();
        $gitignoreFileArray = array();

        if (!empty($gitignoreFiles) && is_array($gitignoreFiles)) {
            foreach ($gitignoreFiles as $gitignoreFile) {
                if (is_file($gitignoreFile)) {
                    $gitignoreFileArray = array_merge(
                        $gitignoreFileArray,
                        file(
                            $gitignoreFile,
                            (FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)
                        )
                    );
                }
            }
        }

        foreach ($gitignoreFileArray as $gitignoreLine) {
            if (strpos($gitignoreLine, '#') === 0) {
                $section = $gitignoreLine;
                if (!isset($gitignoreMerged[$section])) {
                    $gitignoreMerged[$section] = array();
                }
            } else {
                $gitignoreMerged[$section][] = $gitignoreLine;
            }
        }

        asort($gitignoreMerged);
        foreach ($gitignoreMerged as &$merged) {
            $merged = array_unique($merged);
            sort($merged);
        }

    }
878831
public function main()
    {
        $this->out(__d('installer', '<info>Themes Shell</info>'));
        $this->hr();
        $this->out(__d('installer', '[1] Install new theme'));
        $this->out(__d('installer', '[2] Remove an existing theme'));
        $this->out(__d('installer', '[3] Change site theme'));
        $this->out(__d('installer', '[H]elp'));
        $this->out(__d('installer', '[Q]uit'));

        $choice = (string)strtolower($this->in(__d('installer', 'What would you like to do?'), ['1', '2', '3', 'H', 'Q']));
        switch ($choice) {
            case '1':
                $this->_install();
                break;
            case '2':
                $this->_uninstall();
                break;
            case '3':
                $this->_change();
                break;
            case 'h':
                $this->out($this->OptionParser->help());
                break;
            case 'q':
                return $this->_stop();
            default:
                $this->out(__d('installer', 'You have made an invalid selection. Please choose a command to execute by entering 1, 2, 3, H, or Q.'));
        }
        $this->hr();
        $this->main();
    }
141477
public function main()
    {
        $email = $this->in('E-mailaddress:');

        $password = $this->in('Password: [WILL BE VISIBLE]');

        $this->loadModel('CakeAdmin.Administrators');

        $entity = $this->Administrators->newEntity([
            'email' => $email,
            'password' => $password
        ]);

        if ($this->Administrators->save($entity)) {
            $this->out('<info>Administrator has been saved</info>');
        } else {
            $this->out('<error>Administrator could not be saved. Run $ bin/cake admin to create an admin.</error>');
            $this->hr();
            foreach ($entity->errors() as $field => $errors) {
                foreach ($errors as $error) {
                    $this->out('<warning>For field `' . $field . '`: ' . $error . ' </warning>');
                }
            }
            $this->hr();
        }
    }
29671
public function main()
    {
        # The theme is activated.
        # Location: Resources/Themes/Default/
        Theme::active('Default');
        
        # The current settings are being configured.
        Masterpage::headPage('Sections/head')
                  ->bodyPage('Sections/body')
                  ->browserIcon(FILES_DIR . 'favicon.ico')
                  ->backgroundImage(FILES_DIR . 'background.jpg');
    }
314217
public function run()
    {
        $this->loader->parse();
        $files = $this->filesystem->getFiles();

        // Now we check all the files against the config
        while ($files->valid()) {
            /* @var SplFileInfo $file */
            $file = $files->current();

            // Skip symlinks as they are always 0777
            if ($file->isLink()) {
                $files->next();
                continue;
            }

            $filename = $this->getRelativeFilename($file);

            // Skip excluded files, of course.
            if ($this->isExcluded($filename)) {
                $files->next();
                continue;
            }

            $fileShouldBeExecutable = $this->shouldBeExecutable($filename);
            if (!$fileShouldBeExecutable && $file->isExecutable()) {
                $this->messageBag->addMessage($file->getPathname(), 'minx');
                $files->next();
                continue;
            }

            if ($fileShouldBeExecutable && !$file->isExecutable()) {
                $this->messageBag->addMessage($file->getPathname(), 'plusx');
                $files->next();
                continue;
            }

            $files->next();
        }
    }
597010
public function main()
    {
        $cmd = $this->getCmdString();

        $this->silent ?: $this->log("executing $cmd");
        $return = null;
        $output = [];
        exec($cmd, $output, $return);

        $lines = implode("\r\n", $output);

        $this->silent ?: $this->log($lines, Project::MSG_INFO);

        if ($this->propertyName != null) {
            $this->project->setProperty($this->propertyName, $lines);
        }

        if ($return != 0 && $this->checkreturn) {
            $this->log('Task exited with code: ' . $return, Project::MSG_ERR);
            throw new BuildException("SymfonyConsole execution failed");
        }
    }
1116386
public function main()
    {
        if (!empty($this->params['exclude'])) {
            $this->_exclude = explode(',', $this->params['exclude']);
        }
        if (isset($this->params['files']) && !is_array($this->params['files'])) {
            $this->_files = explode(',', $this->params['files']);
        }
        if (isset($this->params['paths'])) {
            $this->_paths = explode(',', $this->params['paths']);
        } elseif (isset($this->params['plugin'])) {
            $plugin = Inflector::camelize($this->params['plugin']);
            if (!Plugin::loaded($plugin)) {
                Plugin::load($plugin);
            }
            $this->_paths = [Plugin::classPath($plugin)];
            $this->params['plugin'] = $plugin;
        } else {
            $this->_getPaths();
        }

        if (isset($this->params['extract-core'])) {
            $this->_extractCore = !(strtolower($this->params['extract-core']) === 'no');
        } else {
            $response = $this->in('Would you like to extract the messages from the CakePHP core?', ['y', 'n'], 'n');
            $this->_extractCore = strtolower($response) === 'y';
        }

        if (!empty($this->params['exclude-plugins']) && $this->_isExtractingApp()) {
            $this->_exclude = array_merge($this->_exclude, App::path('Plugin'));
        }

        if (!empty($this->params['validation-domain'])) {
            $this->_validationDomain = $this->params['validation-domain'];
        }

        if ($this->_extractCore) {
            $this->_paths[] = CAKE;
        }

        if (isset($this->params['merge'])) {
            $this->_merge = !(strtolower($this->params['merge']) === 'no');
        } else {
            $this->out();
            $response = $this->in(
                'Would you like to merge all domain strings into the default domain?',
                ['y', 'n'],
                'n'
            );
            $this->_merge = strtolower($response) === 'y';
        }

        if (empty($this->_files)) {
            $this->_searchFiles();
        }

        $this->_extract();
    }
1276699
public function main()
	{
		$this->addProperty('yii.version',$this->getYiiVersion());
		$this->addProperty('yii.revision',$this->getYiiRevision());
		$this->addProperty('yii.winbuild', substr(PHP_OS, 0, 3) == 'WIN' ? 'true' : 'false');
		$this->addProperty('yii.release',$this->getYiiRelease());
		$this->addProperty('yii.date',date('M j, Y'));
	}
223796
public function main()
    {
        $this->out('CodeBlastr Queue Plugin:');
        $this->hr();
        $this->out('Usage:');
        $this->out('	cake CodeBlastr.Queue help');
        $this->out('		-> Display this Help message');
//        $this->out('	cake Queue.Queue add <taskname>');
//        $this->out('		-> Try to call the cli add() function on a task');
//        $this->out('		-> tasks may or may not provide this functionality.');
        $this->out('	cake Queue.Queue runworker');
        $this->out('		-> run a queue worker, which will look for a pending task it can execute.');
        $this->out('		-> the worker will always try to find jobs matching its installed Tasks');
        $this->out('		-> see "Available Tasks" below.');
        $this->out('	cake Queue.Queue runworker');
        $this->out('		-> run a queue worker, which will look for a pending task it can execute.');
        $this->out('		-> the worker will always try to find jobs matching its installed Tasks');
        $this->out('		-> see "Available Tasks" below.');
        $this->out('	cake Queue.Queue stats');
        $this->out('		-> Display some general Statistics.');
        $this->out('	cake Queue.Queue clean');
        $this->out('		-> Manually call cleanup function to delete task data of completed tasks.');
    }
1216066
public function main()
    {
        $this->setTaskName('spc');
        $map = $this->getMap();
        // Multiple symlinks
        foreach ($map as $directory => $symlinks) {
            $this->makeDirectory($directory);
            foreach ($symlinks as  $targetName => $symlink) {
                $this->symlink($symlink['target'], $symlink['link']);
            }
        }

        return true;
    }
905568
public function main()
    {
        $ret = '';

        $settings = GeneralUtility::getRootSetting();

        // INIT
        $this->tsSetup = $GLOBALS['TSFE']->tmpl->setup;
        $this->cObj    = $GLOBALS['TSFE']->cObj;
        $this->rootPid = GeneralUtility::getRootPid();

        $this->tsSetupSeo = null;
        if (!empty($this->tsSetup['plugin.']['metaseo.']['robotsTxt.'])) {
            $this->tsSetupSeo = $this->tsSetup['plugin.']['metaseo.']['robotsTxt.'];
        }

        // check if sitemap is enabled in root
        if (!GeneralUtility::getRootSettingValue('is_robotstxt', true)) {
            return true;
        }

        $this->linkToStaticSitemap = GeneralUtility::getRootSettingValue('is_robotstxt_sitemap_static', false);

        // Language lock
        $this->sitemapLanguageLock = GeneralUtility::getRootSettingValue('is_sitemap_language_lock', false);
        $this->languageId          = GeneralUtility::getLanguageId();

        // ###############################
        // Fetch robots.txt content
        // ###############################
        $settings['robotstxt'] = trim($settings['robotstxt']);

        if (!empty($settings['robotstxt'])) {
            // Custom Robots.txt
            $ret .= $settings['robotstxt'];
        } elseif ($this->tsSetupSeo) {
            // Default robots.txt
            $ret .= $this->cObj->cObjGetSingle($this->tsSetupSeo['default'], $this->tsSetupSeo['default.']);
        }

        // ###############################
        // Fetch extra robots.txt content
        // ###############################
        // User additional
        if (!empty($settings['robotstxt_additional'])) {
            $ret .= "\n\n" . $settings['robotstxt_additional'];
        }

        // Setup additional
        if ($this->tsSetupSeo) {
            // Default robots.txt
            $tmp = $this->cObj->cObjGetSingle($this->tsSetupSeo['extra'], $this->tsSetupSeo['extra.']);

            if (!empty($tmp)) {
                $ret .= "\n\n" . $tmp;
            }
        }

        // ###############################
        // Marker
        // ###############################
        if (!empty($this->tsSetupSeo['marker.'])) {
            $ret = $this->applyMarker($ret);
        }

        // Call hook
        GeneralUtility::callHookAndSignal(__CLASS__, 'robotsTxtOutput', $this, $ret);

        return $ret;
    }