/application/models/ToJsonObject.php
PHP | 39 lines | 30 code | 4 blank | 5 comment | 0 complexity | 2dfc055ac6a33fa8d9feb00b5f6ca7ea MD5 | raw file
- <?php
- /**
- * @author davidstockton
- *
- *
- */
- class Application_Model_ToJsonObject
- {
- public $foo;
- public $bar;
-
- protected $protFoo;
- protected $protBar;
-
- private $privFoo;
- private $privBar;
-
- public function __construct()
- {
- $this->foo = uniqid();
- $this->bar = uniqid();
- $this->protFoo = uniqid();
- $this->protBar = uniqid();
- $this->privFoo = uniqid();
- $this->privBar = uniqid();
- }
-
- public function toJson()
- {
- return Zend_Json::encode(
- array(
- 'foo' => $this->foo,
- 'bar' => $this->bar,
- 'protFoo' => $this->protFoo,
- 'privBar' => $this->privBar
- )
- );
- }
- }