Merge pull request #2 from domnikl/master

update
This commit is contained in:
Leonam Dias
2015-06-02 15:37:49 -03:00
50 changed files with 783 additions and 488 deletions

View File

@ -36,11 +36,20 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
public function testAttachDetach()
{
$subject = new User();
$this->assertAttributeEmpty('observers', $subject);
$reflection = new \ReflectionProperty($subject, 'observers');
$reflection->setAccessible(true);
/** @var \SplObjectStorage $observers */
$observers = $reflection->getValue($subject);
$this->assertInstanceOf('SplObjectStorage', $observers);
$this->assertFalse($observers->contains($this->observer));
$subject->attach($this->observer);
$this->assertAttributeNotEmpty('observers', $subject);
$this->assertTrue($observers->contains($this->observer));
$subject->detach($this->observer);
$this->assertAttributeEmpty('observers', $subject);
$this->assertFalse($observers->contains($this->observer));
}
/**

View File

@ -20,9 +20,14 @@ class User implements \SplSubject
/**
* observers
*
* @var array
* @var \SplObjectStorage
*/
protected $observers = array();
protected $observers;
function __construct()
{
$this->observers = new \SplObjectStorage();
}
/**
* attach a new observer
@ -33,7 +38,7 @@ class User implements \SplSubject
*/
public function attach(\SplObserver $observer)
{
$this->observers[] = $observer;
$this->observers->attach($observer);
}
/**
@ -45,11 +50,7 @@ class User implements \SplSubject
*/
public function detach(\SplObserver $observer)
{
$index = array_search($observer, $this->observers);
if (false !== $index) {
unset($this->observers[$index]);
}
$this->observers->detach($observer);
}
/**

View File

@ -1,5 +1,5 @@
Behavioral
==========
`Behavioral`__
==============
In software engineering, behavioral design patterns are design patterns
that identify common communication patterns between objects and realize
@ -21,3 +21,5 @@ carrying out this communication.
Strategy/README
TemplateMethod/README
Visitor/README
.. __: http://en.wikipedia.org/wiki/Behavioral_pattern

View File

@ -1,5 +1,5 @@
Creational
==========
`Creational`__
==============
In software engineering, creational design patterns are design patterns
that deal with object creation mechanisms, trying to create objects in a
@ -20,3 +20,5 @@ this object creation.
SimpleFactory/README
Singleton/README
StaticFactory/README
.. __: http://en.wikipedia.org/wiki/Creational_pattern

View File

@ -9,6 +9,16 @@ This is a collection of known design patterns and some sample code how to implem
I think the problem with patterns is that often people do know them but don't know when to apply which.
## Installation
You should look at and run the tests to see what happens in the example.
To do this, you should install dependencies with `Composer` first:
```bash
$ composer install
```
Read more about how to install and use `Composer` on your local machine [here](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx).
## Patterns
The patterns can be structured in roughly three different categories. Please click on the [:notebook:](http://en.wikipedia.org/wiki/Software_design_pattern) for a full explanation of the pattern on Wikipedia.

View File

@ -1,5 +1,5 @@
Structural
==========
`Structural`__
==============
In Software Engineering, Structural Design Patterns are Design Patterns
that ease the design by identifying a simple way to realize
@ -18,3 +18,5 @@ relationships between entities.
FluentInterface/README
Proxy/README
Registry/README
.. __: http://en.wikipedia.org/wiki/Structural_pattern

Binary file not shown.

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Behavioral/README.rst:2
msgid "Behavioral"
msgid "`Behavioral`__"
msgstr ""
#: ../../Behavioral/README.rst:4

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Creational/README.rst:2
msgid "Creational"
msgid "`Creational`__"
msgstr ""
#: ../../Creational/README.rst:4

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Structural/README.rst:2
msgid "Structural"
msgid "`Structural`__"
msgstr ""
#: ../../Structural/README.rst:4

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Behavioral/README.rst:2
msgid "Behavioral"
msgid "`Behavioral`__"
msgstr ""
#: ../../Behavioral/README.rst:4

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Creational/README.rst:2
msgid "Creational"
msgid "`Creational`__"
msgstr ""
#: ../../Creational/README.rst:4

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Structural/README.rst:2
msgid "Structural"
msgid "`Structural`__"
msgstr ""
#: ../../Structural/README.rst:4

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Behavioral/README.rst:2
msgid "Behavioral"
msgid "`Behavioral`__"
msgstr ""
#: ../../Behavioral/README.rst:4

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Creational/README.rst:2
msgid "Creational"
msgid "`Creational`__"
msgstr ""
#: ../../Creational/README.rst:4

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Structural/README.rst:2
msgid "Structural"
msgid "`Structural`__"
msgstr ""
#: ../../Structural/README.rst:4

View File

@ -1,23 +1,23 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-29 21:17+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:2
msgid "`Chain Of Responsibilities`__"
msgstr ""
msgstr "`Цепочка Обязанностей <https://ru.wikipedia.org/wiki/Цепочка_обязанностей>`_ (`Chain Of Responsibilities`__)"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:5
msgid "Purpose:"
msgstr ""
msgstr "Назначение:"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:7
msgid ""
@ -25,26 +25,34 @@ msgid ""
"object cannot handle a call, it delegates the call to the next in the chain "
"and so forth."
msgstr ""
"Построить цепочку объектов для обработки вызова в последовательном порядке. "
"Если один объект не может справиться с вызовом, он делегирует вызов для "
"следующего в цепи и так далее."
#: ../../Behavioral/ChainOfResponsibilities/README.rst:12
msgid "Examples:"
msgstr ""
msgstr "Примеры:"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:14
msgid ""
"logging framework, where each chain element decides autonomously what to do "
"with a log message"
msgstr ""
"фреймворк для записи журналов, где каждый элемент цепи самостоятельно "
"принимает решение, что делать с сообщением для логгирования."
#: ../../Behavioral/ChainOfResponsibilities/README.rst:16
msgid "a Spam filter"
msgstr ""
msgstr "фильтр спама"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:17
msgid ""
"Caching: first object is an instance of e.g. a Memcached Interface, if that "
"\"misses\" it delegates the call to the database interface"
msgstr ""
"кеширование: первый объект является экземпляром, к примеру, интерфейса "
"Memcached. Если запись в кеше отсутствует, вызов делегируется интерфейсу "
"базы данных."
#: ../../Behavioral/ChainOfResponsibilities/README.rst:19
msgid ""
@ -52,39 +60,42 @@ msgid ""
"executing point is passed from one filter to the next along the chain, and "
"only if all filters say \"yes\", the action can be invoked at last."
msgstr ""
"Yii Framework: CFilterChain — это цепочка фильтров действий контроллера. "
"Точка вызова передаётся от фильтра к фильтру по цепочке и только если все "
"фильтры скажут “да”, действие в итоге может быть вызвано."
#: ../../Behavioral/ChainOfResponsibilities/README.rst:25
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:32
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:34
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:36
msgid "Request.php"
msgstr ""
msgstr "Request.php"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:42
msgid "Handler.php"
msgstr ""
msgstr "Handler.php"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:48
msgid "Responsible/SlowStorage.php"
msgstr ""
msgstr "Responsible/SlowStorage.php"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:54
msgid "Responsible/FastStorage.php"
msgstr ""
msgstr "Responsible/FastStorage.php"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:61
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Behavioral/ChainOfResponsibilities/README.rst:63
msgid "Tests/ChainTest.php"
msgstr ""
msgstr "Tests/ChainTest.php"

View File

@ -1,27 +1,27 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-29 21:16+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Behavioral/Command/README.rst:2
msgid "`Command`__"
msgstr ""
msgstr "`Команда <https://ru.wikipedia.org/wiki/Команда_(шаблон_проектирования)>`_ (`Command`__)"
#: ../../Behavioral/Command/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Behavioral/Command/README.rst:7
msgid "To encapsulate invocation and decoupling."
msgstr ""
msgstr "Инкапсулировать действие и его параметры"
#: ../../Behavioral/Command/README.rst:9
msgid ""
@ -31,6 +31,12 @@ msgid ""
"process the Command of the client. The Receiver is decoupled from the "
"Invoker."
msgstr ""
"Допустим, у нас есть объекты Invoker (Командир) и Receiver (Исполнитель). "
"Этот паттерн использует реализацию интерфейса «Команда», чтобы вызвать "
"некий метод Исполнителя используя для этого известный Командиру метод "
"«execute()». Командир просто знает, что нужно вызвать метод “execute()”, "
"для обработки команды клиента, не разбираясь в деталях реализации "
"Исполнителя. Исполнитель отделен от Командира."
#: ../../Behavioral/Command/README.rst:15
msgid ""
@ -38,22 +44,30 @@ msgid ""
"execute(). Command can also be aggregated to combine more complex commands "
"with minimum copy-paste and relying on composition over inheritance."
msgstr ""
"Вторым аспектом этого паттерна является метод undo(), который отменяет "
"действие, выполняемое методом execute(). Команды также могут быть "
"объединены в более общие команды с минимальным копированием-вставкой и "
"полагаясь на композицию поверх наследования."
#: ../../Behavioral/Command/README.rst:21
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../Behavioral/Command/README.rst:23
msgid ""
"A text editor : all events are Command which can be undone, stacked and "
"saved."
msgstr ""
"текстовый редактор: все события являются Командами, которые могут быть "
"отменены, выстроены в определённую последовательность и сохранены."
#: ../../Behavioral/Command/README.rst:25
msgid ""
"Symfony2: SF2 Commands that can be run from the CLI are built with just the "
"Command pattern in mind"
msgstr ""
"Symfony2: SF2 Commands, это команды, которые построены согласно данному "
"паттерну и могут выполняться из командной строки."
#: ../../Behavioral/Command/README.rst:27
msgid ""
@ -61,39 +75,42 @@ msgid ""
"\"modules\", each of these can be implemented with the Command pattern (e.g."
" vagrant)"
msgstr ""
"большие утилиты для командной строки (например, Vagrant) используют "
"вложенные команды для разделения различных задач и упаковки их в «модули», "
"каждый из которых может быть реализован с помощью паттерна «Команда»."
#: ../../Behavioral/Command/README.rst:32
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/Command/README.rst:39
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/Command/README.rst:41
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы также можете найти этот код на `GitHub`_"
#: ../../Behavioral/Command/README.rst:43
msgid "CommandInterface.php"
msgstr ""
msgstr "CommandInterface.php"
#: ../../Behavioral/Command/README.rst:49
msgid "HelloCommand.php"
msgstr ""
msgstr "HelloCommand.php"
#: ../../Behavioral/Command/README.rst:55
msgid "Receiver.php"
msgstr ""
msgstr "Receiver.php"
#: ../../Behavioral/Command/README.rst:61
msgid "Invoker.php"
msgstr ""
msgstr "Invoker.php"
#: ../../Behavioral/Command/README.rst:68
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Behavioral/Command/README.rst:70
msgid "Tests/CommandTest.php"
msgstr ""
msgstr "Tests/CommandTest.php"

View File

@ -1,43 +1,49 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-29 21:47+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Behavioral/Iterator/README.rst:2
msgid "`Iterator`__"
msgstr ""
msgstr "`Итератор <https://ru.wikipedia.org/wiki/Итератор_(шаблон_проектирования)>`_ (`Iterator`__)"
#: ../../Behavioral/Iterator/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Behavioral/Iterator/README.rst:7
msgid ""
"To make an object iterable and to make it appear like a collection of "
"objects."
msgstr ""
"Добавить коллекции объектов функционал последовательного доступа к "
"содержащимся в ней экземплярам объектов без реализации этого функционала в "
"самой коллекции."
#: ../../Behavioral/Iterator/README.rst:11
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../Behavioral/Iterator/README.rst:13
msgid ""
"to process a file line by line by just running over all lines (which have an"
" object representation) for a file (which of course is an object, too)"
msgstr ""
"построчный перебор файла, который представлен в виде объекта, содержащего "
"строки, тоже являющиеся объектами. Обработчик будет запущен поверх всех "
"объектов."
#: ../../Behavioral/Iterator/README.rst:18
msgid "Note"
msgstr ""
msgstr "Примечание"
#: ../../Behavioral/Iterator/README.rst:20
msgid ""
@ -45,39 +51,43 @@ msgid ""
"suited for this! Often you would want to implement the Countable interface "
"too, to allow ``count($object)`` on your iterable object"
msgstr ""
"Стандартная библиотека PHP SPL определяет интерфейс Iterator, который "
"хорошо подходит для данных целей. Также вам может понадобиться реализовать "
"интерфейс Countable, чтобы разрешить вызывать ``count($object)`` в вашем "
"листаемом объекте."
#: ../../Behavioral/Iterator/README.rst:25
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/Iterator/README.rst:32
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/Iterator/README.rst:34
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Также вы можете найти этот код на `GitHub`_"
#: ../../Behavioral/Iterator/README.rst:36
msgid "Book.php"
msgstr ""
msgstr "Book.php"
#: ../../Behavioral/Iterator/README.rst:42
msgid "BookList.php"
msgstr ""
msgstr "BookList.php"
#: ../../Behavioral/Iterator/README.rst:48
msgid "BookListIterator.php"
msgstr ""
msgstr "BookListIterator.php"
#: ../../Behavioral/Iterator/README.rst:54
msgid "BookListReverseIterator.php"
msgstr ""
msgstr "BookListReverseIterator.php"
#: ../../Behavioral/Iterator/README.rst:61
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Behavioral/Iterator/README.rst:63
msgid "Tests/IteratorTest.php"
msgstr ""
msgstr "Tests/IteratorTest.php"

View File

@ -1,30 +1,36 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-29 22:18+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
"Language-Team: \n"
"X-Generator: Poedit 1.8.1\n"
#: ../../Behavioral/Mediator/README.rst:2
msgid "`Mediator`__"
msgstr ""
msgstr "`Посредник <https://ru.wikipedia.org/wiki/Посредник_(шаблон_проектирования)>`_ (`Mediator`__)"
#: ../../Behavioral/Mediator/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Behavioral/Mediator/README.rst:7
msgid ""
"This pattern provides an easy to decouple many components working together. "
"It is a good alternative over Observer IF you have a \"central "
"intelligence\", like a controller (but not in the sense of the MVC)."
"It is a good alternative over Observer IF you have a \"central intelligence"
"\", like a controller (but not in the sense of the MVC)."
msgstr ""
"Этот паттерн позволяет снизить связность множества компонентов, работающих "
"совместно. Объектам больше нет нужды вызывать друг друга напрямую. Это "
"хорошая альтернатива Наблюдателю, если у вас есть “центр интеллекта” вроде "
"контроллера (но не в смысле MVC)"
#: ../../Behavioral/Mediator/README.rst:11
msgid ""
@ -32,47 +38,50 @@ msgid ""
"and it is a good thing because in OOP, one good friend is better than many. "
"This is the key-feature of this pattern."
msgstr ""
"Все компоненты (называемые «Коллеги») объединяются в интерфейс "
"MediatorInterface и это хорошо, потому что в рамках ООП, «старый друг лучше "
"новых двух»."
#: ../../Behavioral/Mediator/README.rst:16
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/Mediator/README.rst:23
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/Mediator/README.rst:25
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Behavioral/Mediator/README.rst:27
msgid "MediatorInterface.php"
msgstr ""
msgstr "MediatorInterface.php"
#: ../../Behavioral/Mediator/README.rst:33
msgid "Mediator.php"
msgstr ""
msgstr "Mediator.php"
#: ../../Behavioral/Mediator/README.rst:39
msgid "Colleague.php"
msgstr ""
msgstr "Colleague.php"
#: ../../Behavioral/Mediator/README.rst:45
msgid "Subsystem/Client.php"
msgstr ""
msgstr "Subsystem/Client.php"
#: ../../Behavioral/Mediator/README.rst:51
msgid "Subsystem/Database.php"
msgstr ""
msgstr "Subsystem/Database.php"
#: ../../Behavioral/Mediator/README.rst:57
msgid "Subsystem/Server.php"
msgstr ""
msgstr "Subsystem/Server.php"
#: ../../Behavioral/Mediator/README.rst:64
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Behavioral/Mediator/README.rst:66
msgid "Tests/MediatorTest.php"
msgstr ""
msgstr "Tests/MediatorTest.php"

View File

@ -1,41 +1,46 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 14:24+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Behavioral/NullObject/README.rst:2
msgid "`Null Object`__"
msgstr ""
msgstr "`Объект Null <https://ru.wikipedia.org/wiki/Null_object_(Шаблон_проектирования)>`_ (`Null Object`__)"
#: ../../Behavioral/NullObject/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Behavioral/NullObject/README.rst:7
msgid ""
"NullObject is not a GoF design pattern but a schema which appears frequently"
" enough to be considered a pattern. It has the following benefits:"
"NullObject is not a GoF design pattern but a schema which appears "
"frequently enough to be considered a pattern. It has the following benefits:"
msgstr ""
"NullObject не шаблон из книги Банды Четырёх, но схема, которая появляется "
"достаточно часто, чтобы считаться паттерном. Она имеет следующие "
"преимущества:"
#: ../../Behavioral/NullObject/README.rst:11
msgid "Client code is simplified"
msgstr ""
msgstr "Клиентский код упрощается"
#: ../../Behavioral/NullObject/README.rst:12
msgid "Reduces the chance of null pointer exceptions"
msgstr ""
"Уменьшает шанс исключений из-за нулевых указателей (и ошибок PHP различного "
"уровня)"
#: ../../Behavioral/NullObject/README.rst:13
msgid "Fewer conditionals require less test cases"
msgstr ""
msgstr "Меньше дополнительных условий — значит меньше тесткейсов"
#: ../../Behavioral/NullObject/README.rst:15
msgid ""
@ -45,59 +50,63 @@ msgid ""
"``$obj->callSomething();`` by eliminating the conditional check in client "
"code."
msgstr ""
"Методы, которые возвращают объект или Null, вместо этого должны вернуть "
"объект ``NullObject``. Это упрощённый формальный код, устраняющий "
"необходимость проверки ``if (!is_null($obj)) { $obj->callSomething(); }``, "
"заменяя её на обычный вызов ``$obj->callSomething();``."
#: ../../Behavioral/NullObject/README.rst:22
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../Behavioral/NullObject/README.rst:24
msgid "Symfony2: null logger of profiler"
msgstr ""
msgstr "Symfony2: null logger of profiler"
#: ../../Behavioral/NullObject/README.rst:25
msgid "Symfony2: null output in Symfony/Console"
msgstr ""
msgstr "Symfony2: null output in Symfony/Console"
#: ../../Behavioral/NullObject/README.rst:26
msgid "null handler in a Chain of Responsibilities pattern"
msgstr ""
msgstr "null handler in a Chain of Responsibilities pattern"
#: ../../Behavioral/NullObject/README.rst:27
msgid "null command in a Command pattern"
msgstr ""
msgstr "null command in a Command pattern"
#: ../../Behavioral/NullObject/README.rst:30
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/NullObject/README.rst:37
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/NullObject/README.rst:39
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Behavioral/NullObject/README.rst:41
msgid "Service.php"
msgstr ""
msgstr "Service.php"
#: ../../Behavioral/NullObject/README.rst:47
msgid "LoggerInterface.php"
msgstr ""
msgstr "LoggerInterface.php"
#: ../../Behavioral/NullObject/README.rst:53
msgid "PrintLogger.php"
msgstr ""
msgstr "PrintLogger.php"
#: ../../Behavioral/NullObject/README.rst:59
msgid "NullLogger.php"
msgstr ""
msgstr "NullLogger.php"
#: ../../Behavioral/NullObject/README.rst:66
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Behavioral/NullObject/README.rst:68
msgid "Tests/LoggerTest.php"
msgstr ""
msgstr "Tests/LoggerTest.php"

View File

@ -1,23 +1,23 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 05:20+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Behavioral/Observer/README.rst:2
msgid "`Observer`__"
msgstr ""
msgstr "`Наблюдатель <https://ru.wikipedia.org/wiki/Наблюдатель_(шаблон_проектирования)>`_ (`Observer`__)"
#: ../../Behavioral/Observer/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Behavioral/Observer/README.rst:7
msgid ""
@ -26,50 +26,59 @@ msgid ""
"notified. It is used to shorten the amount of coupled objects and uses loose"
" coupling instead."
msgstr ""
"Для реализации публикации/подписки на поведение объекта, всякий раз, когда "
"объект «Subject» меняет свое состояние, прикрепленные объекты «Observers» "
"будут уведомлены. Паттерн используется, чтобы сократить количество "
"связанных напрямую объектов и вместо этого использует слабую связь (loose "
"coupling)."
#: ../../Behavioral/Observer/README.rst:13
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../Behavioral/Observer/README.rst:15
msgid ""
"a message queue system is observed to show the progress of a job in a GUI"
msgstr ""
"Система очереди сообщений наблюдает за очередями, чтобы отображать прогресс "
"в GUI"
#: ../../Behavioral/Observer/README.rst:19
msgid "Note"
msgstr ""
msgstr "Примечание"
#: ../../Behavioral/Observer/README.rst:21
msgid ""
"PHP already defines two interfaces that can help to implement this pattern: "
"SplObserver and SplSubject."
msgstr ""
"PHP предоставляет два стандартных интерфейса, которые могут помочь "
"реализовать этот шаблон: SplObserver и SplSubject."
#: ../../Behavioral/Observer/README.rst:25
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/Observer/README.rst:32
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/Observer/README.rst:34
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Behavioral/Observer/README.rst:36
msgid "User.php"
msgstr ""
msgstr "User.php"
#: ../../Behavioral/Observer/README.rst:42
msgid "UserObserver.php"
msgstr ""
msgstr "UserObserver.php"
#: ../../Behavioral/Observer/README.rst:49
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Behavioral/Observer/README.rst:51
msgid "Tests/ObserverTest.php"
msgstr ""
msgstr "Tests/ObserverTest.php"

View File

@ -1,19 +1,19 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-29 21:22+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Behavioral/README.rst:2
msgid "Behavioral"
msgstr ""
msgstr "`Поведенческие шаблоны проектирования <https://ru.wikipedia.org/wiki/Поведенческиеаблоны_проектирования>`_ (Behavioral)"
#: ../../Behavioral/README.rst:4
msgid ""
@ -22,3 +22,7 @@ msgid ""
"patterns. By doing so, these patterns increase flexibility in carrying out "
"this communication."
msgstr ""
"Поведенческие шаблоны проектирования определяют общие закономерности связей "
"между объектами, реализующими данные паттерны. Следование этим шаблонам "
"уменьшает связность системы и облегчает коммуникацию между объектами, что "
"улучшает гибкость программного продукта."

View File

@ -1,23 +1,23 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 04:28+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Behavioral/Specification/README.rst:2
msgid "`Specification`__"
msgstr ""
msgstr "`Спецификация <https://ru.wikipedia.org/wiki/Спецификация_(шаблон_проектирования)>`_ (`Specification`__)"
#: ../../Behavioral/Specification/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Behavioral/Specification/README.rst:7
msgid ""
@ -26,59 +26,63 @@ msgid ""
"``isSatisfiedBy`` that returns either true or false depending on whether the"
" given object satisfies the specification."
msgstr ""
"Строит ясное описание бизнес-правил, на соответствие которым могут быть "
"проверены объекты. Композитный класс спецификация имеет один метод, "
"называемый ``isSatisfiedBy``, который возвращает истину или ложь в "
"зависимости от того, удовлетворяет ли данный объект спецификации."
#: ../../Behavioral/Specification/README.rst:13
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../Behavioral/Specification/README.rst:15
msgid "`RulerZ <https://github.com/K-Phoen/rulerz>`__"
msgstr ""
msgstr "`RulerZ <https://github.com/K-Phoen/rulerz>`__"
#: ../../Behavioral/Specification/README.rst:18
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/Specification/README.rst:25
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/Specification/README.rst:27
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Behavioral/Specification/README.rst:29
msgid "Item.php"
msgstr ""
msgstr "Item.php"
#: ../../Behavioral/Specification/README.rst:35
msgid "SpecificationInterface.php"
msgstr ""
msgstr "SpecificationInterface.php"
#: ../../Behavioral/Specification/README.rst:41
msgid "AbstractSpecification.php"
msgstr ""
msgstr "AbstractSpecification.php"
#: ../../Behavioral/Specification/README.rst:47
msgid "Either.php"
msgstr ""
msgstr "Either.php"
#: ../../Behavioral/Specification/README.rst:53
msgid "PriceSpecification.php"
msgstr ""
msgstr "PriceSpecification.php"
#: ../../Behavioral/Specification/README.rst:59
msgid "Plus.php"
msgstr ""
msgstr "Plus.php"
#: ../../Behavioral/Specification/README.rst:65
msgid "Not.php"
msgstr ""
msgstr "Not.php"
#: ../../Behavioral/Specification/README.rst:72
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Behavioral/Specification/README.rst:74
msgid "Tests/SpecificationTest.php"
msgstr ""
msgstr "Tests/SpecificationTest.php"

View File

@ -1,23 +1,23 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 04:40+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Behavioral/State/README.rst:2
msgid "`State`__"
msgstr ""
msgstr "`Состояние <https://ru.wikipedia.org/wiki/Состояние_(шаблон_проектирования)>`_ (`State`__)"
#: ../../Behavioral/State/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Behavioral/State/README.rst:7
msgid ""
@ -25,39 +25,43 @@ msgid ""
"state. This can be a cleaner way for an object to change its behavior at "
"runtime without resorting to large monolithic conditional statements."
msgstr ""
"Инкапсулирует изменение поведения одних и тех же методов в зависимости "
"от состояния объекта.\n"
"Этот паттерн поможет изящным способом изменить поведение объекта во "
"время выполнения не прибегая к большим монолитным условным операторам."
#: ../../Behavioral/State/README.rst:12
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/State/README.rst:19
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/State/README.rst:21
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Behavioral/State/README.rst:23
msgid "OrderController.php"
msgstr ""
msgstr "OrderController.php"
#: ../../Behavioral/State/README.rst:29
msgid "OrderFactory.php"
msgstr ""
msgstr "OrderFactory.php"
#: ../../Behavioral/State/README.rst:35
msgid "OrderInterface.php"
msgstr ""
msgstr "OrderInterface.php"
#: ../../Behavioral/State/README.rst:41
msgid "ShippingOrder.php"
msgstr ""
msgstr "ShippingOrder.php"
#: ../../Behavioral/State/README.rst:47
msgid "CreateOrder.php"
msgstr ""
msgstr "CreateOrder.php"
#: ../../Behavioral/State/README.rst:54
msgid "Test"
msgstr ""
msgstr "Тест"

View File

@ -1,39 +1,39 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 05:25+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Behavioral/Strategy/README.rst:2
msgid "`Strategy`__"
msgstr ""
msgstr "`Стратегия <https://ru.wikipedia.org/wiki/Стратегия_(шаблон_проектирования)>`_ (`Strategy`__)"
#: ../../Behavioral/Strategy/README.rst:5
msgid "Terminology:"
msgstr ""
msgstr "Терминология:"
#: ../../Behavioral/Strategy/README.rst:7
msgid "Context"
msgstr ""
msgstr "Context"
#: ../../Behavioral/Strategy/README.rst:8
msgid "Strategy"
msgstr ""
msgstr "Strategy"
#: ../../Behavioral/Strategy/README.rst:9
msgid "Concrete Strategy"
msgstr ""
msgstr "Concrete Strategy"
#: ../../Behavioral/Strategy/README.rst:12
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Behavioral/Strategy/README.rst:14
msgid ""
@ -41,52 +41,58 @@ msgid ""
"pattern is a good alternative to inheritance (instead of having an abstract "
"class that is extended)."
msgstr ""
"Чтобы разделить стратегии и получить возможность быстрого переключения "
"между ними. Также этот паттерн является хорошей альтернативой наследованию "
"(вместо расширения абстрактного класса)."
#: ../../Behavioral/Strategy/README.rst:19
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../Behavioral/Strategy/README.rst:21
msgid "sorting a list of objects, one strategy by date, the other by id"
msgstr ""
"сортировка списка объектов, одна стратегия сортирует по дате, другая по id"
#: ../../Behavioral/Strategy/README.rst:22
msgid ""
"simplify unit testing: e.g. switching between file and in-memory storage"
msgstr ""
"упростить юнит тестирование: например переключение между файловым "
"хранилищем и хранилищем в оперативной памяти"
#: ../../Behavioral/Strategy/README.rst:26
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/Strategy/README.rst:33
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/Strategy/README.rst:35
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Behavioral/Strategy/README.rst:37
msgid "ObjectCollection.php"
msgstr ""
msgstr "ObjectCollection.php"
#: ../../Behavioral/Strategy/README.rst:43
msgid "ComparatorInterface.php"
msgstr ""
msgstr "ComparatorInterface.php"
#: ../../Behavioral/Strategy/README.rst:49
msgid "DateComparator.php"
msgstr ""
msgstr "DateComparator.php"
#: ../../Behavioral/Strategy/README.rst:55
msgid "IdComparator.php"
msgstr ""
msgstr "IdComparator.php"
#: ../../Behavioral/Strategy/README.rst:62
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Behavioral/Strategy/README.rst:64
msgid "Tests/StrategyTest.php"
msgstr ""
msgstr "Tests/StrategyTest.php"

View File

@ -1,27 +1,29 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 18:41+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
"Language-Team: \n"
"X-Generator: Poedit 1.8.1\n"
#: ../../Behavioral/TemplateMethod/README.rst:2
msgid "`Template Method`__"
msgstr ""
msgstr "`Шаблонный Метод <https://ru.wikipedia.org/wiki/Шаблонный_метод_(шаблон_проектирования)>`_ (`Template Method`__)"
#: ../../Behavioral/TemplateMethod/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Behavioral/TemplateMethod/README.rst:7
msgid "Template Method is a behavioral design pattern."
msgstr ""
msgstr "Шаблонный метод, это поведенческий паттерн проектирования."
#: ../../Behavioral/TemplateMethod/README.rst:9
msgid ""
@ -29,6 +31,9 @@ msgid ""
"subclasses of this abstract template \"finish\" the behavior of an "
"algorithm."
msgstr ""
"Возможно, вы сталкивались с этим уже много раз. Идея состоит в том, чтобы "
"позволить наследникам абстрактного шаблона переопределить поведение "
"алгоритмов родителя."
#: ../../Behavioral/TemplateMethod/README.rst:13
msgid ""
@ -36,6 +41,9 @@ msgid ""
"class is not called by subclasses but the inverse. How? With abstraction of "
"course."
msgstr ""
"Как в «Голливудском принципе»: «Не звоните нам, мы сами вам позвоним». Этот "
"класс не вызывается подклассами, но наоборот: подклассы вызываются "
"родителем. Как? С помощью метода в родительской абстракции, конечно."
#: ../../Behavioral/TemplateMethod/README.rst:17
msgid ""
@ -43,41 +51,46 @@ msgid ""
"libraries. The user has just to implement one method and the superclass do "
"the job."
msgstr ""
"Другими словами, это каркас алгоритма, который хорошо подходит для "
"библиотек (в фреймворках, например). Пользователь просто реализует "
"уточняющие методы, а суперкласс делает всю основную работу."
#: ../../Behavioral/TemplateMethod/README.rst:21
msgid ""
"It is an easy way to decouple concrete classes and reduce copy-paste, that's"
" why you'll find it everywhere."
"It is an easy way to decouple concrete classes and reduce copy-paste, "
"that's why you'll find it everywhere."
msgstr ""
"Это простой способ изолировать логику в конкретные классы и уменьшить "
"копипаст, поэтому вы повсеместно встретите его в том или ином виде."
#: ../../Behavioral/TemplateMethod/README.rst:25
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/TemplateMethod/README.rst:32
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/TemplateMethod/README.rst:34
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Behavioral/TemplateMethod/README.rst:36
msgid "Journey.php"
msgstr ""
msgstr "Journey.php"
#: ../../Behavioral/TemplateMethod/README.rst:42
msgid "BeachJourney.php"
msgstr ""
msgstr "BeachJourney.php"
#: ../../Behavioral/TemplateMethod/README.rst:48
msgid "CityJourney.php"
msgstr ""
msgstr "CityJourney.php"
#: ../../Behavioral/TemplateMethod/README.rst:55
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Behavioral/TemplateMethod/README.rst:57
msgid "Tests/JourneyTest.php"
msgstr ""
msgstr "Tests/JourneyTest.php"

View File

@ -1,23 +1,23 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 14:44+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Behavioral/Visitor/README.rst:2
msgid "`Visitor`__"
msgstr ""
msgstr "`Посетитель <https://ru.wikipedia.org/wiki/Посетитель_(шаблон_проектирования)>`_ (`Visitor`__)"
#: ../../Behavioral/Visitor/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Behavioral/Visitor/README.rst:7
msgid ""
@ -26,6 +26,11 @@ msgid ""
" classes have to define a contract to allow visitors (the ``Role::accept`` "
"method in the example)."
msgstr ""
"Шаблон «Посетитель» выполняет операции над объектами других классов. "
"Главной целью является сохранение разделения направленности задач "
"отдельных классов. При этом классы обязаны определить специальный "
"контракт, чтобы позволить использовать их Посетителям (метод «принять "
"роль» ``Role::accept`` в примере)."
#: ../../Behavioral/Visitor/README.rst:12
msgid ""
@ -33,43 +38,46 @@ msgid ""
"In that case, each Visitor has to choose itself which method to invoke on "
"the visitor."
msgstr ""
"Контракт, как правило, это абстрактный класс, но вы можете использовать "
"чистый интерфейс. В этом случае, каждый посетитель должен сам выбирать, "
"какой метод ссылается на посетителя."
#: ../../Behavioral/Visitor/README.rst:17
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Behavioral/Visitor/README.rst:24
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Behavioral/Visitor/README.rst:26
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Behavioral/Visitor/README.rst:28
msgid "RoleVisitorInterface.php"
msgstr ""
msgstr "RoleVisitorInterface.php"
#: ../../Behavioral/Visitor/README.rst:34
msgid "RolePrintVisitor.php"
msgstr ""
msgstr "RolePrintVisitor.php"
#: ../../Behavioral/Visitor/README.rst:40
msgid "Role.php"
msgstr ""
msgstr "Role.php"
#: ../../Behavioral/Visitor/README.rst:46
msgid "User.php"
msgstr ""
msgstr "User.php"
#: ../../Behavioral/Visitor/README.rst:52
msgid "Group.php"
msgstr ""
msgstr "Group.php"
#: ../../Behavioral/Visitor/README.rst:59
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Behavioral/Visitor/README.rst:61
msgid "Tests/VisitorTest.php"
msgstr ""
msgstr "Tests/VisitorTest.php"

View File

@ -1,23 +1,25 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 22:25+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Creational/AbstractFactory/README.rst:2
msgid "`Abstract Factory`__"
msgstr ""
"`Абстрактная фабрика <https://ru.wikipedia.org/wiki/"
"Абстрактная_фабрика_(шаблон_проектирования)>`_ (`Abstract Factory`__)"
#: ../../Creational/AbstractFactory/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Creational/AbstractFactory/README.rst:7
msgid ""
@ -26,63 +28,68 @@ msgid ""
"interface. The client of the abstract factory does not care about how these "
"objects are created, he just knows how they go together."
msgstr ""
"Создать ряд связанных или зависимых объектов без указания их конкретных "
"классов. Обычно создаваемые классы стремятся реализовать один и тот же "
"интерфейс. Клиент абстрактной фабрики не заботится о том, как создаются эти "
"объекты, он просто знает, по каким признакам они взаимосвязаны и как с ними "
"обращаться."
#: ../../Creational/AbstractFactory/README.rst:13
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Creational/AbstractFactory/README.rst:20
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Creational/AbstractFactory/README.rst:22
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Creational/AbstractFactory/README.rst:24
msgid "AbstractFactory.php"
msgstr ""
msgstr "AbstractFactory.php"
#: ../../Creational/AbstractFactory/README.rst:30
msgid "JsonFactory.php"
msgstr ""
msgstr "JsonFactory.php"
#: ../../Creational/AbstractFactory/README.rst:36
msgid "HtmlFactory.php"
msgstr ""
msgstr "HtmlFactory.php"
#: ../../Creational/AbstractFactory/README.rst:42
msgid "MediaInterface.php"
msgstr ""
msgstr "MediaInterface.php"
#: ../../Creational/AbstractFactory/README.rst:48
msgid "Picture.php"
msgstr ""
msgstr "Picture.php"
#: ../../Creational/AbstractFactory/README.rst:54
msgid "Text.php"
msgstr ""
msgstr "Text.php"
#: ../../Creational/AbstractFactory/README.rst:60
msgid "Json/Picture.php"
msgstr ""
msgstr "Json/Picture.php"
#: ../../Creational/AbstractFactory/README.rst:66
msgid "Json/Text.php"
msgstr ""
msgstr "Json/Text.php"
#: ../../Creational/AbstractFactory/README.rst:72
msgid "Html/Picture.php"
msgstr ""
msgstr "Html/Picture.php"
#: ../../Creational/AbstractFactory/README.rst:78
msgid "Html/Text.php"
msgstr ""
msgstr "Html/Text.php"
#: ../../Creational/AbstractFactory/README.rst:85
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Creational/AbstractFactory/README.rst:87
msgid "Tests/AbstractFactoryTest.php"
msgstr ""
msgstr "Tests/AbstractFactoryTest.php"

View File

@ -1,110 +1,118 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 22:36+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Creational/Builder/README.rst:2
msgid "`Builder`__"
msgstr ""
"`Строитель <https://ru.wikipedia.org/wiki/"
"Строитель_(шаблон_проектирования)>`_ (`Builder`__)"
#: ../../Creational/Builder/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Creational/Builder/README.rst:7
msgid "Builder is an interface that build parts of a complex object."
msgstr ""
msgstr "Строитель — это интерфейс для производства частей сложного объекта."
#: ../../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 ""
"Иногда, если Строитель лучше знает о том, что он строит, этот интерфейс "
"может быть абстрактным классом с методами по-умолчанию (адаптер)."
#: ../../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 ""
"Примечание: Строители могут иметь `текучий интерфейс <https://ru.wikipedia."
"org/wiki/Fluent_interface>`_, например, строитель макетов в PHPUnit."
#: ../../Creational/Builder/README.rst:19
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../Creational/Builder/README.rst:21
msgid "PHPUnit: Mock Builder"
msgstr ""
msgstr "PHPUnit: Mock Builder"
#: ../../Creational/Builder/README.rst:24
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Creational/Builder/README.rst:31
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Creational/Builder/README.rst:33
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Creational/Builder/README.rst:35
msgid "Director.php"
msgstr ""
msgstr "Director.php"
#: ../../Creational/Builder/README.rst:41
msgid "BuilderInterface.php"
msgstr ""
msgstr "BuilderInterface.php"
#: ../../Creational/Builder/README.rst:47
msgid "BikeBuilder.php"
msgstr ""
msgstr "BikeBuilder.php"
#: ../../Creational/Builder/README.rst:53
msgid "CarBuilder.php"
msgstr ""
msgstr "CarBuilder.php"
#: ../../Creational/Builder/README.rst:59
msgid "Parts/Vehicle.php"
msgstr ""
msgstr "Parts/Vehicle.php"
#: ../../Creational/Builder/README.rst:65
msgid "Parts/Bike.php"
msgstr ""
msgstr "Parts/Bike.php"
#: ../../Creational/Builder/README.rst:71
msgid "Parts/Car.php"
msgstr ""
msgstr "Parts/Car.php"
#: ../../Creational/Builder/README.rst:77
msgid "Parts/Engine.php"
msgstr ""
msgstr "Parts/Engine.php"
#: ../../Creational/Builder/README.rst:83
msgid "Parts/Wheel.php"
msgstr ""
msgstr "Parts/Wheel.php"
#: ../../Creational/Builder/README.rst:89
msgid "Parts/Door.php"
msgstr ""
msgstr "Parts/Door.php"
#: ../../Creational/Builder/README.rst:96
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Creational/Builder/README.rst:98
msgid "Tests/DirectorTest.php"
msgstr ""
msgstr "Tests/DirectorTest.php"

View File

@ -1,90 +1,101 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 22:46+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Creational/FactoryMethod/README.rst:2
msgid "`Factory Method`__"
msgstr ""
"`Фабричный Метод <https://ru.wikipedia.org/wiki/"
абричный_метод_(шаблон_проектирования)>`_ (`Factory Method`__)"
#: ../../Creational/FactoryMethod/README.rst:5
msgid "Purpose"
msgstr ""
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 case, 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 S.O.L.I.D principles."
msgstr ""
"Этот паттерн является «настоящим» Шаблоном Проектирования, потому что он "
"следует «Принципу инверсии зависимостей\" ака \"D\" в `S.O.L.I.D <https://"
"ru.wikipedia.org/wiki/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 ""
msgstr "UML Диаграмма"
#: ../../Creational/FactoryMethod/README.rst:27
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Creational/FactoryMethod/README.rst:29
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Creational/FactoryMethod/README.rst:31
msgid "FactoryMethod.php"
msgstr ""
msgstr "FactoryMethod.php"
#: ../../Creational/FactoryMethod/README.rst:37
msgid "ItalianFactory.php"
msgstr ""
msgstr "ItalianFactory.php"
#: ../../Creational/FactoryMethod/README.rst:43
msgid "GermanFactory.php"
msgstr ""
msgstr "GermanFactory.php"
#: ../../Creational/FactoryMethod/README.rst:49
msgid "VehicleInterface.php"
msgstr ""
msgstr "VehicleInterface.php"
#: ../../Creational/FactoryMethod/README.rst:55
msgid "Porsche.php"
msgstr ""
msgstr "Porsche.php"
#: ../../Creational/FactoryMethod/README.rst:61
msgid "Bicycle.php"
msgstr ""
msgstr "Bicycle.php"
#: ../../Creational/FactoryMethod/README.rst:67
msgid "Ferrari.php"
msgstr ""
msgstr "Ferrari.php"
#: ../../Creational/FactoryMethod/README.rst:74
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Creational/FactoryMethod/README.rst:76
msgid "Tests/FactoryMethodTest.php"
msgstr ""
msgstr "Tests/FactoryMethodTest.php"

View File

@ -1,64 +1,72 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 22:58+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Creational/Multiton/README.rst:2
msgid "Multiton"
msgstr ""
msgstr "Пул одиночек (Multiton)"
#: ../../Creational/Multiton/README.rst:4
msgid ""
"**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND "
"MAINTAINABILITY USE DEPENDENCY INJECTION!**"
msgstr ""
"**Это считается анти-паттерном! Для лучшей тестируемости и сопровождения "
"кода используйте Инъекцию Зависимости (Dependency Injection)!**"
#: ../../Creational/Multiton/README.rst:8
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Creational/Multiton/README.rst:10
msgid ""
"To have only a list of named instances that are used, like a singleton but "
"with n instances."
msgstr ""
"Содержит список именованных созданных экземпляров классов, которые в итоге "
"используются как Singleton-ы, но в заданном заранее N-ном количестве."
#: ../../Creational/Multiton/README.rst:14
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../Creational/Multiton/README.rst:16
msgid "2 DB Connectors, e.g. one for MySQL, the other for SQLite"
msgstr ""
"Два объекта для доступа к базам данных, к примеру, один для MySQL, а "
"второй для SQLite"
#: ../../Creational/Multiton/README.rst:17
msgid "multiple Loggers (one for debug messages, one for errors)"
msgstr ""
"Несколько логгирующих объектов (один для отладочных сообщений, другой для "
"ошибок и т.п.) "
#: ../../Creational/Multiton/README.rst:20
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Creational/Multiton/README.rst:27
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Creational/Multiton/README.rst:29
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Creational/Multiton/README.rst:31
msgid "Multiton.php"
msgstr ""
msgstr "Multiton.php"
#: ../../Creational/Multiton/README.rst:38
msgid "Test"
msgstr ""
msgstr "Тест"

View File

@ -1,19 +1,20 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 23:08+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Creational/Pool/README.rst:2
msgid "`Pool`__"
msgstr ""
"`Объектный пул <https://ru.wikipedia.org/wiki/Объектный_пул>`_ (`Pool`__)"
#: ../../Creational/Pool/README.rst:4
msgid ""
@ -24,6 +25,9 @@ msgid ""
"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 ""
@ -34,6 +38,12 @@ msgid ""
"creation of the new objects (especially over network) may take variable "
"time."
msgstr ""
"Хранение объектов в пуле может заметно повысить производительность в "
"ситуациях, когда стоимость инициализации экземпляра класса высока, скорость "
"экземпляра класса высока, а количество одновременно используемых "
"экземпляров в любой момент времени является низкой. Время на извлечение "
"объекта из пула легко прогнозируется, в отличие от создания новых объектов "
"(особенно с сетевым оверхедом), что занимает неопределённое время."
#: ../../Creational/Pool/README.rst:18
msgid ""
@ -43,39 +53,46 @@ msgid ""
"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 ""
msgstr "UML Диаграмма"
#: ../../Creational/Pool/README.rst:32
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Creational/Pool/README.rst:34
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Creational/Pool/README.rst:36
msgid "Pool.php"
msgstr ""
msgstr "Pool.php"
#: ../../Creational/Pool/README.rst:42
msgid "Processor.php"
msgstr ""
msgstr "Processor.php"
#: ../../Creational/Pool/README.rst:48
msgid "Worker.php"
msgstr ""
msgstr "Worker.php"
#: ../../Creational/Pool/README.rst:55
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Creational/Pool/README.rst:57
msgid "Tests/PoolTest.php"
msgstr ""
msgstr "Tests/PoolTest.php"
#: ../../Creational/Pool/README.rst:63
msgid "Tests/TestWorker.php"
msgstr ""
msgstr "Tests/TestWorker.php"

View File

@ -1,68 +1,74 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 23:13+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Creational/Prototype/README.rst:2
msgid "`Prototype`__"
msgstr ""
"`Прототип <https://ru.wikipedia.org/wiki/"
рототип_(шаблон_проектирования)>`_ (`Prototype`__)"
#: ../../Creational/Prototype/README.rst:5
msgid "Purpose"
msgstr ""
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 ""
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 ""
"Большие объемы данных (например, создать 1000000 строк в базе данных сразу "
"через ORM)."
#: ../../Creational/Prototype/README.rst:17
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Creational/Prototype/README.rst:24
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Creational/Prototype/README.rst:26
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Creational/Prototype/README.rst:28
msgid "index.php"
msgstr ""
msgstr "index.php"
#: ../../Creational/Prototype/README.rst:34
msgid "BookPrototype.php"
msgstr ""
msgstr "BookPrototype.php"
#: ../../Creational/Prototype/README.rst:40
msgid "BarBookPrototype.php"
msgstr ""
msgstr "BarBookPrototype.php"
#: ../../Creational/Prototype/README.rst:46
msgid "FooBookPrototype.php"
msgstr ""
msgstr "FooBookPrototype.php"
#: ../../Creational/Prototype/README.rst:53
msgid "Test"
msgstr ""
msgstr "Тест"

View File

@ -1,19 +1,19 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 23:11+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Creational/README.rst:2
msgid "Creational"
msgstr ""
msgstr "Порождающие шаблоны проектирования (Creational)"
#: ../../Creational/README.rst:4
msgid ""
@ -23,3 +23,9 @@ msgid ""
" design problems or added complexity to the design. Creational design "
"patterns solve this problem by somehow controlling this object creation."
msgstr ""
"В разработке программного обеспечения, Порождающие шаблоны проектирования "
"это паттерны, которые имеют дело с механизмами создания объекта и пытаются "
"создать объекты в порядке, подходящем к ситуации. Обычная форма создания "
"объекта может привести к проблемам проектирования или увеличивать сложность "
"конструкции. Порождающие шаблоны проектирования решают эту проблему, "
"определённым образом контролируя процесс создания объекта."

View File

@ -1,72 +1,77 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 23:17+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Creational/SimpleFactory/README.rst:2
msgid "Simple Factory"
msgstr ""
msgstr "Простая Фабрика (Simple Factory)"
#: ../../Creational/SimpleFactory/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Creational/SimpleFactory/README.rst:7
msgid "ConcreteFactory is a simple factory pattern."
msgstr ""
msgstr "ConcreteFactory в примере ниже, это паттерн «Простая Фабрика»."
#: ../../Creational/SimpleFactory/README.rst:9
msgid ""
"It differs from the static factory because it is NOT static and as you know:"
" static => global => evil!"
msgstr ""
"Она отличается от Статической Фабрики тем, что собственно *не является "
"статической*. Потому как вы должны знаеть: статическая => глобальная => зло!"
#: ../../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 ""
msgstr "UML Диаграмма"
#: ../../Creational/SimpleFactory/README.rst:23
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Creational/SimpleFactory/README.rst:25
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Creational/SimpleFactory/README.rst:27
msgid "ConcreteFactory.php"
msgstr ""
msgstr "ConcreteFactory.php"
#: ../../Creational/SimpleFactory/README.rst:33
msgid "VehicleInterface.php"
msgstr ""
msgstr "VehicleInterface.php"
#: ../../Creational/SimpleFactory/README.rst:39
msgid "Bicycle.php"
msgstr ""
msgstr "Bicycle.php"
#: ../../Creational/SimpleFactory/README.rst:45
msgid "Scooter.php"
msgstr ""
msgstr "Scooter.php"
#: ../../Creational/SimpleFactory/README.rst:52
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Creational/SimpleFactory/README.rst:54
msgid "Tests/SimpleFactoryTest.php"
msgstr ""
msgstr "Tests/SimpleFactoryTest.php"

View File

@ -1,75 +1,87 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 23:20+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Creational/Singleton/README.rst:2
msgid "`Singleton`__"
msgstr ""
"`Одиночка <https://ru.wikipedia.org/wiki/"
"Одиночка_(шаблон_проектирования)>`_ (`Singleton`__)"
#: ../../Creational/Singleton/README.rst:4
msgid ""
"**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND "
"MAINTAINABILITY USE DEPENDENCY INJECTION!**"
msgstr ""
"**Это считается анти-паттерном! Для лучшей тестируемости и "
"сопровождения кода используйте Инъекцию Зависимости (Dependency "
"Injection)!**"
#: ../../Creational/Singleton/README.rst:8
msgid "Purpose"
msgstr ""
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 ""
msgstr "Примеры"
#: ../../Creational/Singleton/README.rst:16
msgid "DB Connector"
msgstr ""
msgstr "DB Connector для подключения к базе данных"
#: ../../Creational/Singleton/README.rst:17
msgid ""
"Logger (may also be a Multiton if there are many log files for several "
"purposes)"
msgstr ""
"Logger (также может быть Multiton если есть много журналов для "
"нескольких целей)"
#: ../../Creational/Singleton/README.rst:19
msgid ""
"Lock file for the application (there is only one in the filesystem ...)"
msgstr ""
"Блокировка файла в приложении (есть только один в файловой системе с "
"одновременным доступом к нему)"
#: ../../Creational/Singleton/README.rst:23
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Creational/Singleton/README.rst:30
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Creational/Singleton/README.rst:32
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Creational/Singleton/README.rst:34
msgid "Singleton.php"
msgstr ""
msgstr "Singleton.php"
#: ../../Creational/Singleton/README.rst:41
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Creational/Singleton/README.rst:43
msgid "Tests/SingletonTest.php"
msgstr ""
msgstr "Tests/SingletonTest.php"

View File

@ -1,23 +1,23 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 23:24+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Creational/StaticFactory/README.rst:2
msgid "Static Factory"
msgstr ""
msgstr "Статическая Фабрика (Static Factory)"
#: ../../Creational/StaticFactory/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../Creational/StaticFactory/README.rst:7
msgid ""
@ -27,49 +27,56 @@ msgid ""
"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:14
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../Creational/StaticFactory/README.rst:16
msgid ""
"Zend Framework: ``Zend_Cache_Backend`` or ``_Frontend`` use a factory method"
" create cache backends or frontends"
msgstr ""
"Zend Framework: ``Zend_Cache_Backend`` или ``_Frontend`` использует "
"фабричный метод для создания cache backends или frontends"
#: ../../Creational/StaticFactory/README.rst:20
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../Creational/StaticFactory/README.rst:27
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../Creational/StaticFactory/README.rst:29
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../Creational/StaticFactory/README.rst:31
msgid "StaticFactory.php"
msgstr ""
msgstr "StaticFactory.php"
#: ../../Creational/StaticFactory/README.rst:37
msgid "FormatterInterface.php"
msgstr ""
msgstr "FormatterInterface.php"
#: ../../Creational/StaticFactory/README.rst:43
msgid "FormatString.php"
msgstr ""
msgstr "FormatString.php"
#: ../../Creational/StaticFactory/README.rst:49
msgid "FormatNumber.php"
msgstr ""
msgstr "FormatNumber.php"
#: ../../Creational/StaticFactory/README.rst:56
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../Creational/StaticFactory/README.rst:58
msgid "Tests/StaticFactoryTest.php"
msgstr ""
msgstr "Tests/StaticFactoryTest.php"

View File

@ -1,60 +1,60 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 04:46+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../More/Delegation/README.rst:2
msgid "`Delegation`__"
msgstr ""
msgstr "`Делегирование <https://ru.wikipedia.org/wiki/Шаблон_делегирования>`_ (`Delegation`__)"
#: ../../More/Delegation/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../More/Delegation/README.rst:7 ../../More/Delegation/README.rst:12
msgid "..."
msgstr ""
msgstr "Основной шаблон проектирования, в котором объект внешне выражает некоторое поведение, но в реальности передаёт ответственность за выполнение этого поведения связанному объекту. Шаблон делегирования является фундаментальной абстракцией, на основе которой реализованы другие шаблоны - композиция (также называемая агрегацией), примеси (mixins) и аспекты (aspects). (c) wiki"
#: ../../More/Delegation/README.rst:10
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../More/Delegation/README.rst:15
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../More/Delegation/README.rst:22
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../More/Delegation/README.rst:24
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../More/Delegation/README.rst:26
msgid "Usage.php"
msgstr ""
msgstr "Usage.php"
#: ../../More/Delegation/README.rst:32
msgid "TeamLead.php"
msgstr ""
msgstr "TeamLead.php"
#: ../../More/Delegation/README.rst:38
msgid "JuniorDeveloper.php"
msgstr ""
msgstr "JuniorDeveloper.php"
#: ../../More/Delegation/README.rst:45
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../More/Delegation/README.rst:47
msgid "Tests/DelegationTest.php"
msgstr ""
msgstr "Tests/DelegationTest.php"

View File

@ -5,12 +5,12 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-29 12:18+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../More/README.rst:2
msgid "More"
msgstr ""
msgstr "Дополнительно"

View File

@ -1,23 +1,23 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 05:02+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../More/Repository/README.rst:2
msgid "Repository"
msgstr ""
msgstr "Хранилище (Repository)"
#: ../../More/Repository/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../More/Repository/README.rst:7
msgid ""
@ -28,49 +28,58 @@ msgid ""
"also supports the objective of achieving a clean separation and one-way "
"dependency between the domain and data mapping layers."
msgstr ""
"Посредник между уровнями области определения (хранилище) и распределения "
"данных. Использует интерфейс, похожий на коллекции, для доступа к объектам "
"области определения. Репозиторий инкапсулирует набор объектов, сохраняемых "
"в хранилище данных, и операции выполняемые над ними, обеспечивая более "
"объектно-ориентированное представление реальных данных. Репозиторий также "
"преследует цель достижения полного разделения и односторонней зависимости "
"между уровнями области определения и распределения данных."
#: ../../More/Repository/README.rst:16
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../More/Repository/README.rst:18
msgid ""
"Doctrine 2 ORM: there is Repository that mediates between Entity and DBAL "
"and contains methods to retrieve objects"
msgstr ""
"Doctrine 2 ORM: в ней есть Repository, который является связующим звеном "
"между Entity и DBAL и содержит методы для получения объектов."
#: ../../More/Repository/README.rst:20
msgid "Laravel Framework"
msgstr ""
msgstr "Laravel Framework"
#: ../../More/Repository/README.rst:23
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../More/Repository/README.rst:30
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../More/Repository/README.rst:32
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../More/Repository/README.rst:34
msgid "Post.php"
msgstr ""
msgstr "Post.php"
#: ../../More/Repository/README.rst:40
msgid "PostRepository.php"
msgstr ""
msgstr "PostRepository.php"
#: ../../More/Repository/README.rst:46
msgid "Storage.php"
msgstr ""
msgstr "Storage.php"
#: ../../More/Repository/README.rst:52
msgid "MemoryStorage.php"
msgstr ""
msgstr "MemoryStorage.php"
#: ../../More/Repository/README.rst:59
msgid "Test"
msgstr ""
msgstr "Тест"

View File

@ -1,23 +1,23 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 05:14+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../More/ServiceLocator/README.rst:2
msgid "`Service Locator`__"
msgstr ""
msgstr "Локатор Служб (`Service Locator`__)"
#: ../../More/ServiceLocator/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "Назначение"
#: ../../More/ServiceLocator/README.rst:7
msgid ""
@ -25,10 +25,14 @@ msgid ""
" maintainable and extendable code. DI pattern and Service Locator pattern "
"are an implementation of the Inverse of Control pattern."
msgstr ""
"Для реализации слабосвязанной архитектуры, чтобы получить хорошо "
"тестируемый, сопровождаемый и расширяемый код. Паттерн Инъекция "
"зависимостей (DI) и паттерн Локатор Служб — это реализация паттерна "
"Инверсия управления (Inversion of Control, IoC)."
#: ../../More/ServiceLocator/README.rst:12
msgid "Usage"
msgstr ""
msgstr "Использование"
#: ../../More/ServiceLocator/README.rst:14
msgid ""
@ -37,10 +41,15 @@ msgid ""
"of the application without knowing its implementation. You can configure and"
" inject the Service Locator object on bootstrap."
msgstr ""
"С ``Локатором Служб`` вы можете зарегистрировать сервис для определенного "
"интерфейса. С помощью интерфейса вы можете получить зарегистрированный "
"сервис и использовать его в классах приложения, не зная его реализацию. Вы "
"можете настроить и внедрить объект Service Locator на начальном этапе "
"сборки приложения."
#: ../../More/ServiceLocator/README.rst:20
msgid "Examples"
msgstr ""
msgstr "Примеры"
#: ../../More/ServiceLocator/README.rst:22
msgid ""
@ -48,47 +57,51 @@ msgid ""
"the framework(i.e. EventManager, ModuleManager, all custom user services "
"provided by modules, etc...)"
msgstr ""
"Zend Framework 2 использует Service Locator для создания и совместного "
"использования сервисов, задействованных в фреймворке (т.е. EventManager, "
"ModuleManager, все пользовательские сервисы, предоставляемые модулями, и т."
"д ...)"
#: ../../More/ServiceLocator/README.rst:27
msgid "UML Diagram"
msgstr ""
msgstr "UML Диаграмма"
#: ../../More/ServiceLocator/README.rst:34
msgid "Code"
msgstr ""
msgstr "Код"
#: ../../More/ServiceLocator/README.rst:36
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "Вы можете найти этот код на `GitHub`_"
#: ../../More/ServiceLocator/README.rst:38
msgid "ServiceLocatorInterface.php"
msgstr ""
msgstr "ServiceLocatorInterface.php"
#: ../../More/ServiceLocator/README.rst:44
msgid "ServiceLocator.php"
msgstr ""
msgstr "ServiceLocator.php"
#: ../../More/ServiceLocator/README.rst:50
msgid "LogServiceInterface.php"
msgstr ""
msgstr "LogServiceInterface.php"
#: ../../More/ServiceLocator/README.rst:56
msgid "LogService.php"
msgstr ""
msgstr "LogService.php"
#: ../../More/ServiceLocator/README.rst:62
msgid "DatabaseServiceInterface.php"
msgstr ""
msgstr "DatabaseServiceInterface.php"
#: ../../More/ServiceLocator/README.rst:68
msgid "DatabaseService.php"
msgstr ""
msgstr "DatabaseService.php"
#: ../../More/ServiceLocator/README.rst:75
msgid "Test"
msgstr ""
msgstr "Тест"
#: ../../More/ServiceLocator/README.rst:77
msgid "Tests/ServiceLocatorTest.php"
msgstr ""
msgstr "Tests/ServiceLocatorTest.php"

View File

@ -1,85 +1,109 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-29 19:46+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../README.rst:5
msgid "DesignPatternsPHP"
msgstr ""
msgstr "DesignPatternsPHP"
#: ../../README.rst:11
msgid ""
"This is a collection of known `design patterns`_ and some sample code how to"
" implement them in PHP. Every pattern has a small list of examples (most of "
"them from Zend Framework, Symfony2 or Doctrine2 as I'm most familiar with "
"this software)."
"This is a collection of known `design patterns`_ and some sample code how "
"to implement them in PHP. Every pattern has a small list of examples (most "
"of them from Zend Framework, Symfony2 or Doctrine2 as I'm most familiar "
"with this software)."
msgstr ""
"Это набор известных `шаблонов проектирования <https://ru.wikipedia.org/wiki/Шаблон_проектирования>`_ (паттернов) и некоторые "
"примеры их реализации в PHP. Каждый паттерн содержит небольшой перечень "
"примеров (большинство из них для ZendFramework, Symfony2 или Doctrine2, так "
"как я лучше всего знаком с этим программным обеспечением)."
#: ../../README.rst:16
msgid ""
"I think the problem with patterns is that often people do know them but "
"don't know when to apply which."
msgstr ""
"Я считаю, проблема паттернов в том, что люди часто знакомы с ними, но не "
"представляют как их применять."
#: ../../README.rst:20
msgid "Patterns"
msgstr ""
msgstr "Паттерны"
#: ../../README.rst:22
msgid ""
"The patterns can be structured in roughly three different categories. Please"
" click on **the title of every pattern's page** for a full explanation of "
"the pattern on Wikipedia."
"The patterns can be structured in roughly three different categories. "
"Please click on **the title of every pattern's page** for a full "
"explanation of the pattern on Wikipedia."
msgstr ""
"Паттерны могут быть условно сгруппированы в три различные категории. "
"Нажмите на **заголовок каждой страницы с паттерном** для детального "
"объяснения паттерна в Википедии."
#: ../../README.rst:35
msgid "Contribute"
msgstr ""
msgstr "Участие в разработке"
#: ../../README.rst:37
msgid ""
"Please feel free to fork and extend existing or add your own examples and "
"send a pull request with your changes! To establish a consistent code "
"quality, please check your code using `PHP CodeSniffer`_ against `PSR2 "
"standard`_ using ``./vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor "
".``."
"standard`_ using ``./vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor ."
"``."
msgstr ""
"Мы приветствуем ответвления этого репозитория. Добавляйте свои примеры и "
"отправляйте запросы на изменение (pull requests)! Чтобы сохранять высокое "
"качество кода, пожалуйста, проверяйте ваш код на соответствие стандарту "
"`PSR2`. Для этого вы можете воспользоваться `PHP CodeSniffer`_ командой ``./"
"vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor .``."
#: ../../README.rst:44
msgid "License"
msgstr ""
msgstr "Лицензия"
#: ../../README.rst:46
msgid "(The MIT License)"
msgstr ""
msgstr "(The MIT License)"
#: ../../README.rst:48
msgid "Copyright (c) 2014 `Dominik Liebler`_ and `contributors`_"
msgstr ""
msgstr "Copyright (c) 2014 `Dominik Liebler`_ and `contributors`_"
#: ../../README.rst:50
msgid ""
"Permission is hereby granted, free of charge, to any person obtaining a copy"
" of this software and associated documentation files (the 'Software'), to "
"deal in the Software without restriction, including without limitation the "
"rights to use, copy, modify, merge, publish, distribute, sublicense, and/or "
"sell copies of the Software, and to permit persons to whom the Software is "
"furnished to do so, subject to the following conditions:"
"Permission is hereby granted, free of charge, to any person obtaining a "
"copy of this software and associated documentation files (the 'Software'), "
"to deal in the Software without restriction, including without limitation "
"the rights to use, copy, modify, merge, publish, distribute, sublicense, "
"and/or sell copies of the Software, and to permit persons to whom the "
"Software is furnished to do so, subject to the following conditions:"
msgstr ""
"Данная лицензия разрешает лицам, получившим копию данного программного "
"обеспечения и сопутствующую документациию (в дальнейшем именуемыми "
"«Программное Обеспечение»), безвозмездно использовать Программное "
"Обеспечение без ограничений, включая неограниченное право на использование, "
"копирование, изменение, добавление, публикацию, распространение, "
"сублицензирование и/или продажу копий Программного Обеспечения, а также "
"лицам, которым предоставляется данное Программное Обеспечение, при "
"соблюдении следующих условий:"
#: ../../README.rst:58
msgid ""
"The above copyright notice and this permission notice shall be included in "
"all copies or substantial portions of the Software."
msgstr ""
"Указанное выше уведомление об авторском праве и данные условия должны быть "
"включены во все копии или значимые части данного Программного Обеспечения."
#: ../../README.rst:61
msgid ""
@ -88,6 +112,14 @@ msgid ""
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE "
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER "
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING "
"FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS"
" IN THE SOFTWARE."
"FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER "
"DEALINGS IN THE SOFTWARE."
msgstr ""
"ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО "
"ГАРАНТИЙ, ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ ГАРАНТИИ ТОВАРНОЙ "
"ПРИГОДНОСТИ, СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ "
"НАРУШЕНИЙ, НО НЕ ОГРАНИЧИВАЯСЬ ИМИ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ "
"ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО КАКИМ-ЛИБО ИСКАМ, ЗА УЩЕРБ ИЛИ "
"ПО ИНЫМ ТРЕБОВАНИЯМ, В ТОМ ЧИСЛЕ, ПРИ ДЕЙСТВИИ КОНТРАКТА, ДЕЛИКТЕ ИЛИ ИНОЙ "
"СИТУАЦИИ, ВОЗНИКШИМ ИЗ-ЗА ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ИЛИ ИНЫХ "
"ДЕЙСТВИЙ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ."

View File

@ -1,19 +1,21 @@
#
#
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: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2015-05-30 23:27+0300\n"
"Last-Translator: Eugene Glotov <kivagant@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
#: ../../Structural/README.rst:2
msgid "Structural"
msgstr ""
"`Структурные шаблоны проектирования <https://ru.wikipedia.org/wiki/"
"Структурныеаблоны_проектирования>` (Structural)"
#: ../../Structural/README.rst:4
msgid ""
@ -21,3 +23,6 @@ msgid ""
" ease the design by identifying a simple way to realize relationships "
"between entities."
msgstr ""
"При разработке программного обеспечения, Структурные шаблоны проектирования "
"упрощают проектирование путем выявления простого способа реализовать "
"отношения между субъектами."

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Behavioral/README.rst:2
msgid "Behavioral"
msgid "`Behavioral`__"
msgstr ""
#: ../../Behavioral/README.rst:4

View File

@ -12,8 +12,8 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Creational/README.rst:2
msgid "Creational"
msgstr ""
msgid "`Creational`__"
msgstr "`创建型设计模式`__"
#: ../../Creational/README.rst:4
msgid ""
@ -23,3 +23,7 @@ msgid ""
" design problems or added complexity to the design. Creational design "
"patterns solve this problem by somehow controlling this object creation."
msgstr ""
"在软件工程中,创建型设计模式承担着对象创建的职责,尝试创建"
"适合程序上下文的对象,对象创建设计模式的产生是由于软件工程"
"设计的问题,具体说是向设计中增加复杂度,创建型设计模式解决"
"了程序设计中对象创建的问题。"

View File

@ -13,54 +13,55 @@ msgstr ""
#: ../../Creational/Singleton/README.rst:2
msgid "`Singleton`__"
msgstr ""
msgstr "`单例模式`__"
#: ../../Creational/Singleton/README.rst:4
msgid ""
"**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND "
"MAINTAINABILITY USE DEPENDENCY INJECTION!**"
msgstr ""
msgstr "**单例模式已经被考虑列入到反模式中!请使用依赖注入获得更好的代码可测试性和可控性!**"
#: ../../Creational/Singleton/README.rst:8
msgid "Purpose"
msgstr ""
msgstr "目标"
#: ../../Creational/Singleton/README.rst:10
msgid ""
"To have only one instance of this object in the application that will handle"
" all calls."
msgstr ""
msgstr "使应用中只存在一个对象的实例,并且使这个单实例负责所有对该对象的调用。"
#: ../../Creational/Singleton/README.rst:14
msgid "Examples"
msgstr ""
msgstr "例子"
#: ../../Creational/Singleton/README.rst:16
msgid "DB Connector"
msgstr ""
msgstr "数据库连接器"
#: ../../Creational/Singleton/README.rst:17
msgid ""
"Logger (may also be a Multiton if there are many log files for several "
"purposes)"
msgstr ""
msgstr "日志记录器 (可能有多个实例,比如有多个日志文件因为不同的目的记录不同到的日志)"
#: ../../Creational/Singleton/README.rst:19
msgid ""
"Lock file for the application (there is only one in the filesystem ...)"
msgstr ""
"应用锁文件 (理论上整个应用只有一个锁文件 ..."
#: ../../Creational/Singleton/README.rst:23
msgid "UML Diagram"
msgstr ""
msgstr "UML 图"
#: ../../Creational/Singleton/README.rst:30
msgid "Code"
msgstr ""
msgstr "代码"
#: ../../Creational/Singleton/README.rst:32
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "你可以在 `GitHub`_ 上找到这些代码"
#: ../../Creational/Singleton/README.rst:34
msgid "Singleton.php"
@ -68,7 +69,7 @@ msgstr ""
#: ../../Creational/Singleton/README.rst:41
msgid "Test"
msgstr ""
msgstr "测试"
#: ../../Creational/Singleton/README.rst:43
msgid "Tests/SingletonTest.php"

View File

@ -13,11 +13,11 @@ msgstr ""
#: ../../Creational/StaticFactory/README.rst:2
msgid "Static Factory"
msgstr ""
msgstr "静态工厂"
#: ../../Creational/StaticFactory/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "目的"
#: ../../Creational/StaticFactory/README.rst:7
msgid ""
@ -27,28 +27,32 @@ msgid ""
"method to create all types of objects it can create. It is usually named "
"``factory`` or ``build``."
msgstr ""
"和抽象工厂类似,静态工厂模式用来创建一系列互相关联或依赖的对象,和抽象工厂模式不同的是静态工厂"
"模式只用一个静态方法就解决了所有类型的对象创建,通常被命名为``工厂`` 或者 ``构建器``"
#: ../../Creational/StaticFactory/README.rst:14
msgid "Examples"
msgstr ""
msgstr "例子"
#: ../../Creational/StaticFactory/README.rst:16
msgid ""
"Zend Framework: ``Zend_Cache_Backend`` or ``_Frontend`` use a factory method"
" create cache backends or frontends"
msgstr ""
"Zend Framework 框架中的: ``Zend_Cache_Backend`` 和 ``_Frontend`` 使用了静态工厂设计模式"
" 创建后端缓存或者前端缓存对象"
#: ../../Creational/StaticFactory/README.rst:20
msgid "UML Diagram"
msgstr ""
msgstr "UML 图"
#: ../../Creational/StaticFactory/README.rst:27
msgid "Code"
msgstr ""
msgstr "代码"
#: ../../Creational/StaticFactory/README.rst:29
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "你可以在 `GitHub`_ 上找到这些代码"
#: ../../Creational/StaticFactory/README.rst:31
msgid "StaticFactory.php"
@ -68,7 +72,7 @@ msgstr ""
#: ../../Creational/StaticFactory/README.rst:56
msgid "Test"
msgstr ""
msgstr "测试"
#: ../../Creational/StaticFactory/README.rst:58
msgid "Tests/StaticFactoryTest.php"

View File

@ -32,7 +32,8 @@ msgstr ""
msgid ""
"I think the problem with patterns is that often people do know them but "
"don't know when to apply which."
msgstr "翻译。。。"
msgstr “”
"我认为人们对于设计模式抱有的问题在于大家都了解它们却不知道该如何在实际中使用它们。"
#: ../../README.rst:20
msgid "Patterns"
@ -57,7 +58,9 @@ msgid ""
"send a pull request with your changes! To establish a consistent code "
"quality, please check your code using `PHP CodeSniffer`_ against `PSR2 "
"standard`_ using ``./vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor .``."
msgstr "翻译。。。"
msgstr ""
"欢迎你fork代码修改和提pr为了保证代码的质量"
"请使用 `PHP CodeSniffer`_ 检查你的代码是否遵守 `PSR2 编码规范`_使用 ``./vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor .``. 命令检查。"
#: ../../README.rst:44
msgid "License"
@ -65,11 +68,11 @@ msgstr "协议"
#: ../../README.rst:46
msgid "(The MIT License)"
msgstr ""
msgstr "MIT 授权协议"
#: ../../README.rst:48
msgid "Copyright (c) 2014 `Dominik Liebler`_ and `contributors`_"
msgstr ""
msgstr "Copyright (c) 2014 `Dominik Liebler`_ 和 `贡献者`_"
#: ../../README.rst:50
msgid ""
@ -80,12 +83,16 @@ msgid ""
"sell copies of the Software, and to permit persons to whom the Software is "
"furnished to do so, subject to the following conditions:"
msgstr ""
"在此授权给任何遵守本软件授权协议的人免费使用的权利,可以"
"不受限制的的使用,包括不受限制的使用,复制,修改,合并,重新发布,分发,改变授权许可,甚至售卖本软件的拷贝,"
"同时也允许买这个软件的个人也具备上述权利,大意如下:"
#: ../../README.rst:58
msgid ""
"The above copyright notice and this permission notice shall be included in "
"all copies or substantial portions of the Software."
msgstr ""
"上面的权利和授权注意事项应该被包括在本软件的所有的派生分支/版本中"
#: ../../README.rst:61
msgid ""
@ -97,3 +104,6 @@ msgid ""
"FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS "
"IN THE SOFTWARE."
msgstr ""
"该软件是'按原样'提供的,没有任何形式的明示或暗示,包括但不限于为特定目的和不侵权的适销性和适用性的保证担保。"
"在任何情况下,作者或版权持有人,都无权要求任何索赔,或有关损害赔偿的其他责任。"
"无论在本软件的使用上或其他买卖交易中,是否涉及合同,侵权或其他行为。"

View File

@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../Structural/README.rst:2
msgid "Structural"
msgid "`Structural`__"
msgstr ""
#: ../../Structural/README.rst:4