Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route::getPath PHP Method

getPath() public method

Handle the trailing slash option.
public getPath ( )
    public function getPath()
    {
        $pattern = parent::getPath();
        if ($this->getOption('add_trailing_slash') && '/' !== $pattern[strlen($pattern) - 1]) {
            $pattern .= '/';
        }
        return $pattern;
    }

Usage Example

Example #1
0
 /**
  * @expectedException \LogicException
  */
 public function testPrefixNonpersisted()
 {
     $route = new Route();
     $route->getPath();
 }