public function run()
    {

        try {
            // register the default autoloader
            require SERVER_AUTOLOADER;

            // register shutdown handler
            set_error_handler(array(&$this, 'errorHandler'));
            register_shutdown_function(array(&$this, 'shutdown'));

            // try to load the application
            $application = $this->application;

            // register the applications class loaders
            $application->registerClassLoaders();

            // register the applications annotation registries
            $application->registerAnnotationRegistries();

            // load input/output instances
            $input = $this->input;
            $output = $this->output;

            // add the application instance to the environment
            Environment::singleton()->setAttribute(EnvironmentKeys::APPLICATION, $application);

            // create a simulated request/session ID whereas session equals request ID (as long as session has NOT been started)
            Environment::singleton()->setAttribute(EnvironmentKeys::REQUEST_ID, $requestId = SessionUtils::generateRandomString());
            Environment::singleton()->setAttribute(EnvironmentKeys::SESSION_ID, $requestId);

            // load and initialize the Symfony console application
            /** @var \Symfony\Component\Console\Application $cli */
            $cli = $application->search('Console');
            $cli->setAutoExit(false);
            $cli->setCatchExceptions(true);

            // run the Symfony console application
            $cli->run($input, $output);

            // update the output instance
            $this->output = $output;

        } catch (\Exception $e) {
            // log the exception
            \error($e->__toString());
        }
    }
public function run()
    {

        try {
            // register the default autoloader
            require SERVER_AUTOLOADER;

            // register shutdown handler
            set_error_handler(array(&$this, 'errorHandler'));
            register_shutdown_function(array(&$this, 'shutdown'));

            // try to load the application
            $application = $this->application;

            // register the applications class loaders
            $application->registerClassLoaders();

            // register the applications annotation registries
            $application->registerAnnotationRegistries();

            // load input/output instances
            $input = $this->input;
            $output = $this->output;

            // add the application instance to the environment
            Environment::singleton()->setAttribute(EnvironmentKeys::APPLICATION, $application);

            // create a simulated request/session ID whereas session equals request ID (as long as session has NOT been started)
            Environment::singleton()->setAttribute(EnvironmentKeys::REQUEST_ID, $requestId = SessionUtils::generateRandomString());
            Environment::singleton()->setAttribute(EnvironmentKeys::SESSION_ID, $requestId);

            // load and initialize the Symfony console application
            /** @var \Symfony\Component\Console\Application $cli */
            $cli = $application->search('Console');
            $cli->setAutoExit(false);
            $cli->setCatchExceptions(true);

            // run the Symfony console application
            $cli->run($input, $output);

            // update the output instance
            $this->output = $output;

        } catch (\Exception $e) {
            // log the exception
            \error($e->__toString());
        }
    }
public function run ( ) { try { // register the default autoloader require SERVER_AUTOLOADER ; // register shutdown handler set_error_handler ( array ( & $ this , 'errorHandler' ) ) ; register_shutdown_function ( array ( & $ this , 'shutdown' ) ) ; // try to load the application $ application = $ this -> application ; // register the applications class loaders $ application -> registerClassLoaders ( ) ; // register the applications annotation registries $ application -> registerAnnotationRegistries ( ) ; // load input/output instances $ input = $ this -> input ; $ output = $ this -> output ; // add the application instance to the environment Environment :: singleton ( ) -> setAttribute ( EnvironmentKeys :: APPLICATION , $ application ) ; // create a simulated request/session ID whereas session equals request ID (as long as session has NOT been started) Environment :: singleton ( ) -> setAttribute ( EnvironmentKeys :: REQUEST_ID , $ requestId = SessionUtils :: generateRandomString ( ) ) ; Environment :: singleton ( ) -> setAttribute ( EnvironmentKeys :: SESSION_ID , $ requestId ) ; // load and initialize the Symfony console application /** @var \Symfony\Component\Console\Application $cli */ $ cli = $ application -> search ( 'Console' ) ; $ cli -> setAutoExit ( false ) ; $ cli -> setCatchExceptions ( true ) ; // run the Symfony console application $ cli -> run ( $ input , $ output ) ; // update the output instance $ this -> output = $ output ; } catch ( \ Exception $ e ) { // log the exception \ error ( $ e -> __toString ( ) ) ; } }
The thread's main method.

@return void
The thread s main method .