mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-26 09:40:15 +02:00
remove Multiton
This commit is contained in:
@@ -1,44 +0,0 @@
|
|||||||
<?php declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace DesignPatterns\Creational\Multiton;
|
|
||||||
|
|
||||||
final class Multiton
|
|
||||||
{
|
|
||||||
const INSTANCE_1 = '1';
|
|
||||||
const INSTANCE_2 = '2';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Multiton[]
|
|
||||||
*/
|
|
||||||
private static array $instances = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* this is private to prevent from creating arbitrary instances
|
|
||||||
*/
|
|
||||||
private function __construct()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getInstance(string $instanceName): Multiton
|
|
||||||
{
|
|
||||||
if (!isset(self::$instances[$instanceName])) {
|
|
||||||
self::$instances[$instanceName] = new self();
|
|
||||||
}
|
|
||||||
|
|
||||||
return self::$instances[$instanceName];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* prevent instance from being cloned
|
|
||||||
*/
|
|
||||||
private function __clone()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* prevent instance from being unserialized
|
|
||||||
*/
|
|
||||||
private function __wakeup()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,46 +0,0 @@
|
|||||||
Multiton
|
|
||||||
========
|
|
||||||
|
|
||||||
**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND
|
|
||||||
MAINTAINABILITY USE DEPENDENCY INJECTION!**
|
|
||||||
|
|
||||||
Purpose
|
|
||||||
-------
|
|
||||||
|
|
||||||
To have only a list of named instances that are used, like a singleton
|
|
||||||
but with n instances.
|
|
||||||
|
|
||||||
Examples
|
|
||||||
--------
|
|
||||||
|
|
||||||
- 2 DB Connectors, e.g. one for MySQL, the other for SQLite
|
|
||||||
- multiple Loggers (one for debug messages, one for errors)
|
|
||||||
|
|
||||||
UML Diagram
|
|
||||||
-----------
|
|
||||||
|
|
||||||
.. image:: uml/uml.png
|
|
||||||
:alt: Alt Multiton UML Diagram
|
|
||||||
:align: center
|
|
||||||
|
|
||||||
Code
|
|
||||||
----
|
|
||||||
|
|
||||||
You can also find this code on `GitHub`_
|
|
||||||
|
|
||||||
Multiton.php
|
|
||||||
|
|
||||||
.. literalinclude:: Multiton.php
|
|
||||||
:language: php
|
|
||||||
:linenos:
|
|
||||||
|
|
||||||
Test
|
|
||||||
----
|
|
||||||
|
|
||||||
MultitonTest.php
|
|
||||||
|
|
||||||
.. literalinclude:: Tests/MultitonTest.php
|
|
||||||
:language: php
|
|
||||||
:linenos:
|
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Multiton
|
|
@@ -1,28 +0,0 @@
|
|||||||
<?php declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace DesignPatterns\Creational\Multition\Tests;
|
|
||||||
|
|
||||||
use DesignPatterns\Creational\Multiton\Multiton;
|
|
||||||
use PHPUnit\Framework\TestCase;
|
|
||||||
|
|
||||||
class MultitonTest extends TestCase
|
|
||||||
{
|
|
||||||
public function testUniqueness()
|
|
||||||
{
|
|
||||||
$firstCall = Multiton::getInstance(Multiton::INSTANCE_1);
|
|
||||||
$secondCall = Multiton::getInstance(Multiton::INSTANCE_1);
|
|
||||||
|
|
||||||
$this->assertInstanceOf(Multiton::class, $firstCall);
|
|
||||||
$this->assertSame($firstCall, $secondCall);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testUniquenessForEveryInstance()
|
|
||||||
{
|
|
||||||
$firstCall = Multiton::getInstance(Multiton::INSTANCE_1);
|
|
||||||
$secondCall = Multiton::getInstance(Multiton::INSTANCE_2);
|
|
||||||
|
|
||||||
$this->assertInstanceOf(Multiton::class, $firstCall);
|
|
||||||
$this->assertInstanceOf(Multiton::class, $secondCall);
|
|
||||||
$this->assertNotSame($firstCall, $secondCall);
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.9 KiB |
@@ -9,7 +9,6 @@ solve this problem by somehow controlling this object creation.
|
|||||||
* [AbstractFactory](AbstractFactory) [:notebook:](http://en.wikipedia.org/wiki/Abstract_factory_pattern)
|
* [AbstractFactory](AbstractFactory) [:notebook:](http://en.wikipedia.org/wiki/Abstract_factory_pattern)
|
||||||
* [Builder](Builder) [:notebook:](http://en.wikipedia.org/wiki/Builder_pattern)
|
* [Builder](Builder) [:notebook:](http://en.wikipedia.org/wiki/Builder_pattern)
|
||||||
* [FactoryMethod](FactoryMethod) [:notebook:](http://en.wikipedia.org/wiki/Factory_method_pattern)
|
* [FactoryMethod](FactoryMethod) [:notebook:](http://en.wikipedia.org/wiki/Factory_method_pattern)
|
||||||
* [Multiton](Multiton) (is considered an anti-pattern! :no_entry:)
|
|
||||||
* [Pool](Pool) [:notebook:](http://en.wikipedia.org/wiki/Object_pool_pattern)
|
* [Pool](Pool) [:notebook:](http://en.wikipedia.org/wiki/Object_pool_pattern)
|
||||||
* [Prototype](Prototype) [:notebook:](http://en.wikipedia.org/wiki/Prototype_pattern)
|
* [Prototype](Prototype) [:notebook:](http://en.wikipedia.org/wiki/Prototype_pattern)
|
||||||
* [SimpleFactory](SimpleFactory)
|
* [SimpleFactory](SimpleFactory)
|
||||||
|
@@ -14,7 +14,6 @@ this object creation.
|
|||||||
AbstractFactory/README
|
AbstractFactory/README
|
||||||
Builder/README
|
Builder/README
|
||||||
FactoryMethod/README
|
FactoryMethod/README
|
||||||
Multiton/README
|
|
||||||
Pool/README
|
Pool/README
|
||||||
Prototype/README
|
Prototype/README
|
||||||
SimpleFactory/README
|
SimpleFactory/README
|
||||||
|
@@ -14,8 +14,7 @@ Examples
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
- DB Connector
|
- DB Connector
|
||||||
- Logger (may also be a Multiton if there are many log files for
|
- Logger
|
||||||
several purposes)
|
|
||||||
- Lock file for the application (there is only one in the filesystem
|
- Lock file for the application (there is only one in the filesystem
|
||||||
...)
|
...)
|
||||||
|
|
||||||
|
@@ -48,7 +48,6 @@ The patterns can be structured in roughly three different categories. Please cli
|
|||||||
* [AbstractFactory](Creational/AbstractFactory) [:notebook:](http://en.wikipedia.org/wiki/Abstract_factory_pattern)
|
* [AbstractFactory](Creational/AbstractFactory) [:notebook:](http://en.wikipedia.org/wiki/Abstract_factory_pattern)
|
||||||
* [Builder](Creational/Builder) [:notebook:](http://en.wikipedia.org/wiki/Builder_pattern)
|
* [Builder](Creational/Builder) [:notebook:](http://en.wikipedia.org/wiki/Builder_pattern)
|
||||||
* [FactoryMethod](Creational/FactoryMethod) [:notebook:](http://en.wikipedia.org/wiki/Factory_method_pattern)
|
* [FactoryMethod](Creational/FactoryMethod) [:notebook:](http://en.wikipedia.org/wiki/Factory_method_pattern)
|
||||||
* [Multiton](Creational/Multiton) (is considered an anti-pattern! :no_entry:)
|
|
||||||
* [Pool](Creational/Pool) [:notebook:](http://en.wikipedia.org/wiki/Object_pool_pattern)
|
* [Pool](Creational/Pool) [:notebook:](http://en.wikipedia.org/wiki/Object_pool_pattern)
|
||||||
* [Prototype](Creational/Prototype) [:notebook:](http://en.wikipedia.org/wiki/Prototype_pattern)
|
* [Prototype](Creational/Prototype) [:notebook:](http://en.wikipedia.org/wiki/Prototype_pattern)
|
||||||
* [SimpleFactory](Creational/SimpleFactory)
|
* [SimpleFactory](Creational/SimpleFactory)
|
||||||
|
@@ -1,60 +0,0 @@
|
|||||||
#
|
|
||||||
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"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:2
|
|
||||||
msgid "Multiton"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:4
|
|
||||||
msgid ""
|
|
||||||
"**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND "
|
|
||||||
"MAINTAINABILITY USE DEPENDENCY INJECTION!**"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:8
|
|
||||||
msgid "Purpose"
|
|
||||||
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 ""
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:14
|
|
||||||
msgid "Examples"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:16
|
|
||||||
msgid "2 DB Connectors, e.g. one for MySQL, the other for SQLite"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../../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 ""
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:27
|
|
||||||
msgid "Code"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:29
|
|
||||||
msgid "You can also find this code on `GitHub`_"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:38
|
|
||||||
msgid "Test"
|
|
||||||
msgstr ""
|
|
@@ -40,9 +40,7 @@ msgid "DB Connector"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:17
|
#: ../../Creational/Singleton/README.rst:17
|
||||||
msgid ""
|
msgid "Logger"
|
||||||
"Logger (may also be a Multiton if there are many log files for several "
|
|
||||||
"purposes)"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:19
|
#: ../../Creational/Singleton/README.rst:19
|
||||||
|
@@ -1,67 +0,0 @@
|
|||||||
#
|
|
||||||
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: 2016-04-04 08:27+0200\n"
|
|
||||||
"Last-Translator: Dominik Liebler <liebler.dominik@gmail.com>\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: de\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"X-Generator: Poedit 1.8.7.1\n"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:2
|
|
||||||
msgid "Multiton"
|
|
||||||
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 ""
|
|
||||||
"**DIESES MUSTER IST EIN ANTI-PATTERN! FÜR BESSERE TESTBARKEIT UND "
|
|
||||||
"WARTBARKEIT VERWENDE STATTDESSEN DEPENDENCY INJECTION!**"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:8
|
|
||||||
msgid "Purpose"
|
|
||||||
msgstr "Zweck"
|
|
||||||
|
|
||||||
#: ../../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 ""
|
|
||||||
"stellt eine Liste an benamten Instanzen bereit, genauso wie ein Singleton, "
|
|
||||||
"aber mit n Instanzen."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:14
|
|
||||||
msgid "Examples"
|
|
||||||
msgstr "Beispiele"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:16
|
|
||||||
msgid "2 DB Connectors, e.g. one for MySQL, the other for SQLite"
|
|
||||||
msgstr ""
|
|
||||||
"zwei Datenbank-Konnektoren, z.B. einer für MySQL, ein anderer für SQLite"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:17
|
|
||||||
msgid "multiple Loggers (one for debug messages, one for errors)"
|
|
||||||
msgstr "mehrere Logger (einer für Debugmeldungen, einer für Fehler)"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:20
|
|
||||||
msgid "UML Diagram"
|
|
||||||
msgstr "UML Diagramm"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:27
|
|
||||||
msgid "Code"
|
|
||||||
msgstr "Code"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:29
|
|
||||||
msgid "You can also find this code on `GitHub`_"
|
|
||||||
msgstr "Du findest den Code auch auf `GitHub`_"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:38
|
|
||||||
msgid "Test"
|
|
||||||
msgstr "Теst"
|
|
@@ -47,11 +47,9 @@ msgstr "DB Konnektor"
|
|||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:17
|
#: ../../Creational/Singleton/README.rst:17
|
||||||
msgid ""
|
msgid ""
|
||||||
"Logger (may also be a Multiton if there are many log files for several "
|
"Logger"
|
||||||
"purposes)"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Logger (kann auch ein Multiton sein, falls es mehrere Logfiles für "
|
"Logger"
|
||||||
"verschiedene Zwecke gibt)"
|
|
||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:19
|
#: ../../Creational/Singleton/README.rst:19
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@@ -1,67 +0,0 @@
|
|||||||
#
|
|
||||||
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: 2015-09-11 11:31+0100\n"
|
|
||||||
"Last-Translator: Daniel González <daniel@desarrolla2.com>\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: es\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"X-Generator: Poedit 1.5.4\n"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:2
|
|
||||||
msgid "Multiton"
|
|
||||||
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 ""
|
|
||||||
"**ESTO ES CONSIDERADO UN ANTI-PATRÓN. PARA MEJOR TESTEABILIDAD Y "
|
|
||||||
"MANTENIBILIDAD USA INYECCIÓN DE DEPENDENCIAS**"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:8
|
|
||||||
msgid "Purpose"
|
|
||||||
msgstr "Propósito"
|
|
||||||
|
|
||||||
#: ../../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 ""
|
|
||||||
"Tener una única lista de los nombres de las instancias que se están "
|
|
||||||
"utilizando, como en el singleton pero con n instancias."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:14
|
|
||||||
msgid "Examples"
|
|
||||||
msgstr "Ejemplos"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:16
|
|
||||||
msgid "2 DB Connectors, e.g. one for MySQL, the other for SQLite"
|
|
||||||
msgstr "2 Conectores de base de datos, Ej. uno para MySQL y otro para SQLite."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:17
|
|
||||||
msgid "multiple Loggers (one for debug messages, one for errors)"
|
|
||||||
msgstr ""
|
|
||||||
"Múltiples sistemas de log (uno para mensajes de debug, uno para errores)."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:20
|
|
||||||
msgid "UML Diagram"
|
|
||||||
msgstr "Diagrama UML"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:27
|
|
||||||
msgid "Code"
|
|
||||||
msgstr "Código"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:29
|
|
||||||
msgid "You can also find this code on `GitHub`_"
|
|
||||||
msgstr "Puedes encontrar el código en `GitHub`_"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:38
|
|
||||||
msgid "Test"
|
|
||||||
msgstr "Test"
|
|
@@ -47,11 +47,9 @@ msgstr "Conexión a la base de datos"
|
|||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:17
|
#: ../../Creational/Singleton/README.rst:17
|
||||||
msgid ""
|
msgid ""
|
||||||
"Logger (may also be a Multiton if there are many log files for several "
|
"Logger"
|
||||||
"purposes)"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Logger ( también podría ser un Multiton si hay varios ficheros de log para "
|
"Logger"
|
||||||
"diferentes propósitos )"
|
|
||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:19
|
#: ../../Creational/Singleton/README.rst:19
|
||||||
msgid "Lock file for the application (there is only one in the filesystem ...)"
|
msgid "Lock file for the application (there is only one in the filesystem ...)"
|
||||||
|
@@ -1,73 +0,0 @@
|
|||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: DesignPatternsPHP "
|
|
||||||
"d4972f03fc93de3ef10bb31220de49931487d5e0\n"
|
|
||||||
"POT-Creation-Date: 2016-09-22 20:30-0500\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"PO-Revision-Date: \n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"X-Generator: Poedit 1.8.9\n"
|
|
||||||
"Last-Translator: \n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
"Language: es_MX\n"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:1
|
|
||||||
msgid "Multiton"
|
|
||||||
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 ""
|
|
||||||
"**¡ESTE ES CONSIDERADO COMO UN ANTI-PATRÓN! PARA UNA MEJOR CAPACIDAD DE "
|
|
||||||
"PRUEBAS Y MANTENIMIENTO UTILIZA INYECCIÓN DE DEPENDENCIAS!**"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:7
|
|
||||||
msgid "Purpose"
|
|
||||||
msgstr "Propósito"
|
|
||||||
|
|
||||||
#: ../../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 ""
|
|
||||||
"Tener solamente una lista de instancias nombradas que se pueden utilizar, "
|
|
||||||
"como un Singleton pero con n instancias."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:13
|
|
||||||
msgid "Examples"
|
|
||||||
msgstr "Ejemplos"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:16
|
|
||||||
msgid "2 DB Connectors, e.g. one for MySQL, the other for SQLite"
|
|
||||||
msgstr ""
|
|
||||||
"2 Conectores de Base de Datos, p.ej. uno para MySQL y otro para SQLite"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:17
|
|
||||||
msgid "multiple Loggers (one for debug messages, one for errors)"
|
|
||||||
msgstr ""
|
|
||||||
"Múltiples registradores de eventos (uno para mensajes de depuración y otro "
|
|
||||||
"para errores)"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:19
|
|
||||||
msgid "UML Diagram"
|
|
||||||
msgstr "Diagrama UML"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:23
|
|
||||||
msgid "Alt Multiton UML Diagram"
|
|
||||||
msgstr "Alt Diagrama UML Multiton"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:26
|
|
||||||
msgid "Code"
|
|
||||||
msgstr "Código"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:29
|
|
||||||
msgid "You can also find this code on `GitHub`_"
|
|
||||||
msgstr "Puedes encontrar este código también en `GitHub`_"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:37
|
|
||||||
msgid "Test"
|
|
||||||
msgstr "Pruebas"
|
|
@@ -47,11 +47,9 @@ msgstr "Conector de Base de Datos"
|
|||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:17
|
#: ../../Creational/Singleton/README.rst:17
|
||||||
msgid ""
|
msgid ""
|
||||||
"Logger (may also be a Multiton if there are many log files for several "
|
"Logger"
|
||||||
"purposes)"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Registrador de Eventos (puede ser también un Multiton si hay archivos de "
|
"Registrador de Eventos"
|
||||||
"registro de eventos para diferentes propósitos)"
|
|
||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:19
|
#: ../../Creational/Singleton/README.rst:19
|
||||||
msgid "Lock file for the application (there is only one in the filesystem ...)"
|
msgid "Lock file for the application (there is only one in the filesystem ...)"
|
||||||
|
@@ -1,66 +0,0 @@
|
|||||||
#
|
|
||||||
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: 2015-05-30 22:58+0300\n"
|
|
||||||
"Last-Translator: Piotr Grabski-Gradzinski <piotr.gradzinski@gmail.com>\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: pl\n"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:2
|
|
||||||
msgid "Multiton"
|
|
||||||
msgstr "Multiton (Multiton)"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:4
|
|
||||||
msgid ""
|
|
||||||
"**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND "
|
|
||||||
"MAINTAINABILITY USE DEPENDENCY INJECTION!**"
|
|
||||||
msgstr ""
|
|
||||||
"**TEN WZORZEC PROJEKTOWY JEST UZNAWANY ZA ANTY-WZORZEC! DLA LEPSZEGO TESTOWANIA I ŁATWIEJSZEGO UTRZYMANIA "
|
|
||||||
"STOSUJĄC TEN WZORZEC POWINIENEŚ STOSOWAĆ TAKŻE WZORZEC WSTRZYKIWANIA ZALEŻNOŚCI (DEPENDENCY INJECTION)!**"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:8
|
|
||||||
msgid "Purpose"
|
|
||||||
msgstr "Przeznaczenie"
|
|
||||||
|
|
||||||
#: ../../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 ""
|
|
||||||
"Ten wzorzec jest bardzo podobny do Singletonu, z tą różnicą, że pozwala tworzyć unikalne instancje "
|
|
||||||
"danej klasy w ramach przechowywanego klucza."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:14
|
|
||||||
msgid "Examples"
|
|
||||||
msgstr "Przykłady"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:16
|
|
||||||
msgid "2 DB Connectors, e.g. one for MySQL, the other for SQLite"
|
|
||||||
msgstr ""
|
|
||||||
"Dwa obiekty do łączenia się z bazą danych - jeden do MySQL, a drugi do SQLite."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:17
|
|
||||||
msgid "multiple Loggers (one for debug messages, one for errors)"
|
|
||||||
msgstr ""
|
|
||||||
"Kilka Loggerów - na przykład jeden do debugowania, drugi do logowania błędów."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:20
|
|
||||||
msgid "UML Diagram"
|
|
||||||
msgstr "Diagram UML"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:27
|
|
||||||
msgid "Code"
|
|
||||||
msgstr "Kod"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:29
|
|
||||||
msgid "You can also find this code on `GitHub`_"
|
|
||||||
msgstr "Ten kod znajdziesz również na `GitHub`_."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:38
|
|
||||||
msgid "Test"
|
|
||||||
msgstr "Testy"
|
|
@@ -45,10 +45,9 @@ msgstr "Połączenie do bazy danych."
|
|||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:17
|
#: ../../Creational/Singleton/README.rst:17
|
||||||
msgid ""
|
msgid ""
|
||||||
"Logger (may also be a Multiton if there are many log files for several "
|
"Logger"
|
||||||
"purposes)"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Logger - można do tego wykorzystać również wzorzec Multitona."
|
"Logger"
|
||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:19
|
#: ../../Creational/Singleton/README.rst:19
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@@ -1,65 +0,0 @@
|
|||||||
#
|
|
||||||
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: 2019-04-10 14:25-0300\n"
|
|
||||||
"Previous-Translator: Leonam Pereira Dias <leonam.pd@gmail.com>\n"
|
|
||||||
"Last-Translator: Pablo Juan Garcia <contato@pablogarcia.com.br>\n"
|
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:2
|
|
||||||
msgid "Multiton"
|
|
||||||
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 ""
|
|
||||||
"**ESTE É CONSIDERADO UM ANTI-PATTERN! PARA MELHOR TESTABILIDADE E "
|
|
||||||
"MANUTENIBILIDADE USE INJEÇÃO DE DEPENDÊNCIAS!**"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:8
|
|
||||||
msgid "Purpose"
|
|
||||||
msgstr "Objetivos"
|
|
||||||
|
|
||||||
#: ../../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 ""
|
|
||||||
"Para se ter uma lista conhecida de instâncias utilizáveis, como um singleton mas "
|
|
||||||
"com n instâncias."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:14
|
|
||||||
msgid "Examples"
|
|
||||||
msgstr "Exemplos"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:16
|
|
||||||
msgid "2 DB Connectors, e.g. one for MySQL, the other for SQLite"
|
|
||||||
msgstr "2 conexões à bancos de dados. Exemplo: uma para MySQL e outra para SQLite"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:17
|
|
||||||
msgid "multiple Loggers (one for debug messages, one for errors)"
|
|
||||||
msgstr "multiplos Loggers (um para mensagens de debug, outro para erros)"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:20
|
|
||||||
msgid "UML Diagram"
|
|
||||||
msgstr "Diagrama UML"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:27
|
|
||||||
msgid "Code"
|
|
||||||
msgstr "Código"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:29
|
|
||||||
msgid "You can also find this code on `GitHub`_"
|
|
||||||
msgstr "Você também pode encontrar esse código no `GitHub`_"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:38
|
|
||||||
msgid "Test"
|
|
||||||
msgstr "Teste"
|
|
@@ -46,11 +46,9 @@ msgstr "Conexão ao banco de dados (DB Connector)"
|
|||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:17
|
#: ../../Creational/Singleton/README.rst:17
|
||||||
msgid ""
|
msgid ""
|
||||||
"Logger (may also be a Multiton if there are many log files for several "
|
"Logger"
|
||||||
"purposes)"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Logger (pode ser necessário um Multiton se houverem mais de um arquivo de log para diferentes "
|
"Logger"
|
||||||
"necessidades"
|
|
||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:19
|
#: ../../Creational/Singleton/README.rst:19
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@@ -1,68 +0,0 @@
|
|||||||
#
|
|
||||||
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: 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 "Пул одиночек (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 "Назначение"
|
|
||||||
|
|
||||||
#: ../../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 "Примеры"
|
|
||||||
|
|
||||||
#: ../../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 "Диаграмма UML"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:27
|
|
||||||
msgid "Code"
|
|
||||||
msgstr "Код"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:29
|
|
||||||
msgid "You can also find this code on `GitHub`_"
|
|
||||||
msgstr "Вы можете найти этот код на `GitHub`_"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:38
|
|
||||||
msgid "Test"
|
|
||||||
msgstr "Тест"
|
|
@@ -49,11 +49,9 @@ msgstr "DB Connector для подключения к базе данных"
|
|||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:17
|
#: ../../Creational/Singleton/README.rst:17
|
||||||
msgid ""
|
msgid ""
|
||||||
"Logger (may also be a Multiton if there are many log files for several "
|
"Logger"
|
||||||
"purposes)"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Logger (также может быть Multiton если есть много журналов для "
|
"Logger"
|
||||||
"нескольких целей)"
|
|
||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:19
|
#: ../../Creational/Singleton/README.rst:19
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@@ -1,74 +0,0 @@
|
|||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: DesignPatternsPHP 1.0\n"
|
|
||||||
"POT-Creation-Date: 2017-12-16 05:32+0300\n"
|
|
||||||
"PO-Revision-Date: 2017-12-16 05:32+0300\n"
|
|
||||||
"Last-Translator: Muhammet Burak Şentürk\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: tr\n"
|
|
||||||
"Language-Team: Mütercimler\n"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:1
|
|
||||||
msgid "Multiton"
|
|
||||||
msgstr "Multiton (Çoğullama)"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:4
|
|
||||||
msgid ""
|
|
||||||
"**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND "
|
|
||||||
"MAINTAINABILITY USE DEPENDENCY INJECTION!**"
|
|
||||||
msgstr ""
|
|
||||||
"**BU DESEN ANTI-PATTERN OLARAK NİTELENDİRİLMİŞTİR, DAHA İYİ BİR TEST EDİLEBİLİRLİK "
|
|
||||||
"(TESTABILITY) VE BAKIM YAPILABİLİRLİK (MAINTAINABILITY) İÇİN BAĞIMLILIK ENJEKSİYONU "
|
|
||||||
"(DEPENDENCY INJECTION) KULLANINIZ!**"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:7
|
|
||||||
msgid "Purpose"
|
|
||||||
msgstr "Amaç"
|
|
||||||
|
|
||||||
#: ../../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 ""
|
|
||||||
"Yalnızca kullanımda olan adlandırılmış örneklerin (named instances) bir listesine "
|
|
||||||
"sahip olmak. Mesala bir tekilleme (singleton) gibi, ancak \"N\" kez örneklenmiş "
|
|
||||||
"(initialized) olan."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:13
|
|
||||||
msgid "Examples"
|
|
||||||
msgstr "Örnekler"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:16
|
|
||||||
msgid "2 DB Connectors, e.g. one for MySQL, the other for SQLite"
|
|
||||||
msgstr ""
|
|
||||||
"2 Veritabanı Bağlantıcısı (Database Connector): Örneğin birisi MySQL, bir diğeri ise "
|
|
||||||
"SQLite bağlantısını yapar."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:17
|
|
||||||
msgid "multiple Loggers (one for debug messages, one for errors)"
|
|
||||||
msgstr ""
|
|
||||||
"Çoklu Kayıtçılar (Multiple Logger): Örneğin birisi hata yakalama (debug), bir diğeri ise "
|
|
||||||
"hata iletileri (error) ile ilgili işlemleri yapar."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:19
|
|
||||||
msgid "UML Diagram"
|
|
||||||
msgstr "UML Diyagramı"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:23
|
|
||||||
msgid "Alt Multiton UML Diagram"
|
|
||||||
msgstr "Alt Multiton UML Diyagramı"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:26
|
|
||||||
msgid "Code"
|
|
||||||
msgstr "Kod"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:29
|
|
||||||
msgid "You can also find this code on `GitHub`_"
|
|
||||||
msgstr "Bu kodu `Github`_ üzerinde de bulabilirsiniz."
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:37
|
|
||||||
msgid "Test"
|
|
||||||
msgstr "Test"
|
|
@@ -46,11 +46,9 @@ msgstr "Veritabanı Bağlantıcısı (Database Connector)"
|
|||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:17
|
#: ../../Creational/Singleton/README.rst:17
|
||||||
msgid ""
|
msgid ""
|
||||||
"Logger (may also be a Multiton if there are many log files for "
|
"Logger"
|
||||||
"several purposes)"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Kayıtçı (Logger) (çeşitli amaçlara yönelik çok sayıda kayıt dosyası varsa, "
|
"Kayıtçı (Logger)"
|
||||||
"bu aynı zamanda bir Çoğullama (Multiton) da olabilir)."
|
|
||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:19
|
#: ../../Creational/Singleton/README.rst:19
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@@ -1,61 +0,0 @@
|
|||||||
#
|
|
||||||
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"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:2
|
|
||||||
msgid "Multiton"
|
|
||||||
msgstr "多例"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:4
|
|
||||||
msgid ""
|
|
||||||
"**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND "
|
|
||||||
"MAINTAINABILITY USE DEPENDENCY INJECTION!**"
|
|
||||||
msgstr "**多例模式已经被考虑列入到反模式中!请使用依赖注入获得更好的代码可测试性和可控性!**"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:8
|
|
||||||
msgid "Purpose"
|
|
||||||
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 "使类仅有一个命名的对象的集合可供使用,像单例模式但是有多个实例。"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:14
|
|
||||||
msgid "Examples"
|
|
||||||
msgstr "例子"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:16
|
|
||||||
msgid "2 DB Connectors, e.g. one for MySQL, the other for SQLite"
|
|
||||||
msgstr "2 个数据库连接,比如,一个连接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 "UML 图"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:27
|
|
||||||
msgid "Code"
|
|
||||||
msgstr "代码"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:29
|
|
||||||
msgid "You can also find this code on `GitHub`_"
|
|
||||||
msgstr "你可以在 `GitHub`_ 上找到这些代码"
|
|
||||||
|
|
||||||
#: ../../Creational/Multiton/README.rst:38
|
|
||||||
msgid "Test"
|
|
||||||
msgstr "测试"
|
|
||||||
|
|
@@ -41,9 +41,8 @@ msgstr "数据库连接器"
|
|||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:17
|
#: ../../Creational/Singleton/README.rst:17
|
||||||
msgid ""
|
msgid ""
|
||||||
"Logger (may also be a Multiton if there are many log files for several "
|
"Logger"
|
||||||
"purposes)"
|
msgstr "日志记录器"
|
||||||
msgstr "日志记录器 (可能有多个实例,比如有多个日志文件因为不同的目的记录不同到的日志)"
|
|
||||||
|
|
||||||
#: ../../Creational/Singleton/README.rst:19
|
#: ../../Creational/Singleton/README.rst:19
|
||||||
msgid ""
|
msgid ""
|
||||||
|
Reference in New Issue
Block a user