class_UserUpdateFilter.php

Go to the documentation of this file.
00001 <?php
00025 class UserUpdateFilter extends BaseFilter implements Filterable {
00031         protected function __construct () {
00032                 // Call parent constructor
00033                 parent::__construct(__CLASS__);
00034         }
00035 
00041         public final static function createUserUpdateFilter () {
00042                 // Get a new instance
00043                 $filterInstance = new UserUpdateFilter();
00044 
00045                 // Return the instance
00046                 return $filterInstance;
00047         }
00048 
00057         public function execute (Requestable $requestInstance, Responseable $responseInstance) {
00058                 // Get user instance from registry
00059                 $userInstance = Registry::getRegistry()->getInstance('user');
00060 
00061                 // Now update last activity
00062                 $userInstance->updateLastActivity($requestInstance);
00063 
00064                 // Update auth data as well
00065                 $authInstance = Registry::getRegistry()->getInstance('auth');
00066                 $authInstance->updateAuthData();
00067 
00068                 // Write all updates to the database
00069                 $userInstance->flushPendingUpdates();
00070         }
00071 }
00072 
00073 // [EOF]
00074 ?>

Generated on Mon Dec 8 01:06:45 2008 for Ship-Simulator by  doxygen 1.5.6