Creational

This commit is contained in:
CodeRaiser
2020-11-28 23:44:37 +02:00
parent 198ea9e9a9
commit 833da1d262
9 changed files with 554 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
#
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: 2020-11-28 15:53+0200\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: \n"
"X-Generator: Poedit 2.4.1\n"
"Last-Translator: Vladimir Dediuc <code.geeks1@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: bg\n"
#: ../../Creational/AbstractFactory/README.rst:2
msgid "`Abstract Factory`__"
msgstr "`Абстрактна Фабрика`__"
#: ../../Creational/AbstractFactory/README.rst:5
msgid "Purpose"
msgstr "Предназначение"
#: ../../Creational/AbstractFactory/README.rst:7
msgid ""
"To create series of related or dependent objects without specifying their "
"concrete classes. Usually the created classes all implement the same "
"interface. The client of the abstract factory does not care about how these "
"objects are created, it just knows how they go together."
msgstr ""
"За създаване на поредица от свързани или зависими обекти, без да се "
"посочват техните конкретни класове. Обикновено създадените класове "
"изпълняват един и същ интерфейс. Клиентът на абстрактната фабрика не се "
"интересува от това как се създават тези обекти, той просто знае как вървят "
"заедно."
#: ../../Creational/AbstractFactory/README.rst:13
msgid "UML Diagram"
msgstr "UML Диаграма"
#: ../../Creational/AbstractFactory/README.rst:20
msgid "Code"
msgstr "Код"
#: ../../Creational/AbstractFactory/README.rst:22
msgid "You can also find this code on `GitHub`_"
msgstr "Можете също да намерите този код в `GitHub`_"
#: ../../Creational/AbstractFactory/README.rst:85
msgid "Test"
msgstr "Тест"

View File

@@ -0,0 +1,76 @@
#
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: 2020-11-28 16:03+0200\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: \n"
"X-Generator: Poedit 2.4.1\n"
"Last-Translator: Vladimir Dediuc <code.geeks1@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: bg\n"
#: ../../Creational/Builder/README.rst:2
msgid "`Builder`__"
msgstr "`Строител`__"
#: ../../Creational/Builder/README.rst:5
msgid "Purpose"
msgstr "Предназначение"
#: ../../Creational/Builder/README.rst:7
msgid "Builder is an interface that build parts of a complex object."
msgstr "Builder е интерфейс, който изгражда части от сложен обект."
#: ../../Creational/Builder/README.rst:9
msgid ""
"Sometimes, if the builder has a better knowledge of what it builds, this "
"interface could be an abstract class with default methods (aka adapter)."
msgstr ""
"Понякога, ако строител (builder) има по-добри познания за това, което "
"изгражда, този интерфейс може да бъде абстрактен клас с методи по "
"подразбиране (известен още като адаптер)."
#: ../../Creational/Builder/README.rst:12
msgid ""
"If you have a complex inheritance tree for objects, it is logical to have a "
"complex inheritance tree for builders too."
msgstr ""
"Ако имате сложно дърво за наследяване на обекти, логично е да имате сложно "
"дърво за наследяване и за строители."
#: ../../Creational/Builder/README.rst:15
msgid ""
"Note: Builders have often a fluent interface, see the mock builder of "
"PHPUnit for example."
msgstr ""
"Забележка: Конструкторите често имат плавен интерфейс, вижте конструктор на "
"фалшивия обект (mock builder) на PHPUnit например."
#: ../../Creational/Builder/README.rst:19
msgid "Examples"
msgstr "Примери"
#: ../../Creational/Builder/README.rst:21
msgid "PHPUnit: Mock Builder"
msgstr "PHPUnit: Mock Builder"
#: ../../Creational/Builder/README.rst:24
msgid "UML Diagram"
msgstr "UML Диаграма"
#: ../../Creational/Builder/README.rst:31
msgid "Code"
msgstr "Код"
#: ../../Creational/Builder/README.rst:33
msgid "You can also find this code on `GitHub`_"
msgstr "Можете също да намерите този код в `GitHub`_"
#: ../../Creational/Builder/README.rst:96
msgid "Test"
msgstr "Тест"

View File

@@ -0,0 +1,68 @@
#
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: 2020-11-28 16:07+0200\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: \n"
"X-Generator: Poedit 2.4.1\n"
"Last-Translator: Vladimir Dediuc <code.geeks1@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: bg\n"
#: ../../Creational/FactoryMethod/README.rst:2
msgid "`Factory Method`__"
msgstr "`Метод Фабрика`__"
#: ../../Creational/FactoryMethod/README.rst:5
msgid "Purpose"
msgstr "Предназначение"
#: ../../Creational/FactoryMethod/README.rst:7
msgid ""
"The good point over the SimpleFactory is you can subclass it to implement "
"different ways to create objects."
msgstr ""
"Добрата точка за SimpleFactory е, че можете да го подкласирате, за да "
"реализира различни начини за създаване на обекти."
#: ../../Creational/FactoryMethod/README.rst:10
msgid "For simple cases, this abstract class could be just an interface."
msgstr "За прости случаи този абстрактен клас може да бъде просто интерфейс."
#: ../../Creational/FactoryMethod/README.rst:12
msgid ""
"This pattern is a \"real\" Design Pattern because it achieves the Dependency "
"Inversion principle a.k.a the \"D\" in SOLID principles."
msgstr ""
"Този модел е \"истински\" шаблон на проектиране, тъй като постига принципа "
"на инверсия на зависимостите, известен още като \"D\" в SOLID принципите."
#: ../../Creational/FactoryMethod/README.rst:15
msgid ""
"It means the FactoryMethod class depends on abstractions, not concrete "
"classes. This is the real trick compared to SimpleFactory or StaticFactory."
msgstr ""
"Това означава, че класът FactoryMethod зависи от абстракциите, а не от "
"конкретни класове. Това е истинският трик в сравнение с SimpleFactory или "
"StaticFactory."
#: ../../Creational/FactoryMethod/README.rst:20
msgid "UML Diagram"
msgstr "UML Диаграма"
#: ../../Creational/FactoryMethod/README.rst:27
msgid "Code"
msgstr "Код"
#: ../../Creational/FactoryMethod/README.rst:29
msgid "You can also find this code on `GitHub`_"
msgstr "Можете също да намерите този код в `GitHub`_"
#: ../../Creational/FactoryMethod/README.rst:74
msgid "Test"
msgstr "Тест"

View File

@@ -0,0 +1,80 @@
#
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: 2020-11-28 19:37+0200\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: \n"
"X-Generator: Poedit 2.4.1\n"
"Last-Translator: Vladimir Dediuc <code.geeks1@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: bg\n"
#: ../../Creational/Pool/README.rst:2
msgid "`Pool`__"
msgstr "`Pool`__"
#: ../../Creational/Pool/README.rst:4
msgid ""
"The **object pool pattern** is a software creational design pattern that "
"uses a set of initialized objects kept ready to use a \"pool\" rather "
"than allocating and destroying them on demand. A client of the pool will "
"request an object from the pool and perform operations on the returned "
"object. When the client has finished, it returns the object, which is a "
"specific type of factory object, to the pool rather than destroying it."
msgstr ""
"** Шаблонът за обект на обекти ** е софтуерен шаблон за създаване на дизайн, "
"който използва набор от инициализирани обекти, поддържани в готовност за "
"използване - \"пул\" - вместо да ги разпределя и унищожава при поискване. "
"Клиент на пула ще поиска обект от пула и ще извърши операции върху върнатия "
"обект. Когато клиентът завърши, той връща обекта, който е специфичен тип "
"фабричен обект, в пула, вместо да го унищожава."
#: ../../Creational/Pool/README.rst:11
msgid ""
"Object pooling can offer a significant performance boost in situations where "
"the cost of initializing a class instance is high, the rate of instantiation "
"of a class is high, and the number of instances in use at any one time is "
"low. The pooled object is obtained in predictable time when creation of the "
"new objects (especially over network) may take variable time."
msgstr ""
"Обединяването на обекти може да предложи значително подобрение на "
"производителността в ситуации, когато цената за инициализиране на екземпляр "
"на клас е висока, скоростта на създаване на екземпляр на клас е висока и "
"броят на използваните екземпляри по всяко време е нисък. Обединеният обект "
"се получава в предвидимо време, когато създаването на новите обекти (особено "
"по мрежа) може да отнеме променливо време."
#: ../../Creational/Pool/README.rst:18
msgid ""
"However these benefits are mostly true for objects that are expensive with "
"respect to time, such as database connections, socket connections, threads "
"and large graphic objects like fonts or bitmaps. In certain situations, "
"simple object pooling (that hold no external resources, but only occupy "
"memory) may not be efficient and could decrease performance."
msgstr ""
"Тези предимства обаче важат най-вече за обекти, които са скъпи по отношение "
"на времето, като връзки към база данни, връзки на сокети, нишки и големи "
"графични обекти като шрифтове или растерни изображения. В определени "
"ситуации простото обединяване на обекти (които не съдържат външни ресурси, а "
"само заемат памет) може да не е ефективно и да намали производителността."
#: ../../Creational/Pool/README.rst:25
msgid "UML Diagram"
msgstr "UML Диаграма"
#: ../../Creational/Pool/README.rst:32
msgid "Code"
msgstr "Код"
#: ../../Creational/Pool/README.rst:34
msgid "You can also find this code on `GitHub`_"
msgstr "Можете също да намерите този код в `GitHub`_"
#: ../../Creational/Pool/README.rst:55
msgid "Test"
msgstr "Тест"

View File

@@ -0,0 +1,59 @@
#
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: 2020-11-28 19:40+0200\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: \n"
"X-Generator: Poedit 2.4.1\n"
"Last-Translator: Vladimir Dediuc <code.geeks1@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: bg\n"
#: ../../Creational/Prototype/README.rst:2
msgid "`Prototype`__"
msgstr "`Прототип`__"
#: ../../Creational/Prototype/README.rst:5
msgid "Purpose"
msgstr "Предназначение"
#: ../../Creational/Prototype/README.rst:7
msgid ""
"To avoid the cost of creating objects the standard way (new Foo()) and "
"instead create a prototype and clone it."
msgstr ""
"За да избегнете разходите за създаване на обекти по стандартния начин (new "
"Foo()) и вместо това да създадете прототип и да го клонирате."
#: ../../Creational/Prototype/README.rst:11
msgid "Examples"
msgstr "Примери"
#: ../../Creational/Prototype/README.rst:13
msgid ""
"Large amounts of data (e.g. create 1,000,000 rows in a database at once via "
"a ORM)."
msgstr ""
"Големи количества данни (напр. Създаване на 1 000 000 реда в база данни "
"наведнъж чрез ORM)."
#: ../../Creational/Prototype/README.rst:17
msgid "UML Diagram"
msgstr "UML Диаграма"
#: ../../Creational/Prototype/README.rst:24
msgid "Code"
msgstr "Код"
#: ../../Creational/Prototype/README.rst:26
msgid "You can also find this code on `GitHub`_"
msgstr "Можете също да намерите този код в `GitHub`_"
#: ../../Creational/Prototype/README.rst:53
msgid "Test"
msgstr "Тест"

View File

@@ -0,0 +1,33 @@
#
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: 2020-11-28 20:40+0200\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: \n"
"X-Generator: Poedit 2.4.1\n"
"Last-Translator: Vladimir Dediuc <code.geeks1@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: bg\n"
#: ../../Creational/README.rst:2
msgid "`Creational`__"
msgstr "`Създаващи`__"
#: ../../Creational/README.rst:4
msgid ""
"In software engineering, creational design patterns are design patterns that "
"deal with object creation mechanisms, trying to create objects in a manner "
"suitable to the situation. The basic form of object creation could result in "
"design problems or added complexity to the design. Creational design "
"patterns solve this problem by somehow controlling this object creation."
msgstr ""
"В софтуерното инженерство създаващи шаблони са шаблони, които се занимават с "
"механизми за създаване на обекти, опитвайки се да създадат обекти по начин, "
"подходящ за ситуацията. Основната форма на създаване на обект може да доведе "
"до проблеми с дизайна или да добави сложност към дизайна. Създаващи шаблони "
"решават този проблем чрез някакъв контрол върху създаването на този обект."

View File

@@ -0,0 +1,62 @@
#
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: 2020-11-28 19:51+0200\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: \n"
"X-Generator: Poedit 2.4.1\n"
"Last-Translator: Vladimir Dediuc <code.geeks1@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: bg\n"
#: ../../Creational/SimpleFactory/README.rst:2
msgid "Simple Factory"
msgstr "Simple Factory"
#: ../../Creational/SimpleFactory/README.rst:5
msgid "Purpose"
msgstr "Предназначение"
#: ../../Creational/SimpleFactory/README.rst:7
msgid "SimpleFactory is a simple factory pattern."
msgstr "SimpleFactory е прост фабричен шаблон."
#: ../../Creational/SimpleFactory/README.rst:9
msgid ""
"It differs from the static factory because it is not static. Therefore, you "
"can have multiple factories, differently parameterized, you can subclass it "
"and you can mock it. It always should be preferred over a static factory!"
msgstr ""
"Тя се различава от статичната фабрика, защото не е статична. Следователно "
"можете да имате множество фабрики, параметризирани по различен начин, "
"можете да го наследявате и да го макетирате (you can mock it). Винаги "
"трябва да се предпочита пред статична фабрика!"
#: ../../Creational/SimpleFactory/README.rst:12
msgid ""
"Therefore, you can have multiple factories, differently parametrized, you "
"can subclass it and you can mock-up it."
msgstr ""
"Следователно можете да имате множество фабрики, параметризирани по различен "
"начин, можете да го подкласирате и да го макетирате."
#: ../../Creational/SimpleFactory/README.rst:16
msgid "UML Diagram"
msgstr "UML Диаграма"
#: ../../Creational/SimpleFactory/README.rst:23
msgid "Code"
msgstr "Код"
#: ../../Creational/SimpleFactory/README.rst:25
msgid "You can also find this code on `GitHub`_"
msgstr "Можете също да намерите този код в `GitHub`_"
#: ../../Creational/SimpleFactory/README.rst:52
msgid "Test"
msgstr "Тест"

View File

@@ -0,0 +1,71 @@
#
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: 2020-11-28 19:59+0200\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: \n"
"X-Generator: Poedit 2.4.1\n"
"Last-Translator: Vladimir Dediuc <code.geeks1@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: bg\n"
#: ../../Creational/Singleton/README.rst:2
msgid "`Singleton`__"
msgstr "`Сек`__"
#: ../../Creational/Singleton/README.rst:4
msgid ""
"**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND "
"MAINTAINABILITY USE DEPENDENCY INJECTION!**"
msgstr ""
"** ТОВА СЧИТА СЕ ЗА АНТИ-ШАБЛОН (anti-pattern)! ЗА ПО-ДОБРА ПРОВЕРИМОСТ И "
"ПОДДЪРЖАЕМОСТ ИЗПОЛЗВАЙТЕ ИНЖЕКЦИЯ НА ЗАВИСИМОСТ! **"
#: ../../Creational/Singleton/README.rst:8
msgid "Purpose"
msgstr "Предназначение"
#: ../../Creational/Singleton/README.rst:10
msgid ""
"To have only one instance of this object in the application that will handle "
"all calls."
msgstr ""
"Да има само един екземпляр на този обект в приложението, който да обработва "
"всички повиквания."
#: ../../Creational/Singleton/README.rst:14
msgid "Examples"
msgstr "Примери"
#: ../../Creational/Singleton/README.rst:16
msgid "DB Connector"
msgstr "DB конектор"
#: ../../Creational/Singleton/README.rst:17
msgid "Logger"
msgstr "Регистратор (logger)"
#: ../../Creational/Singleton/README.rst:19
msgid "Lock file for the application (there is only one in the filesystem ...)"
msgstr "Lock file за приложението (във файловата система има само един ...)"
#: ../../Creational/Singleton/README.rst:23
msgid "UML Diagram"
msgstr "UML Диаграма"
#: ../../Creational/Singleton/README.rst:30
msgid "Code"
msgstr "Код"
#: ../../Creational/Singleton/README.rst:32
msgid "You can also find this code on `GitHub`_"
msgstr "Можете също да намерите този код в `GitHub`_"
#: ../../Creational/Singleton/README.rst:41
msgid "Test"
msgstr "Тест"

View File

@@ -0,0 +1,53 @@
#
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: 2020-11-28 20:01+0200\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: \n"
"X-Generator: Poedit 2.4.1\n"
"Last-Translator: Vladimir Dediuc <code.geeks1@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: bg\n"
#: ../../Creational/StaticFactory/README.rst:2
msgid "Static Factory"
msgstr "Статична фабрика"
#: ../../Creational/StaticFactory/README.rst:5
msgid "Purpose"
msgstr "Предназначение"
#: ../../Creational/StaticFactory/README.rst:7
msgid ""
"Similar to the AbstractFactory, this pattern is used to create series of "
"related or dependent objects. The difference between this and the abstract "
"factory pattern is that the static factory pattern uses just one static "
"method to create all types of objects it can create. It is usually named "
"``factory`` or ``build``."
msgstr ""
"Подобно на AbstractFactory, този модел се използва за създаване на "
"поредица от свързани или зависими обекти. Разликата между този и "
"абстрактния фабричен модел е, че статичният фабричен модел използва само "
"един статичен метод, за да създаде всички видове обекти, които може да "
"създаде. Обикновено се нарича ``factory`` или ``build``."
#: ../../Creational/StaticFactory/README.rst:20
msgid "UML Diagram"
msgstr "UML Диаграма"
#: ../../Creational/StaticFactory/README.rst:27
msgid "Code"
msgstr "Код"
#: ../../Creational/StaticFactory/README.rst:29
msgid "You can also find this code on `GitHub`_"
msgstr "Можете също да намерите този код в `GitHub`_"
#: ../../Creational/StaticFactory/README.rst:56
msgid "Test"
msgstr "Тест"