public static function extend($method) {
        if (is_array($method)) {
            if (count($method) == 2 && method_exists($method[0], $method[1])) {
                array_push(self::$_extends, ['class' => $method[0], 'method' => $method[1]]);
            }
            else {
                throw new MissingTemplateException('You c\'ant extend the template engine with the method : "' . $method[0] . '"');
            }
        }
        else {
            $trace = debug_backtrace();

            if (isset($trace[1])) {
                array_push(self::$_extends, ['class' => '\\' . $trace[1]['class'], 'method' => $method]);
            }
            else {
                throw new MissingTemplateException('Can\'t reach the method "' . $method . '"');
            }
        }
    }