Skip to content

Instantly share code, notes, and snippets.

@sugarHoge
Created June 24, 2013 08:12
Show Gist options
  • Select an option

  • Save sugarHoge/5848484 to your computer and use it in GitHub Desktop.

Select an option

Save sugarHoge/5848484 to your computer and use it in GitHub Desktop.
Zend_Registry
<?php
require_once 'Zend/Registry.php';
Zend_Registry::set('foo', $data); // set()メソッドを使い(キー, 値)をセット
$data = Zend_Registry::get('foo'); // get()メソッドを使いキーを指定して値取得
<?php
require_once 'Zend/Registry.php';
Zend_Registry::set('foo', array('Boo', 'Foo', 'Woo'));
foreach (Zend_Registry::get('foo') as $key => $value) {
echo $key,": ",$value,"<br />\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment