Giter Site home page Giter Site logo

Comments (11)

harikt avatar harikt commented on June 10, 2024

Pull request initialized .

#3

from aura.signal.

pmjones avatar pmjones commented on June 10, 2024

Hey man, can you attach a test case for this?

from aura.signal.

harikt avatar harikt commented on June 10, 2024

@pmjones also I guess that pull request was too old, so we may want to test the same again.
I will try to write a test case. But I may want your help, lets discuss tonight at irc if I didn't finish it :) .

from aura.signal.

harikt avatar harikt commented on June 10, 2024

@pmjones See https://github.com/auraphp/Aura.Signal/blob/master/src/Aura/Signal/Manager.php#L185 , you have already mentioned about the return type ResultCollection The results from each of the Handler objects.
But forgot to return it . So in the above example the results is not having an object of it, hence the error and ie the pull request #3 .

About the test case , I wonder for which one we neeed . About the clone one ?

from aura.signal.

harikt avatar harikt commented on June 10, 2024

Another Question is regarding the use of

// clone a new result collection
$this->results = clone $this->result_collection;

in send() , do we need it in constructor then ?

$this->results = clone $this->result_collection;

from aura.signal.

pmjones avatar pmjones commented on June 10, 2024

I don't think so; the idea is that the manager will have to deal with lots of send()ing, and it's easiest to reuse a clone of the initial empty collection.

from aura.signal.

harikt avatar harikt commented on June 10, 2024

ok for clone in send() . What about in constructor ? Or does that answers all ?

from aura.signal.

pmjones avatar pmjones commented on June 10, 2024

The constructor already has a ResultCollection param. Am I missing what you're getting at?

from aura.signal.

harikt avatar harikt commented on June 10, 2024

My query is regarding https://github.com/auraphp/Aura.Signal/blob/master/src/Aura/Signal/Manager.php#L114 . Do we need that there for we already have the clone in send() .

from aura.signal.

pmjones avatar pmjones commented on June 10, 2024

But we also have getResults(), which needs to return a ResultCollection, even if you haven't called send() yet.

from aura.signal.

harikt avatar harikt commented on June 10, 2024

Yup that make sense :) . Sorry for the long conversation :D .

from aura.signal.

Related Issues (3)

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.