Overview

Classes

  • vodka
  • Overview
  • Class

Class vodka

Author: deseven
Version: 1.0.1
Link: https://github.com/deseven/vodka
Located at
Methods summary
public boolean
# __construct( array $params )

Engine initialization.

Engine initialization.

Keep in mind that all internal redirects are handled here.

Parameters

$params
Array with engine parameters. Check config.php from demo sources or github wiki to get full list of parameters.

Returns

boolean
true if everything is ok, false otherwise.
public integer
# getStartTime( )

Return vodka start time.

Return vodka start time.

Returns

integer
Number of microseconds.
public boolean
# loadTemplate( string $name )

Loads template by its name.

Loads template by its name.

Parameters

$name
Name of desired template.

Returns

boolean
true if everything is ok, false otherwise.
public mixed
# getPageByName( string $name )

Returns page by its name or alias.

Returns page by its name or alias.

Parameters

$name
Name of desired page.

Returns

mixed
array with a page or false.
public mixed
# getCurrentPage( )

Returns current page.

Returns current page.

Returns

mixed
array with current page or false.
public boolean
# loadCurrentPage( )

Loads current page.

Loads current page.

Returns

boolean
true if everything is ok, false otherwise.
public boolean
# loadPage( mixed $page )

Loads specified page.

Loads specified page.

Parameters

$page
Array with page or page name.

Returns

boolean
true if everything is ok, false otherwise.
public mixed
# getPageURL( mixed $page )

Get specified page url.

Get specified page url.

Parameters

$page
Array with page or page name.

Returns

mixed
string with canonical URL of the page or false.
public boolean
# buildCurrentMenu( )

Builds current menu.

Builds current menu.

Returns

boolean
true if everything is ok, false otherwise.
public boolean
# buildMenu( mixed $page )

Builds menu for specified page.

Builds menu for specified page.

Parameters

$page
Array with page or page name.

Returns

boolean
true if everything is ok, false otherwise.
public boolean
# buildCurrentPage( )

Builds current page.

Builds current page.

Returns

boolean
true if everything is ok, false otherwise.
public boolean
# buildPage( mixed $page )

Builds specified page.

Builds specified page.

Parameters

$page
Array with page or page name.

Returns

boolean
true if everything is ok, false otherwise.
public boolean
# replaceVar( string $var, string $string = null )

Replaces variable (string encapsulated in curly braces) in page.

Replaces variable (string encapsulated in curly braces) in page.

Please note that this function doesn't modify the output directly, call buildPage() to apply your actions.

Parameters

$var
$string

Returns

boolean
Always true.

Example

$vodka->replaceVar('VAR','value');
public boolean
# appendHead( string $string )

Appends $string to the {VODKA:HEAD} part of the template.

Appends $string to the {VODKA:HEAD} part of the template.

Please note that this function doesn't modify the output directly, call buildPage() to apply your actions.

Parameters

$string

Returns

boolean
Always true.

Example

$vodka->appendHead('<meta name="robots" content="all">');
Constants summary
string ver
# '1.0.1'
integer rev
# 101
string head
# '{VODKA:HEAD}'
string canonical
# '{VODKA:CANONICAL}'
string description
# '{VODKA:DESCRIPTION}'
string keywords
# '{VODKA:KEYWORDS}'
string menu
# '{VODKA:MENU}'
string content
# '{VODKA:CONTENT}'
string title
# '{VODKA:TITLE}'
string template
# '{VODKA:TEMPLATE}'
string url
# '{VODKA:URL}'
string baseurl
# '{VODKA:BASEURL}'
string name
# '{VODKA:NAME}'
string cclass
# '{VODKA:CLASS}'
Properties summary
protected $base_url
#
protected $root
#
protected boolean $show_errors
# true
protected boolean $forbid_scriptname
# true
protected $clean_unused_vars
#
protected $auto_pages
#
protected $main_page
#
protected $notfound_page
#
protected $pages
#
protected $menu
#
protected $templates
#
protected $aliases
#
protected $template
#
protected $content
#
protected $current_page
#
protected $current_template
#
protected $page_built
#
protected $output
#
protected $built_head
#
protected $built_menu
#
protected $uri
#
protected array $replace
# []
protected array $subject
# []
protected $start_time
#
API documentation generated by ApiGen