Beispiel #1
0
 /**
  * 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;
     }
 }