Code Monkey home page Code Monkey logo

Comments (4)

ovflowd avatar ovflowd commented on July 29, 2024 1

Hey thanks for the suggestion. But why you think it would be useful? I mean, those functions are cool and have a purpose. But I think they doesn't match the purpose of this library.

Since this is just a route, it means to just route given requested into respective handlers. And just that...

But maybe I'm wrong xD

from router.

bramus avatar bramus commented on July 29, 2024

Hi @abmmhasan,

As @ovflowd mentioned validation indeed falls outside of the scope of the router. You can always compose the router in a bigger framework/structure which can contain the checks you suggested.

Regards,
Bramus!

from router.

abmmhasan avatar abmmhasan commented on July 29, 2024

Well, I have been referring to following features actually:
https://github.com/klein/klein.php#api

from router.

bramus avatar bramus commented on July 29, 2024

I know, but that still fall outside of the scope of this library. This router only focusses on routing, not requests and responses.

In a real life scenario you'd of course augment this router with Request and Response classes. You're free to choose which one, or you can write your own to be used in tandem with this project. For client projects I've done so, and it works like a charm :)

from router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.