public function select($id)
 {
     $em = Zool::app()->entityManager;
     $estate = $em->find('app\\model\\Estate', $id);
     SessionContext::instance()->set('estate', $estate);
     Zool::app()->viewProvider->envelope->message = array('title' => 'Mentés', 'content' => $estate->name);
 }
 private function __construct()
 {
     $this->sessionContext = SessionContext::instance();
     $this->pageContext = PageContext::instance();
     $this->requestContext = RequestContext::instance();
     $this->eventContext = EventContext::instance();
 }
 public function beforeAction()
 {
     $this->contexts = Contexts::instance();
     $this->reqCon = RequestContext::instance();
     $this->sesCon = SessionContext::instance();
     $this->em = Zool::app()->em;
 }
 public function callThis()
 {
     $this->string++;
     if ($this->string > 40) {
         $this->string = 35;
     }
     $this->llist = array();
     SessionContext::instance()->set('string', $this->string);
     return 'called me';
 }
 public function bugger($bugid)
 {
     $em = Zool::app()->em;
     $bug = $em->find('app\\model\\Bug', $bugid);
     SessionContext::instance()->set('bugstringm', 'Selected: ' . $bug->description);
     SessionContext::instance()->set('selectedBug', $bug);
     SessionContext::instance()->set('bug_id', $bug->id);
     SessionContext::instance()->set('bug_description', $bug->description);
     SessionContext::instance()->set('bug_created', $bug->created);
 }
 public function dom()
 {
     RequestContext::instance()->set('foo', true);
     RequestContext::instance()->set('bar', rand(1, 20));
     $colors = array('blue', 'red', 'orange', 'green', 'gray', 'yellow');
     $c = $colors[array_rand($colors, 1)];
     RequestContext::instance()->set('color', $c);
     \shuffle($colors);
     SessionContext::instance()->set('colors', $colors);
     RequestContext::instance()->set('title', $c);
 }
 function __set($property, $value)
 {
     $this->{$property} = $value;
     if (array_key_exists($property, $this->watchedProperties)) {
         $annotation = $this->watchedProperties[$property];
         $name = $property;
         if (!is_null($annotation->value)) {
             $name = $annotation->value;
         }
         switch ($annotation->scope) {
             case SESSION_SCOPE:
                 SessionContext::instance()->set($name, $value);
                 break;
             default:
                 //TODO
         }
     }
 }