Giter Club home page Giter Club logo

Comments (7)

matthiasnoback avatar matthiasnoback commented on August 15, 2024

The load() method accepts an array of config values. When no argument was provided, the getMinimalConfiguration() method will be called and it should return an array of the minimal configuration that would cause no errors. Then that array will be used to call the actual load() method of the extension.

from symfonydependencyinjectiontest.

cordoval avatar cordoval commented on August 15, 2024

still it does not address the question, i was actually looking of an example with values, even if it is hypothetical it would help. I tried to use but i was lost:

something like this but with typical values:

[
   'a' => 'b',
   'c' => 'd',
]

or explaining what key and value are typically like
and also if different array configuration or nested or if values are directly parameters of the container etc

from symfonydependencyinjectiontest.

matthiasnoback avatar matthiasnoback commented on August 15, 2024

Ah, no, it is like in the examples of load(array(...)). It's the values that get passed in as values for the config tree of the extension.

from symfonydependencyinjectiontest.

cordoval avatar cordoval commented on August 15, 2024

which are like? That is what i say it is too abstract for the reader. Maybe adding an example of the first few typical values could prove very valuable so they can use this feature.

from symfonydependencyinjectiontest.

matthiasnoback avatar matthiasnoback commented on August 15, 2024

:) Well, when your config tree has a scalar node called "default_port" and it is required, then you can return array('default_port' => 4730) in getMinimalConfiguration() so that calling $this->load() will always work, even if you provide no argument.

You're right, there should be something about this in the README file...

from symfonydependencyinjectiontest.

 avatar commented on August 15, 2024

yeah it'd be nice to see an example

from symfonydependencyinjectiontest.

matthiasnoback avatar matthiasnoback commented on August 15, 2024

Closing this to clean the list of open issues. If anyone would like to supply an example, feel free to do so.

from symfonydependencyinjectiontest.

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.