Giter VIP home page Giter VIP logo

hook's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hook's Issues

hook "break" ?

Hi! I ve a question, imagine that I ve an article with a price X. This price can be varied through hooks, BUT, it's possible to not have to pass through all the hooks? maybe the first one give me a final price.. I don't know if there's the possibility to create something like a hook "break" and return the price I ve at this moment... have I made myself understood? thanks!

Hello, what is the use of Hook::get callback?

Hook::listen('fillUser', function ($callback, $output, $user) {
    if (empty($output))
    {
      $output = $user;
    }
    $output['__hook'] = 'run';
    return $output;
});

$user = ['username' => 'test', 'password' => '123'];

$user = Hook::get('fillUser', [$user], function($user) {
    // Why is it not running here?
    return $user;
});

I don't understand, what is the use of the following code?

function($user) {
    return $user;
}

blade issuing

when 2 separate provider call blade hook and each return own views the hook just return latest view
but in wordpress for example hook will return all returning view by sort

blade templates hooks

There is an error in blade templates documentation.
To listen blade templates we need to listen template.hookName instead of just hookName

listeners overriding?

Should we override listeners ?

If you have modular application - you don't know on which position your module land in the system.

If you don't specify priority, listeners will be overrided.

If you do, and you may have collision with other module created by other peoples.

Maybe some kind of auto incrementing index will be better approach?

Where should I put the listen code

This package is awesome, good job.

One question, what's the best practice of putting the listen code?

Now I put it in middleware, it work fine from the web, but can not access from command line.

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.