hoaproject / dispatcher Goto Github PK
View Code? Open in Web Editor NEWThe Hoa\Dispatcher library.
Home Page: https://hoa-project.net/
The Hoa\Dispatcher library.
Home Page: https://hoa-project.net/
https://github.com/hoaproject/Dispatcher/blob/master/Basic.php#L83-L88
In these lines, the operator @ prevents to raise errors, but if you put an custom error handler with this code :
set_error_handler(function ($errno, $errstr, $errfile, $errline ) {
var_dump(func_get_args());
});
There is still an triggered error.
In order to prevent this, I suggest these line as replacement
$call = !empty($variables['controller']) ? $variables['controller'] :
!empty($variables['_call']) ? $variables['_call'] : $rule[\Hoa\Router::RULE_CALL];
$able = !empty($variables['action']) ? $variables['action'] :
!empty($variables['_able']) ? $variables['_able'] : $rule[\Hoa\Router::RULE_ABLE];
Hi, as you can see on hoa-project.net/Fr/Literature/Hack/Dispatcher there is a little error :)
Error: ...règle (voir string(23) "Rule lh does not exist."
Source: Documentation/Fr/Index.xyl#L24
...règle (voir <a href="@lh:chapter=Router">la bibliothèque <code>Hoa\Router</code></a> si...
As we can see on Hoa\Router
doc the rule name should be hack
.
See s/@lh/@hack
commit in Hoa\Router
.
I didn't do a PR because I can't test whether it's just that or not ;)
The Basic dispatcher is able to dispatch a request/task on several callables: function, closure, class+method, object+method…
The idea is to extract each one of these forms as a standalone dispatcher. Then, when they will be tested, we could introduce an Aggregate dispatcher. Finally, the Basic dispatcher would be a special usage of the Aggregate dispatcher that aggregates all the existing dispatchers.
The roadmap is:
Progress:
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hey,
I have a Fatal Error : PHP Fatal error: Cannot mix bracketed namespace declarations with unbracketed namespace declarations in C:\www\sohapi\vendor\hoa\console\Dispatcher\Kit.php on line 37
I think its come from the Core , who still have file with namespace {} and namespace ;
I try to fix it, but when we declare namespace foo; we can't return on the global namespace namespace ;
And if we force tu use namespace Hoa\Core; all function defined on root can't be access ie ( dnew => \Hoa\Core\Consistence\dnew() )... i don't have any solution for it
Related to #11.
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.