Linux 软件免费装

Wordpress Registry

开发者 rbncha
更新时间 2012年9月12日 20:27
PHP版本: 1.5 及以上
WordPress版本: 3.4.2

标签

http request session $_GET $_POST registry globals scope

下载

详情介绍:

The main reason for building this plugin is because wordpress doesn't readily have a central registry system where things can be stored such as variable values, objects, arrays. Which can be retrieved from a global space. This plugin basically tries to lessen the repeating declarations of variables and etc. It is something quite similar to Magento registry "Mage_Registry", but very light version. This plugin can also be used as GET and POST request parameters handler. The benefit is, you don't have to check isset($_GET['myparam']) or isset($_POST['myparam']). If the param is not set, it will return a default value you supplied in second param. By default, the default value is false. Handle the session data as easy as never before. Save to session, check existance, get, unset it easily using dynamic methods. Hope this could be of some use. Usage is very easy, neat and straight forward: Register a dynamic method on the fly: registry()->setDynamicMethodName('this is my value'); registry()->setMyName('My Name is Rubin Shrestha'); Validate existance of your method and echo: if( registry()->hasDynamicMethodName() ) echo 'Has ' . registry()->getDynamicMethodName(); Unset the dynamic method: registry()->unsDynamicMethodName(); after this, if you echo registry()->getDynamicMethodName() it will return null; For GET and POST request handler use it like this: Session handler: Handle the data in session as easy as registry()->session()->setDynamicMethodName('this is my value'); and get it as registry()->session()->getDynamicMethodName(); Unset it registry()->session()->unsDynamicMethodName();

安装:

  1. Upload Wordpress Registry to the '/wp-content/plugins/' directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

更新日志:

2.4 2.3 2.2 2.1 2.0 1.0