KWeb
6.4
|
Public Member Functions | |
__construct () | |
_initialize () | |
getBox ($box, $id=false) | |
addBox ($box, $data, $pos=0) | |
clearBox ($box) | |
boxCount ($box) | |
removeBoxByName ($box, $name) | |
removeBoxById ($box, $name) | |
boxSort () | |
printBox ($box, $force=false, $inc=false, $group=null) | |
setHeader ($header, $footer=false) | |
Sets header and footer for the layout. | |
setLayout ($layout) | |
Sets layout template to be used. | |
getState () | |
addHeader ($header, $footer=false, $vars=null, $once=true) | |
printHeader () | |
printAddHeaders ($inHead=null) | |
Prints additional headers. | |
printAddFooters () | |
Prints additional footers. | |
clearAddHeaders () | |
clearAddFooters () | |
printFooter () | |
getBody ($reset) | |
printBody () | |
getBodySize () | |
disableBuffering ($printHeader=true, $clearBuffer=false) | |
resetOuput () | |
Clears all output buffers and returns the content. | |
finish () | |
setEditMode ($em) | |
getEditMode () | |
getTitle ($useGlobal=true, $useOpenedObject=true) | |
setTitle ($title) | |
getGlobalTitle () | |
setGlobalTitle ($title) | |
setSubtitle ($title) | |
getSubtitle () | |
getMetaDescription ($useOpenedObject=true) | |
setMetaDescription ($text) | |
setMetaKeywords ($keywords) | |
getMetaKeywords ($useOpenedObject=true) | |
setMetaRobots ($index, $follow) | |
getMetaRobots () | |
setMetaThumbnail ($thumb, $add=true) | |
getMetaThumbnail () | |
addMetaLink ($url, $data) | |
addRSS ($url, $title, $options=array()) | |
addCSS ($url, $alternate=false, $options=array(), $searchIn=null) | |
Adds CSS to the header. | |
metalinksSortCmp ($a, $b) | |
getMetaLinks ($sortAndFilter=false) | |
Returns the list of meta links. | |
addJS ($url, $type=null, $searchIn=null, $options=array()) | |
pathImg ($file, $searchIn=null) | |
pathJS ($file, $searchIn=null) | |
pathCSS ($file, $searchIn=null) | |
pathIco ($name, $size, $searchIn=null, $find=true) | |
addCSSClass ($cssClass) | |
Appends layout's CSS class. | |
getCSSClass () | |
Returns layout's CSS class. | |
isAjax () | |
setHtmlCacheHeaders ($timeout, $public=true) | |
cacheWholeResponse (array $opts, $id, $items=null, $unique=null, $timeout=null) | |
onFilterMetaLinks_lessc (KWebEvent $event, array $filters) | |
onFilterMetaLinks_minify (KWebEvent $event, array $filters) | |
Static Public Member Functions | |
isInitialized () | |
static | instance () |
Data Fields | |
const | ADDHEADER_INHEAD = 'inHead' |
const | ADDHEADER_CONTENT = 'content' |
const | CACHEOPT_BROWSER_CACHE_TIMEOUT = "browser_cache_timeout" |
const | EVENT_FINISHED = "kweb.template.finished" |
const | FILTER_TITLE = "kweb.template.title" |
const | FILTER_META_DESCRIPTION = "kweb.template.meta.description" |
const | FILTER_META_KEYWORDS = "kweb.template.meta.keywords" |
const | FILTER_META_LINKS = 'kweb.template.meta.links' |
const | META_GROUP = 'group' |
Group of meta data. | |
const | META_REL = 'rel' |
const | META_TYPE = 'type' |
const | META_TITLE = 'title' |
const | META_URL = '_url' |
const | META_INDEX = '_index' |
const | META_LESS_COMPILE = '_less_compile' |
const | META_MINIFY = '_minify' |
If TRUE it will be minified. | |
const | META_MINIFY_MINIFIED = 'minified' |
const | META_PRIORITY = 'priority' |
const | META_NOCACHE = 'nocache' |
const | META_IF = 'if' |
const | META_MEDIA = 'media' |
$state = TMPLS_BUFFERING | |
$use_header = true | |
true - używa domyślnego, string - używa inc'a, false - nie używa | |
$use_footer = true | |
$addHeaders = array() | |
$addFooters = array() | |
$finished = 0 | |
$debug_mode = 1 | |
$margin_top = 0 | |
$margin_bottom = 0 | |
$margin_left = 0 | |
$margin_right = 0 | |
$title = '' | |
$body | |
$bodySize = 0 | |
$links = array() | |
$boxGroups = array() | |
$inBox = false | |
$img = '/img/' | |
$wholeResponseCache = false | |
Static Public Attributes | |
static | $inst |
KWebTemplate::__construct | ( | ) |
KWebTemplate::_initialize | ( | ) |
KWebTemplate::addBox | ( | $ | box, |
$ | data, | ||
$ | pos = 0 |
||
) |
KWebTemplate::addCSS | ( | $ | url, |
$ | alternate = false , |
||
$ | options = array() , |
||
$ | searchIn = null |
||
) |
Adds CSS to the header.
unknown_type | $url | |
unknown_type | $alternate | |
array | $options | |
$searchIn | comma separated list of FileDiscovery directories to search in ("kweb,local") |
To use conditional CSS for IE use option: 'if' => 'lte IE 7'
KWebTemplate::addCSSClass | ( | $ | cssClass | ) |
Appends layout's CSS class.
unknown_type | $cssClass |
KWebTemplate::addHeader | ( | $ | header, |
$ | footer = false , |
||
$ | vars = null , |
||
$ | once = true |
||
) |
$vars | array Parametry przekazywane do szablonów. Plus specjalne parametry: inHead - w nagłówku HEAD content - treść zamiast INCa |
KWebTemplate::addMetaLink | ( | $ | url, |
$ | data | ||
) |
$data,: | rel, type, title, if |
KWebTemplate::addRSS | ( | $ | url, |
$ | title, | ||
$ | options = array() |
||
) |
KWebTemplate::boxCount | ( | $ | box | ) |
KWebTemplate::boxSort | ( | ) |
KWebTemplate::cacheWholeResponse | ( | array $ | opts, |
$ | id, | ||
$ | items = null , |
||
$ | unique = null , |
||
$ | timeout = null |
||
) |
KWebTemplate::clearAddFooters | ( | ) |
KWebTemplate::clearAddHeaders | ( | ) |
KWebTemplate::clearBox | ( | $ | box | ) |
KWebTemplate::disableBuffering | ( | $ | printHeader = true , |
$ | clearBuffer = false |
||
) |
KWebTemplate::finish | ( | ) |
KWebTemplate::getBody | ( | $ | reset | ) |
KWebTemplate::getBodySize | ( | ) |
KWebTemplate::getBox | ( | $ | box, |
$ | id = false |
||
) |
KWebTemplate::getCSSClass | ( | ) |
Returns layout's CSS class.
KWebTemplate::getEditMode | ( | ) |
KWebTemplate::getGlobalTitle | ( | ) |
KWebTemplate::getMetaDescription | ( | $ | useOpenedObject = true | ) |
KWebTemplate::getMetaKeywords | ( | $ | useOpenedObject = true | ) |
KWebTemplate::getMetaLinks | ( | $ | sortAndFilter = false | ) |
Returns the list of meta links.
$sortAndFilter | - TRUE to sort the links, and pass them through filters (like minify, lessc and so on) |
KWebTemplate::getMetaRobots | ( | ) |
KWebTemplate::getMetaThumbnail | ( | ) |
KWebTemplate::getState | ( | ) |
KWebTemplate::getSubtitle | ( | ) |
KWebTemplate::getTitle | ( | $ | useGlobal = true , |
$ | useOpenedObject = true |
||
) |
static KWebTemplate::instance | ( | ) | [static] |
KWebTemplate::isAjax | ( | ) |
KWebTemplate::isInitialized | ( | ) | [static] |
KWebTemplate::metalinksSortCmp | ( | $ | a, |
$ | b | ||
) |
KWebTemplate::onFilterMetaLinks_lessc | ( | KWebEvent $ | event, |
array $ | filters | ||
) |
KWebTemplate::onFilterMetaLinks_minify | ( | KWebEvent $ | event, |
array $ | filters | ||
) |
KWebTemplate::pathCSS | ( | $ | file, |
$ | searchIn = null |
||
) |
KWebTemplate::pathIco | ( | $ | name, |
$ | size, | ||
$ | searchIn = null , |
||
$ | find = true |
||
) |
KWebTemplate::pathImg | ( | $ | file, |
$ | searchIn = null |
||
) |
KWebTemplate::pathJS | ( | $ | file, |
$ | searchIn = null |
||
) |
KWebTemplate::printAddFooters | ( | ) |
Prints additional footers.
KWebTemplate::printAddHeaders | ( | $ | inHead = null | ) |
Prints additional headers.
boolean | $inHead | TRUE to print headers for <HEAD>, FALSE to print headers designated for <BODY>, NULL to print ALL not printed before |
KWebTemplate::printBody | ( | ) |
KWebTemplate::printBox | ( | $ | box, |
$ | force = false , |
||
$ | inc = false , |
||
$ | group = null |
||
) |
KWebTemplate::printFooter | ( | ) |
KWebTemplate::printHeader | ( | ) |
KWebTemplate::removeBoxById | ( | $ | box, |
$ | name | ||
) |
KWebTemplate::removeBoxByName | ( | $ | box, |
$ | name | ||
) |
KWebTemplate::resetOuput | ( | ) |
Clears all output buffers and returns the content.
KWebTemplate::setEditMode | ( | $ | em | ) |
KWebTemplate::setGlobalTitle | ( | $ | title | ) |
KWebTemplate::setHeader | ( | $ | header, |
$ | footer = false |
||
) |
Sets header and footer for the layout.
If only the header is provided, then the footer is not printed (works like setLayout).
KWebTemplate::setHtmlCacheHeaders | ( | $ | timeout, |
$ | public = true |
||
) |
KWebTemplate::setLayout | ( | $ | layout | ) |
Sets layout template to be used.
The template should use KWebTemplate::$inst->printBody() and KWebTemplate::$inst->printAddFooters() somewhere in it's body.
KWebTemplate::setMetaDescription | ( | $ | text | ) |
KWebTemplate::setMetaKeywords | ( | $ | keywords | ) |
KWebTemplate::setMetaRobots | ( | $ | index, |
$ | follow | ||
) |
KWebTemplate::setMetaThumbnail | ( | $ | thumb, |
$ | add = true |
||
) |
KWebTemplate::setSubtitle | ( | $ | title | ) |
KWebTemplate::setTitle | ( | $ | title | ) |
KWebTemplate::$addFooters = array() |
KWebTemplate::$addHeaders = array() |
KWebTemplate::$body |
KWebTemplate::$bodySize = 0 |
KWebTemplate::$boxGroups = array() |
KWebTemplate::$debug_mode = 1 |
KWebTemplate::$finished = 0 |
KWebTemplate::$img = '/img/' |
KWebTemplate::$inBox = false |
KWebTemplate::$inst [static] |
KWebTemplate::$links = array() |
KWebTemplate::$margin_bottom = 0 |
KWebTemplate::$margin_left = 0 |
KWebTemplate::$margin_right = 0 |
KWebTemplate::$margin_top = 0 |
KWebTemplate::$state = TMPLS_BUFFERING |
KWebTemplate::$title = '' |
KWebTemplate::$use_footer = true |
KWebTemplate::$use_header = true |
true - używa domyślnego, string - używa inc'a, false - nie używa
KWebTemplate::$wholeResponseCache = false |
const KWebTemplate::ADDHEADER_CONTENT = 'content' |
const KWebTemplate::ADDHEADER_INHEAD = 'inHead' |
const KWebTemplate::CACHEOPT_BROWSER_CACHE_TIMEOUT = "browser_cache_timeout" |
const KWebTemplate::EVENT_FINISHED = "kweb.template.finished" |
const KWebTemplate::FILTER_META_DESCRIPTION = "kweb.template.meta.description" |
const KWebTemplate::FILTER_META_KEYWORDS = "kweb.template.meta.keywords" |
const KWebTemplate::FILTER_META_LINKS = 'kweb.template.meta.links' |
const KWebTemplate::FILTER_TITLE = "kweb.template.title" |
const KWebTemplate::META_GROUP = 'group' |
Group of meta data.
const KWebTemplate::META_IF = 'if' |
const KWebTemplate::META_INDEX = '_index' |
const KWebTemplate::META_LESS_COMPILE = '_less_compile' |
const KWebTemplate::META_MEDIA = 'media' |
const KWebTemplate::META_MINIFY = '_minify' |
If TRUE it will be minified.
If FALSE it won't be concatenated with other files, and won't be minified... You can pass array() with additional options for minification.
For already minified files that should be concatenated with others use 'minified'
const KWebTemplate::META_MINIFY_MINIFIED = 'minified' |
const KWebTemplate::META_NOCACHE = 'nocache' |
const KWebTemplate::META_PRIORITY = 'priority' |
const KWebTemplate::META_REL = 'rel' |
const KWebTemplate::META_TITLE = 'title' |
const KWebTemplate::META_TYPE = 'type' |
const KWebTemplate::META_URL = '_url' |