<?php
/*
* This file is part of the pwp package.
* (c) 2009-2010 Victor Rad' <victor.v.rad[at]gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Geting default value of giving route rule name
*
* @param string $routeName name of route
* @param string $key key of default param of route
* @return <type>
*/
function getDefaultOfRule($routeName, $key)
{
$routes = sfContext::getInstance()->getRouting()->getRoutes();
$defaults = $routes[$routeName]->getDefaults();
return $defaults[$key];
}