클래스·함수 명세

Context

Context (전역 클래스) 클래스의 공개 메서드 목록입니다. 이 문서는 Zittme 코어 소스에서 자동 생성되었습니다.

소스: classes/context/Context.class.php

공개 메서드

  • static function getInstance()
  • Obtain a singleton instance of Context.
  • static function init()
  • Initialization, it sets DB information, request arguments and so on.
  • static function getSessionStatus()
  • Get the session status
  • static function checkSessionStatus($force = false)
  • Start the session if $_SESSION was touched
  • static function close()
  • Finalize using resources, such as DB connection
  • static function setCacheControl($ttl = 0, $public = true)
  • set Cache-Control header
  • static function setCorsPolicy(string $origin = '*', array $methods = [], array $headers = [], int $max_age = 0)
  • Set CORS policy for the current request.
  • static function redirect(string $url, int $status_code = 302, int $ttl = 0)
  • Redirect
  • static function loadDBInfo($config = null)
  • Load the database information
  • static function getDBType()
  • Get DB's db_type
  • static function setDBInfo(object $db_info)
  • Set DB information
  • static function getDBInfo()
  • Get DB information
  • static function getRouteInfo()
  • Get current route information
  • static function getCurrentRequest()
  • Get the current request.
  • static function getSSLStatus()
  • Return SSL status
  • static function getDefaultUrl($site_module_info = null, $use_ssl = null)
  • Return default URL
  • static function loadLangSupported()
  • Find supported languages
  • static function loadLangSelected()
  • Find selected languages to serve in the site
  • static function checkSSO()
  • Single Sign On (SSO)
  • static function isFTPRegisted()
  • Check if FTP info is registered
  • static function getFTPInfo()
  • Get FTP information
  • static function addBrowserTitle($title, $delimiter = ' - ')
  • Append string to browser title
  • static function prependBrowserTitle($title, $delimiter = ' - ')
  • Prepend string to browser title
  • static function setBrowserTitle($title, $vars = array()
  • Set string to browser title
  • static function getBrowserTitle()
  • Get browser title
  • static function getSiteTitle()
  • Return site title
  • static function getSiteSubtitle()
  • Return site subtitle
  • static function _getBrowserTitle()
  • Get browser title
  • static function loadLang($path, $plugin_name = null)
  • Load language file according to language type
  • static function setLangType($lang_type = 'ko')
  • Set lang_type
  • static function getLangType()
  • Get lang_type
  • static function getLang($code)
  • Return string accoring to the inputed code
  • static function setLang($code, $val)
  • Set data to lang variable
  • static function replaceUserLang($string, $fix_double_escape = false)
  • Replace user-defined language codes
  • static function convertEncoding($source_obj)
  • Convert strings of variables in $source_object into UTF-8
  • static function checkConvertFlag(&$val, $key = null, $charset = null)
  • Check flag
  • static function doConvertEncoding(&$val, $key = null, $charset = 'CP949')
  • Convert array type variables into UTF-8
  • static function convertEncodingStr($str)
  • Convert strings into UTF-8
  • static function encodeIdna($domain)
  • Encode UTF-8 domain into IDNA (punycode)
  • static function decodeIdna($domain)
  • Convert IDNA (punycode) domain into UTF-8
  • static function setResponseMethod($method = 'HTML', $content_type = null)
  • Force to set response method
  • static function getResponseMethod()
  • Get reponse method
  • static function getRequestMethod()
  • Return request method
  • static function setRequestMethod($type = '')
  • Determine request method
  • static function setRequestArguments(array $router_args = [])
  • handle request arguments for GET/POST
  • static function setUploadInfo()
  • Handle uploaded file info.
  • static function isUploaded()
  • Check if there exists uploaded file
  • static function _setUploadedArgument()
  • Handle uploaded file
  • static function displayErrorPage($title = 'Error', $message = '', $status = 500, $location = '')
  • Display a generic error page.
  • static function getRequestUrl()
  • Return request URL
  • static function getJSCallbackFunc()
  • Return js callback func.
  • static function getUrl($num_args = 0, $args_list = array()
  • Make URL with args_list upon request URL
  • static function getRequestUri($ssl_mode = FOLLOW_REQUEST_SSL, $domain = null)
  • Return after removing an argument on the requested URL
  • static function set($key, $val, $replace_request_arg = false)
  • Set a context value with a key
  • static function get($key)
  • Return key's value
  • static function gets()
  • Get one more vars in object vars with given arguments(key1, key2, key3,...)
  • static function getAll()
  • Return all data
  • static function getRequestVars()
  • Return values from the GET/POST/XMLRPC
  • static function clearRequestVars()
  • Clear all values from GET/POST/XMLRPC
  • static function clearUserVars()
  • Clear all user-set values
  • static function addSSLAction($action)
  • Register if an action is to be encrypted by SSL. Those actions are sent to https in common/js/xml_handler.js
  • static function addSSLActions($action_array)
  • Register if actions are to be encrypted by SSL. Those actions are sent to https in common/js/xml_handler.js
  • static function subtractSSLAction($action)
  • Delete if action is registerd to be encrypted by SSL.
  • static function getSSLActions()
  • Get SSL Action
  • static function isExistsSSLAction($action)
  • Check SSL action are existed
  • static function normalizeFilePath($file)
  • Normalize file path
  • static function getAbsFileUrl($file)
  • Get abstract file url
  • static function loadFile($args)
  • Load front end file
  • static function unloadFile($file, $unused = '', $media = 'all')
  • Unload front end file
  • static function unloadAllFiles($type = 'all')
  • Unload front end file all
  • static function addJsFile($file, $unused1 = '', $unused2 = '', $index = 0, $type = 'head', $isRuleset = FALSE, $autoPath = null)
  • Add the js file
  • static function unloadJsFile($file)
  • Remove the js file
  • static function unloadAllJsFiles()
  • Unload all javascript files
  • static function addJsFilter($path, $filename)
  • Add javascript filter
  • static function _getUniqueFileList($files)
  • Same as array_unique but works only for file subscript
  • static function getJsFile($type = 'head', $finalize = false)
  • Returns the list of javascripts that matches the given type.
  • static function addCSSFile($file, $unused1 = '', $media = 'all', $unused2 = '', $index = 0)
  • Add CSS file
  • static function unloadCSSFile($file, $unused = '', $media = 'all')
  • Remove css file
  • static function unloadAllCSSFiles()
  • Unload all css files
  • static function getCSSFile($finalize = false)
  • Return a list of css files
  • static function getJavascriptPluginInfo($plugin_name)
  • Returns javascript plugin file info
  • static function loadJavascriptPlugin($plugin_name)
  • Load javascript plugin
  • static function addHtmlHeader($header, bool $prepend = false)
  • Add html code before </head>
  • static function getHtmlHeader()
  • Returns added html code by addHtmlHeader()
  • static function clearHtmlHeader()
  • Remove all content added by addHtmlHeader()
  • static function addBodyClass($class_name)
  • Add css class to Html Body
  • static function removeBodyClass($class_name)
  • Remove css class from Html Body
  • static function getBodyClassList()
  • Return css class to Html Body
  • static function getBodyClass()
  • Return css class to Html Body
  • static function addBodyHeader($header, bool $prepend = false)
  • Add html code after <body>
  • static function getBodyHeader()
  • Returns added html code by addBodyHeader()
  • static function addHtmlFooter($footer, bool $prepend = false)
  • Add html code before </body>
  • static function getHtmlFooter()
  • Returns added html code by addHtmlHeader()
  • static function addLink(string $url, string $rel)
  • Add <link> such as <link rel="preconnect" href="https://webfonts.example.com" />
  • static function getLinks()
  • Returns added <link> list
  • static function getConfigFile()
  • Get config file
  • static function getFTPConfigFile()
  • Get FTP config file
  • static function setValidatorMessage($id, $message, $type = 'info')
  • Set a validator message
  • static function isInstalled()
  • Checks whether XE is installed
  • static function isLocked()
  • Checks whether the site is locked
  • static function transContent($content)
  • Transforms codes about widget or other features into the actual code
  • static function isAllowRewrite()
  • Check whether it is allowed to use rewrite mod
  • static function isDefaultPlugin($plugin_name, $type)
  • Check whether an addon, layout, module, or widget is distributed with Zittme core.
  • static function isBlacklistedPlugin($plugin_name, $type = '')
  • Check whether an addon, module, or widget is blacklisted
  • static function isReservedWord($word)
  • Check whether a word is reserved in Zittme
  • static function pathToUrl($path)
  • Converts a local path into an URL
  • static function getMetaTag($name = null)
  • Get meta tag
  • static function addMetaTag($name, $content, $is_http_equiv = false, $is_before_title = true)
  • Add meta tag
  • static function getMetaImages()
  • Get meta images
  • static function addMetaImage($filename, $width = 0, $height = 0)
  • Add meta image
  • static function getOpenGraphData()
  • Get OpenGraph metadata
  • static function addOpenGraphData($name, $content)
  • Add OpenGraph metadata
  • static function setCanonicalURL($url)
  • Set canonical URL
  • static function getCanonicalURL()
  • Get canonical URL