Refactoring dynamic URLs to routes.
This commit is contained in:
parent
553f377ed0
commit
c7e7d64545
|
@ -142,12 +142,13 @@ public static function slug($title, $separator = '-')
|
||||||
*/
|
*/
|
||||||
public static function __callStatic($method, $parameters)
|
public static function __callStatic($method, $parameters)
|
||||||
{
|
{
|
||||||
|
$parameters = (isset($parameters[0])) ? $parameters[0] : array();
|
||||||
|
|
||||||
// ----------------------------------------------------
|
// ----------------------------------------------------
|
||||||
// Dynamically create a secure route URL.
|
// Dynamically create a secure route URL.
|
||||||
// ----------------------------------------------------
|
// ----------------------------------------------------
|
||||||
if (strpos($method, 'to_secure_') === 0)
|
if (strpos($method, 'to_secure_') === 0)
|
||||||
{
|
{
|
||||||
$parameters = (isset($parameters[0])) ? $parameters[0] : array();
|
|
||||||
return static::to_route(substr($method, 10), $parameters, true);
|
return static::to_route(substr($method, 10), $parameters, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +157,6 @@ public static function __callStatic($method, $parameters)
|
||||||
// ----------------------------------------------------
|
// ----------------------------------------------------
|
||||||
if (strpos($method, 'to_') === 0)
|
if (strpos($method, 'to_') === 0)
|
||||||
{
|
{
|
||||||
$parameters = (isset($parameters[0])) ? $parameters[0] : array();
|
|
||||||
return static::to_route(substr($method, 3), $parameters);
|
return static::to_route(substr($method, 3), $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue