public function getLevelValue($levelName)
    {
        if (!is_string($levelName)) {
            throw new \Plop\Exception('Invalid level name');
        }
        $key = array_search($levelName, $this->levelNames, true);
        return (int) $key; // false is silently converted to 0.
    }
public function getLevelValue($levelName)
    {
        if (!is_string($levelName)) {
            throw new \Plop\Exception('Invalid level name');
        }
        $key = array_search($levelName, $this->levelNames, true);
        return (int) $key; // false is silently converted to 0.
    }
public function getLevelValue ( $ levelName ) { if ( ! is_string ( $ levelName ) ) { throw new \ Plop \ Exception ( 'Invalid level name' ) ; } $ key = array_search ( $ levelName , $ this -> levelNames , true ) ; return ( int ) $ key ; // false is silently converted to 0. }
Return the value of a level given its name.

\param string $levelName
Level for which a value must be returned.

\retval int
Value for the given level.

\note
If the given level name is not known,
Plop::NOTSET (0) is returned.

\note
You may use Plop::addLevelName() to register
new levels.
Return the value of a level given its name .