j-arens / wp-rest-router Goto Github PK
View Code? Open in Web Editor NEWWP Rest Router - bringing the developer experience of Laravel and Express to WP
WP Rest Router - bringing the developer experience of Laravel and Express to WP
IIRC the WP_Error
was a way implemented in WP time ago when Exceptions weren't a thing.
Wouldn't be better to stay with native php way and use Exceptions since the lib seems to targeting php 7.1?
Referencing: https://github.com/j-arens/wp-rest-router/blob/master/src/WordPress/Rest/CallbackWrappers.php#L19
Seeing this class constructor https://github.com/j-arens/wp-rest-router/blob/master/src/WordPress/Rest/DispatchListener.php I was wondering to know why the constructor is responsible of define the integration to WordPress?
I see this is a library and as such wouldn't be preferable to have a service provider and let the application (may be the plugin or "theme) decide where to integrate it?
May be instead of a service provider or as part of a configuration step there could be a class or something which take care of the bootstrap leave the class constructors free to do what they have to do, construct instances.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.