final public static function valueOf($name)
    {
        $result = null;

        try {
            /* @var $constant EnumAbstract */
            foreach (self::values() as $constant) {
                if ($constant->name === $name) {
                    $result = $constant;
                    break;
                }
            }
        } catch (InvalidArgumentException $ex) {
            // Empty block.
        }

        return $result;
    }