Вход Регистрация
Файл: onlinepoisk.wm-scripts.ru/vendor/silex/silex/silex/src/Silex/Application/UrlGeneratorTrait.php
Строк: 44
<?php

/*
 * This file is part of the Silex framework.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace SilexApplication;

/**
 * UrlGenerator trait.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
trait UrlGeneratorTrait
{
    
/**
     * Generates a path from the given parameters.
     *
     * @param string $route      The name of the route
     * @param mixed  $parameters An array of parameters
     *
     * @return string The generated path
     */
    
public function path($route$parameters = array())
    {
        return 
$this['url_generator']->generate($route$parametersfalse);
    }

    
/**
     * Generates an absolute URL from the given parameters.
     *
     * @param string $route      The name of the route
     * @param mixed  $parameters An array of parameters
     *
     * @return string The generated URL
     */
    
public function url($route$parameters = array())
    {
        return 
$this['url_generator']->generate($route$parameterstrue);
    }
}
Онлайн: 0
Реклама