Dotclear 2.24
Loading...
Searching...
No Matches
dcCore Class Reference

Public Member Functions

 __construct (string $driver, string $host, string $db, string $user, string $password, string $prefix, bool $persist)
 
 __set (string $identifier, $value=null)
 
 __get (string $identifier)
 
 __isset (string $identifier)
 
 __unset (string $identifier)
 
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)
 
 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, $post_id, bool $escaped=true)
 
 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)
 
 delVersion (string $module)
 
HTML Filter methods
 HTMLfilter (string $str)
 
Maintenance methods
 blogDefaults (?array $defaults=null)
 
 indexAllPosts ($start=null, $limit=null)
 
 indexAllComments (?int $start=null, ?int $limit=null)
 
 countAllComments ()
 
 emptyTemplatesCache ()
 
 getElapsedTime (?float $mtime=null)
 

Static Public Member Functions

static app ()
 

Data Fields

const SESSION_TABLE_NAME = 'session'
 
const VERSION_TABLE_NAME = 'version'
 
 $con
 
 $prefix
 
 $blog
 
 $auth
 
 $session
 
 $url
 
 $rest
 
 $wiki2xhtml
 
 $plugins
 
 $themes
 
 $media
 
 $postmedia
 
 $meta
 
 $error
 
 $notices
 
 $log
 
 $stime
 
 $lang
 
 $admin
 
 $adminurl
 
 $favs
 
 $menu
 
 $resources = []
 
 $public
 
 $tpl
 
 $ctx
 
 $cache
 
 $spamfilters = []
 

Protected Attributes

 $properties = []
 

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)
 
 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)
 

wiki2xhtml methods

 wikiTransform (string $str)
 
 initWikiPost ()
 
 initWikiSimpleComment ()
 
 initWikiComment ()
 
 wikiPostLink (string $url, string $content)
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( string  $driver,
string  $host,
string  $db,
string  $user,
string  $password,
string  $prefix,
bool  $persist 
)

dcCore constructor inits everything related to Dotclear. It takes arguments to init database connection.

Parameters
string$driverThe db driver
string$hostThe db host
string$dbThe db name
string$userThe db user
string$passwordThe db password
string$prefixThe tables prefix
bool$persistPersistent database connection

References mysqliConnection\$weak_locks, DC_ADMIN_SSL, DC_SESSION_NAME, DC_START_TIME, and dbLayer\init().

Member Function Documentation

◆ app()

static app ( )
static

Get dcCore singleton instance

Returns
dcCore

Referenced by dcSettings\__construct(), dcNamespace\__construct(), dcBlog\__construct(), adminMediaPage\__construct(), dcFavorites\__construct(), adminCommentFilter\__construct(), adminUserFilter\__construct(), adminBlogFilter\__construct(), dcAuth\__construct(), dcCategories\__construct(), dcLog\__construct(), dcMeta\__construct(), dcNotices\__construct(), dcPostMedia\__construct(), dcSqlStatement\__construct(), dcTrackback\__construct(), dcFilterAkismet\__construct(), dcFilterIP\__construct(), dcFilterIpLookup\__construct(), dcFilterIPv6\__construct(), dcFilterWords\__construct(), dcSpamFilter\__construct(), l10nFaker\__construct(), dcThemeEditor\__construct(), dcBlogsActions\__construct(), dcCommentsActions\__construct(), dcBlogroll\__construct(), dcMaintenanceTask\__construct(), adminModulesList\__construct(), dcMedia\__construct(), adminMediaFilter\__construct(), adminPostFilter\__construct(), dcPrefs\__construct(), dcWorkspace\__construct(), dcBlog\addCategory(), dcBlog\addComment(), dcFilterIP\addIP(), dcFilterIPv6\addIP(), dcLog\addLog(), dcAdminHelper\addMenuItem(), dcNotices\addNotice(), dcAdminNotices\addNotice(), dcPostMedia\addPostMedia(), tagsBehaviors\adminAddTags(), dcMaintenanceAdmin\adminAfterDashboardOptionsUpdate(), themeEditorBehaviors\adminBeforeUserUpdate(), dcProxyV2AdminBehaviors\adminBlogFilter(), dcProxyV2AdminBehaviors\adminBlogListHeader(), dcProxyV2AdminBehaviors\adminBlogListValue(), dcProxyV2AdminBehaviors\adminBlogPreferencesForm(), antispamBehaviors\adminBlogPreferencesForm(), dcProxyV2AdminBehaviors\adminBlogsActionsPage(), dcDefaultBlogActions\adminBlogsActionsPage(), dcProxyV2AdminBehaviors\adminColumnsLists(), dcProxyV2AdminBehaviors\adminCommentFilter(), dcProxyV2AdminBehaviors\adminCommentListHeader(), dcProxyV2AdminBehaviors\adminCommentListValue(), dcProxyV2AdminBehaviors\adminCommentsActions(), dcProxyV2AdminBehaviors\adminCommentsActionsPage(), dcDefaultCommentActions\adminCommentsActionsPage(), antispamBehaviors\adminCommentsSpamForm(), dcProxyV2AdminBehaviors\adminCommentsSpamForm(), dcProxyV2AdminBehaviors\adminCurrentThemeDetails(), themeEditorBehaviors\adminCurrentThemeDetails(), dcProxyV2AdminBehaviors\adminDashboardContents(), dcProxyV2AdminBehaviors\adminDashboardFavorites(), dcMaintenanceAdmin\adminDashboardFavorites(), dcMaintenanceAdmin\adminDashboardFavoritesCallback(), dcProxyV2AdminBehaviors\adminDashboardFavs(), dcProxyV2AdminBehaviors\adminDashboardFavsIcon(), dcProxyV2AdminBehaviors\adminDashboardItems(), dcMaintenanceAdmin\adminDashboardItems(), dcProxyV2AdminBehaviors\adminDashboardOptionsForm(), dcMaintenanceAdmin\adminDashboardOptionsForm(), dcProxyV2AdminBehaviors\adminFiltersLists(), dcProxyV2AdminBehaviors\adminMediaFilter(), dcProxyV2AdminBehaviors\adminPageFooter(), tplDuctileThemeAdmin\adminPageHTMLHead(), dcProxyV2AdminBehaviors\adminPagesActionsPage(), dcDefaultPageActions\adminPagesActionsPage(), dcProxyV2AdminBehaviors\adminPagesListHeader(), dcProxyV2AdminBehaviors\adminPagesListValue(), dcAdminBlogPref\adminPopupPosts(), attachmentAdminBehaviors\adminPostAfterForm(), tagsBehaviors\adminPostEditor(), dcCKEditorBehaviors\adminPostEditor(), dcProxyV2AdminBehaviors\adminPostFilter(), attachmentAdminBehaviors\adminPostFormItems(), dcProxyV2AdminBehaviors\adminPostListHeader(), dcProxyV2AdminBehaviors\adminPostListValue(), dcProxyV2AdminBehaviors\adminPostMiniListHeader(), dcProxyV2AdminBehaviors\adminPostMiniListValue(), dcProxyV2AdminBehaviors\adminPostsActions(), tagsBehaviors\adminPostsActions(), dcProxyV2AdminBehaviors\adminPostsActionsPage(), dcDefaultPostActions\adminPostsActionsPage(), dcProxyV2AdminBehaviors\adminPreferencesForm(), themeEditorBehaviors\adminPreferencesForm(), tagsBehaviors\adminRemoveTags(), dcProxyV2AdminBehaviors\adminRteFlags(), dcProxyV2AdminBehaviors\adminSearchPageCombo(), dcProxyV2AdminBehaviors\adminSearchPageDisplay(), dcProxyV2AdminBehaviors\adminSearchPageHead(), dcProxyV2AdminBehaviors\adminSearchPageProcess(), dcProxyV2AdminBehaviors\adminUserFilter(), tagsBehaviors\adminUserForm(), dcProxyV2AdminBehaviors\adminUserListHeader(), dcProxyV2AdminBehaviors\adminUserListValue(), dcProxyV2AdminBehaviors\adminUsersActions(), dcProxyV2AdminBehaviors\adminUsersActionsContent(), dcFavorites\appendDashboardIcons(), attachmentTpl\AttachmentFileName(), attachmentTpl\AttachmentMimeType(), attachmentTpl\AttachmentSize(), attachmentTpl\AttachmentThumbnailURL(), attachmentTpl\AttachmentTitle(), attachmentTpl\AttachmentType(), attachmentTpl\AttachmentURL(), defaultWidgets\bestof(), tplBlogroll\blogrollXbelLink(), dcPage\breadcrumb(), adminMediaPage\breadcrumb(), dcRestServer\callFunction(), dcThemeConfig\canWriteCss(), dcThemeConfig\canWriteImages(), defaultWidgets\categories(), dcBlog\changePostsCategory(), dcPage\check(), dcRestMethods\checkCoreUpdate(), dcWidget\checkHomeOnly(), dcRestMethods\checkNewsUpdate(), dcAuth\checkSession(), dcRestMethods\checkStoreUpdate(), dcPage\checkSuper(), dcAuth\checkUser(), dcPage\close(), rsExtPost\commentsActive(), defaultFavorites\commentsDashboard(), dcIeModule\congratMessage(), dcLegacyEditorRest\convert(), dcProxyV2CoreBehaviors\coreBeforeLoadingNsFiles(), publicPages\coreBlogBeforeGetPosts(), dcProxyV2CoreBehaviors\coreCommentSearch(), dcProxyV2CoreBehaviors\corePostSearch(), rsExtPost\countMedia(), dcAntispam\countPublishedComments(), dcAntispam\countSpam(), blowupConfig\createCss(), dcMedia\createFile(), dcUtils\cssModuleLoad(), dcThemeConfig\cssPath(), dcThemeConfig\cssURL(), tagsBehaviors\dashboardFavorites(), dcAntispam\dashboardIconTitle(), dcAntispam\delAllSpam(), dcBlog\delCategory(), dcBlog\delComments(), dcBlog\delJunkComments(), dcMaintenance\delLogs(), dcRestMethods\delMeta(), dcMeta\delMeta(), dcBlog\delPosts(), adminGenericFilterV2\display(), adminPostMiniList\display(), adminPagesList\display(), adminPostList\display(), adminBlogList\display(), adminUserList\display(), adminCommentList\display(), tplBreadcrumb\displayBreadcrumb(), adminSearch\displayComments(), adminSearch\displayPosts(), dcDefaultCommentActions\doBlocklistIP(), dcDefaultBlogActions\doChangeBlogStatus(), dcDefaultCommentActions\doChangeCommentStatus(), dcDefaultPostActions\doChangePostAuthor(), dcDefaultPostActions\doChangePostCategory(), dcDefaultPostActions\doChangePostLang(), dcDefaultPostActions\doChangePostStatus(), dcDefaultBlogActions\doDeleteBlog(), dcDefaultCommentActions\doDeleteComment(), dcDefaultPostActions\doDeletePost(), pingsAdminBehaviors\doPings(), dcDefaultPageActions\doReorderPages(), dcUpgrade\dotclearUpgrade(), dcDefaultPostActions\doUpdateSelectedPost(), dcThemeConfig\dropImage(), tplDuctileTheme\ductileNbEntryPerPageHelper(), attachmentTpl\EntryAttachmentCount(), dcBlogsActions\error(), dcCommentsActions\error(), dcPostsActions\error(), dcPagesActions\error(), ieMaintenanceExportblog\execute(), ieMaintenanceExportfull\execute(), dcMaintenanceCache\execute(), dcMaintenanceCountcomments\execute(), dcMaintenanceIndexcomments\execute(), dcMaintenanceIndexposts\execute(), dcMaintenanceLogs\execute(), dcMaintenanceVacuum\execute(), dcMaintenanceZipmedia\execute(), dcMaintenanceZiptheme\execute(), dcProxyV2AdminBehaviors\exportFull(), dcProxyV2AdminBehaviors\exportSingle(), defaultWidgets\feed(), dcBlogsActions\fetchEntries(), dcCommentsActions\fetchEntries(), dcPostsActions\fetchEntries(), dcMedia\fileRecord(), dcThemeEditor\findTemplates(), dcBlog\firstPublicationEntries(), dcWidget\formSetting(), l10nFaker\generate_file(), rsExtComment\getAuthorLink(), dcAuth\getBlogCount(), dcAdminCombos\getBlogsSortbyCombo(), dcAdminCombos\getBlogStatusesCombo(), dcBlog\getCategories(), rsExtPost\getCategoryURL(), dcRestMethods\getCommentById(), adminCommentFilter\getCommentIpFilter(), dcBlog\getComments(), dcMeta\getCommentsByMeta(), dcRestMethods\getCommentsCount(), dcAdminCombos\getCommentsSortbyCombo(), dcAdminCombos\getCommentStatusesCombo(), rsExtComment\getContent(), rsExtPost\getDate(), rsExtComment\getDate(), adminUserPref\getDefaultFilters(), dcMedia\getDir(), adminMediaFilter\getDirFilter(), dcAdminCombos\getEditorsCombo(), adminMediaPage\getFav(), dcFavorites\getFavorite(), rsExtPost\getFeedID(), rsExtComment\getFeedID(), dcMedia\getFile(), adminMediaFilter\getFileModeFilter(), dcAdminCombos\getFormatersCombo(), adminChartePage\getJS(), adminMediaPage\getLast(), tplBlogroll\getList(), dcMaintenance\getLogs(), dcLog\getLogs(), dcRestMethods\getMeta(), dcMeta\getMetadata(), dcRestMethods\getModuleById(), dcAdminNotices\getNotices(), dcPage\getPF(), dcRestMethods\getPostById(), adminPostFilter\getPostCategoriesFilter(), adminPostFilter\getPostFormatFilter(), adminMediaFilter\getPostIdFilter(), adminPostFilter\getPostLangFilter(), dcPostMedia\getPostMedia(), adminPostFilter\getPostMonthFilter(), dcTrackback\getPostPings(), dcBlog\getPosts(), dcMeta\getPostsByMeta(), dcRestMethods\getPostsCount(), dcAdminCombos\getPostsSortbyCombo(), dcAdminCombos\getPostStatusesCombo(), rsExtComment\getPostURL(), adminPostFilter\getPostUserFilter(), dcImportFlat\getPublicFiles(), adminChartePage\getTheme(), rsExtPost\getTime(), rsExtComment\getTime(), rsExtPost\getTrackbackLink(), rsExtPost\getURL(), adminUserPref\getUserColumns(), adminUserPref\getUserFilters(), dcAdminCombos\getUsersSortbyCombo(), dcPage\getVF(), dcRestMethods\getZipMediaContent(), dcFilterAkismet\gui(), dcExportFlat\gui(), dcImportDC1\gui(), dcImportFeed\gui(), dcImportFlat\gui(), dcImportWP\gui(), dcFilterIP\gui(), dcFilterIpLookup\gui(), dcFilterIPv6\gui(), dcFilterWords\gui(), dcImportDC1\guiprocess(), dcImportWP\guiprocess(), dcSpamFilter\hasGUI(), dcPage\helpBlock(), ifWidgetsHandler(), dcMedia\imageMetaCreate(), dcThemeConfig\imagesPath(), dcThemeConfig\imagesURL(), dcImportDC1\imForm(), dcImportWP\imForm(), dcImportWP\importComments(), dcProxyV2AdminBehaviors\importExportModules(), dcProxyV2AdminBehaviors\importFull(), dcProxyV2AdminBehaviors\importInit(), dcImportDC1\importMeta(), dcImportWP\importPost(), dcProxyV2AdminBehaviors\importPrepareDC12(), dcProxyV2AdminBehaviors\importSingle(), dcImportWP\importTags(), dcImportDC1\importUsers(), dcImportWP\importUsers(), adminChartePage\init(), adminAuth\init(), adminBlog\init(), adminBlogDel\init(), adminBlogTheme\init(), adminBlogs\init(), adminCategories\init(), adminCategory\init(), adminComment\init(), adminComments\init(), adminCommentsActions\init(), adminHelp\init(), adminIndex\init(), adminLangs\init(), adminMedia\init(), adminMediaItem\init(), adminPlugin\init(), adminPlugins\init(), adminPopupLink\init(), adminPopupPosts\init(), adminPost\init(), adminPostMedia\init(), adminPosts\init(), adminPostsActions\init(), adminUserPrefs\init(), adminSearch\init(), adminUpdate\init(), adminUser\init(), adminUsers\init(), adminUsersActions\init(), adminXMLRPCpage\init(), dcAdmin\init(), adminAboutConfig\init(), adminAntispam\init(), adminBlogrollEdit\init(), adminBlogroll\init(), adminBlowupConfig\init(), adminCKEditor\init(), adminLegacyEditor\init(), dcImportDC1\init(), dcImportWP\init(), ieMaintenanceExportblog\init(), adminImportExport\init(), dcMaintenance\init(), adminMaintenance\init(), adminPages\init(), adminPage\init(), adminPings\init(), adminSimpleMenu\init(), adminTag\init(), adminTags\init(), adminThemeEditor\init(), adminUserPreferences\init(), defaultWidgets\init(), adminWidgets\init(), adminConfigThemeCustomCSS\init(), adminConfigThemeDuctile\init(), dcSpamFilters\init(), defaultFavorites\initDefaultFavorites(), dcAntispam\initFilters(), blogrollWidgets\initWidgets(), installAntispam\install(), installBlogroll\install(), installBlowupConfig\install(), installCKEditor\install(), installLegacyEditor\install(), installPings\install(), installSimpleMenu\install(), installWidgets\install(), adminPost\isContributionAllowed(), adminPage\isContributionAllowed(), rsExtPost\isDeletable(), adminModulesList\isDeletablePath(), rsExtPost\isEditable(), dcFilterAkismet\isSpam(), dcFilterFairTrackbacks\isSpam(), dcPage\jsAdsBlockCheck(), dcPage\jsCommon(), dcPage\jsFilterControl(), dcUtils\jsModuleLoad(), dcPage\jsToggles(), dcLegacyEditorBehaviors\jsToolBar(), dcPage\jsUpload(), defaultWidgets\langs(), defaultWidgets\lastcomments(), defaultWidgets\lastposts(), adminMediaFilter\legacyBehavior(), dcFavorites\legacyFavorites(), linksWidget(), adminImportExport\listImportExportModules(), dcWidgets\load(), dcProxyV2\loadBehaviors(), dcPostsActions\loadDefaults(), dcPagesActions\loadDefaults(), dcAdminHelper\loadLocales(), dcModules\loadModules(), dcMedia\makeDir(), adminMediaPage\mediaArchivable(), adminMediaList\mediaLine(), adminMediaPage\mediaLine(), attachmentTpl\MediaURL(), dcAdminNotices\message(), dcFavorites\migrateFavorites(), defaultWidgets\navigation(), dcPage\open(), dcPage\openPopup(), urlPages\pages(), pagesDashboard\pagesDashboardCB(), urlPages\pagespreview(), tplPages\pagesWidget(), dcTrackback\ping(), dcXmlRpc\pingback_ping(), pingsAdminBehaviors\pingsFormItems(), dcProxyV2AdminBehaviors\pluginsToolsHeaders(), dcProxyV2AdminBehaviors\pluginsToolsTabs(), tagsBehaviors\postHeaders(), defaultFavorites\postsDashboard(), dcUpgrade\prefs2array(), adminUserPreferences\prefsTable(), adminAuth\process(), adminBlog\process(), adminBlogDel\process(), adminBlogTheme\process(), adminCategories\process(), adminCategory\process(), adminComment\process(), adminIndex\process(), adminLangs\process(), adminMedia\process(), adminMediaItem\process(), adminPlugins\process(), adminPost\process(), adminPostMedia\process(), adminUserPrefs\process(), adminSearch\process(), adminUpdate\process(), adminUser\process(), adminUsersActions\process(), adminAboutConfig\process(), adminAntispam\process(), adminBlogrollEdit\process(), adminBlogroll\process(), adminBlowupConfig\process(), adminCKEditor\process(), adminLegacyEditor\process(), adminImportExport\process(), adminMaintenance\process(), adminPage\process(), adminPings\process(), adminSimpleMenu\process(), adminTag\process(), adminThemeEditor\process(), adminUserPreferences\process(), adminWidgets\process(), adminConfigThemeCustomCSS\process(), adminConfigThemeDuctile\process(), dcExportFlat\process(), dcImportFeed\process(), dcImportFlat\process(), adminSearch\processComments(), adminSearch\processPosts(), dcProxyV2PublicBehaviors\publicAfterContentFilter(), dcProxyV2PublicBehaviors\publicAfterDocument(), dcProxyV2PublicBehaviors\publicBeforeContentFilter(), dcProxyV2PublicBehaviors\publicBeforeDocument(), dcProxyV2PublicBehaviors\publicBeforeReceiveTrackback(), dcProxyV2PublicBehaviors\publicContentFilter(), dcThemeConfig\publicCssUrlHelper(), dcProxyV2PublicBehaviors\publicPrepend(), dcBlog\publishScheduledEntries(), dcRestMethods\quickPost(), dcMedia\rebuild(), dcTrackback\receiveTrackback(), dcTrackback\receiveWebmention(), importExportBehaviors\registerIeModules(), dcModules\registerModule(), dcThemes\registerModule(), dcMedia\removeDir(), dcMedia\removeFile(), dcPostMedia\removePostMedia(), adminAuth\render(), adminBlog\render(), adminBlogDel\render(), adminBlogTheme\render(), adminBlogs\render(), adminCategories\render(), adminCategory\render(), adminComment\render(), adminComments\render(), adminHelp\render(), adminIndex\render(), adminLangs\render(), adminMedia\render(), adminPlugin\render(), adminPlugins\render(), adminPopupLink\render(), adminPopupPosts\render(), adminPost\render(), adminPosts\render(), adminUserPrefs\render(), adminSearch\render(), adminUpdate\render(), adminUser\render(), adminUsers\render(), adminUsersActions\render(), adminAboutConfig\render(), adminAntispam\render(), adminBlogrollEdit\render(), adminBlogroll\render(), adminBlowupConfig\render(), adminImportExport\render(), adminMaintenance\render(), adminPages\render(), adminPage\render(), adminPings\render(), adminSimpleMenu\render(), adminTag\render(), adminTags\render(), adminThemeEditor\render(), adminUserPreferences\render(), adminWidgets\render(), adminConfigThemeCustomCSS\render(), adminConfigThemeDuctile\render(), adminPlugins\renderConfig(), dcWidget\renderDiv(), dcWidget\renderSubtitle(), dcWidget\renderTitle(), dcBlog\resetCategoriesOrder(), dcProxyV2AdminBehaviors\restCheckStoreUpdate(), dcSpamFilters\saveFilterOpts(), defaultWidgets\search(), dcMedia\searchMedia(), dcRestMethods\searchMeta(), dcRestMethods\setDashboardPositions(), dcUtils\setLexicalLang(), dcRestMethods\setListsOptions(), dcMaintenance\setLog(), dcBlog\setPostContent(), dcRestMethods\setPostMeta(), dcRestMethods\setSectionFold(), tagsBehaviors\setTags(), dcUpgrade\settings2array(), adminAboutConfig\settingsTable(), dcFavorites\setup(), adminPage\showComments(), adminPost\showComments(), adminMediaPage\showLast(), dcSelectStatement\statement(), dcJoinStatement\statement(), dcDeleteStatement\statement(), dcUpdateStatement\statement(), dcInsertStatement\statement(), dcTruncateStatement\statement(), defaultWidgets\subscribe(), dcMaintenanceSynchpostsmeta\synchronizeAllPostsmeta(), urlTags\tag(), urlTags\tagFeed(), tagsBehaviors\tagsField(), dcProxyV2PublicBehaviors\templateAfterBlock(), dcProxyV2PublicBehaviors\templateAfterValue(), dcProxyV2PublicBehaviors\templateBeforeBlock(), dcProxyV2PublicBehaviors\templateBeforeValue(), dcProxyV2PublicBehaviors\templateInsideBlock(), defaultWidgets\text(), dcProxyV2AdminBehaviors\themesToolsHeaders(), dcProxyV2AdminBehaviors\themesToolsTabs(), dcProxyV2PublicBehaviors\tplAfterData(), dcProxyV2PublicBehaviors\tplBeforeData(), tplWidget(), rsExtPost\trackbacksActive(), dcBlog\triggerBlog(), rsExtPost\underCat(), adminMediaPage\updateFav(), dcMedia\updateFile(), adminMediaPage\updateLast(), dcMeta\updateMeta(), dcBlog\updCategory(), dcBlog\updComment(), dcBlog\updCommentsStatus(), dcBlog\updPost(), dcBlog\updPostsCategory(), dcBlog\updPostsSelected(), dcBlog\updPostsStatus(), dcMedia\uploadBits(), dcMedia\uploadFile(), rsExtDates\url(), dcRestMethods\validatePostMarkup(), dcUpdateStatement\whereStatement(), widgetHandler(), publicWidgets\widgetsHandler(), tagsBehaviors\wiki2xhtmlTag(), and urlBlogroll\xbel().

◆ __set()

__set ( string  $identifier,
  $value = null 
)

Magic function, store a property and its value

Parameters
string$identifierThe identifier
mixed$valueThe value

◆ __get()

__get ( string  $identifier)

Gets the specified property value (null if does not exist).

Parameters
string$identifierThe identifier
Returns
mixed

◆ __isset()

__isset ( string  $identifier)

Test if a property exists

Parameters
string$identifierThe identifier
Returns
bool

◆ __unset()

__unset ( string  $identifier)

Unset a property

Parameters
string$identifierThe identifier

◆ setBlog()

setBlog (   $id)

Sets the blog to use.

Parameters
string$idThe blog ID

◆ unsetBlog()

unsetBlog ( )

Unsets blog property

◆ getAllBlogStatus()

getAllBlogStatus ( )

Gets all blog status.

Returns
array An array of available blog status codes and names.

References dcBlog\BLOG_OFFLINE, dcBlog\BLOG_ONLINE, and dcBlog\BLOG_REMOVED.

Referenced by getBlogStatus().

◆ getBlogStatus()

getBlogStatus ( int  $s)

Returns a blog status name given to a code. This is intended to be human-readable and will be translated, so never use it for tests. If status code does not exist, returns offline.

Parameters
int$sStatus code
Returns
string The blog status name.

References getAllBlogStatus().

◆ getNonce()

getNonce ( )

Gets the nonce.

Returns
string The nonce.

Referenced by formNonce().

◆ checkNonce()

checkNonce ( string  $secret)

Check the nonce

Parameters
string$secretThe nonce
Returns
bool

◆ formNonce()

formNonce ( bool  $render = true)

Get the nonce HTML code

Parameters
bool$renderShould render element?
Returns
mixed

References getNonce().

◆ addEditorFormater()

addEditorFormater ( string  $editor_id,
string  $name,
  $func 
)

Adds a new text formater which will call the function $func to transform text. The function must be a valid callback and takes one argument: the string to transform. It returns the transformed string.

Parameters
string$editor_idThe editor identifier (dcLegacyEditor, dcCKEditor, ...)
string$nameThe formater name
callable$funcThe function to use, must be a valid and callable callback

Referenced by addFormater().

◆ addFormater()

addFormater ( string  $name,
  $func 
)

Adds a new dcLegacyEditor text formater which will call the function $func to transform text. The function must be a valid callback and takes one argument: the string to transform. It returns the transformed string.

Parameters
string$nameThe formater name
callable$funcThe function to use, must be a valid and callable callback

References addEditorFormater().

◆ addFormaterName()

addFormaterName ( string  $format,
string  $name 
)

Adds a formater name.

Parameters
string$formatThe format
string$nameThe name

◆ getFormaterName()

getFormaterName ( string  $format)

Gets the formater name.

Parameters
string$formatThe format
Returns
string The formater name.

◆ getEditors()

getEditors ( )

Gets the editors list.

Returns
array The editors.

◆ getFormaters()

getFormaters ( string  $editor_id = '')

Gets the formaters.

if

Parameters
editor_idis empty: return all formaters sorted by actives editors

if

Parameters
editor_idis not empty return formaters for an editor if editor is active return empty() array if editor is not active. It can happens when a user choose an editor and admin deactivate that editor later
string$editor_idThe editor identifier (dcLegacyEditor, dcCKEditor, ...)
Returns
array The formaters.

◆ callEditorFormater()

callEditorFormater ( string  $editor_id,
string  $name,
string  $str 
)

If $name is a valid formater, it returns $str transformed using that formater.

Parameters
string$editor_idThe editor identifier (dcLegacyEditor, dcCKEditor, ...)
string$nameThe formater name
string$strThe string to transform
Returns
string

Referenced by callFormater().

◆ callFormater()

callFormater ( string  $name,
string  $str 
)

If $name is a valid dcLegacyEditor formater, it returns $str transformed using that formater.

Parameters
string$nameThe name
string$strThe string
Returns
string

References callEditorFormater().

◆ addBehavior()

addBehavior ( string  $behavior,
  $func 
)

Adds a new behavior to behaviors stack. $func must be a valid and callable callback.

Parameters
string$behaviorThe behavior
callable | array$funcThe function

Referenced by addBehaviour().

◆ addBehaviour()

addBehaviour ( string  $behaviour,
  $func 
)

Adds a behaviour (alias).

Parameters
string$behaviourThe behaviour
callable | array$funcThe function

References addBehavior().

◆ hasBehavior()

hasBehavior ( string  $behavior)

Determines if behavior exists in behaviors stack.

Parameters
string$behaviorThe behavior
Returns
bool True if behavior exists, False otherwise.

Referenced by hasBehaviour().

◆ hasBehaviour()

hasBehaviour ( string  $behaviour)

Determines if behaviour exists (alias).

Parameters
string$behaviourThe behavior
Returns
bool True if behaviour, False otherwise.

References hasBehavior().

◆ getBehaviors()

getBehaviors ( string  $behavior = '')

Gets the behaviors stack (or part of).

Parameters
string$behaviorThe behavior
Returns
mixed The behaviors.

Referenced by getBehaviours().

◆ getBehaviours()

getBehaviours ( string  $behaviour = '')

Gets the behaviours stack (alias).

Parameters
string$behaviourThe behaviour
Returns
mixed The behaviours.

References getBehaviors().

◆ callBehavior()

callBehavior ( string  $behavior,
  $args 
)

Calls every function in behaviors stack for a given behavior and returns concatened result of each function.

Every parameters added after $behavior will be pass to behavior calls.

Parameters
string$behaviorThe behavior
mixed...$args The arguments
Returns
mixed Behavior concatened result

Referenced by addUser(), callBehaviour(), delUser(), HTMLfilter(), initWikiComment(), initWikiPost(), initWikiSimpleComment(), and updUser().

◆ callBehaviour()

callBehaviour ( string  $behaviour,
  $args 
)

Calls every function in behaviours stack (alias of self::callBehavior)

Parameters
string$behaviourThe behaviour
mixed...$args The arguments
Returns
mixed

References callBehavior().

◆ getPostAdminURL()

getPostAdminURL ( string  $type,
  $post_id,
bool  $escaped = true 
)

Gets the post admin url.

Parameters
string$typeThe type
mixed$post_idThe post identifier
bool$escapedEscape the URL
Returns
string The post admin url.

References $url, and html\escapeURL().

◆ getPostPublicURL()

getPostPublicURL ( string  $type,
string  $post_url,
bool  $escaped = true 
)

Gets the post public url.

Parameters
string$typeThe type
string$post_urlThe post url
bool$escapedEscape the URL
Returns
string The post public url.

References $url, and html\escapeURL().

◆ setPostType()

setPostType ( string  $type,
string  $admin_url,
string  $public_url,
string  $label = '' 
)

Sets the post type.

Parameters
string$typeThe type
string$admin_urlThe admin url
string$public_urlThe public url
string$labelThe label

References $admin_url.

◆ getPostTypes()

getPostTypes ( )

Gets the post types.

Returns
array The post types.

◆ getVersion()

getVersion ( string  $module = 'core')

Gets the version of a module.

Parameters
string$moduleThe module
Returns
mixed The version.

Referenced by setVersion().

◆ getVersions()

getVersions ( )

Gets all known versions

Returns
array The versions.

◆ setVersion()

setVersion ( string  $module,
string  $version 
)

Sets the version of a module.

Parameters
string$moduleThe module
string$versionThe version

References $version, and getVersion().

◆ delVersion()

delVersion ( string  $module)

Remove a module version entry

Parameters
string$moduleThe module

◆ getUser()

getUser ( string  $id)

Gets the user by its ID.

Parameters
string$idThe identifier
Returns
dcRecord The user.

References getUsers().

Referenced by delUser().

◆ getUsers()

getUsers (   $params = [],
bool  $count_only = false 
)

Returns a users list. $params is an array with the following optionnal parameters:

  • q: search string (on user_id, user_name, user_firstname)
  • user_id: user ID
  • order: ORDER BY clause (default: user_id ASC)
  • limit: LIMIT clause (should be an array ![limit,offset])
Parameters
array | ArrayObject$paramsThe parameters
bool$count_onlyCount only results
Returns
dcRecord The users.

References dcBlog\POST_TABLE_NAME, and dcAuth\USER_TABLE_NAME.

Referenced by getUser().

◆ addUser()

addUser ( cursor  $cur)

Adds a new user. Takes a cursor as input and returns the new user ID.

Parameters
cursor$curThe user cursor
Exceptions
Exception
Returns
string

References callBehavior(), and cursor\insert().

◆ updUser()

updUser ( string  $id,
cursor  $cur 
)

Updates an existing user. Returns the user ID.

Parameters
string$idThe user identifier
cursor$curThe cursor
Exceptions
Exception
Returns
string

References callBehavior(), and dcBlog\POST_TABLE_NAME.

◆ delUser()

delUser ( string  $id)

Deletes a user.

Parameters
string$idThe user identifier
Exceptions
Exception

References callBehavior(), getUser(), and dcAuth\USER_TABLE_NAME.

◆ userExists()

userExists ( string  $id)

Determines if user exists.

Parameters
string$idThe identifier
Returns
bool True if user exists, False otherwise.

References dcAuth\USER_TABLE_NAME.

◆ getUserPermissions()

getUserPermissions ( string  $id)

Returns all user permissions as an array which looks like:

  • [blog_id]
  • [name] => Blog name
  • [url] => Blog URL
  • [p]
  • [permission] => true
  • ...
Parameters
string$idThe user identifier
Returns
array The user permissions.

References dcBlog\BLOG_TABLE_NAME, and dcAuth\PERMISSIONS_TABLE_NAME.

◆ setUserPermissions()

setUserPermissions ( string  $id,
array  $perms 
)

Sets user permissions. The $perms array looks like:

  • [blog_id] => '|perm1|perm2|'
  • ...
Parameters
string$idThe user identifier
array$permsThe permissions
Exceptions
Exception

References dcAuth\PERMISSIONS_TABLE_NAME, and setUserBlogPermissions().

◆ setUserBlogPermissions()

setUserBlogPermissions ( string  $id,
string  $blog_id,
array  $perms,
bool  $delete_first = true 
)

Sets the user blog permissions.

Parameters
string$idThe user identifier
string$blog_idThe blog identifier
array$permsThe permissions
bool$delete_firstDelete permissions first
Exceptions
Exception(description)

References dcAuth\PERMISSIONS_TABLE_NAME.

Referenced by setUserPermissions().

◆ setUserDefaultBlog()

setUserDefaultBlog ( string  $id,
string  $blog_id 
)

Sets the user default blog. This blog will be selected when user log in.

Parameters
string$idThe user identifier
string$blog_idThe blog identifier

References dcAuth\USER_TABLE_NAME.

◆ userDefaults()

userDefaults ( )

Returns user default settings in an associative array with setting names in keys.

Returns
array

◆ getBlogPermissions()

getBlogPermissions ( string  $id,
bool  $with_super = true 
)

Returns all blog permissions (users) as an array which looks like:

  • [user_id]
  • [name] => User name
  • [firstname] => User firstname
  • [displayname] => User displayname
  • [super] => (true|false) super admin
  • [p]
  • [permission] => true
  • ...
Parameters
string$idThe blog identifier
bool$with_superIncludes super admins in result
Returns
array The blog permissions.

References dcAuth\PERMISSIONS_TABLE_NAME, and dcAuth\USER_TABLE_NAME.

◆ getBlog()

getBlog ( string  $id)

Gets the blog.

Parameters
string$idThe blog identifier
Returns
dcRecord|false The blog.

References $blog, and getBlogs().

◆ getBlogs()

getBlogs (   $params = [],
bool  $count_only = false 
)

Returns a dcRecord of blogs. $params is an array with the following optionnal parameters:

  • blog_id: Blog ID
  • q: Search string on blog_id, blog_name and blog_url
  • limit: limit results
Parameters
array | ArrayObject$paramsThe parameters
bool$count_onlyCount only results
Returns
dcRecord The blogs.

References dcBlog\BLOG_OFFLINE, dcBlog\BLOG_ONLINE, dcBlog\BLOG_TABLE_NAME, and dcAuth\PERMISSIONS_TABLE_NAME.

Referenced by getBlog().

◆ addBlog()

addBlog ( cursor  $cur)

Adds a new blog.

Parameters
cursor$curThe blog cursor
Exceptions
Exception

References cursor\insert().

◆ updBlog()

updBlog ( string  $id,
cursor  $cur 
)

Updates a given blog.

Parameters
string$idThe blog identifier
cursor$curThe cursor

References cursor\update().

◆ delBlog()

delBlog ( string  $id)

Removes a given blog.

Warning
This will remove everything related to the blog (posts, categories, comments, links...)
Parameters
string$idThe blog identifier
Exceptions
Exception

References dcBlog\BLOG_TABLE_NAME.

◆ blogExists()

blogExists ( string  $id)

Determines if blog exists.

Parameters
string$idThe blog identifier
Returns
bool True if blog exists, False otherwise.

References dcBlog\BLOG_TABLE_NAME.

◆ countBlogPosts()

countBlogPosts ( string  $id,
  $type = null 
)

Counts the number of blog posts.

Parameters
string$idThe blog identifier
mixed$typeThe post type
Returns
int Number of blog posts.

References dcBlog\POST_TABLE_NAME.

◆ HTMLfilter()

HTMLfilter ( string  $str)

Calls HTML filter to drop bad tags and produce valid HTML output (if tidy extension is present). If enable_html_filter blog setting is false, returns not filtered string.

Parameters
string$strThe string
Returns
string

References callBehavior().

◆ wikiTransform()

wikiTransform ( string  $str)

Returns a transformed string with wiki2xhtml.

Parameters
string$strThe string
Returns
string

◆ initWikiPost()

initWikiPost ( )

Inits wiki2xhtml property for blog post.

References callBehavior(), wiki2xhtml\registerFunction(), and wiki2xhtml\setOpts().

◆ initWikiSimpleComment()

initWikiSimpleComment ( )

Inits wiki2xhtml property for simple blog comment (basic syntax).

References callBehavior(), and wiki2xhtml\setOpts().

◆ initWikiComment()

initWikiComment ( )

Inits wiki2xhtml property for blog comment.

References callBehavior(), and wiki2xhtml\setOpts().

◆ wikiPostLink()

wikiPostLink ( string  $url,
string  $content 
)

Get info about a post:id wiki macro

Parameters
string$urlThe post url
string$contentThe content
Returns
array

References html\escapeHTML().

◆ blogDefaults()

blogDefaults ( ?array  $defaults = null)

Creates default settings for active blog. Optionnal parameter defaults replaces default params while needed.

Parameters
array$defaultsThe defaults settings

References DC_DEFAULT_THEME.

◆ indexAllPosts()

indexAllPosts (   $start = null,
  $limit = null 
)

Recreates entries search engine index.

Parameters
mixed$startThe start entry index
mixed$limitThe limit of entry to index
Returns
mixed sum of $start and $limit

References cursor\clean(), dcBlog\POST_TABLE_NAME, text\splitWords(), and cursor\update().

◆ indexAllComments()

indexAllComments ( ?int  $start = null,
?int  $limit = null 
)

Recreates comments search engine index.

Parameters
int$startThe start comment index
int$limitThe limit of comment to index
Returns
mixed sum of $start and $limit

References cursor\clean(), dcBlog\COMMENT_TABLE_NAME, text\splitWords(), and cursor\update().

◆ countAllComments()

countAllComments ( )

Reinits nb_comment and nb_trackback in post table.

References dcBlog\COMMENT_PUBLISHED, dcBlog\COMMENT_TABLE_NAME, and dcBlog\POST_TABLE_NAME.

◆ emptyTemplatesCache()

emptyTemplatesCache ( )

Empty templates cache directory

References DC_TPL_CACHE, and files\deltree().

◆ getElapsedTime()

getElapsedTime ( ?float  $mtime = null)

Return elapsed time since script has been started

Parameters
float$mtimetimestamp (microtime format) to evaluate delta from current time is taken if null
Returns
float The elapsed time.

Field Documentation

◆ SESSION_TABLE_NAME

const SESSION_TABLE_NAME = 'session'

◆ VERSION_TABLE_NAME

const VERSION_TABLE_NAME = 'version'

◆ $con

$con

◆ $prefix

$prefix

◆ $blog

$blog

Referenced by getBlog().

◆ $auth

$auth

◆ $session

$session

◆ $url

$url

◆ $rest

$rest

◆ $wiki2xhtml

◆ $plugins

$plugins

◆ $themes

$themes

◆ $media

$media

◆ $postmedia

$postmedia

◆ $meta

$meta

◆ $error

$error

◆ $notices

$notices

◆ $log

$log

◆ $stime

$stime

◆ $lang

$lang

◆ $admin

$admin

◆ $adminurl

$adminurl

◆ $favs

$favs

◆ $menu

$menu

◆ $resources

$resources = []

◆ $public

$public

◆ $tpl

$tpl

◆ $ctx

$ctx

◆ $cache

$cache
Initial value:
= [
'mod_files' => [],
'mod_ts' => [],
]

◆ $spamfilters

$spamfilters = []

◆ $properties

$properties = []
protected

The documentation for this class was generated from the following file: