return 200;
}
use Joomla\CMS\Date\Date;
class fa_IRDate extends Date {
const DAY_NUMBER = "\x027\x03";
const DAY_NUMBER2 = "\x030\x03";
const DAY_YEAR = "\x032\x03";
const MONTH_ABBR = "\x033\x03";
const MONTH_NAME = "\x034\x03";
*
* @since 4.0.0
*/
public function createLanguage($lang, $debug = false): Language
{
return new Language($lang, $debug);
}
}
* @since 4.0.0
*/
public function createLanguage($lang, $debug = false): Language
{
if (!isset(self::$languages[$lang . $debug])) {
self::$languages[$lang . $debug] = parent::createLanguage($lang, $debug);
}
return self::$languages[$lang . $debug];
}
}
);
$conf = self::getConfig();
$locale = $conf->get('language');
$debug = $conf->get('debug_lang');
$lang = self::getContainer()->get(LanguageFactoryInterface::class)->createLanguage($locale, $debug);
return $lang;
}
/**
),
E_USER_DEPRECATED
);
if (!self::$language) {
self::$language = self::createLanguage();
}
return self::$language;
}
*/
public function __construct($options = [])
{
// Extract the internal dependencies before calling the parent constructor since it calls $this->load()
$this->app = isset($options['app']) && $options['app'] instanceof CMSApplication ? $options['app'] : Factory::getApplication();
$this->language = isset($options['language']) && $options['language'] instanceof Language ? $options['language'] : Factory::getLanguage();
if (!isset($options['db']) || !($options['db'] instanceof DatabaseDriver)) {
@trigger_error(sprintf('Database will be mandatory in 5.0.'), E_USER_DEPRECATED);
$options['db'] = Factory::getContainer()->get(DatabaseDriver::class);
}
if (!\array_key_exists('db', $options)) {
$options['db'] = $this->getDatabase();
}
$instance = new $classname($options);
if ($instance instanceof CacheControllerFactoryAwareInterface) {
$instance->setCacheControllerFactory($this->getCacheControllerFactory());
}
if ($this->menuFactory === null) {
@trigger_error('Menu factory must be set in 5.0', E_USER_DEPRECATED);
$this->menuFactory = $this->getContainer()->get(MenuFactoryInterface::class);
}
$this->menus[$name] = $this->menuFactory->createMenu($name, $options);
// Make sure the abstract menu has the instance too, is needed for BC and will be removed with version 5
AbstractMenu::$instances[$name] = $this->menus[$name];
return $this->menus[$name];
return $this->template->template;
}
// Get the id of the active menu item
$menu = $this->getMenu();
$item = $menu->getActive();
if (!$item) {
$item = $menu->getItem($this->input->getInt('Itemid', null));
}
public function render(\Throwable $error): string
{
$app = Factory::getApplication();
// Get the current template from the application
$template = $app->getTemplate(true);
// Push the error object into the document
$this->getDocument()->setError($error);
// Add registry file for the template asset
'subject' => $app,
'document' => $renderer->getDocument(),
])
);
$data = $renderer->render($error);
// If nothing was rendered, just use the message from the Exception
if (empty($data)) {
$data = $error->getMessage();
}
* @since 3.10.0
*/
public static function handleException(\Throwable $error)
{
static::logException($error);
static::render($error);
}
/**
* Render the error page based on an exception.
*
);
// Trigger the onError event.
$this->dispatchEvent('onError', $event);
ExceptionHandler::handleException($event->getError());
}
// Trigger the onBeforeRespond event.
$this->dispatchEvent(
'onBeforeRespond',
// Set the application as global app
\Joomla\CMS\Factory::$application = $app;
// Execute the application.
$app->execute();
* define() is used rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
return ['OTHER', 'MORE'];
}
use Joomla\CMS\Date\Date;
class fa_IRDate extends Date {
const DAY_NUMBER = "\x027\x03";
const DAY_NUMBER2 = "\x030\x03";
const DAY_YEAR = "\x032\x03";
const MONTH_ABBR = "\x033\x03";
const MONTH_NAME = "\x034\x03";
*
* @since 4.0.0
*/
public function createLanguage($lang, $debug = false): Language
{
return new Language($lang, $debug);
}
}
* @since 4.0.0
*/
public function createLanguage($lang, $debug = false): Language
{
if (!isset(self::$languages[$lang . $debug])) {
self::$languages[$lang . $debug] = parent::createLanguage($lang, $debug);
}
return self::$languages[$lang . $debug];
}
}
if (isset($options['language'])) {
$this->set('language', $options['language']);
}
// Build our language object
$lang = $this->getContainer()->get(LanguageFactoryInterface::class)->createLanguage($this->get('language'), $this->get('debug_lang'));
// Load the language to the API
$this->loadLanguage($lang);
// Register the language object with Factory
$options['language'] = 'en-GB';
}
}
// Finish initialisation
parent::initialiseApp($options);
}
/**
* Load the library language files for the application
*
* @since 3.2
*/
protected function doExecute()
{
// Initialise the application
$this->initialiseApp();
// Mark afterInitialise in the profiler.
JDEBUG ? $this->profiler->mark('afterInitialise') : null;
// Route the application
$this->sanityCheckSystemVariables();
$this->setupLogging();
$this->createExtensionNamespaceMap();
// Perform application routines.
$this->doExecute();
// If we have an application document object, render it.
if ($this->document instanceof \Joomla\CMS\Document\Document) {
// Render the application output.
$this->render();
// Set the application as global app
\Joomla\CMS\Factory::$application = $app;
// Execute the application.
$app->execute();
* define() is used rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
[2/2]
ParseError
|
---|
ParseError: syntax error, unexpected token "class", expecting "function" or "const" at /home/falaghso/public_html/administrator/language/fa-IR/localise.php:97 at Joomla\CMS\Language\Language->__construct('fa-IR', false) (/home/falaghso/public_html/libraries/src/Language/LanguageFactory.php:35) at Joomla\CMS\Language\LanguageFactory->createLanguage('fa-IR', false) (/home/falaghso/public_html/libraries/src/Language/CachingLanguageFactory.php:45) at Joomla\CMS\Language\CachingLanguageFactory->createLanguage('fa-IR', false) (/home/falaghso/public_html/libraries/src/Factory.php:745) at Joomla\CMS\Factory::createLanguage() (/home/falaghso/public_html/libraries/src/Factory.php:305) at Joomla\CMS\Factory::getLanguage() (/home/falaghso/public_html/libraries/src/Menu/SiteMenu.php:72) at Joomla\CMS\Menu\SiteMenu->__construct(array('app' => object(SiteApplication), 'db' => object(MysqliDriver))) (/home/falaghso/public_html/libraries/src/Menu/MenuFactory.php:55) at Joomla\CMS\Menu\MenuFactory->createMenu('site', array('app' => object(SiteApplication), 'db' => object(MysqliDriver))) (/home/falaghso/public_html/libraries/src/Application/CMSApplication.php:543) at Joomla\CMS\Application\CMSApplication->getMenu() (/home/falaghso/public_html/libraries/src/Application/SiteApplication.php:430) at Joomla\CMS\Application\SiteApplication->getTemplate(true) (/home/falaghso/public_html/libraries/src/Error/Renderer/HtmlRenderer.php:50) at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(ParseError)) (/home/falaghso/public_html/libraries/src/Exception/ExceptionHandler.php:136) at Joomla\CMS\Exception\ExceptionHandler::render(object(ParseError)) (/home/falaghso/public_html/libraries/src/Exception/ExceptionHandler.php:73) at Joomla\CMS\Exception\ExceptionHandler::handleException(object(ParseError)) (/home/falaghso/public_html/libraries/src/Application/CMSApplication.php:336) at Joomla\CMS\Application\CMSApplication->execute() (/home/falaghso/public_html/includes/app.php:58) at require_once('/home/falaghso/public_html/includes/app.php') (/home/falaghso/public_html/index.php:32) |
[1/2]
ParseError
|
---|
ParseError: syntax error, unexpected token "class", expecting "function" or "const" at /home/falaghso/public_html/language/fa-IR/localise.php:49 at Joomla\CMS\Language\Language->__construct('fa-IR', false) (/home/falaghso/public_html/libraries/src/Language/LanguageFactory.php:35) at Joomla\CMS\Language\LanguageFactory->createLanguage('fa-IR', false) (/home/falaghso/public_html/libraries/src/Language/CachingLanguageFactory.php:45) at Joomla\CMS\Language\CachingLanguageFactory->createLanguage('fa-IR', false) (/home/falaghso/public_html/libraries/src/Application/CMSApplication.php:736) at Joomla\CMS\Application\CMSApplication->initialiseApp(array('language' => 'fa-IR')) (/home/falaghso/public_html/libraries/src/Application/SiteApplication.php:643) at Joomla\CMS\Application\SiteApplication->initialiseApp() (/home/falaghso/public_html/libraries/src/Application/SiteApplication.php:238) at Joomla\CMS\Application\SiteApplication->doExecute() (/home/falaghso/public_html/libraries/src/Application/CMSApplication.php:306) at Joomla\CMS\Application\CMSApplication->execute() (/home/falaghso/public_html/includes/app.php:58) at require_once('/home/falaghso/public_html/includes/app.php') (/home/falaghso/public_html/index.php:32) |