Howto create an empty object in PHP
To create an empty object use stdClass
$obj = new \stdClass();
To create an empty object use stdClass
$obj = new \stdClass();
This topics show you, how you can disable layout
to disable layout use this line:
$this->_helper->layout->disableLayout();
This topics show you, how you can change a default layout
to change layout use this line:
$this->_helper->layout->setLayout('admin');
This example show you how we can check if a use logged in
$auth = Zend_Auth::getInstance();
if (!$auth->hasIdentity()) {
if ('login' != $this->getRequest()->getActionName()) {
$this->_helper->getHelper('Redirector')->setGotoRoute(array(), 'MYROUTE');
}
}
This is a code show how to access to private property in php
<?php
class MyClass {
private $privateProperty = 'myproperty';
}
$reflectionClass = new ReflectionClass('MyClass');
$reflectionProperty = $reflectionClass->getProperty('privateProperty');
...