| Server IP : 10.10.92.66 / Your IP : 104.23.243.84 Web Server : Apache/2.4.52 (Ubuntu) System : Linux jurnalpolinema 5.15.0-177-generic #187-Ubuntu SMP Sat Apr 11 22:54:33 UTC 2026 x86_64 User : jurnal ( 1001) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/jurnal/public_html/lib/pkp/classes/site/ |
Upload File : |
<?php
/**
* @defgroup site Site
* Site-related concerns such as the Site object and version management.
*/
/**
* @file classes/site/Site.inc.php
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class Site
* @ingroup site
* @see SiteDAO
*
* @brief Describes system-wide site properties.
*/
class Site extends DataObject {
/**
* Return associative array of all locales supported by the site.
* These locales are used to provide a language toggle on the main site pages.
* @return array
*/
function &getSupportedLocaleNames() {
$supportedLocales =& Registry::get('siteSupportedLocales', true, null);
if ($supportedLocales === null) {
$supportedLocales = array();
$localeNames =& AppLocale::getAllLocales();
$locales = $this->getSupportedLocales();
foreach ($locales as $localeKey) {
$supportedLocales[$localeKey] = $localeNames[$localeKey];
}
asort($supportedLocales);
}
return $supportedLocales;
}
//
// Get/set methods
//
/**
* Get site title.
* @param $locale string Locale code to return, if desired.
*/
function getTitle($locale = null) {
return $this->getData('title', $locale);
}
/**
* Get localized site title.
*/
function getLocalizedTitle() {
return $this->getLocalizedData('title');
}
/**
* Get "localized" site page title (if applicable).
* @return array|string
* @deprecated 3.3.0
*/
function getLocalizedPageHeaderTitle() {
if ($this->getLocalizedData('pageHeaderTitleImage')) {
return $this->getLocalizedData('pageHeaderTitleImage');
}
if ($this->getData('pageHeaderTitleImage', AppLocale::getPrimaryLocale())) {
return $this->getData('pageHeaderTitleImage', AppLocale::getPrimaryLocale());
}
if ($this->getLocalizedData('title')) {
return $this->getLocalizedData('title');
}
if ($this->getData('title', AppLocale::getPrimaryLocale())) {
return $this->getData('title', AppLocale::getPrimaryLocale());
}
return '';
}
/**
* Get redirect
* @return int
*/
function getRedirect() {
return $this->getData('redirect');
}
/**
* Set redirect
* @param $redirect int
*/
function setRedirect($redirect) {
$this->setData('redirect', (int)$redirect);
}
/**
* Get localized site about statement.
*/
function getLocalizedAbout() {
return $this->getLocalizedData('about');
}
/**
* Get localized site contact name.
*/
function getLocalizedContactName() {
return $this->getLocalizedData('contactName');
}
/**
* Get localized site contact email.
*/
function getLocalizedContactEmail() {
return $this->getLocalizedData('contactEmail');
}
/**
* Get minimum password length.
* @return int
*/
function getMinPasswordLength() {
return $this->getData('minPasswordLength');
}
/**
* Set minimum password length.
* @param $minPasswordLength int
*/
function setMinPasswordLength($minPasswordLength) {
$this->setData('minPasswordLength', $minPasswordLength);
}
/**
* Get primary locale.
* @return string
*/
function getPrimaryLocale() {
return $this->getData('primaryLocale');
}
/**
* Set primary locale.
* @param $primaryLocale string
*/
function setPrimaryLocale($primaryLocale) {
$this->setData('primaryLocale', $primaryLocale);
}
/**
* Get installed locales.
* @return array
*/
function getInstalledLocales() {
$locales = $this->getData('installedLocales');
return isset($locales) ? $locales : array();
}
/**
* Set installed locales.
* @param $installedLocales array
*/
function setInstalledLocales($installedLocales) {
$this->setData('installedLocales', $installedLocales);
}
/**
* Get array of all supported locales (for static text).
* @return array
*/
function getSupportedLocales() {
$locales = $this->getData('supportedLocales');
return isset($locales) ? $locales : array();
}
/**
* Set array of all supported locales (for static text).
* @param $supportedLocales array
*/
function setSupportedLocales($supportedLocales) {
$this->setData('supportedLocales', $supportedLocales);
}
}