mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-09-25 05:51:46 +02:00
# msgid "" msgstr "" "Project-Id-Version: DesignPatternsPHP 1.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: 2021-10-31 18:06-0300\n" "Last-Translator: Raphael de Almeida <jaguarnet7@gmail.com>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt_BR\n" #: ../../Structural/DependencyInjection/README.rst:2 msgid "`Dependency Injection`__" msgstr "`Injeção de dependência (Dependency Injection)`__" #: ../../Structural/DependencyInjection/README.rst:5 msgid "Purpose" msgstr "Objetivo" #: ../../Structural/DependencyInjection/README.rst:7 msgid "" "To implement a loosely coupled architecture in order to get better testable," " maintainable and extendable code." msgstr "" "Implementar uma arquitetura menos acoplada com o objetivo de obter um código " "mais fácil de testar, de melhor manutenibilidade e mais extensível." #: ../../Structural/DependencyInjection/README.rst:11 msgid "Usage" msgstr "Uso" #: ../../Structural/DependencyInjection/README.rst:13 msgid "" "``DatabaseConfiguration`` gets injected and ``DatabaseConnection`` will get all that it " "needs from ``$config``. Without DI, the configuration would be created " "directly in ``DatabaseConnection``, which is not very good for testing and " "extending it." msgstr "" "``DatabaseConfiguration`` é injetado e ``DatabaseConnection`` irá receber tudo o que é " " necessário de ``$config``. Sem a Injeção de Dependência, a configuração seria criada " " diretamente em ``DatabaseConnection``, o que não é muito bom para testar e extender " " isto." #: ../../Structural/DependencyInjection/README.rst:18 msgid "" "Notice we are following Inversion of control principle in ``Connection`` by " "asking ``$config`` to implement ``Parameters`` interface. This decouples our" " components. We don't care where the source of information comes from, we " "only care that ``$config`` has certain methods to retrieve that information." " Read more about Inversion of control `here " "<http://en.wikipedia.org/wiki/Inversion_of_control>`__." msgstr "" "Note que estamos seguindo o princípio da inversão de controle em ``Connection`` por " " estar perguntando ``$config`` para implementar a interface ``Parameters``. Isto " " desacopla nossos componentes. Nós não nos importamos de onde vem a fonte de informação, " " nós apenas garantimos que ``$config`` tem certos métodos para recuperar a informação." " Leia mais sobre Inversão de Controle `aqui " "<https://pt.wikipedia.org/wiki/Invers%C3%A3o_de_controle>`__." #: ../../Structural/DependencyInjection/README.rst:26 msgid "Examples" msgstr "Exemplos" #: ../../Structural/DependencyInjection/README.rst:28 msgid "" "The Doctrine2 ORM uses dependency injection e.g. for configuration that is " "injected into a ``Connection`` object. For testing purposes, one can easily " "create a mock object of the configuration and inject that into the " "``Connection`` object" msgstr "" "O ORM Doctrine 2 usa injeção de dependência, por exemplo, para a configuração " " que é injetada no objeto ``Connection``. Para propósitos de teste, algúem pode " " facilmente criar um objeto simulado na configuração e injetá-lo no objeto " "``Connection``." #: ../../Structural/DependencyInjection/README.rst:32 msgid "" "many frameworks already have containers for DI that create " "objects via a configuration array and inject them where needed (i.e. in " "Controllers)" msgstr "" "muitos frameworks já têm contêineres para ID que criam " "objetos por meio de um array de configuração e os injetam onde necessário (ou seja, nos " "Controladores)" #: ../../Structural/DependencyInjection/README.rst:37 msgid "UML Diagram" msgstr "Diagrama UML" #: ../../Structural/DependencyInjection/README.rst:44 msgid "Code" msgstr "Código" #: ../../Structural/DependencyInjection/README.rst:46 msgid "You can also find this code on `GitHub`_" msgstr "Você pode também ver este código no `GitHub`_" #: ../../Structural/DependencyInjection/README.rst:73 msgid "Test" msgstr "Teste"