Author: bicou Date: 2010-03-26 20:47:10 +0100 (Fri, 26 Mar 2010) New Revision: 28813
Modified: plugins/sfRedisPlugin/trunk/config/sfRedisPluginConfiguration.class.php plugins/sfRedisPlugin/trunk/lib/cache/sfRedisCache.class.php plugins/sfRedisPlugin/trunk/lib/config/sfRedisConfigHandler.class.php plugins/sfRedisPlugin/trunk/lib/sfRedis.class.php plugins/sfRedisPlugin/trunk/lib/task/redisInfoTask.class.php Log: phpdoc Modified: plugins/sfRedisPlugin/trunk/config/sfRedisPluginConfiguration.class.php =================================================================== --- plugins/sfRedisPlugin/trunk/config/sfRedisPluginConfiguration.class.php 2010-03-26 19:08:07 UTC (rev 28812) +++ plugins/sfRedisPlugin/trunk/config/sfRedisPluginConfiguration.class.php 2010-03-26 19:47:10 UTC (rev 28813) @@ -1,24 +1,28 @@ <?php /** - * TODO: short description. + * sfRedisPluginConfiguration * - * TODO: long description. - * - * @version $Id$ - * @author Benjamin Viellard <[email protected]> + * @uses sfPluginConfiguration + * @package sfRedisPlugin + * @author Benjamin VIELLARD <[email protected]> + * @license The MIT License + * @version SVN: $Id$ */ class sfRedisPluginConfiguration extends sfPluginConfiguration { - const VERSION = '0.a'; - + /** + * path to config + * + * @var string + */ const CONFIG_PATH = 'config/redis.yml'; /** - * TODO: short description. + * initialize plugin * - * @return TODO - * @author Benjamin Viellard <[email protected]> + * @access public + * @return void */ public function initialize() { Modified: plugins/sfRedisPlugin/trunk/lib/cache/sfRedisCache.class.php =================================================================== --- plugins/sfRedisPlugin/trunk/lib/cache/sfRedisCache.class.php 2010-03-26 19:08:07 UTC (rev 28812) +++ plugins/sfRedisPlugin/trunk/lib/cache/sfRedisCache.class.php 2010-03-26 19:47:10 UTC (rev 28813) @@ -5,17 +5,23 @@ * * @package sfRedisPlugin * @subpackage cache - * @author Thomas Parisot <[email protected]> + * @author Benjamin Viellard <[email protected]> * @version SVN: $Id$ */ class sfRedisCache extends sfCache { + /** + * Predis client instance + * + * @var Predis_Client + * @access protected + */ protected $redis = null; /** * Available options : * - * * config: Configuration key to connection parameters + * * connection: Configuration key to connection parameters * * @see sfCache */ @@ -88,7 +94,6 @@ /** * We manually remove keys as the redis glob style * == sfCache ** style * - * @author oncletom * @see sfCache */ public function removePattern($pattern) @@ -135,6 +140,7 @@ * Optimized getMany with Redis mget method * * @param array $keys + * @access public * @return array */ public function getMany($keys) @@ -147,9 +153,9 @@ /** * Checks if a key is expired or not * - * @author oncletom * @param string $key - * @return boolean + * @access public + * @return void */ public function isExpired($key) { @@ -161,9 +167,9 @@ * * Usefull to be mapped on an array. Faster than foreach * - * @protected - * @author oncletom - * @param string $value + * @param string $name + * @param string $suffix + * @access protected * @return string */ protected function getKey($name, $suffix = null) Modified: plugins/sfRedisPlugin/trunk/lib/config/sfRedisConfigHandler.class.php =================================================================== --- plugins/sfRedisPlugin/trunk/lib/config/sfRedisConfigHandler.class.php 2010-03-26 19:08:07 UTC (rev 28812) +++ plugins/sfRedisPlugin/trunk/lib/config/sfRedisConfigHandler.class.php 2010-03-26 19:47:10 UTC (rev 28813) @@ -1,5 +1,14 @@ <?php +/** + * sfRedisConfigHandler + * + * @uses sfYamlConfigHandler + * @package sfRedisPlugin + * @author Benjamin VIELLARD <[email protected]> + * @license The MIT License + * @version SVN: $Id$ + */ class sfRedisConfigHandler extends sfYamlConfigHandler { /** Modified: plugins/sfRedisPlugin/trunk/lib/sfRedis.class.php =================================================================== --- plugins/sfRedisPlugin/trunk/lib/sfRedis.class.php 2010-03-26 19:08:07 UTC (rev 28812) +++ plugins/sfRedisPlugin/trunk/lib/sfRedis.class.php 2010-03-26 19:47:10 UTC (rev 28813) @@ -1,34 +1,47 @@ <?php /** - * TODO: short description. + * sfRedis * - * TODO: long description. - * - * @version $Id$ - * @author Benjamin Viellard <[email protected]> - * @copyright (c) 2010 AGAPS - * @since 2010-03-16 + * @package sfRedisPlugin + * @author Benjamin VIELLARD <[email protected]> + * @license The MIT License + * @version SVN: $Id$ */ class sfRedis { + /** + * Array of configuration parameters + * @var array + */ private static $config = null; + /** + * Array of Predis clients + * @var array + */ private static $clients = array(); + /** + * Initialize + * + * @param array $config + * @static + * @access public + * @return void + */ public static function initialize($config) { self::$config = $config; } /** - * TODO: short description. + * Create a predis client on demand * - * @param string $connection Optional, defaults to 'default'. - * - * @return TODO - * @author Benjamin Viellard <[email protected]> - * @since 2010-03-16 + * @param string $connection + * @static + * @access public + * @return Predis_Client */ public static function getClient($connection = 'default') { Modified: plugins/sfRedisPlugin/trunk/lib/task/redisInfoTask.class.php =================================================================== --- plugins/sfRedisPlugin/trunk/lib/task/redisInfoTask.class.php 2010-03-26 19:08:07 UTC (rev 28812) +++ plugins/sfRedisPlugin/trunk/lib/task/redisInfoTask.class.php 2010-03-26 19:47:10 UTC (rev 28813) @@ -1,19 +1,22 @@ <?php +/** + * redis:info task + * + * @uses sfBaseTask + * @package sfRedisPlugin + * @author Benjamin VIELLARD <[email protected]> + * @license The MIT License + * @version SVN: $Id$ + */ class redisInfoTask extends sfBaseTask { protected function configure() { - // // add your own arguments here - // $this->addArguments(array( - // new sfCommandArgument('my_arg', sfCommandArgument::REQUIRED, 'My argument'), - // )); - $this->addOptions(array( new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name'), new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'prod'), new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'default'), - // add your own options here )); $this->namespace = 'redis'; @@ -27,6 +30,14 @@ EOF; } + /** + * execute task + * + * @param array $arguments + * @param array $options + * @access protected + * @return void + */ protected function execute($arguments = array(), $options = array()) { $redis = sfRedis::getClient($options['connection']); -- 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.
