Author: Jonathan.Wage Date: 2010-02-11 16:49:59 +0100 (Thu, 11 Feb 2010) New Revision: 27898
Added: plugins/sfSympalPlugin/trunk/lib/sfSympal.class.php Log: [1.4][sfSympalPlugin][1.0] Class for Sympal shortcut static methods Added: plugins/sfSympalPlugin/trunk/lib/sfSympal.class.php =================================================================== --- plugins/sfSympalPlugin/trunk/lib/sfSympal.class.php (rev 0) +++ plugins/sfSympalPlugin/trunk/lib/sfSympal.class.php 2010-02-11 15:49:59 UTC (rev 27898) @@ -0,0 +1,60 @@ +<?php + +/** + * Class for shortcuts, global helper methods, etc. + * + * @package sfSympalPlugin + * @author Jonathan H. Wage <[email protected]> + */ +class sfSympal +{ + public static function getRequest() + { + return sfContext::getInstance()->getRequest(); + } + + public static function getResponse() + { + return sfContext::getInstance()->getResponse(); + } + + public static function getUser() + { + return sfContext::getInstance()->getUser(); + } + + public static function getGuardUser() + { + return sfContext::getInstance()->getGuardUser(); + } + + public static function getContext() + { + return sfContext::getInstance(); + } + + public static function getSympalContext() + { + return sfSympalContext::getInstance(); + } + + public static function getSymfonyContext() + { + return sfContext::getInstance(); + } + + public static function getSympalConfiguration() + { + return sfSympalConfiguration::getActive(); + } + + public static function getSymfonyConfiguration() + { + return sfProjectConfiguration::getActive(); + } + + public static function getEventDispatcher() + { + return sfProjectConfiguration::getActive()->getEventDispatcher(); + } +} \ No newline at end of file -- You received this message because you are subscribed to the Google Groups "symfony SVN" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/symfony-svn?hl=en.
