Свойство | Type | Description | |
---|---|---|---|
$EE | |||
$context | |||
$default_scope | |||
$file_sync | |||
$limit_bots | |||
$path | |||
$site_id | |||
$stash_cookie | |||
$stash_cookie_expire | |||
$version |
Свойство | Type | Description | |
---|---|---|---|
$bundle_id | |||
$bundles | |||
$parse_complete | |||
$parse_conditionals | |||
$parse_depth | |||
$parse_tags | |||
$parse_vars | |||
$priority | |||
$process | |||
$replace | |||
$type | |||
$xss_clean |
Méthode | Description | |
---|---|---|
__call ( string $name, array $arguments ) : void | Shortcut to stash:get or stash:set | |
__construct ( $calling_from_hook = FALSE ) | * Constructor | |
_no_results ( ) : String | parse and return no_results content | |
_prep_no_results ( string $prefix ) : String | prep a prefixed no_results block in current template tagdata | |
append ( ) : void | Append the specified value to an already existing variable. | |
append_list ( ) : string | Append to array | |
append_value ( ) : void | Single tag version of append() | |
block ( ) : string | Define default/fallback content for a stash variable from enclosed tagdata | |
bundle ( array $params = [], array $dynamic = [] ) : void | Bundle up a collection of variables and save in the database | |
cache ( ) : string | Cache tagdata to db and link it to the current URL context | |
context ( ) : void | Set the current context | |
copy ( ) : string | Clone a variable / list | |
destroy ( mixed $params = [], string $type = 'variable', string $scope = 'user' ) : void | Unset variable(s) in the current session, optionally flush from db | |
embed ( ) : string | Embed a Stash template file in the current template | |
embed_extend ( ) : string | Pass variables to an embed via variable pairs in tagdata | |
extend ( ) : string | void | Inject a stash embed into a variable or block | |
final_output ( $output = '' ) : string | Final parsing/cleanup of template tagdata before output | |
finish ( ) : string | Tagb for cleaning up specific placeholders before final output | |
flatten_list ( $array ) : string | Flattens an array into a quasi-serialized format suitable for saving as a stash variable | |
flush_cache ( ) : string | Flush the variables database cache for the current site (Super Admins only) | |
get ( mixed $params = '', string $type = 'variable', string $scope = 'user' ) : string | Get content from session, database, $_POST/$_GET superglobals or file | |
get_bundle ( $set = TRUE ) : string | Restore values for a given bundle | |
get_list ( $params = [], $value = '', $type = 'variable', $scope = 'user' ) : string | Retrieve a serialised array of items, explode and replace into tagdata | |
init ( boolean $calling_from_hook = FALSE ) : void | Initialise tag parameters | |
is_empty ( $string = NULL ) : integer | Checks if a variable or string has any content, handy for conditionals | |
join_lists ( ) : string | Create a union of two or more existing lists Lists *must* share the same keys and be *already in memory* | |
list_count ( ) : string | Retrieve the item count for a given list | |
not_empty ( $string = NULL ) : integer | Checks if a variable or string is empty or non-existent, handy for conditionals | |
not_found ( ) : string | Output the 404 template with the correct header and exit | |
parse ( array $params = [], string $value = NULL ) : string | Parse tagdata | |
prepend ( ) : void | Prepend the specified value to an already existing variable. | |
prepend_list ( ) : string | Prepend to array | |
prepend_value ( ) : void | Single tag version of prepend() | |
rebuild_list ( mixed $params = '', string $type = 'variable', string $scope = 'user' ) : array | Retrieve and rebuild list, or optionally part of a list | |
save_output ( string $output = '' ) : string | Save the final rendered template output to a static file | |
set ( mixed $params = [], string $value = '', string $type = 'variable', string $scope = 'user' ) : void | Set content in the current session, optionally save to the database | |
set_bundle ( ) : void | Set values into a bundle | |
set_list ( ) : string | Serialize a multidimenisional array and save as a variable | |
set_parse_params ( ) : String | set individual parse parameters if parse="yes" | |
set_value ( ) : void | Single tag version of set(), for when you need to use a plugin as a tag parameter (always use with parse="inward") | |
shuffle_list_key ( $arr, $key ) : void | Shuffle a stash list key | |
sort_by_key ( $arr, $key, $cmp = 'sort_by_integer' ) : void | Sort a multi-dimensional array by key | |
split_list ( ) | ||
static_cache ( string $output = '' ) : string | Cache a template to file and link it to the current URL context |
Méthode | Description | |
---|---|---|
sort_by_integer ( $a, $b ) | Sort callback function: sort by integer | |
sort_by_string ( $a, $b ) | Sort callback function: sort by string |
Méthode | Description | |
---|---|---|
_api_call ( string $method, mixed $params, string $type = 'variable', string $scope = 'user', string $value = NULL ) : void | API: call a Stash method directly | |
_api_static_call ( string $method, mixed $params, string $type = 'variable', string $scope = 'user', string $value = NULL ) : void | API: call a Stash method statically (DEPRECATED, PHP <5.6 only) | |
_clean_string ( string $value = NULL ) : string | String manipulations | |
_get_boolean_config_item ( string $item, boolean $default = TRUE ) : boolean | get the boolean value of a config item, with the desired fallback value | |
_get_stash_cookie ( ) : boolean/array | get the stash cookie | |
_get_users_vars ( ) : array | return the standard set of user variables | |
_is_bot ( ) : void | Check if the user agent is a bot | |
_is_cacheable ( boolean $check_request_type = TRUE ) : string | Check to see if a template (not a fragment) is suitable for caching | |
_lcd ( $array, $x = 1 ) : integer | get the least common denominator for a given array of numbers | |
_list_row_explode ( string $string ) : array | ||
_list_row_implode ( array $array ) : string | ||
_load_EE_TMPL ( ) : void | Load the EE Template class and register the Stash module Used when Stash is instantiated outside of an EE template | |
_matches ( string $match, string/array $against ) : boolean | Match a regex against a string or array of strings | |
_normalize ( $str ) : string | Normalize characters in a string (the dirty way) | |
_parse_context ( string $name, $disable_query_str = FALSE ) : string | Replace the current context in a variable name | |
_parse_fraction ( $fraction, $offset, $total ) : integer | get a fraction from a parameter value | |
_parse_output ( string $value = NULL, string $match = NULL, string $filter = NULL, string $default = NULL ) : string | Final parsing of the stash variable before output to the template | |
_parse_sub_template ( boolean $tags = TRUE, boolean $vars = TRUE, boolean $conditionals = FALSE, integer $depth = 1, $nocache_id = FALSE ) : string | Parse template data | |
_parse_template_vars ( string $template = '' ) : string | Parse global vars inside a string | |
_placeholders ( array $matches ) : string | Replaces nested tag content with placeholders | |
_post_parse ( $method ) : Mixed | Delay processing a tag until template_post_parse hook | |
_prep_in_conditionals ( string $tagdata = '' ) : String | Prep {if var IN (array)} conditionals | |
_run_tag ( string $method, array $params = [] ) : string | Run a Stash module tag with a known set of parameters | |
_serialize_stash_tag_pairs ( ) : void | Retrieve {stash:var}{/stash:var} tag pairs and serialize | |
_set_stash_cookie ( string $unique_id ) : void | set the stash cookie | |
_un_prefix ( string $prefix, string $template ) : String | remove a given prefix from common variables in the template tagdata | |
_update_list ( boolean $append = TRUE ) : string | Append / prepend to array |
public _no_results ( ) : String | ||
Résultat | String |
public _prep_no_results ( string $prefix ) : String | ||
$prefix | string | |
Résultat | String |
public append_value ( ) : void | ||
Résultat | void |
public embed_extend ( ) : string | ||
Résultat | string |
public final_output ( $output = '' ) : string | ||
Résultat | string |
public static flatten_list ( $array ) : string | ||
Résultat | string | The imploded string |
public flush_cache ( ) : string | ||
Résultat | string |
public get_bundle ( $set = TRUE ) : string | ||
Résultat | string |
public join_lists ( ) : string | ||
Résultat | string |
public list_count ( ) : string | ||
Résultat | string |
public prepend_value ( ) : void | ||
Résultat | void |
public save_output ( string $output = '' ) : string | ||
$output | string | the rendered template |
Résultat | string |
public set ( mixed $params = [], string $value = '', string $type = 'variable', string $scope = 'user' ) : void | ||
$params | mixed | The name of the variable to retrieve, or an array of key => value pairs |
$value | string | The value of the variable |
$type | string | The type of variable |
$scope | string | The scope of the variable |
Résultat | void |
public set_parse_params ( ) : String | ||
Résultat | String |
public shuffle_list_key ( $arr, $key ) : void | ||
Résultat | void |
protected sort_by_integer ( $a, $b ) |
public sort_by_key ( $arr, $key, $cmp = 'sort_by_integer' ) : void | ||
Résultat | void |
protected sort_by_string ( $a, $b ) |
public static_cache ( string $output = '' ) : string | ||
$output | string | additional tagdata to return to the template along with the placeholder |
Résultat | string |