PHP Class Mo_variables_ext, mo_variables

ファイルを表示 Open project: rsanchez/mo_variables

Public Properties

Property Type Description
$description
$docs_url
$name
$settings
$settings_exist
$version

Protected Properties

Property Type Description
$defaults
$run_multiple eg. in embedded templates
$template_data

Public Methods

Method Description
__construct ( $settings = [] )
activate_extension ( )
cleanup ( string $final_template, boolean $sub ) : string Clean up unparsed variables
disable_extension ( )
run ( $row ) : void Add all the global variables specified in $this->settings
sessions_end ( ) for legacy purposes, so we don't break updates
settings ( )
update_extension ( $current = '' )

Protected Methods

Method Description
ajax ( ) : void Set the {if ajax} and {if not_ajax} variables
archive ( ) : void Set the {if archive}, {if daily_archive}, {if monthly_archive}, {if yearly_archive}, {if not_archive}, {if not_daily_archive}, {if not_monthy_archive} and {if not_yearly_archive} variables
categorized ( ) Set the {if categorized} conditional
cookie ( ) : void Set variables from the $_COOKIE array
current_url ( ) : void Set the {current_url}, {uri_string} and {query_string} variables
flashdata ( ) : void Set variables from the $this->EE->session->flashdata array
get ( ) : void Set variables from the $_GET array
get_post ( ) : void Set variables from the $_GET and $_POST arrays
member_group_conditionals ( ) : void Set the {if in_group_1_2_3} and {if not_in_group_1_2_3} early-parsed conditionals
member_id_conditionals ( ) : void Set the {if has_member_id_1_2_3} and {if not_has_member_id_1_2_3} early-parsed conditionals
member_variables ( ) : void Set the member variables as early-parsed
mobile_detect ( ) : void Early-parsed conditionals for mobile detection
page_tracker ( ) : void Set the {last_page_visited}, {one_pages_ago}, {two_pages_ago}, {three_pages_ago}, {four_pages_ago} and {five_pages_ago} variables
paginated ( ) : void Set the {if paginated}, {if not_paginated} and {page_offset variables}
post ( ) : void Set variables from the $_POST array
reserved_category_word ( ) Set the {reserved_category_word} variable
reverse_segments ( ) : void Set the {rev_segment_X} variables
secure ( ) : void Set the {if secure}, {if not_secure}, {insecure_site_url}, {secure_site_url} variables
segments_from ( ) : void Set the {segments_from_X} variables
set_global_var ( string | array $key, string $value = '', boolean $xss_clean = FALSE, boolean $embed = FALSE, string $separator = ':', string $prefix = '' ) : void Set Global Variable

Method Details

__construct() public method

public __construct ( $settings = [] )

activate_extension() public method

public activate_extension ( )

ajax() protected method

Set the {if ajax} and {if not_ajax} variables
protected ajax ( ) : void
return void

archive() protected method

Set the {if archive}, {if daily_archive}, {if monthly_archive}, {if yearly_archive}, {if not_archive}, {if not_daily_archive}, {if not_monthy_archive} and {if not_yearly_archive} variables
protected archive ( ) : void
return void

categorized() protected method

Set the {if categorized} conditional
protected categorized ( )

cleanup() public method

Clean up unparsed variables
public cleanup ( string $final_template, boolean $sub ) : string
$final_template string the template content after parsing
$sub boolean whether or not the template is an embed
return string the final template content

current_url() protected method

Set the {current_url}, {uri_string} and {query_string} variables
protected current_url ( ) : void
return void

disable_extension() public method

public disable_extension ( )

flashdata() protected method

Set variables from the $this->EE->session->flashdata array
protected flashdata ( ) : void
return void

get() protected method

Set variables from the $_GET array
protected get ( ) : void
return void

get_post() protected method

Set variables from the $_GET and $_POST arrays
protected get_post ( ) : void
return void

member_group_conditionals() protected method

Set the {if in_group_1_2_3} and {if not_in_group_1_2_3} early-parsed conditionals
protected member_group_conditionals ( ) : void
return void

member_id_conditionals() protected method

Set the {if has_member_id_1_2_3} and {if not_has_member_id_1_2_3} early-parsed conditionals
protected member_id_conditionals ( ) : void
return void

member_variables() protected method

Set the member variables as early-parsed
protected member_variables ( ) : void
return void

mobile_detect() protected method

Early-parsed conditionals for mobile detection
protected mobile_detect ( ) : void
return void

page_tracker() protected method

Set the {last_page_visited}, {one_pages_ago}, {two_pages_ago}, {three_pages_ago}, {four_pages_ago} and {five_pages_ago} variables
protected page_tracker ( ) : void
return void

paginated() protected method

Set the {if paginated}, {if not_paginated} and {page_offset variables}
protected paginated ( ) : void
return void

post() protected method

Set variables from the $_POST array
protected post ( ) : void
return void

reserved_category_word() protected method

Set the {reserved_category_word} variable
protected reserved_category_word ( )

reverse_segments() protected method

Set the {rev_segment_X} variables
protected reverse_segments ( ) : void
return void

run() public method

Add all the global variables specified in $this->settings
public run ( $row ) : void
return void

secure() protected method

Set the {if secure}, {if not_secure}, {insecure_site_url}, {secure_site_url} variables
protected secure ( ) : void
return void

segments_from() protected method

Set the {segments_from_X} variables
protected segments_from ( ) : void
return void

sessions_end() public method

for legacy purposes, so we don't break updates
public sessions_end ( )

set_global_var() protected method

Set Global Variable
protected set_global_var ( string | array $key, string $value = '', boolean $xss_clean = FALSE, boolean $embed = FALSE, string $separator = ':', string $prefix = '' ) : void
$key string | array the key/index/tag of the variable, or an array of key/value pairs of multiple variables
$value string the value of the variable, or the tag prefix if the first arg is an array
$xss_clean boolean whether or not to clean (used for GET/POST/COOKIE arrays)
$embed boolean whether or not to add the embed: prefix
$separator string change the default colon : separator between prefix and key
$prefix string a prefix to add to the key/index/tag
return void

settings() public method

public settings ( )

update_extension() public method

public update_extension ( $current = '' )

Property Details

$defaults protected_oe property

protected $defaults

$description public_oe property

public $description

$docs_url public_oe property

public $docs_url

$name public_oe property

public $name

$run_multiple protected_oe property

eg. in embedded templates
protected $run_multiple

$settings public_oe property

public $settings

$settings_exist public_oe property

public $settings_exist

$template_data protected_oe property

protected $template_data

$version public_oe property

public $version