public function runlevelFromString($runlevel)
    {

        // query whether the passed string representation is a valid runlevel
        if (Runlevels::singleton()->isRunlevel($runlevel)) {
            return Runlevels::singleton()->getRunlevel($runlevel);
        }

        // throw an exception if the runlevel is unknown
        throw new \Exception(sprintf('Request invalid runlevel to string conversion for %s', $runlevel));
    }
public function runlevelFromString($runlevel)
    {

        // query whether the passed string representation is a valid runlevel
        if (Runlevels::singleton()->isRunlevel($runlevel)) {
            return Runlevels::singleton()->getRunlevel($runlevel);
        }

        // throw an exception if the runlevel is unknown
        throw new \Exception(sprintf('Request invalid runlevel to string conversion for %s', $runlevel));
    }
public function runlevelFromString ( $ runlevel ) { // query whether the passed string representation is a valid runlevel if ( Runlevels :: singleton ( ) -> isRunlevel ( $ runlevel ) ) { return Runlevels :: singleton ( ) -> getRunlevel ( $ runlevel ) ; } // throw an exception if the runlevel is unknown throw new \ Exception ( sprintf ( 'Request invalid runlevel to string conversion for %s' , $ runlevel ) ) ; }
Translates and returns the runlevel of the passed a string representation.

@param string $runlevel The string representation of the runlevel to return

@return integer The runlevel of the passed string representation

@throws \Exception Is thrown if the passed string representation is not a valid runlevel
Translates and returns the runlevel of the passed a string representation .