first commit
This commit is contained in:
41
plugins/sfGuardPlugin/lib/model/sfGuardGroupPeer.php
Normal file
41
plugins/sfGuardPlugin/lib/model/sfGuardGroupPeer.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the symfony package.
|
||||
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package symfony
|
||||
* @subpackage plugin
|
||||
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
|
||||
* @version SVN: $Id: sfGuardGroupPeer.php 4 2008-09-24 08:40:58Z marek $
|
||||
*/
|
||||
class sfGuardGroupPeer extends BasesfGuardGroupPeer
|
||||
{
|
||||
protected static $groups = [];
|
||||
|
||||
/**
|
||||
* Zwraca grupę
|
||||
*
|
||||
* @param mixed $name Nazwa grupy
|
||||
* @return null|sfGuardGroup
|
||||
* @throws PropelException
|
||||
*/
|
||||
public static function retrieveByName($name)
|
||||
{
|
||||
if (!isset(self::$groups[$name]) && !array_key_exists($name, self::$groups))
|
||||
{
|
||||
$c = new Criteria();
|
||||
$c->add(self::NAME, $name);
|
||||
|
||||
self::$groups[$name] = self::doSelectOne($c);
|
||||
}
|
||||
|
||||
return self::$groups[$name];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user