public static function get($containerState)
    {

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

        // throw a exception if the requested runlevel is not available
        throw new InvalidContainerStateException(
            sprintf(
                'Requested container state %s is not available (choose on of: %s)',
                $containerState,
                implode(',', ContainerStateKeys::getContainerStates())
            )
        );
    }
public static function get($containerState)
    {

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

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

@param integer $containerState The container state to create an instance for

@return \AppserverIo\Appserver\Core\Utilities\ContainerStateKeys The container state key instance
@throws \AppserverIo\Appserver\Core\Utilities\InvalidContainerStateException
Is thrown if the container state is not available
Factory method to create a new container state instance .