Created
May 28, 2010 06:57
-
-
Save tight/416854 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// lib/form/BaseForm.class.php | |
/** | |
* Base project form. | |
* | |
* @package peanut | |
* @subpackage form | |
* @author Alexandre 'pocky' BALMES | |
* @version SVN: $Id: BaseForm.class.php 20147 2009-07-13 11:46:57Z FabianLange $ | |
*/ | |
class BaseForm extends sfFormSymfony | |
{ | |
static protected $userForm = null; | |
static protected function getUser() | |
{ | |
return self::$userForm; | |
} | |
static public function getValidUser() | |
{ | |
if (!self::$userForm instanceof sfBasicSecurityUser) | |
{ | |
throw new RuntimeException('No valid user instance available'); | |
} | |
return self::$userForm; | |
} | |
static public function setUser(sfBasicSecurityUser $user) | |
{ | |
self::$userForm = $user; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
J'ai fermé le ticket correspondant grâce a toi donc merci !