public static function get($applicationState)
    {

        // check if the requested container state is available and create a new instance
        if (in_array($applicationState, ApplicationStateKeys::getApplicationStates())) {
            return new ApplicationStateKeys($applicationState);
        }

        // throw a exception if the requested runlevel is not available
        throw new InvalidApplicationStateException(
            sprintf(
                'Requested application state %s is not available (choose on of: %s)',
                $applicationState,
                implode(',', ApplicationStateKeys::getApplicationStates())
            )
        );
    }
public static function get($applicationState)
    {

        // check if the requested container state is available and create a new instance
        if (in_array($applicationState, ApplicationStateKeys::getApplicationStates())) {
            return new ApplicationStateKeys($applicationState);
        }

        // throw a exception if the requested runlevel is not available
        throw new InvalidApplicationStateException(
            sprintf(
                'Requested application state %s is not available (choose on of: %s)',
                $applicationState,
                implode(',', ApplicationStateKeys::getApplicationStates())
            )
        );
    }
public static function get ( $ applicationState ) { // check if the requested container state is available and create a new instance if ( in_array ( $ applicationState , ApplicationStateKeys :: getApplicationStates ( ) ) ) { return new ApplicationStateKeys ( $ applicationState ) ; } // throw a exception if the requested runlevel is not available throw new InvalidApplicationStateException ( sprintf ( 'Requested application state %s is not available (choose on of: %s)' , $ applicationState , implode ( ',' , ApplicationStateKeys :: getApplicationStates ( ) ) ) ) ; }
Factory method to create a new application state instance.

@param integer $applicationState The application state to create an instance for

@return \AppserverIo\Appserver\Application\ApplicationStateKeys The application state key instance
@throws \AppserverIo\Appserver\Application\InvalidApplicationStateException
Is thrown if the application state is not available
Factory method to create a new application state instance .