Joomla Platform
13.1
Documentation des API du framework Joomla Platform
Page principale
Pages associées
Espaces de nommage
Classes
Fichiers
Exemples
Liste des fichiers
Membres de fichier
Tout
Classes
Espaces de nommage
Fichiers
Fonctions
Variables
Pages
cms.php
Aller à la documentation de ce fichier.
1
<?php
2
/**
3
* @package Joomla.Libraries
4
*
5
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
6
* @license GNU General Public License version 2 or later; see LICENSE
7
*/
8
9
defined(
'_JEXEC'
) or die;
10
11
// Set the platform root path as a constant if necessary.
12
if
(!defined('JPATH_PLATFORM'))
13
{
14
define(
'JPATH_PLATFORM'
, __DIR__);
15
}
16
17
// Import the library loader if necessary.
18
if
(!class_exists(
'JLoader'
))
19
{
20
require_once JPATH_PLATFORM .
'/loader.php'
;
21
}
22
23
// Make sure that the Joomla Platform has been successfully loaded.
24
if
(!class_exists(
'JLoader'
))
25
{
26
throw
new
RuntimeException(
'Joomla Platform not loaded.'
);
27
}
28
29
// Register the library base path for CMS libraries.
30
JLoader::registerPrefix
(
'J'
, JPATH_PLATFORM .
'/cms'
,
false
,
true
);
31
32
// Register a handler for uncaught exceptions that shows a pretty error page when possible
33
set_exception_handler(array(
'JErrorPage'
,
'render'
));
34
35
// Define the Joomla version if not already defined.
36
if
(!defined(
'JVERSION'
))
37
{
38
$jversion =
new
JVersion;
39
define(
'JVERSION'
, $jversion->getShortVersion());
40
}
41
42
// Set up the message queue logger for web requests
43
if
(array_key_exists(
'REQUEST_METHOD'
, $_SERVER))
44
{
45
JLog::addLogger
(array(
'logger'
=>
'messagequeue'
),
JLog::ALL
, array(
'jerror'
));
46
}
47
48
// Register classes where the names have been changed to fit the autoloader rules
49
// @deprecated 4.0
50
JLoader::register
(
'JToolBar'
, JPATH_PLATFORM .
'/cms/toolbar/toolbar.php'
);
51
JLoader::register
(
'JButton'
, JPATH_PLATFORM .
'/cms/toolbar/button.php'
);
52
JLoader::register
(
'JInstallerComponent'
, JPATH_PLATFORM .
'/cms/installer/adapter/component.php'
);
53
JLoader::register
(
'JInstallerFile'
, JPATH_PLATFORM .
'/cms/installer/adapter/file.php'
);
54
JLoader::register
(
'JInstallerLanguage'
, JPATH_PLATFORM .
'/cms/installer/adapter/language.php'
);
55
JLoader::register
(
'JInstallerLibrary'
, JPATH_PLATFORM .
'/cms/installer/adapter/library.php'
);
56
JLoader::register
(
'JInstallerModule'
, JPATH_PLATFORM .
'/cms/installer/adapter/module.php'
);
57
JLoader::register
(
'JInstallerPackage'
, JPATH_PLATFORM .
'/cms/installer/adapter/package.php'
);
58
JLoader::register
(
'JInstallerPlugin'
, JPATH_PLATFORM .
'/cms/installer/adapter/plugin.php'
);
59
JLoader::register
(
'JInstallerTemplate'
, JPATH_PLATFORM .
'/cms/installer/adapter/template.php'
);
60
JLoader::register
(
'JExtension'
, JPATH_PLATFORM .
'/cms/installer/extension.php'
);
61
JLoader::registerAlias
(
'JAdministrator'
,
'JApplicationAdministrator'
);
62
JLoader::registerAlias
(
'JSite'
,
'JApplicationSite'
);
63
64
// Register Observers:
65
// Add Tags to Content, Contact, NewsFeeds, WebLinks and Categories: (this is the only link between them here!):
66
JObserverMapper::addObserverClassToClass
(
'JTableObserverTags'
,
'JTableContent'
, array(
'typeAlias'
=>
'com_content.article'
));
67
JObserverMapper::addObserverClassToClass
(
'JTableObserverTags'
,
'ContactTableContact'
, array(
'typeAlias'
=>
'com_contact.contact'
));
68
JObserverMapper::addObserverClassToClass
(
'JTableObserverTags'
,
'NewsfeedsTableNewsfeed'
, array(
'typeAlias'
=>
'com_newsfeeds.newsfeed'
));
69
JObserverMapper::addObserverClassToClass
(
'JTableObserverTags'
,
'WeblinksTableWeblink'
, array(
'typeAlias'
=>
'com_weblinks.weblink'
));
70
JObserverMapper::addObserverClassToClass
(
'JTableObserverTags'
,
'JTableCategory'
, array(
'typeAlias'
=>
'{extension}.category'
));
71
72
// Register Observers for Version History
73
JObserverMapper::addObserverClassToClass
(
'JTableObserverContenthistory'
,
'ContactTableContact'
, array(
'typeAlias'
=>
'com_contact.contact'
));
74
JObserverMapper::addObserverClassToClass
(
'JTableObserverContenthistory'
,
'JTableContent'
, array(
'typeAlias'
=>
'com_content.article'
));
75
JObserverMapper::addObserverClassToClass
(
'JTableObserverContenthistory'
,
'JTableCategory'
, array(
'typeAlias'
=>
'{extension}.category'
));
76
JObserverMapper::addObserverClassToClass
(
'JTableObserverContenthistory'
,
'NewsfeedsTableNewsfeed'
, array(
'typeAlias'
=>
'com_newsfeeds.newsfeed'
));
77
JObserverMapper::addObserverClassToClass
(
'JTableObserverContenthistory'
,
'WeblinksTableWeblink'
, array(
'typeAlias'
=>
'com_weblinks.weblink'
));
78
JObserverMapper::addObserverClassToClass
(
'JTableObserverContenthistory'
,
'BannersTableBanner'
, array(
'typeAlias'
=>
'com_banners.banner'
));
79
JObserverMapper::addObserverClassToClass
(
'JTableObserverContenthistory'
,
'BannersTableClient'
, array(
'typeAlias'
=>
'com_banners.client'
));
80
JObserverMapper::addObserverClassToClass
(
'JTableObserverContenthistory'
,
'TagsTableTag'
, array(
'typeAlias'
=>
'com_tags.tag'
));
81
JObserverMapper::addObserverClassToClass
(
'JTableObserverContenthistory'
,
'UsersTableNote'
, array(
'typeAlias'
=>
'com_users.note'
));
Documentation et API générés le 16/11/2013 par l'équipe
Dev.joomla.fr
de l'
AFUJ
avec la solution