nette / application

🏆 A full-stack component-based MVC kernel for PHP that helps you write powerful and modern web applications. Write less, have cleaner code and your work will bring you joy.
https://doc.nette.org/application
Other
403 stars 101 forks source link

New interface for Route display in debugbar #113

Open h4kuna opened 8 years ago

h4kuna commented 8 years ago

If I want create new Route and display values in debug bar, i must extend Route class. What do you think about new interface with two methods?

interface IRouteMeta {
public funciton getDefaults();
public function getMask();
}

Class route must edit.

class Route implements IRoute, IRouteMeta {}

And I will use like this

class MyRoute implements IRoute, IRouteMeta {}

instance of

class MyRoute extends Route {}

RoutingPanel will change condition to new interface.

Or append both methods to IRoute interface?

Edit Renamed IRouteBar -> IRouteMeta

fprochazka commented 8 years ago

@h4kuna interface is a good idea, just a suggestion: IRouteBar -> IRouteMeta