|
@@ -159,6 +159,18 @@ class Route
|
|
|
return isset($this->defaults[$name]) ? $this->defaults[$name] : null;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Checks if a default value is set for the given variable.
|
|
|
+ *
|
|
|
+ * @param string $name A variable name
|
|
|
+ *
|
|
|
+ * @return Boolean true if the default value is set, false otherwise
|
|
|
+ */
|
|
|
+ public function hasDefault($name)
|
|
|
+ {
|
|
|
+ return array_key_exists($name, $this->defaults);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Sets a default value.
|
|
|
*
|