Define variables outside the PHP class.
Posted
by Muhammad Sajid
on Stack Overflow
See other posts from Stack Overflow
or by Muhammad Sajid
Published on 2010-03-24T06:21:46Z
Indexed on
2010/03/24
6:23 UTC
Read the original article
Hit count: 244
Hello,
I m using zend.
I want to define the below code outside the controller class & access in different Actions.
$user = new Zend_Session_Namespace('user');
$logInArray = array();
$logInArray['userId'] = $user->userid;
$logInArray['orgId'] = $user->authOrgId;
class VerifierController extends SystemadminController
{
public function indexAction()
{
// action body
print_r($logInArray);
}
}
How it is possible.
© Stack Overflow or respective owner