src/Joomlatools/Console/Joomla/Bootstrapper.php
public static function getApplication($base, $client_id = self::ADMIN)
    {
        $_SERVER['SERVER_PORT'] = 80;

        if (!self::$_application)
        {
            self::bootstrap($base);

            $options = array(
                'root_user' => 'root',
                'client_id' => $client_id
            );

            self::$_application = new Application($options);

            $credentials = array(
                'name'      => 'root',
                'username'  => 'root',
                'groups'    => array(8),
                'email'     => 'root@localhost.home'
            );

            self::$_application->authenticate($credentials);

            // If there are no marks in JProfiler debug plugin performs a division by zero using count($marks)
            \JProfiler::getInstance('Application')->mark('Hello world');
        }

        return self::$_application;
    }
public static function getApplication($base, $client_id = self::ADMIN)
    {
        $_SERVER['SERVER_PORT'] = 80;

        if (!self::$_application)
        {
            self::bootstrap($base);

            $options = array(
                'root_user' => 'root',
                'client_id' => $client_id
            );

            self::$_application = new Application($options);

            $credentials = array(
                'name'      => 'root',
                'username'  => 'root',
                'groups'    => array(8),
                'email'     => 'root@localhost.home'
            );

            self::$_application->authenticate($credentials);

            // If there are no marks in JProfiler debug plugin performs a division by zero using count($marks)
            \JProfiler::getInstance('Application')->mark('Hello world');
        }

        return self::$_application;
    }
public static function getApplication ( $ base , $ client_id = self :: ADMIN ) { $ _SERVER [ 'SERVER_PORT' ] = 80 ; if ( ! self :: $ _application ) { self :: bootstrap ( $ base ) ; $ options = array ( 'root_user' => 'root' , 'client_id' => $ client_id ) ; self :: $ _application = new Application ( $ options ) ; $ credentials = array ( 'name' => 'root' , 'username' => 'root' , 'groups' => array ( 8 ) , 'email' => 'root@localhost.home' ) ; self :: $ _application -> authenticate ( $ credentials ) ; // If there are no marks in JProfiler debug plugin performs a division by zero using count($marks) \ JProfiler :: getInstance ( 'Application' ) -> mark ( 'Hello world' ) ; } return self :: $ _application ; }
Returns a Joomla application with a root user logged in

@param string $base Base path for the Joomla installation
@param int    $client_id Application client id to spoof. Defaults to admin.

@return Application
Returns a Joomla application with a root user logged in