/** * Append a path to the current absolute path * * @param string $base * Base url * @param string $path * String to append * @param integer $protocol * Protocol to append to the path * @return string */ private static function write_url($base, $path, $protocol) { if (isset(Request::get()['language'])) { if (Request::get()['language'] == Translator::language()->code || Request::get()['language'] == Translator::language()->code_short) { $language = Request::get()['language']; } else { $language = Translator::language()->code_short; } return self::protocol($protocol) . $base . '/' . $language . '/' . $path; } else { return self::protocol($protocol) . $base . '/' . $path; } }
/** * Return the instance of the Application Translator * * @return Apine\Application\Translator */ function apine_app_translator() { return Apine\Application\Translator::get_instance(); }
/** * Gateway Timeout Error * * @param Exception $a_exception * @return MVC\View */ public function gatewaytimeout(Exception $a_exception = null) { if (null == ($title = Application\Translator::translate('errors', '504'))) { $title = $this->errors[504]['title']; } return $this->custom(504, $title, $a_exception); }