You are here

class RouteMock in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony-cmf/routing/Tests/Routing/RouteMock.php \Symfony\Cmf\Component\Routing\Tests\Routing\RouteMock

Hierarchy

  • class \Symfony\Component\Routing\Route implements \Symfony\Component\Routing\Serializable

Expanded class hierarchy of RouteMock

File

vendor/symfony-cmf/routing/Tests/Routing/RouteMock.php, line 18

Namespace

Symfony\Cmf\Component\Routing\Tests\Routing
View source
class RouteMock extends SymfonyRoute implements RouteObjectInterface {
  private $locale;
  public function setLocale($locale) {
    $this->locale = $locale;
  }
  public function getContent() {
    return null;
  }
  public function getDefaults() {
    $defaults = array();
    if (!is_null($this->locale)) {
      $defaults['_locale'] = $this->locale;
    }
    return $defaults;
  }
  public function getRequirement($key) {
    if (!$key == '_locale') {
      throw new \Exception();
    }
    return $this->locale;
  }
  public function getRouteKey() {
    return null;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Route::$compiled private property
Route::$condition private property
Route::$defaults private property
Route::$host private property
Route::$methods private property
Route::$options private property
Route::$path private property
Route::$requirements private property
Route::$schemes private property
Route::addDefaults public function Adds defaults.
Route::addOptions public function Adds options.
Route::addRequirements public function Adds requirements.
Route::compile public function Compiles the route.
Route::getCondition public function Returns the condition.
Route::getDefault public function Gets a default value.
Route::getHost public function Returns the pattern for the host.
Route::getMethods public function Returns the uppercased HTTP methods this route is restricted to. So an empty array means that any method is allowed.
Route::getOption public function Get an option value.
Route::getOptions public function Returns the options.
Route::getPath public function Returns the pattern for the path.
Route::getPattern Deprecated public function Returns the pattern for the path.
Route::getRequirements public function Returns the requirements.
Route::getSchemes public function Returns the lowercased schemes this route is restricted to. So an empty array means that any scheme is allowed.
Route::hasDefault public function Checks if a default value is set for the given variable.
Route::hasOption public function Checks if an option has been set.
Route::hasRequirement public function Checks if a requirement is set for the given key.
Route::hasScheme public function Checks if a scheme requirement has been set.
Route::sanitizeRequirement private function
Route::serialize public function
Route::setCondition public function Sets the condition.
Route::setDefault public function Sets a default value.
Route::setDefaults public function Sets the defaults.
Route::setHost public function Sets the pattern for the host.
Route::setMethods public function Sets the HTTP methods (e.g. 'POST') this route is restricted to. So an empty array means that any method is allowed.
Route::setOption public function Sets an option value.
Route::setOptions public function Sets the options.
Route::setPath public function Sets the pattern for the path.
Route::setPattern Deprecated public function Sets the pattern for the path.
Route::setRequirement public function Sets a requirement for the given key.
Route::setRequirements public function Sets the requirements.
Route::setSchemes public function Sets the schemes (e.g. 'https') this route is restricted to. So an empty array means that any scheme is allowed.
Route::unserialize public function
Route::__construct public function Constructor.
RouteMock::$locale private property
RouteMock::getContent public function Get the content document this route entry stands for. If non-null, the ControllerClassMapper uses it to identify a controller and the content is passed to the controller. Overrides RouteObjectInterface::getContent
RouteMock::getDefaults public function Returns the defaults. Overrides Route::getDefaults
RouteMock::getRequirement public function Returns the requirement for the given key. Overrides Route::getRequirement
RouteMock::getRouteKey public function Get the route key. Overrides RouteObjectInterface::getRouteKey
RouteMock::setLocale public function
RouteObjectInterface::CONTENT_OBJECT constant Field name for the content of the current route, if any.
RouteObjectInterface::CONTROLLER_NAME constant Field name for an explicit controller name to be used with this route
RouteObjectInterface::ROUTE_NAME constant Field name that will hold the route name that was matched.
RouteObjectInterface::ROUTE_OBJECT constant Field name of the route object that was matched.
RouteObjectInterface::TEMPLATE_NAME constant Field name for an explicit template to be used with this route. i.e. CmfContentBundle:StaticContent:index.html.twig