Giter Site home page Giter Site logo

Incorrect documentation about rest HOT 3 CLOSED

respect avatar respect commented on August 30, 2024
Incorrect documentation

from rest.

Comments (3)

nickl- avatar nickl- commented on August 30, 2024

Maybe the RouteInspector #63 should rather be exposed on the router, as this seems much more straight forward and usable then as a routine implementation.

It can be lazy loaded and accessed as follows: (for example)

<?php

            $path = r3->inspector->active->uri;

            $parseValues = r3->inspector->active->turiTemplate->parseUrl($path};

             $r3->inspector->reset();
             while (r3->inspector->isValid())  {
                    foreach (r3->inspector->current()->routines as $routine)
                             foreach ($routine->types as $routineType)
                                       echo "$routine - $routineType\n";

                     r3->inspector->next();
             }

             foreach (r3->inspector as $routine)
                   echo $routine,
                        "\nIs active: ",
                         var_export($routine->active),
                         PHP_EOL,
                         "HTTP verbs: ",
                         implode(',', $routine->methods);

Has anyone had a chance to look at the route-inspector branch yet? Can I have some feedback please!

from rest.

alganet avatar alganet commented on August 30, 2024

I like the inspecting approach, but for now we could expose the last dispatched request on the router as well, while the RouteInspector gets more stable. I believe it's a simple fix (I'll do this one by the end of the week!) The request may be useful for things-that-are-not-routy. What do you think?

from rest.

alganet avatar alganet commented on August 30, 2024

Finally had a time window to fixed that, should work like the docs now!

from rest.

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.