Code Monkey home page Code Monkey logo

Comments (8)

Hywan avatar Hywan commented on June 16, 2024

Hello :-),

What would be the semantics of unresolve?

from core.

1e1 avatar 1e1 commented on June 16, 2024

Sorry, my brain is off today.
I saw resolve, so I think unresolve.

Dynamically, I were say $hoa->setRoots($data, [$application=null, [$hoa=null]]).
But a global function like resolved deserves a discussion.
I need this action for one project.

from core.

Hywan avatar Hywan commented on June 16, 2024

You need it once but when starting, so this is important for the user experience. I agree that a function alias would be welcome, but not a global one. What about something like:

$core = Hoa\Core::getInstance();
$core->setApplicationRoot(…);
$core->setDataRoot(…);
$core->setLibraryRoot(…);

Maybe, an alternative would be:

$core = Hoa\Core::getInstance();
$core->setRoots(['application' => …, 'data' => …, 'library' => …]);

I don't like your proposal setRoots($data, $application, $library) because the root names do not appear when reading the code.

from core.

1e1 avatar 1e1 commented on June 16, 2024

I dislike the first option because each root setting calls Core->setProtocol().
If I'm wrong, the first option is easy understanding.

The second option is short and efficient.
Usually we are setting up the roots once per project, well the call can be "technical" (grow up the code complexity in the statement).

Who writes it? :p

from core.

Hywan avatar Hywan commented on June 16, 2024

You're right. The first proposal, with set*Root methods, will call the setProtocol method each time, which is bad. So we are agree for the setRoots(Array) proposal?

from core.

1e1 avatar 1e1 commented on June 16, 2024

Yeap!

from core.

vonglasow avatar vonglasow commented on June 16, 2024

@Hywan can we close this issue as Hoa\Core is no longer maintained ?

from core.

Hywan avatar Hywan commented on June 16, 2024

Sure!
@1e1 If this issue is still valid with the Hoa\Protocol library, please, reopen it there.

from core.

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.