Changeset 4695

Show
Ignore:
Timestamp:
07/19/08 12:12:59 (12 months ago)
Author:
andyman3000
Message:

Added German translation for the Connection Management chapter of the documentation

Location:
branches/1.0/docs/manual/de/connection-management
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/docs/manual/de/connection-management/connection-component-binding.txt

    r4674 r4695  
    1 Doctrine allows you to bind connections to components (= your ActiveRecord classes). This means everytime a component  
    2 issues a query or data is being fetched from the table the component is pointing at Doctrine will use the bound  
    3 connection. 
     1Mit Doctrine k�n Sie einzelnen Komponenten ihrer Anwendung (= ActiveRecord Klassen) unterschiedliche Verbindungen zuweisen (binding). Immer wenn eine Komponente Datenbankzugriffe durchf�nutzt diese die ihr zugewiesene DB-Verbindung: 
    42 
    53<code type="php"> 
     
    1412$q = Doctrine_Query::create(); 
    1513 
    16 // Doctrine uses 'connection 1' for fetching here 
     14// Doctrine nutzt 'connection 1' zum Zugriff 
    1715$users = $q->from('User u')->where('u.id IN (1,2,3)')->execute(); 
    1816 
    19 // Doctrine uses 'connection 2' for fetching here 
     17// Doctrine nutzt 'connection 2' zum Zugriff 
    2018$groups = $q->from('Group g')->where('g.id IN (1,2,3)')->execute(); 
    2119</code> 
  • branches/1.0/docs/manual/de/connection-management/dsn-the-data-source-name.txt

    r4674 r4695  
    1 In order to connect to a database through Doctrine, you have to create a valid DSN - data source name.  
     1Um eine DB-Verbindung mit Doctrine herzustellen, benutzen Sie einen g�n DSN  - data source name (Name der Datenquelle). 
     2Doctrine unterst�owohl PEAR/DB/MDB2 als auch PDO DSN. Wenn Sie mehr zu PDO DSN wissen m�en, lesen Sie [[php PDO->__construct()]]. 
     3  
     4Ein DSN besteht aus folgenden Teilen 
    25 
    3 Doctrine supports both PEAR DB/MDB2 like data source names as well as PDO style data source names. The following  
    4 section deals with PEAR like data source names. If you need more info about the PDO-style data source names see  
    5 [[php PDO->__construct()]]. 
     6||~ DSN Teil   ||~ Beschreibung || 
     7||  phptype    ||  von PHP benutzte DB (z.B. mysql , pgsql etc.) || 
     8||  dbsyntax   ||  verwendete Datenbaksyntax im Bezug auf SQL Syntax etc. || 
     9||  protocol   ||  �ertragunsprotokoll ( z.B. tcp, unix etc.) || 
     10||  hostspec   ||  Hostrechner (z.B. localhost)(Hostname[:Port]) || 
     11||  database   ||  Name der Dantenbank auf dem DBMS Server || 
     12||  username   ||  Username f�in || 
     13||  password   ||  Passwort f�in || 
     14||  proto_opts ||  Kann zusammen mit protocol benutzt werden|| 
     15||  option     ||  Zus�liche Verbindungsoptionen angeh�t im URL-Query String Format (Key/Value Paare getrennt mit &). Die folgende Tabelle zeigt eine unvollst�ige Auswahl an Optionen: || 
    616 
    7 The DSN consists in the following parts: 
     17**Optionsliste** 
    818 
    9 ||~ DSN part   ||~ Description || 
    10 ||  phptype    ||  Database backend used in PHP (i.e. mysql , pgsql etc.) || 
    11 ||  dbsyntax   ||  Database used with regards to SQL syntax etc. || 
    12 ||  protocol   ||  Communication protocol to use ( i.e. tcp, unix etc.) || 
    13 ||  hostspec   ||  Host specification (hostname[:port]) || 
    14 ||  database   ||  Database to use on the DBMS server || 
    15 ||  username   ||  User name for login || 
    16 ||  password   ||  Password for login || 
    17 ||  proto_opts ||  Maybe used with protocol || 
    18 ||  option     ||  Additional connection options in URI query string format. Options are separated by ampersand  
    19 (&). The Following table shows a non complete list of options: || 
     19||~ Name     ||~ Beschreibung || 
     20||  charset  ||  Einige Backends unterst�das Setzen des Client Zeichensatzes.|| 
     21||  new_link ||  Einige RDBMS erzeugen keine neuen Verbindungen, wenn sie mehrfach mit dem gleichen Host verbinden. Diese Option versucht, immer eine neue Verbindung zu erzwingen. || 
    2022 
    21  
    22 **List of options** 
    23  
    24 ||~ Name     ||~ Description || 
    25 ||  charset  ||  Some backends support setting the client charset.|| 
    26 ||  new_link ||  Some RDBMS do not create new connections when connecting to the same host multiple times. This option  
    27 will attempt to force a new connection. || 
    28  
    29 The DSN can either be provided as an associative array or as a string. The string format of the supplied DSN is in its  
    30 fullest form: 
     23Der DSN kann entweder als assoziatives Array oder als String �ben werden. Die komplette Variante des String-Formats sieht so aus: 
    3124 
    3225<code>phptype(dbsyntax)://username:password@protocol+hostspec/database?option=value</code> 
    3326 
    34 Most variations are allowed: 
     27Die meisten Schreibweisen werden unterst�z.B.: 
    3528 
    3629<code> 
     
    4740</code> 
    4841 
    49 The currently supported database backends are:  
    50  
    51 ||~ Driver name ||~ Supported databases || 
     42Zur Zeit werden folgende DB-Systeme unterst� 
     43||~ Treibername ||~ Unerst�Datenbank || 
    5244||  fbsql       ||  FrontBase || 
    53 ||  ibase       ||  InterBase / Firebird (requires PHP 5) || 
    54 ||  mssql       ||  Microsoft SQL Server (NOT for Sybase. Compile PHP --with-mssql) || 
     45||  ibase       ||  InterBase / Firebird (ben�t PHP 5) || 
     46||  mssql       ||  Microsoft SQL Server (NICHT f�ase. Compile PHP --with-mssql) || 
    5547||  mysql       ||  MySQL || 
    56 ||  mysqli      ||  MySQL (supports new authentication protocol) (requires PHP 5) || 
     48||  mysqli      ||  MySQL (unterst�neues Authentication Protokoll) (ben�t PHP 5) || 
    5749||  oci8        ||  Oracle 7/8/9/10    || 
    5850||  pgsql       ||  PostgreSQL  || 
     
    6052||  sqlite      ||  SQLite 2 || 
    6153 
    62 A second DSN format supported is 
     54Ein zweites unterst� DSN Format ist: 
    6355 
    6456<code> 
     
    6658</code> 
    6759 
    68 If your database, option values, username or password contain characters used to delineate DSN parts, you can escape  
    69 them via URI hex encodings:   
     60Wenn der Datenbankname, die Option Parameter, der Username oder das Passwort Zeichen enthalten, die zur Kennzeichnung von DSN Teilen reserviert sind, k�n Sie diese durch die entsprechenden URI Hexadezimal-Codes ersetzen: 
    7061 
    71 ||~ Character ||~ Hex Code || 
     62||~ Zeichen  ||~ Hex Code || 
    7263|| :          ||  %3a      || 
    7364|| /          ||  %2f      ||  
     
    8071|| &          ||  %26      ||  
    8172 
    82 Warning  
    83 Please note, that some features may be not supported by all database backends.  
     73Warnung  
     74Bitte beachten Sie, dass einige Features nicht von allen Datenbanksystemen unterst�erden.  
    8475  
    8576 
    86 +++ Examples 
     77+++ Beispiele 
    8778 
    88 **Example 1.** Connect to database through a socket 
     79**Bespiel 1.** Verbindung zur Datenbank mit einer Socket-Connection 
    8980 
    9081<code> 
     
    9283</code> 
    9384 
    94 **Example 2.** Connect to database on a non standard port 
     85**Bespiel 2.** Verbindung zur Datenbank �inen Nicht-Standard-Port 
    9586 
    9687<code> 
     
    9889</code> 
    9990 
    100 **Example 3.** Connect to SQLite on a Unix machine using options 
     91**Bespiel 3.** Verbindung mit SQLite auf einem Unix Server mit zus�liche Parameters (options) 
    10192 
    10293<code> 
     
    10495</code> 
    10596 
    106 **Example 4.** Connect to SQLite on a Windows machine using options 
     97**Bespiel 4.** Verbindung mit SQLite auf einem Windows Server mit zus�liche Parameters (options) 
    10798 
    10899<code> 
     
    110101</code> 
    111102 
    112 **Example 5.** Connect to MySQLi using SSL 
     103**Bespiel 5.** Verbingung mit MySQLi �SL 
    113104 
    114105<code> 
  • branches/1.0/docs/manual/de/connection-management/lazy-connecting-to-database.txt

    r4674 r4695  
    1 Lazy-connecting to database can save a lot of resources. There might be many pages where you don't need an actual  
    2 database connection, hence its always recommended to use lazy-connecting (that means Doctrine will only connect to  
    3 database when needed). 
     1Lazy-Connecting zur Datenbank kann viele Systemresourcen sparen. Oftmals wird auf vielen Seiten keine DB-Verbindung gebraucht. Deshalb sollten Sie immer Lazy-Connecting benutzen. So stellt Doctrine nur dann eine DB-Verbindung her, wenn diese auch wirklich ben�t wird. 
    42 
    5 This feature can be very useful when using for example page caching, hence not actually needing a database connection  
    6 on every request. Remember connecting to database is an expensive operation. 
     3Diese Funktion kann z.B. dann sehr sinnvoll sein, wenn Sie komplette Seiten cachen, denn dann brauchen Sie die Datenbankverbindung nicht. Denken Sie immer daran, dass das Verbinden mit der Datenbank ein sehr resourcenintensiver Vorgang ist. 
    74 
    85<code type="php"> 
    9 // initalize a new Doctrine_Connection 
     6// neues Doctrine_Connection Objekt erzeugen 
    107$conn = Doctrine_Manager::connection('mysql://username:password@localhost/test'); 
    118// !! no actual database connection yet !! 
    129 
    13 // connects database and performs a query 
     10// stellt die Verbindung zur Datenbank her und f�ine Anfrage aus 
    1411$users = Doctrine_Query::create() 
    1512          ->from('User u') 
  • branches/1.0/docs/manual/de/connection-management/managing-connections.txt

    r4674 r4695  
    1 From the start Doctrine has been designed to work with multiple connections. Unless separately specified Doctrine always  
    2 uses the current connection for executing the queries. The following example uses {{openConnection()}} second argument as  
    3 an optional connection alias. 
     1Von Beginn an wurde Doctrine so entworfen, dass es mit mehreren DB-Verbindungen arbeitet. Au�r Sie geben die Verbindung explizit an, benutzt Doctrine immer die dezeit aktuelle Verbindung f�ragen.  
     2Das folgende Bespiel zeigt, wie man eine optionale DB-Verbindung als 2. Funktionsparameter {{openConnection()}} �bt: 
    43 
    54<code type="php"> 
    6 // Doctrine_Manager controls all the connections 
     5// Doctrine_Manager verwaltet alle Verbindungen 
    76 
    87$manager = Doctrine_Manager::getInstance(); 
    98 
    10 // open first connection 
     9// erste Verbindung �en 
    1110  
    1211$conn = $manager->openConnection('mysql://username:password@localhost/test', 'connection 1'); 
    1312</code> 
    1413 
    15 For convenience {{Doctrine_Manager}} provides static method {{connection()}} which opens new connection when arguments  
    16 are given to it and returns the current connection when no arguments have been speficied. 
    17  
    18 <code type="php"> 
    19 // open first connection 
     14Zur Vereinfachung stellt {{Doctrine_Manager}} die statische Methode {{connection()}} bereit. Beim Aufruf mit Parametern �et sie eine neue Verbindung, ohne Parameter liefert sie die aktuelle Vebindung zur�<code type="php"> 
     15// erste Verbindung �en 
    2016  
    2117$conn = Doctrine_Manager::connection('mysql://username:password@localhost/test', 'connection 1'); 
     
    2622</code> 
    2723 
    28 The current connection is the lastly opened connection.  
     24Die aktuelle Verbindung ist immer die zuletzt ge�ete. 
     25 
    2926 
    3027<code type="php"> 
    31 // open second connection 
     28// zweite Verbindung �en 
    3229 
    3330$conn2 = $manager->openConnection('mysql://username2:password2@localhost/test2', 'connection 2'); 
     
    3633</code> 
    3734 
    38 You can change the current connection by calling {{setCurrentConnection()}}.  
    39  
     35�dern Sie die benutzte Verbindung durch Aufrufen von {{setCurrentConnection()}}. 
    4036<code type="php"> 
    4137$manager->setCurrentConnection('connection 1'); 
     
    4440</code> 
    4541 
    46 You can iterate over the opened connection by simple passing the manager object to foreach clause. This is possible  
    47 since {{Doctrine_Manager}} implements special {{IteratorAggregate}} interface. 
     42 
     43Da {{Doctrine_Manager}} das {{IteratorAggregate}} Interface implementiert, k�n sie ganz einfach mit foreach �as Manager Objekt iterieren, um auf die ge�eten Verbindungen zuzugreifen: 
    4844 
    4945<code type="php"> 
  • branches/1.0/docs/manual/de/connection-management/opening-a-new-connection.txt

    r4674 r4695  
    1 Opening a new database connection in Doctrine is very easy. If you wish to use PDO (www.php.net/PDO) you can just  
    2 initalize a new PDO object: 
     1Eine neue Datenbankverbindung mit Doctrine herzustellen ist sehr einfach. 
     2Wenn Sie PDO (www.php.net/PDO) benutzen wollen, erzeugen Sie einfach ein neues PDO Objekt: 
    33 
    44<code type="php"> 
     
    1515</code> 
    1616 
    17 Note: Directly passing a PDO instance to Doctrine_Manager::connection() will not allow Doctrine to be aware of the username  
    18 and password for the connection, since their is no way to retrieve it from an existing PDO instance. The username and password  
    19 is required in order for Doctrine to be able to create and drop databases. To get around this you can manually set the  
    20 username and password option directly on the $conn object. 
     17Anmerkung: Wenn Sie eine PDO Instanz direkt an Doctrine_Manager::connection() �ben, kennt Doctrine den Usernamen/Passwort der Verbindung nicht, da sich diese Informationen nicht aus einer bestehenden PDO Instanz auslesen lassen. Username und Passwort werden von Doctrine aber ben�t, um Datenbanken zu erzeugen und zu l�en. 
     18Dieses Problem k�n Sie umgehen, indem sie dem $conn Objekt manuell Username und Passwort zuweisen. 
    2119 
    2220<code type="php">