Created a new service for show days
Created a new user service Started refactoring edit show action
This commit is contained in:
parent
1cc823ef0e
commit
7347be35b1
8 changed files with 286 additions and 137 deletions
33
airtime_mvc/application/services/UserService.php
Normal file
33
airtime_mvc/application/services/UserService.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
/*define('UTYPE_HOST' , 'H');
|
||||
define('UTYPE_ADMIN' , 'A');
|
||||
define('UTYPE_GUEST' , 'G');
|
||||
define('UTYPE_PROGRAM_MANAGER' , 'P');*/
|
||||
|
||||
class Application_Service_UserService
|
||||
{
|
||||
private $currentUser;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
if (!is_null($userInfo->id)) {
|
||||
$this->currentUser = CcSubjsQuery::create()->findPK($userInfo->id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns a CcSubjs object
|
||||
*/
|
||||
public function getCurrentUser()
|
||||
{
|
||||
if (is_null($this->currentUser)) {
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
return $this->currentUser;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue