本文整理汇总了PHP中GO::language方法的典型用法代码示例。如果您正苦于以下问题:PHP GO::language方法的具体用法?PHP GO::language怎么用?PHP GO::language使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GO
的用法示例。
在下文中一共展示了GO::language方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDefaultLangId
public static function getDefaultLangId()
{
if (!isset(self::$_defaultLangId)) {
$lang = Model\Language::model()->findSingleByAttribute('language', \GO::language()->getLanguage());
self::$_defaultLangId = $lang ? $lang->id : 1;
}
return self::$_defaultLangId;
}
示例2: init
public function init()
{
try {
$this->uploadTarget = \Site::urlManager()->createUrl('site/front/ajaxWidget', array('widget_method' => 'upload', 'widget_class' => $this->className()));
if (empty($this->max_file_size)) {
$this->max_file_size = \GO::config()->max_file_size;
}
\Site::scripts()->registerGapiScript('jquery');
\Site::scripts()->registerGapiScript('jquery-ui');
$assetUrl = \Site::assetManager()->publish(\GO::config()->root_path . 'modules/site/widget/plupload/assets');
$this->_swfUrl = $assetUrl . '/assets/js/plupload.flash.swf';
\Site::scripts()->registerCssFile($assetUrl . '/assets/style.css');
\Site::scripts()->registerScriptFile($assetUrl . '/assets/js/plupload.full.js');
\Site::scripts()->registerScriptFile($assetUrl . '/assets/js/jquery.plupload.queue/jquery.plupload.queue.js');
$langFile = '/assets/js/i18n/' . \GO::language()->getLanguage() . '.js';
// if(file_exists(\Site::assetManager()->getBasePath().$langFile)){
\Site::scripts()->registerScriptFile($assetUrl . $langFile);
// }
} catch (\Exception $e) {
echo '<h2 style="color:red;">AN ERROR HAS OCCURED</h2>';
//echo '<p style="color:red;">'.$e->getMessage().'</p>';
echo '<p style="color:red;">Please check if the folder( <b>' . \GO::config()->assets_path . '</b> ) is writable for the webserver.<br />This path is also configurable in the Group-Office <b>config.php</b> file.<br />Please check the options: <b>assets_path</b> and <b>assets_url</b></p>';
}
}
示例3: actionLogin
/**
* Render a login page
*/
public function actionLogin()
{
$model = new \GO\Base\Model\User();
if (\GO\Base\Util\Http::isPostRequest() && isset($_POST['User'])) {
$model->username = $_POST['User']['username'];
$password = $_POST['User']['password'];
$user = \GO::session()->login($model->username, $password);
//reset language after login
if (!empty(\Site::model()->language)) {
\GO::language()->setLanguage(\Site::model()->language);
}
if (!$user) {
\Site::notifier()->setMessage('error', \GO::t('badLogin'));
// set the correct login failure message
} else {
if (!empty($_POST['rememberMe'])) {
$encUsername = \GO\Base\Util\Crypt::encrypt($model->username);
if ($encUsername) {
$encUsername = $model->username;
}
$encPassword = \GO\Base\Util\Crypt::encrypt($password);
if ($encPassword) {
$encPassword = $password;
}
\GO\Base\Util\Http::setCookie('GO_UN', $encUsername);
\GO\Base\Util\Http::setCookie('GO_PW', $encPassword);
}
$this->redirect($this->getReturnUrl());
}
} elseif (isset($_GET['ref'])) {
// url to go to after login
\GO::session()->values['sites']['returnUrl'] = $_GET['ref'];
}
echo $this->render('login', array('model' => $model));
}
示例4: function
},true);
require(["converse"], function (converse) {
converse.initialize({
//allow_chat_pending_contacts: true,
bosh_service_url: "' . \GO\Chat\ChatModule::getBoshUri() . '", // Please use this connection manager only for testing purposes
roster_groups: true,
auto_login: true,
authentication: "login",
play_sounds: true,
allow_otr: true,
auto_list_rooms: true,
//auto_subscribe: true,
debug: false,
hide_muc_server: true,
i18n: locales["' . GO::language()->getLanguage() . '"], // Refer to ./locale/locales.js to see which locales are supported
show_controlbox_by_default: true,
xhr_user_search: false,
jid: "' . GO::user()->username . '@puan.ddns.net",
password: "epsilon@30",
//fullname: "' . GO::user()->name . '"
allow_registration: false
});
var name = converseJs.select("input.new-chatroom-name");
name.value="conference.' . \GO\Chat\ChatModule::getXmppHost() . '";
var nick = converseJs.select("input.new-chatroom-nick");
nick.value="' . \GO\Base\Util\String::escape_javascript(GO::user()->name) . '";
示例5: generate
function generate($order = null)
{
$this->endPage();
if ($order) {
$this->_order = $order;
$this->_orderAttr = $order->getAttributes('formatted');
$this->_template = $order->status->getLanguage($this->_order->language_id)->template->getAttributes('raw');
$this->init();
$this->_headerPrinted = false;
//Reset crap
$this->cols = array();
if ($this->_template['stationery_paper']) {
$stationeryPaper = \GO::config()->file_storage_path . $this->_template['stationery_paper'];
}
if (!empty($stationeryPaper)) {
$this->templateFile = $stationeryPaper;
} else {
$this->templateFile = null;
}
}
$oldLangIso = \GO::language()->setLanguage($this->_order->language->language);
$this->AddPage();
//restore margins
$this->SetMargins($this->lMargin, $this->_template['margin_top']);
if (!empty($this->_orderAttr['frontpage_text']) && $this->_orderAttr['frontpage_text'] != '<br>') {
$this->SetFont($this->font, '', 10);
$this->writeHTMLCell($this->pageWidth, 12, $this->getX(), $this->getY(), $this->prepare_html($this->_orderAttr['frontpage_text']), 0, 1);
if ($this->_orderAttr['pagebreak'] == '1') {
$this->AddPage();
} else {
$this->Ln(20);
}
}
$discount = false;
//$supplier_product_id = false;
$i = 0;
$items = array();
// if (count($this->supplier)) {
// $this->_orderAttr['costs'] = 0;
// $this->_orderAttr['subtotal'] = 0;
// $this->_orderAttr['total'] = 0;
// }
$stmt = $this->_order->items;
$this->_inTable = true;
while ($item = $stmt->fetch()) {
if ($item->item_group_id > 0) {
$itemGroup = Model\ItemGroup::model()->findByPk($item->item_group_id);
if ($itemGroup) {
$suppressPrice = empty($itemGroup->summarize) && !$itemGroup->show_individual_prices;
}
}
$items[$i]['heading'] = $item->unit_price == 0 && $item->amount == 0;
//$items[$i]['product_id'] = $items[$i]['supplier_product_id'] = $item->supplier_product_id;
if ($this->_IS_PURCHASE_INVOICE && $this->_template['show_supplier_product_id'] == '1') {
$items[$i]['supplier_product_id'] = $item->product ? $item->product->supplier_product_id : "";
}
$items[$i]['discount'] = $item->discount > 0 ? $item->discount : 0;
$items[$i]['amount'] = $item->amount;
$items[$i]['description'] = $item->getParsedDescription();
//$items[$i]['description'] = $billing2->replace_item_description($items[$i]['description'], $this->order);
$items[$i]['id'] = $item->id;
$items[$i]['article_id'] = !empty($item->product) ? $item->product->article_id : '';
$items[$i]['cost_code'] = $item->cost_code;
if ($this->_IS_PURCHASE_INVOICE) {
$items[$i]['unit_cost'] = $item->unit_cost;
$items[$i]['unit_total_cost'] = $item->unit_cost * ((100 + $item->vat) / 100);
$items[$i]['total_cost'] = $item->amount * $item->unit_cost;
$items[$i]['totalincl_cost'] = $item->amount * $items[$i]['unit_total_cost'];
} else {
$items[$i]['unit_price'] = $item->unit_price;
$items[$i]['unit_list'] = $item->unit_list;
$items[$i]['unit_total'] = $item->unit_total;
$items[$i]['total'] = $item->amount * $item->unit_price;
$items[$i]['totalincl'] = $item->amount * $item->unit_total;
}
$items[$i]['vat'] = $item->vat;
$price = !empty($item->unit_price) ? $item->unit_price : $item->unit_list;
$netUnitPrice = (100 + (double) $item->vat) * (double) $price / 100;
$items[$i]['gross_unit_price'] = $netUnitPrice;
$items[$i]['gross_total_price'] = (double) $item->amount * $netUnitPrice;
$items[$i]['unit'] = $item->unit;
$items[$i]['markup'] = $item->markup;
$items[$i]['item_group_name'] = isset($item->item_group_name) ? $item->item_group_name : '';
$items[$i]['summarize'] = !empty($item->summarize);
$items[$i]['suppress_price'] = !empty($suppressPrice);
//$items[$i]['item_price'] = $items[$i]['amount'] * $items[$i]['unit_price'];
if ($item->discount > 0) {
$discount = true;
}
// if ($item->supplier_product_id > 0) {
// $supplier_product_id = true;
// }
$i++;
}
//
// var_dump($items);
// exit();
//$new_item_group = $item_group_name != $billing->f('item_group_name');
//$item_group_name = $billing->f('item_group_name');
// if (count($this->supplier)) {
//.........这里部分代码省略.........
示例6: setCurrentUser
/**
* Sets current user for the entire session. Use it wisely!
* @param int/Model\User $user_id
*/
public function setCurrentUser($user_id)
{
// if(\GO::modules()->isInstalled("log"))
// \GO\Log\Model\Log::create ("setcurrentuser", "Set user ID to $user_id");
if ($user_id instanceof Model\User) {
$this->_user = $user_id;
$this->values['user_id'] = $user_id->id;
} else {
//remember user id in session
$this->values['user_id'] = $user_id;
}
if (!\GO::user()) {
throw new \Exception("Could not set user with id " . $user_id . " in Session::setCurrentUser()!");
}
date_default_timezone_set(\GO::user()->timezone);
\GO::language()->setLanguage(\GO::user()->language);
//for logging
\GO::session()->values['username'] = \GO::user()->username;
}
示例7: foreach
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (\GO\Base\Html\Error::checkRequired()) {
foreach ($_POST as $key => $value) {
\GO::config()->{$key} = $value;
}
\GO::config()->save();
redirect("smtp.php");
}
}
printHead();
?>
<h1>Regional settings</h1>
<?php
\GO\Base\Html\Select::render(array("required" => true, 'label' => 'Country', 'value' => \GO::config()->default_country, 'name' => "default_country", 'options' => \GO::language()->getCountries()));
\GO\Base\Html\Select::render(array("required" => true, 'label' => 'Language', 'value' => \GO::config()->language, 'name' => "language", 'options' => \GO::language()->getLanguages()));
$tz = array();
foreach (DateTimeZone::listIdentifiers() as $id) {
$tz[$id] = $id;
}
\GO\Base\Html\Select::render(array("required" => true, 'label' => 'Timezone', 'value' => \GO::config()->default_timezone, 'name' => "default_timezone", 'options' => $tz));
$dateFormats = array();
foreach (\GO::config()->date_formats as $format) {
$dateFormats[$format] = str_replace(array('Y', 'm', 'd'), array('Year ', 'Month ', 'Day '), $format);
}
\GO\Base\Html\Select::render(array("required" => true, 'label' => 'Date format', 'value' => \GO::config()->default_date_format, 'name' => "default_date_format", 'options' => $dateFormats));
\GO\Base\Html\Input::render(array("required" => true, "label" => "Date separator", "name" => "default_date_separator", "value" => \GO::config()->default_date_separator));
$timeFormats = array();
foreach (\GO::config()->time_formats as $format) {
$timeFormats[$format] = trim(str_replace(array('h', 'H', 'a', 'i', ':'), array('12h ', '24h ', '', ''), $format));
}
示例8: _getAllLanguageFiles
private function _getAllLanguageFiles()
{
$files = array();
$languages = array_keys(\GO::language()->getLanguages());
$commonLangFolder = new \GO\Base\Fs\Folder(\GO::config()->root_path . 'language/');
$folders = $commonLangFolder->ls();
$modules = \GO::modules()->getAllModules();
foreach ($modules as $module) {
$folder = new \GO\Base\Fs\Folder($module->path . 'language');
if ($folder->exists()) {
$folders[] = $folder;
}
}
foreach ($folders as $folder) {
foreach ($languages as $language) {
if ($file = $folder->child($language . '.php')) {
$files[] = $file;
}
}
}
return $files;
}
示例9: sendMeetingRequest
/**
* Sends a meeting request to all participants. If the participant is not a Group-Office user
* or the organizer has no permissions to schedule an event it will include an
* icalendar attachment so the calendar software can schedule it.
*
* @return boolean
* @throws Exception
*/
public function sendMeetingRequest($newParticipantsOnly = false, $update = false)
{
if (!$this->is_organizer) {
throw new \Exception("Meeting request can only be send from the organizer's event");
}
$stmt = $this->participants;
//handle missing user
if (!$this->user) {
$this->user_id = 1;
$this->save(true);
}
while ($participant = $stmt->fetch()) {
if (!$newParticipantsOnly || isset(\GO::session()->values['new_participant_ids']) && in_array($participant->user_id, \GO::session()->values['new_participant_ids'])) {
//don't invite organizer
if ($participant->is_organizer) {
continue;
}
// Set the language of the email to the language of the participant.
$language = false;
if (!empty($participant->user_id)) {
$user = \GO\Base\Model\User::model()->findByPk($participant->user_id);
if ($user) {
\GO::language()->setLanguage($user->language);
}
}
//if participant status is pending then send a new inviation subject. Otherwise send it as update
if (!$update) {
$subject = \GO::t('invitation', 'calendar') . ': ' . $this->name;
$bodyLine = \GO::t('invited', 'calendar');
} else {
$subject = \GO::t('invitation_update', 'calendar') . ': ' . $this->name;
$bodyLine = \GO::t('eventUpdated', 'calendar');
}
//create e-mail message
$message = \GO\Base\Mail\Message::newInstance($subject)->setFrom($this->user->email, $this->user->name)->addTo($participant->email, $participant->name);
//check if we have a Group-Office event. If so, we can handle accepting
//and declining in Group-Office. Otherwise we'll use ICS calendar objects by mail
$participantEvent = $participant->getParticipantEvent();
$body = '<p>' . $bodyLine . ': </p>' . $this->toHtml();
// if(!$participantEvent){
//build message for external program
$acceptUrl = \GO::url("calendar/event/invitation", array("id" => $this->id, 'accept' => 1, 'email' => $participant->email, 'participantToken' => $participant->getSecurityToken()), false);
$declineUrl = \GO::url("calendar/event/invitation", array("id" => $this->id, 'accept' => 0, 'email' => $participant->email, 'participantToken' => $participant->getSecurityToken()), false);
// if($participantEvent){
//hide confusing buttons if user has a GO event.
$body .= '<div class="go-hidden">';
// }
$body .= '<p><br /><b>' . \GO::t('linkIfCalendarNotSupported', 'calendar') . '</b></p>' . '<p>' . \GO::t('acccept_question', 'calendar') . '</p>' . '<a href="' . $acceptUrl . '">' . \GO::t('accept', 'calendar') . '</a>' . ' | ' . '<a href="' . $declineUrl . '">' . \GO::t('decline', 'calendar') . '</a>';
// if($participantEvent){
$body .= '</div>';
// }
$ics = $this->toICS("REQUEST");
$a = \Swift_Attachment::newInstance($ics, \GO\Base\Fs\File::stripInvalidChars($this->name) . '.ics', 'text/calendar; METHOD="REQUEST"');
$a->setEncoder(new Swift_Mime_ContentEncoder_PlainContentEncoder("8bit"));
$a->setDisposition("inline");
$message->attach($a);
//for outlook 2003 compatibility
$a2 = \Swift_Attachment::newInstance($ics, 'invite.ics', 'application/ics');
$a2->setEncoder(new Swift_Mime_ContentEncoder_PlainContentEncoder("8bit"));
$message->attach($a2);
if ($participantEvent) {
$url = \GO::createExternalUrl('calendar', 'openCalendar', array('unixtime' => $this->start_time));
$body .= '<br /><a href="' . $url . '">' . \GO::t('openCalendar', 'calendar') . '</a>';
}
$message->setHtmlAlternateBody($body);
// Set back the original language
if ($language !== false) {
\GO::language()->setLanguage($language);
}
\GO\Base\Mail\Mailer::newGoInstance()->send($message);
}
}
unset(\GO::session()->values['new_participant_ids']);
return true;
}
示例10:
<td><?php
echo $form->label($company, 'state');
?>
</td>
<td><?php
echo $form->textField($company, 'state');
echo $form->error($company, 'state');
?>
</td>
</tr>
<tr>
<td><?php
echo $form->label($company, 'country');
?>
<td><?php
echo $form->dropDownList($company, 'country', \GO::language()->getCountries());
echo $form->error($company, 'country');
?>
</td>
</tr>
<!-- <tr>
<td><?php
//echo $form->label($company, 'postAddressIsEqual');
?>
</td>
<td><?php
//echo $form->checkBox($company, 'postAddressIsEqual');
?>
</td>
</tr>-->
<!-- <tr>
示例11: explode
$lines = explode("\n", $data);
foreach ($lines as $line) {
if (!empty($line)) {
$scripts[] = $root_uri . $line;
}
}
}
$modules[] = $module->id . $module->permissionLevel;
}
}
//two modules may include the same script
$scripts = array_map('trim', $scripts);
$scripts = array_unique($scripts);
//include config file location because in some cases different URL's point to
//the same database and this can break things if the settings are cached.
$file = $user_id . '-' . md5(\GO::config()->mtime . \GO::config()->get_config_file() . ':' . \GO::language()->getLanguage() . ':' . $modulesCacheStr) . '.js';
$path = $cacheFolder->path() . '/' . $file;
if (!\GO::config()->debug) {
if (!file_exists($path)) {
$js = '';
file_put_contents($cacheFolder->path() . '/' . $user_id . '-modules.js', 'GO.settings.modules = Ext.decode("' . addslashes(json_encode(\GO::view()->exportModules())) . '");');
array_unshift($scripts, $cacheFolder->path() . '/' . $user_id . '-modules.js');
foreach ($scripts as $script) {
//file_put_contents($path,"\n\n".file_get_contents($script),FILE_APPEND);
$js .= "\n\n" . file_get_contents($script);
}
if (\GO::config()->minify) {
$js = \GO\Base\Util\Minify\JSMin::minify($js);
}
file_put_contents($path, $js, FILE_APPEND);
}
示例12: actionLogin
protected function actionLogin($params)
{
if (!empty($params["login_language"])) {
GO::language()->setLanguage($params["login_language"]);
}
if (!empty($params['domain'])) {
$params['username'] .= $params['domain'];
}
$response = array();
if (!$this->fireEvent('beforelogin', array(&$params, &$response))) {
$response['success'] = false;
if (!isset($response['feedback'])) {
$response['feedback'] = GO::t('badLogin');
}
return $response;
}
$user = \GO::session()->login($params['username'], $params['password']);
$response['success'] = $user != false;
if (!$response['success']) {
$response['feedback'] = \GO::t('badLogin');
} else {
if (!empty($params['remind'])) {
$encUsername = \GO\Base\Util\Crypt::encrypt($params['username']);
if (!$encUsername) {
$encUsername = $params['username'];
}
$encPassword = \GO\Base\Util\Crypt::encrypt($params['password']);
if (!$encPassword) {
$encPassword = $params['password'];
}
\GO\Base\Util\Http::setCookie('GO_UN', $encUsername);
\GO\Base\Util\Http::setCookie('GO_PW', $encPassword);
}
$response['groupoffice_version'] = \GO::config()->version;
$response['user_id'] = $user->id;
$response['security_token'] = \GO::session()->values["security_token"];
$response['sid'] = session_id();
if (!empty($params['return_user_info'])) {
$response['modules'] = array();
foreach (\GO::modules()->getAllModules() as $module) {
$response['modules'][] = $module->id;
}
$response['user'] = \GO::user()->getAttributes();
}
if (!empty($params["login_language"])) {
GO::language()->setLanguage($params["login_language"]);
\GO::user()->language = \GO::language()->getLanguage();
\GO::user()->save();
}
}
// return $response;
if (\GO\Base\Util\Http::isAjaxRequest()) {
return $response;
} else {
$this->redirect();
}
}
示例13: process_form
//.........这里部分代码省略.........
$contactCfModel = \GO\Addressbook\Customfields\Model\Contact::model()->findByPk($contactId);
if (!$contactCfModel) {
$contactCfModel = new \GO\Addressbook\Customfields\Model\Contact();
$contactCfModel->model_id = $contactId;
}
$contactCfModel->setAttributes($cfFields);
$contactCfModel->save();
}
if (isset($_POST['mailings'])) {
foreach ($_POST['mailings'] as $mailingName) {
if (!empty($mailingName)) {
$addresslistModel = \GO\Addressbook\Model\Addresslist::model()->findSingleByAttribute('name', $mailingName);
if (empty($addresslistModel)) {
throw new Exception('Addresslist not found!');
}
$addresslistModel->addManyMany('contacts', $contactId);
}
}
}
if ($this->contact_id > 0) {
if (isset($_FILES['photo']['tmp_name']) && is_uploaded_file($_FILES['photo']['tmp_name'])) {
$fsFile = new \GO\Base\Fs\File($_FILES['photo']['tmp_name']);
$fsFile->move(new \GO\Base\Fs\Folder(\GO::config()->tmpdir), $_FILES['photo']['name'], false, false);
$contactModel = \GO\Addressbook\Model\Contact::model()->findByPk($contactId);
$contactModel->setPhoto(\GO::config()->tmpdir . $_FILES['photo']['name']);
}
}
if (!isset($_POST['contact_id'])) {
/**
* Send notification of new contact to (1) users specified by 'notify_users'
* in the form itself and to (2) the addressbook owner if so specified.
*/
// Send the email to the admin users in the language of the addressbook owner.
$oldLanguage = \GO::language()->getLanguage();
\GO::language()->setLanguage($addressbookModel->user->language);
$usersToNotify = isset($_POST['notify_users']) ? explode(',', $_POST['notify_users']) : array();
if (!empty($_POST['notify_addressbook_owner'])) {
$usersToNotify[] = $addressbookModel->user_id;
}
$mailTo = array();
foreach ($usersToNotify as $userToNotifyId) {
$userModel = \GO\Base\Model\User::model()->findByPk($userToNotifyId);
$mailTo[] = $userModel->email;
}
if (count($mailTo)) {
$viewContactUrl = \GO::createExternalUrl('addressbook', 'showContact', array($contactId));
$contactModel = \GO\Addressbook\Model\Contact::model()->findByPk($contactId);
$companyModel = \GO\Addressbook\Model\Company::model()->findByPk($contactModel->company_id);
if (!empty($companyModel)) {
$companyName = $companyModel->name;
} else {
$companyName = '';
}
$values = array('address_no', 'address', 'zip', 'city', 'state', 'country');
$formatted_address = nl2br(\GO\Base\Util\Common::formatAddress('{country}', '{address}', '{address_no}', '{zip}', '{city}', '{state}'));
foreach ($values as $val) {
$formatted_address = str_replace('{' . $val . '}', $contactModel->{$val}, $formatted_address);
}
$body = \GO::t('newContactFromSite', 'addressbook') . ':<br />';
$body .= \GO::t('name', 'addressbook') . ': ' . $contactModel->addressbook->name . '<br />';
$body .= "<br />" . $contactModel->name;
$body .= "<br />" . $formatted_address;
if (!empty($contactModel->home_phone)) {
$body .= "<br />" . \GO::t('phone') . ': ' . $contactModel->home_phone;
}
if (!empty($contactModel->cellular)) {
示例14: launch
/**
* Find's the site model by server name or GET param site_id and runs the site.
*
* @throws \GO\Base\Exception\NotFound
*/
public static function launch($site_id = null)
{
if (isset($site_id)) {
self::$_site = \GO\Site\Model\Site::model()->findByPk($site_id, false, true);
// Find the website model from its id
} else {
if (isset($_GET['site_id'])) {
GO::session()->values['site_id'] = $_GET['site_id'];
}
if (isset(GO::session()->values['site_id'])) {
self::$_site = \GO\Site\Model\Site::model()->findByPk(GO::session()->values['site_id'], false, true);
} else {
self::$_site = \GO\Site\Model\Site::model()->findSingleByAttribute('domain', $_SERVER["SERVER_NAME"]);
}
// Find the website model from its domainname
}
if (!self::$_site) {
self::$_site = \GO\Site\Model\Site::model()->findSingleByAttribute('domain', '*');
}
// Find the website model from its domainname
if (!self::$_site) {
throw new \GO\Base\Exception\NotFound('Website for domain ' . $_SERVER["SERVER_NAME"] . ' not found in database');
}
\GO::session()->loginWithCookies();
if (!empty(self::model()->language)) {
\GO::language()->setLanguage(self::model()->language);
}
self::router()->runController();
}