コード例 #1
0
 /**
  * Get the full query of the request
  * @return string
  */
 protected function getQuery()
 {
     $query = parent::getQuery();
     $tokens = explode(Request::QUERY_SEPARATOR, $query, 2);
     if (!$tokens) {
         return $query;
     }
     $i18n = I18n::getInstance();
     if ($i18n->hasLocale($tokens[0])) {
         $locale = $i18n->getLocale($tokens[0]);
         $i18n->setCurrentLocale($locale);
         if (array_key_exists(1, $tokens)) {
             $query = $tokens[1];
         } else {
             $query = '';
         }
     }
     return $query;
 }