Prado\PradoBase::setApplication PHP Method

setApplication() public static method

This method helps implement a singleton pattern for TApplication. Repeated invocation of this method or the application constructor will cause the throw of an exception. This method should only be used by framework developers.
public static setApplication ( $application )
    public static function setApplication($application)
    {
        if (self::$_application !== null && !defined('PRADO_TEST_RUN')) {
            throw new TInvalidOperationException('prado_application_singleton_required');
        }
        self::$_application = $application;
    }