start code manipulation
@return void
556480
public function startManipulation(){
		$core			= ConfigurationManager::Get("profiles.{$this->getProfileName()}.coreDirectory");
		$public			= ConfigurationManager::Get("profiles.{$this->getProfileName()}.publicDirectory");
		$manipulations	= ConfigurationManager::Get("profiles.{$this->getProfileName()}.manipulations");

		# Fixing bootstrap
		$this->fixBootstrapper($public, $core);

		# Manipulate Codes
		foreach ($manipulations as $file => $lines) {
			$file = Utility::renderTemplate($file, [
				'{CORE}'	=> Utility::getCorePath($this->getAlias(), $core),
				'{PUBLIC}'	=> Utility::getPublicPath($this->getAlias(), $public)
			]);
			$file = Utility::normalizePath($file);
			if(\file_exists($file)){
				Utility::replaceInFile($file, $lines);
			}
		}
	}
275353
public function start()
    {
        $__scope = $this->_runHooks($this->_startHooks);
        extract($__scope);
        
        $this->_write($this->_socket, self::READY);
        
        /* Note the naming of the local variables due to shared scope with the user here */
        for (;;) {
            declare (ticks = 1);
            // don't exit on ctrl-c
            pcntl_signal(SIGINT, SIG_IGN, true);
            
            $this->_cancelled = false;
            
            $__input = $this->_transform($this->_read($this->_socket));
            
            if ($__input === null) {
                continue;
            }
            
            $__response = self::DONE;
            
            $this->_ppid = posix_getpid();
            $this->_pid  = pcntl_fork();
            
            if ($this->_pid < 0) {
                throw new \RuntimeException('Failed to fork child labourer');
            } elseif ($this->_pid > 0) {
                // kill the child on ctrl-c
                pcntl_signal(SIGINT, array(
                    $this,
                    'cancelOperation'
                ), true);
                pcntl_waitpid($this->_pid, $__status);
                
                if (!$this->_cancelled && $__status != (self::ABNORMAL_EXIT << 8)) {
                    $__response = self::EXITED;
                } else {
                    $this->_runHooks($this->_failureHooks);
                    $__response = self::FAILED;
                }
            } else {
                // if the user has installed a custom exception handler, install a new
                // one which calls it and then (if the custom handler didn't already exit)
                // exits with the correct status.
                // If not, leave the exception handler unset; we'll display
                // an uncaught exception error and carry on.
                $__oldexh = set_exception_handler(array(
                    $this,
                    'delegateExceptionHandler'
                ));
                if ($__oldexh && !$this->_userExceptionHandler) {
                    $this->_userExceptionHandler = $__oldexh; // save the old handler (once)
                } else {
                    restore_exception_handler();
                }
                
                // undo ctrl-c signal handling ready for user code execution
                pcntl_signal(SIGINT, SIG_DFL, true);
                $__pid = posix_getpid();
                
                $__result = eval($__input);
                
                if (posix_getpid() != $__pid) {
                    // whatever the user entered caused a forked child
                    // (totally valid, but we don't want that child to loop and wait for input)
                    exit(0);
                }
                
                if (preg_match('/\s*return\b/i', $__input)) {
                    fwrite(STDOUT, sprintf("%s\n", $this->_inspector->inspect($__result)));
                }
                $this->_expungeOldWorker();
            }
            
            $this->_write($this->_socket, $__response);
            
            if ($__response == self::EXITED) {
                exit(0);
            }
        }
    }
699624
public function start() {
		$data = $this->handler->read( $this->get_id() );

		if ( false !== $data && ! is_null( $data ) && is_array( $data ) ) {
			$this->attributes = $data;
		}

		$this->started = true;
	}
1328427
protected function onInit()
    {
        if (is_array($this->params)) {
            foreach ($this->params as $cName => $cMap) {
                $cFunc = Utility::get($cMap, "{func}");
                if (is_callable($cFunc)) {
                    $this->mapFuncs[$cName] = $cFunc;
                }

            }
        }

    }
343706
public function start()
    {
        $command = $this->client->createCommand('MONITOR');
        $this->client->executeCommand($command, $this);
    }
1267397
public function start()
  {
      $this->getApplication()->setCatchExceptions(false);

      try
      {
          // Create a Codeigniter instance
          $CI = new Codeigniter; $CI =& $CI->get();

          $config = new Configuration; // TODO: Create a method that configures the Psy\Shell
          $shell  = new Shell($config);

          $this->writeln([
            sprintf('Craftsman %s - Console',$this->getApplication()->getVersion()),
            str_repeat('-', 60),
            'Codeigniter : $CI',
            sprintf('App Path: ./%s/', basename(APPPATH)),
            str_repeat('-', 60)
          ]);

          $shell->setScopeVariables(['CI' => $CI]);
          $shell->addCommands($this->getCommands());
          $shell->run();
      }
      catch (Exception $e)
      {
          echo $e->getMessage() . PHP_EOL;
          // TODO: this triggers the "exited unexpectedly" logic in the
          // ForkingLoop, so we can't exit(1) after starting the shell...
          // exit(1);
      }
  }
1228542
private function launch()
    {
        $action = $this->arg->getParameter('action');

        if (!in_array($action, ['server', 'console'])) {
            $this->throwFailsCommand('help run');
        }

        $this->command->call(
            'run',
            $action,
            $this->arg->getParameter('target')
        );
    }
1335536
public function start()
    {
        if ($this->isStart) {
            return;
        }

        $this->startAt = time();
        $this->stopAt  = null;
        $this->isStart = true;

        if (extension_loaded('xdebug')) {
            xdebug_disable();
        }

        foreach ($this->onStart as $callable) {
            call_user_func_array($callable, []);
        }

        while ($this->isStart) {
            $this->tick();
        }

        $this->stopAt = time();

        foreach ($this->onStop as $callable) {
            call_user_func_array($callable, []);
        }

        if (extension_loaded('xdebug')) {
            xdebug_enable();
        }
    }
86196
public function start()
    {
        $cmd = $this->command->getPreparedCommand();
        $cwd = realpath(CRAFT_BASE_PATH);

        $process = Process::fromShellCommandline($cmd, $cwd);

        try {
            $process->run();
        } catch (\Symfony\Component\Process\Exception\RuntimeException $e) {
            $e = new RuntimeException($e->getMessage());
            $e->setProcess($process);
            throw $e;
        } catch (\Symfony\Component\Process\Exception\LogicException $e) {
            $e = new LogicException($e->getMessage());
            $e->setProcess($process);
            throw $e;
        }

        return $process;
    }
348301
public static function start() {
        global $CFG, $DB, $PERF;

        if (isset(self::$sessionactive)) {
            debugging('Session was already started!', DEBUG_DEVELOPER);
            return;
        }

        // Grab the time before session lock starts.
        $PERF->sessionlock['start'] = microtime(true);
        self::load_handler();

        // Init the session handler only if everything initialised properly in lib/setup.php file
        // and the session is actually required.
        if (empty($DB) or empty($CFG->version) or !defined('NO_MOODLE_COOKIES') or NO_MOODLE_COOKIES or CLI_SCRIPT) {
            self::$sessionactive = false;
            self::init_empty_session();
            return;
        }

        try {
            self::$handler->init();
            self::prepare_cookies();
            $isnewsession = empty($_COOKIE[session_name()]);

            if (!self::$handler->start()) {
                // Could not successfully start/recover session.
                throw new \core\session\exception(get_string('servererror'));
            }

            // Grab the time when session lock starts.
            $PERF->sessionlock['gained'] = microtime(true);
            $PERF->sessionlock['wait'] = $PERF->sessionlock['gained'] - $PERF->sessionlock['start'];
            self::initialise_user_session($isnewsession);
            self::$sessionactive = true; // Set here, so the session can be cleared if the security check fails.
            self::check_security();

            // Link global $USER and $SESSION,
            // this is tricky because PHP does not allow references to references
            // and global keyword uses internally once reference to the $GLOBALS array.
            // The solution is to use the $GLOBALS['USER'] and $GLOBALS['$SESSION']
            // as the main storage of data and put references to $_SESSION.
            $GLOBALS['USER'] = $_SESSION['USER'];
            $_SESSION['USER'] =& $GLOBALS['USER'];
            $GLOBALS['SESSION'] = $_SESSION['SESSION'];
            $_SESSION['SESSION'] =& $GLOBALS['SESSION'];

        } catch (\Exception $ex) {
            self::init_empty_session();
            self::$sessionactive = false;
            throw $ex;
        }
    }
316076
protected function start()
    {
        set_time_limit(0);

        $this->session->delete('user');
        $this->session->delete('install');
        $this->session->set('install.data', $this->data);
    }
135467
public function Start()
    {
        $this->definitions_path = rtrim($this->definitions_path, "/\\");

        $this->document = new DOMDocument();
        $this->document->load($this->definitions_path . "/index.xml");

        $this->ExtractConstants($this->document);
        $this->ExtractEnumerations($this->document);
        $this->ExtractVariables($this->document);
        $this->ExtractTypeDefinitions($this->document);
        $this->ExtractFunctions($this->document);
        $this->ExtractClasses($this->document);
    }
102880
public function start(): void
    {
        $classAndMethodName = $this->classNameGenerator->getClassAndMethodNamesForCalling();

        $this->executor->exec(...$classAndMethodName);
    }
1276679
public function startup() {
        if ($this->_blacklist) {
            return;
        }

        // Load files from config paths
        foreach ($this->getParser()->getPaths() as $path) {
            foreach (glob($path . 'censored.*') as $file) {
                $this->addLoader(new FileLoader($file));
            }
        }

        // Load the contents into the blacklist
        foreach ($this->getLoaders() as $loader) {
            $loader->setParser($this->getParser());

            if ($blacklist = $loader->load()) {
                $this->blacklist($blacklist);
            }
        }
    }
1312351
private function _processFunctionStart() {
		$this->_inFunction = true;
		$this->_cyclomaticComplexity = 1;
		$this->_npathComplexity = 0;
		$this->_functionLevel = $this->statementStack->count();
		$this->_justAfterFuncStmt = false;

		$this->_functionStartLine = $this->lineNumber;

		// Check the position of the open curly after the function declaration
		if ($this->_isActive('funcDefinitionOpenCurly')) {
			$pos = $this->_config->getTestProperty('funcDefinitionOpenCurly', 'position');

			$currentToken = $this->tokenizer->getCurrentToken();
			$previousToken = $this->tokenizer->peekPrvsValidToken();

			if ($pos === NEW_LINE) {
				// The previous token should be on the previous line
				$isPosOk = ($previousToken->line < $currentToken->line);
			} else {
				// The previous token should be on the same line
				$isPosOk = ($previousToken->line === $currentToken->line);
			}

			if (!$isPosOk) {
				$tmp = ($pos === SAME_LINE) ? "the previous line." : "a new line.";
				$msg = $this->_getMessage('LEFT_CURLY_POS', $tmp);
				$this->_writeError('funcDefinitionOpenCurly', $msg);
			}
		}
	}
679775
private function start()
    {
        $name = $this->scaffoldCommandObj->getObjName('Name');
        $observer_name = $name . 'Observer';
        $this->makeObserver($observer_name, 'observer');

        $this->registerObserver($name, $observer_name);
    }
1013943
protected function onInit()
    {
        $this->filePath = Utility::get($this->params, "filePath");
        $this->fieldSeparator = Utility::get($this->params, "fieldSeparator", ",");
        $this->charset = Utility::get($this->params, "charset");
        $this->precision = Utility::get($this->params, "precision", 100);
        $this->firstRowData = Utility::get($this->params, "firstRowData", false);
    }