Created a new service for show days

Created a new user service
Started refactoring edit show action
This commit is contained in:
denise 2013-03-11 16:18:40 -04:00
parent 1cc823ef0e
commit 7347be35b1
8 changed files with 286 additions and 137 deletions

View 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;
}
}