Public Member Functions | |
__construct () | |
killAdminSession () | |
Blog init methods | |
setBlog ($id) | |
unsetBlog () | |
Blog status methods | |
getAllBlogStatus () | |
getBlogStatus (int $s) | |
Admin nonce secret methods | |
getNonce () | |
checkNonce (string $secret) | |
formNonce (bool $render=true) | |
Text Formatters methods | |
addEditorFormater (string $editor_id, string $name, $func) | |
addFormater (string $name, $func) | |
addFormaterName (string $format, string $name) | |
getFormaterName (string $format) | |
getEditors () | |
getFormaters (string $editor_id= '') | |
callEditorFormater (string $editor_id, string $name, string $str) | |
callFormater (string $name, string $str) | |
Behaviors methods | |
addBehavior (string $behavior, $func) | |
addBehaviour (string $behaviour, $func) | |
addBehaviors (array $behaviors) | |
addBehaviours (array $behaviours) | |
hasBehavior (string $behavior) | |
hasBehaviour (string $behaviour) | |
getBehaviors (string $behavior= '') | |
getBehaviours (string $behaviour= '') | |
callBehavior (string $behavior,...$args) | |
callBehaviour (string $behaviour,...$args) | |
Post types URLs management | |
getPostAdminURL (string $type, int|string $post_id, bool $escaped=true, array $params=[]) | |
getPostPublicURL (string $type, string $post_url, bool $escaped=true) | |
setPostType (string $type, string $admin_url, string $public_url, string $label= '') | |
getPostTypes () | |
Versions management methods | |
getVersion (string $module= 'core') | |
getVersions () | |
setVersion (string $module, string $version) | |
testVersion (string $module, string $version) | |
newVersion (string $module, string $version) | |
delVersion (string $module) | |
Users management methods | |
getUser (string $id) | |
getUsers ($params=[], bool $count_only=false) | |
addUser (Cursor $cur) | |
updUser (string $id, Cursor $cur) | |
delUser (string $id) | |
userExists (string $id) | |
getUserPermissions (string $id) | |
setUserPermissions (string $id, array $perms) | |
setUserBlogPermissions (string $id, string $blog_id, array $perms, bool $delete_first=true) | |
setUserDefaultBlog (string $id, string $blog_id) | |
removeUsersDefaultBlogs (array $ids) | |
userDefaults () | |
Blog management methods | |
getBlogPermissions (string $id, bool $with_super=true) | |
getBlog (string $id) | |
getBlogs ($params=[], bool $count_only=false) | |
addBlog (Cursor $cur) | |
updBlog (string $id, Cursor $cur) | |
delBlog (string $id) | |
blogExists (string $id) | |
countBlogPosts (string $id, $type=null) | |
HTML Filter methods | |
HTMLfilter (string $str) | |
WikiToHtml methods | |
wikiTransform (string $str) | |
initWikiPost () | |
initWikiSimpleComment () | |
initWikiComment () | |
wikiPostLink (string $url, string $content) | |
Maintenance methods | |
blogDefaults (?array $defaults=null) | |
indexAllPosts ($start=null, $limit=null) | |
indexAllComments (?int $start=null,?int $limit=null) | |
countAllComments () | |
emptyTemplatesCache () | |
enableRestServer (bool $serve=true) | |
serveRestRequests () | |
Static Public Member Functions | |
static | app () |
Data Fields | |
const | SESSION_TABLE_NAME = Session::SESSION_TABLE_NAME |
const | VERSION_TABLE_NAME = Version::VERSION_TABLE_NAME |
readonly ConnectionInterface | $con |
readonly string | $prefix |
BlogInterface | $blog |
readonly AuthInterface | $auth |
readonly SessionInterface | $session |
readonly UrlInterface | $url |
readonly RestInterface | $rest |
$wiki | |
$wiki2xhtml | |
readonly ModulesInterface | $plugins |
$themes | |
$media | |
$postmedia | |
readonly MetaInterface | $meta |
readonly ErrorInterface | $error |
readonly NoticeInterface | $notices |
readonly LogInterface | $log |
$lang | |
$autoload | |
Backend | $admin |
Dotclear Core Backend Url | $adminurl |
Dotclear Core Backend Favorites | $favs |
Dotclear Core Backend Menus | $menu |
$resources = [] | |
Frontend | $public |
Tpl | $tpl |
Ctx | $ctx |
$cache | |
$spamfilters = [] | |
$widgets | |
Static Private Attributes | |
static dcCore | $instance |
Dotclear core class.
__construct | ( | ) |
dcCore constructor inits everything related to Dotclear.
References $resources, and Autoloader\me().
|
static |
Get dcCore singleton instance
Referenced by Utility\__construct(), Config\__construct(), Media\__construct(), dcProxyV2AdminBehaviors\adminBlogFilter(), dcProxyV2AdminBehaviors\adminBlogListHeader(), dcProxyV2AdminBehaviors\adminBlogListValue(), dcProxyV2AdminBehaviors\adminBlogPreferencesForm(), dcProxyV2AdminBehaviors\adminBlogsActionsPage(), dcProxyV2AdminBehaviors\adminColumnsLists(), dcProxyV2AdminBehaviors\adminCommentFilter(), dcProxyV2AdminBehaviors\adminCommentListHeader(), dcProxyV2AdminBehaviors\adminCommentListValue(), dcProxyV2AdminBehaviors\adminCommentsActions(), dcProxyV2AdminBehaviors\adminCommentsActionsPage(), dcProxyV2AdminBehaviors\adminCommentsSpamForm(), dcProxyV2AdminBehaviors\adminCurrentThemeDetails(), dcProxyV2AdminBehaviors\adminDashboardContents(), dcProxyV2AdminBehaviors\adminDashboardFavorites(), dcProxyV2AdminBehaviors\adminDashboardFavs(), dcProxyV2AdminBehaviors\adminDashboardFavsIcon(), dcProxyV2AdminBehaviors\adminDashboardItems(), dcProxyV2AdminBehaviors\adminDashboardOptionsForm(), dcProxyV2AdminBehaviors\adminFiltersLists(), dcProxyV2AdminBehaviors\adminMediaFilter(), dcProxyV2AdminBehaviors\adminPageFooter(), dcProxyV2AdminBehaviors\adminPagesActionsPage(), dcProxyV2AdminBehaviors\adminPagesListHeader(), dcProxyV2AdminBehaviors\adminPagesListValue(), dcProxyV2AdminBehaviors\adminPostFilter(), dcProxyV2AdminBehaviors\adminPostListHeader(), dcProxyV2AdminBehaviors\adminPostListValue(), dcProxyV2AdminBehaviors\adminPostMiniListHeader(), dcProxyV2AdminBehaviors\adminPostMiniListValue(), dcProxyV2AdminBehaviors\adminPostsActions(), dcProxyV2AdminBehaviors\adminPostsActionsPage(), dcProxyV2AdminBehaviors\adminPreferencesForm(), dcProxyV2AdminBehaviors\adminRteFlags(), dcProxyV2AdminBehaviors\adminSearchPageCombo(), dcProxyV2AdminBehaviors\adminSearchPageDisplay(), dcProxyV2AdminBehaviors\adminSearchPageHead(), dcProxyV2AdminBehaviors\adminSearchPageProcess(), dcProxyV2AdminBehaviors\adminUserFilter(), dcProxyV2AdminBehaviors\adminUserListHeader(), dcProxyV2AdminBehaviors\adminUserListValue(), dcProxyV2AdminBehaviors\adminUsersActions(), dcProxyV2AdminBehaviors\adminUsersActionsContent(), Utility\context(), dcProxyV2CoreBehaviors\coreBeforeLoadingNsFiles(), dcProxyV2CoreBehaviors\coreCommentSearch(), dcProxyV2CoreBehaviors\corePostSearch(), dcProxyV2AdminBehaviors\exportFull(), dcProxyV2AdminBehaviors\exportSingle(), Utility\favorites(), Resources\getDeprecated(), Notices\getNotices(), dcProxyV2AdminBehaviors\importExportModules(), dcProxyV2AdminBehaviors\importFull(), dcProxyV2AdminBehaviors\importInit(), dcProxyV2AdminBehaviors\importPrepareDC12(), dcProxyV2AdminBehaviors\importSingle(), Manage\init(), SpamFilters\init(), Widgets\init(), Antispam\initFilters(), Filter\initWiki(), Manage\listImportExportModules(), Blog\loadFromBlog(), Utility\menus(), dcProxyV2AdminBehaviors\pluginsToolsHeaders(), dcProxyV2AdminBehaviors\pluginsToolsTabs(), Utility\process(), dcProxyV2PublicBehaviors\publicAfterContentFilter(), dcProxyV2PublicBehaviors\publicAfterDocument(), dcProxyV2PublicBehaviors\publicBeforeContentFilter(), dcProxyV2PublicBehaviors\publicBeforeDocument(), dcProxyV2PublicBehaviors\publicBeforeReceiveTrackback(), dcProxyV2PublicBehaviors\publicContentFilter(), dcProxyV2PublicBehaviors\publicPrepend(), dcProxyV2AdminBehaviors\restCheckStoreUpdate(), Rest\serve(), Lang\setLang(), Tpl\SysBehavior(), Utility\template(), dcProxyV2PublicBehaviors\templateAfterBlock(), dcProxyV2PublicBehaviors\templateAfterValue(), dcProxyV2PublicBehaviors\templateBeforeBlock(), dcProxyV2PublicBehaviors\templateBeforeValue(), dcProxyV2PublicBehaviors\templateInsideBlock(), dcProxyV2AdminBehaviors\themesToolsHeaders(), dcProxyV2AdminBehaviors\themesToolsTabs(), dcProxyV2PublicBehaviors\tplAfterData(), dcProxyV2PublicBehaviors\tplBeforeData(), and Utility\url().
killAdminSession | ( | ) |
Kill admin session helper.
setBlog | ( | $id | ) |
Sets the blog to use.
string | $id | The blog ID |
unsetBlog | ( | ) |
Unsets blog property.
getAllBlogStatus | ( | ) |
Gets all blog status.
getBlogStatus | ( | int | $s | ) |
Returns a blog status name given to a code.
int | $s | Status code |
getNonce | ( | ) |
checkNonce | ( | string | $secret | ) |
Check the nonce.
string | $secret | The nonce |
formNonce | ( | bool | $render = true | ) |
Get the nonce HTML code.
bool | $render | Should render element? |
addEditorFormater | ( | string | $editor_id, |
string | $name, | ||
$func | |||
) |
Adds a new text formater.
string | $editor_id | The editor identifier (dcLegacyEditor, dcCKEditor, ...) |
string | $name | The formater name |
callable | $func | The function to use, must be a valid and callable callback |
addFormater | ( | string | $name, |
$func | |||
) |
Adds a new dcLegacyEditor text formater.
string | $name | The formater name |
callable | $func | The function to use, must be a valid and callable callback |
addFormaterName | ( | string | $format, |
string | $name | ||
) |
Adds a formater name.
string | $format | The format |
string | $name | The name |
getFormaterName | ( | string | $format | ) |
Gets the formater name.
string | $format | The format |
getEditors | ( | ) |
Gets the editors list.
getFormaters | ( | string | $editor_id = '' | ) |
Gets the formaters.
string | $editor_id | The editor identifier (dcLegacyEditor, dcCKEditor, ...) |
callEditorFormater | ( | string | $editor_id, |
string | $name, | ||
string | $str | ||
) |
Call editor formater.
string | $editor_id | The editor identifier (dcLegacyEditor, dcCKEditor, ...) |
string | $name | The formater name |
string | $str | The string to transform |
callFormater | ( | string | $name, |
string | $str | ||
) |
Call formater.
string | $name | The name |
string | $str | The string |
addBehavior | ( | string | $behavior, |
$func | |||
) |
Adds a new behavior to behaviors stack.
string | $behavior | The behavior |
callable | $func | The function |
addBehaviour | ( | string | $behaviour, |
$func | |||
) |
Adds a behaviour (alias).
string | $behaviour | The behaviour |
callable | $func | The function |
addBehaviors | ( | array | $behaviors | ) |
Adds new behaviors to behaviors stack.
array<string|string,callable> | $behaviors The behaviors |
addBehaviours | ( | array | $behaviours | ) |
Adds behaviours (alias).
array<string|string,callable> | $behaviours The behaviours |
hasBehavior | ( | string | $behavior | ) |
Determines if behavior exists in behaviors stack.
string | $behavior | The behavior |
hasBehaviour | ( | string | $behaviour | ) |
Determines if behaviour exists (alias).
string | $behaviour | The behavior |
getBehaviors | ( | string | $behavior = '' | ) |
Gets the behaviors stack (or part of).
string | $behavior | The behavior |
getBehaviours | ( | string | $behaviour = '' | ) |
Gets the behaviours stack (alias).
string | $behaviour | The behaviour |
callBehavior | ( | string | $behavior, |
$args | |||
) |
Calls every function in behaviors stack for a given behavior and returns concatened result of each function.
string | $behavior | The behavior |
mixed | ...$args The arguments |
callBehaviour | ( | string | $behaviour, |
$args | |||
) |
Calls every function in behaviours stack (alias).
string | $behaviour | The behaviour |
mixed | ...$args The arguments |
getPostAdminURL | ( | string | $type, |
int|string | $post_id, | ||
bool | $escaped = true , |
||
array | $params = [] |
||
) |
Gets the post admin url.
string | $type | The type |
int | string | $post_id | The post identifier |
bool | $escaped | Escape the URL |
array<string,mixed> | $params The query string parameters (associative array) |
getPostPublicURL | ( | string | $type, |
string | $post_url, | ||
bool | $escaped = true |
||
) |
Gets the post public url.
string | $type | The type |
string | $post_url | The post url |
bool | $escaped | Escape the URL |
setPostType | ( | string | $type, |
string | $admin_url, | ||
string | $public_url, | ||
string | $label = '' |
||
) |
Sets the post type.
string | $type | The type |
string | $admin_url | The admin url |
string | $public_url | The public url |
string | $label | The label |
getPostTypes | ( | ) |
Gets the post types.
getVersion | ( | string | $module = 'core' | ) |
Gets the version of a module.
string | $module | The module |
getVersions | ( | ) |
Gets all known versions.
setVersion | ( | string | $module, |
string | $version | ||
) |
Sets the version of a module.
string | $module | The module |
string | $version | The version |
testVersion | ( | string | $module, |
string | $version | ||
) |
Compare the given version of a module with the registered one.
string | $module | The module |
string | $version | The version |
newVersion | ( | string | $module, |
string | $version | ||
) |
Test if a version is a new one.
string | $module | The module |
string | $version | The version |
delVersion | ( | string | $module | ) |
Remove a module version entry.
string | $module | The module |
getUser | ( | string | $id | ) |
Gets the user by its ID.
string | $id | The identifier |
getUsers | ( | $params = [] , |
|
bool | $count_only = false |
||
) |
Returns a users list.
array<string,mixed>|ArrayObject<string,mixed> | $params The parameters | |
bool | $count_only | Count only results |
addUser | ( | Cursor | $cur | ) |
Adds a new user.
Cursor | $cur | The user Cursor |
Exception |
updUser | ( | string | $id, |
Cursor | $cur | ||
) |
Updates an existing user. Returns the user ID.
string | $id | The user identifier |
Cursor | $cur | The Cursor |
Exception |
delUser | ( | string | $id | ) |
Deletes a user.
string | $id | The user identifier |
Exception |
userExists | ( | string | $id | ) |
Determines if user exists.
string | $id | The identifier |
getUserPermissions | ( | string | $id | ) |
Returns all user permissions as an array.
string | $id | The user identifier |
setUserPermissions | ( | string | $id, |
array | $perms | ||
) |
Sets user permissions.
string | $id | The user identifier |
array<string,array<string,bool>> | $perms The permissions |
Exception |
setUserBlogPermissions | ( | string | $id, |
string | $blog_id, | ||
array | $perms, | ||
bool | $delete_first = true |
||
) |
Sets the user blog permissions.
string | $id | The user identifier |
string | $blog_id | The blog identifier |
array<string,bool> | $perms The permissions | |
bool | $delete_first | Delete permissions first |
Exception |
setUserDefaultBlog | ( | string | $id, |
string | $blog_id | ||
) |
Sets the user default blog. This blog will be selected when user log in.
string | $id | The user identifier |
string | $blog_id | The blog identifier |
removeUsersDefaultBlogs | ( | array | $ids | ) |
Removes users default blogs.
array<int,int|string> | $ids The blogs to remove |
userDefaults | ( | ) |
Returns user default settings in an associative array with setting names in keys.
getBlogPermissions | ( | string | $id, |
bool | $with_super = true |
||
) |
Returns all blog permissions (users) as an array.
string | $id | The blog identifier |
bool | $with_super | Includes super admins in result |
getBlog | ( | string | $id | ) |
Gets the blog.
string | $id | The blog identifier |
getBlogs | ( | $params = [] , |
|
bool | $count_only = false |
||
) |
Returns a MetaRecord of blogs.
array<string,mixed>|ArrayObject<string,mixed> | $params The parameters | |
bool | $count_only | Count only results |
addBlog | ( | Cursor | $cur | ) |
Adds a new blog.
Cursor | $cur | The blog Cursor |
Exception |
updBlog | ( | string | $id, |
Cursor | $cur | ||
) |
Updates a given blog.
string | $id | The blog identifier |
Cursor | $cur | The Cursor |
delBlog | ( | string | $id | ) |
Removes a given blog.
string | $id | The blog identifier |
Exception |
blogExists | ( | string | $id | ) |
Determines if blog exists.
string | $id | The blog identifier |
countBlogPosts | ( | string | $id, |
$type = null |
|||
) |
Counts the number of blog posts.
string | $id | The blog identifier |
null | string | $type | The post type |
HTMLfilter | ( | string | $str | ) |
Calls HTML filter to drop bad tags and produce valid HTML output.
string | $str | The string |
wikiTransform | ( | string | $str | ) |
Returns a transformed string with WikiToHtml.
string | $str | The string |
initWikiPost | ( | ) |
Inits wiki property for blog post.
initWikiSimpleComment | ( | ) |
Inits wiki property for simple blog comment (basic syntax).
initWikiComment | ( | ) |
Inits wiki property for blog comment.
wikiPostLink | ( | string | $url, |
string | $content | ||
) |
Get info about a post:id wiki macro.
string | $url | The post url |
string | $content | The content |
blogDefaults | ( | ?array | $defaults = null | ) |
Creates default settings for active blog.
null|array<array{0:string,1:string,2:mixed,3:string}> | $defaults The defaults settings |
indexAllPosts | ( | $start = null , |
|
$limit = null |
|||
) |
Recreates entries search engine index.
mixed | $start | The start entry index |
mixed | $limit | The limit of entry to index |
indexAllComments | ( | ?int | $start = null , |
?int | $limit = null |
||
) |
Recreates comments search engine index.
int | $start | The start comment index |
int | $limit | The limit of comment to index |
countAllComments | ( | ) |
Reinits nb_comment and nb_trackback in post table.
emptyTemplatesCache | ( | ) |
Empty templates cache directory.
enableRestServer | ( | bool | $serve = true | ) |
Serve or not the REST requests.
bool | $serve | The flag |
serveRestRequests | ( | ) |
Check if we need to serve REST requests.
const SESSION_TABLE_NAME = Session::SESSION_TABLE_NAME |
const VERSION_TABLE_NAME = Version::VERSION_TABLE_NAME |
|
staticprivate |
readonly ConnectionInterface $con |
readonly string $prefix |
BlogInterface $blog |
readonly AuthInterface $auth |
readonly SessionInterface $session |
readonly UrlInterface $url |
readonly RestInterface $rest |
$wiki |
$wiki2xhtml |
readonly ModulesInterface $plugins |
$themes |
$media |
$postmedia |
readonly MetaInterface $meta |
readonly ErrorInterface $error |
readonly NoticeInterface $notices |
readonly LogInterface $log |
$lang |
$autoload |
Backend $admin |
Dotclear Core Backend Url $adminurl |
Dotclear Core Backend Favorites $favs |
Dotclear Core Backend Menus $menu |
$resources = [] |
Referenced by __construct().
Frontend $public |
Tpl $tpl |
Ctx $ctx |
$cache |
$spamfilters = [] |
$widgets |