Giter Site home page Giter Site logo

Comments (7)

weierophinney avatar weierophinney commented on August 20, 2024

This is only currently possible by running through the instantiation of all services once, in a warmup script.


Originally posted by @Ocramius at zendframework/zend-servicemanager#278 (comment)

from laminas-servicemanager.

weierophinney avatar weierophinney commented on August 20, 2024

So I need to write this script or it exists somewhere?


Originally posted by @snapshotpl at zendframework/zend-servicemanager#278 (comment)

from laminas-servicemanager.

weierophinney avatar weierophinney commented on August 20, 2024

You'll need to write a script, yup.

I think its contents would be something like array_walk([$serviceManager, 'get'], $serviceManager->getDefinedServices()) or similar

On Thu, 14 Feb 2019, 09:55 Witold Wasiczko <[email protected] wrote:

So I need to write this script or it exists somewhere?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
zendframework/zend-servicemanager#278 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJakJdt0x1GZA58nvHJgPTLHbTvdJoWks5vNSSSgaJpZM4a7FkL
.


Originally posted by @Ocramius at zendframework/zend-servicemanager#278 (comment)

from laminas-servicemanager.

weierophinney avatar weierophinney commented on August 20, 2024

Or:

    public function warmup(): void
    {
        foreach ($this->services as $service) {
            $this->container->get($service);
        }
    }

where services is lazy_services.class_map keys.

Anyway ready script in package will be nice addon


Originally posted by @snapshotpl at zendframework/zend-servicemanager#278 (comment)

from laminas-servicemanager.

weierophinney avatar weierophinney commented on August 20, 2024

Don't think we should expand the API for an edge case, and adding a script
also requires knowing which instance of the ServiceManager you are
referring to.

In a zendframework/zend-mvc context, that may be any of the plugin
containers, for example.

On Thu, 14 Feb 2019, 10:06 Witold Wasiczko <[email protected] wrote:

Or:

public function warmup(): void    {        foreach ($this->services as $service) {            $this->container->get($service);        }    }

where services' is lazy_services.class_map` keys.

Anyway ready script in package will be nice addon


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
zendframework/zend-servicemanager#278 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJakCtLHTLTFvUbctEJEk7djF75cLz_ks5vNSb7gaJpZM4a7FkL
.


Originally posted by @Ocramius at zendframework/zend-servicemanager#278 (comment)

from laminas-servicemanager.

weierophinney avatar weierophinney commented on August 20, 2024

Or zf module ;)


Originally posted by @snapshotpl at zendframework/zend-servicemanager#278 (comment)

from laminas-servicemanager.

GeeH avatar GeeH commented on August 20, 2024

Closing, I feel this was solved in the original issue.

from laminas-servicemanager.

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.