Coder Social home page Coder Social logo

Comments (5)

Jurigag avatar Jurigag commented on June 9, 2024

There are no modules system in cli mode.

You would need to write your own dispatcher for multi module cli.

You can see this - https://forum.phalconphp.com/discussion/7283/multiple-module-cli

from phalcon.

lanlin avatar lanlin commented on June 9, 2024

@Jurigag I did that from the beginning.

I didn't attach any event in cli mode before. After attach events, i find i can't get module name from callback.

image

Like above, the $arguments passed to handle() contains a module name.

In mvc application's handle() method, line 266 dispatcher->setModuleName been called, so module name been setted correct, but it's not been setted yet in console's handle() method.

I think that's why i can't get the module name from event callback.
image

The getTaskName & getActionName methods both can return a valid value.

I have another way to get the module name, from the router $router->getModuleName.
I just wander could it be a issue?

from phalcon.

Jurigag avatar Jurigag commented on June 9, 2024

It's not set because Dispatcher cli doesn't use modules at all. It's not an issue. Just dispatcher cli/router doesn't support modules.

from phalcon.

lanlin avatar lanlin commented on June 9, 2024

@Jurigag thanks for your help.

Could it be supported in next version?

I think the peoples who choosen phalcon that means they should be have a little complex project like me, so both cli and mvc all need support multiple modules.

from phalcon.

niden avatar niden commented on June 9, 2024

Closing in favor of phalcon/cphalcon#13855. Will revisit if the community votes for it, or in later versions.

from phalcon.

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.