guillaumemonet/Rad

View on GitHub
src/Rad/Language/Language.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

/**
 * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
 * @author Guillaume Monet
 * @link https://github.com/guillaumemonet/Rad
 * @package Rad
 */

namespace Rad\Language;

use Rad\Service\Service;

/**
 * Description of Language
 *
 * @author Guillaume Monet
 */
class Language extends Service {

    public static function addHandler(string $handlerType, $handler) {
        static::getInstance()->addServiceHandler($handlerType, $handler);
    }

    public static function getHandler(string $handlerType = null): LanguageInterface {
        return static::getInstance()->getServiceHandler($handlerType);
    }

    protected function getServiceType(): string {
        return 'language';
    }
}