Skip to content

Commit 7312464

Browse files
committed
Route: deprecated addStyle() and setStyleProperty() trigger E_USER_DEPRECATED
1 parent a12ded7 commit 7312464

File tree

3 files changed

+2
-56
lines changed

3 files changed

+2
-56
lines changed

src/Application/Routers/Route.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,7 @@ private static function param2path($s)
805805
*/
806806
public static function addStyle($style, $parent = '#')
807807
{
808+
trigger_error(__METHOD__ . '() is deprecated.', E_USER_DEPRECATED);
808809
if (isset(static::$styles[$style])) {
809810
throw new Nette\InvalidArgumentException("Style '$style' already exists.");
810811
}
@@ -826,6 +827,7 @@ public static function addStyle($style, $parent = '#')
826827
*/
827828
public static function setStyleProperty($style, $key, $value)
828829
{
830+
trigger_error(__METHOD__ . '() is deprecated.', E_USER_DEPRECATED);
829831
if (!isset(static::$styles[$style])) {
830832
throw new Nette\InvalidArgumentException("Style '$style' doesn't exist.");
831833
}

tests/Application.Routers/Route.withUserClass.phpt

Lines changed: 0 additions & 28 deletions
This file was deleted.

tests/Application.Routers/Route.withUserClassAndUserPattern.phpt

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)