Mecha CMS

Deep learning on using the API.

Class Lot

Author: Taufik Nurrohman · 74 Views

Tweet

Variables.

Table of Content

Register variables and makes them available globally in the shields.

Set 

Lot::set($key, $value = null, $scope = null);

Set a $test variable for usage in the shields:

Lot::set('test', 'Hello!');

Get 

Lot::get($key, $fail = false, $scope = null);

Get test value from the $GLOBALS storage:

echo Lot::get('test');

Reset 

Lot::reset($key = null, $scope = null);

Remove test property from the $GLOBALS storage:

Lot::reset('test');

Remove all properties that has been set by the Lot::set() method:

Lot::reset();

Variables 

Here are list of variables that are available globally in the shields:

  • $config
  • $date
  • $language
  • $site
  • $state
  • $url
  • $u_r_l → alias for $url

Global variables created by Page extension:

  • $pager
  • $page
  • $pages

Related: Variables

0 Comments

No comments yet.