瀏覽代碼

[DOCUMENTATION] English:
- fix line length in programlisting

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17054 44c647ce-9c0f-0410-b52a-842ac1e357ba

mikaelkael 16 年之前
父節點
當前提交
086946fa65

+ 2 - 1
documentation/manual/en/module_specs/Zend_Db_Table.xml

@@ -1163,7 +1163,8 @@ $rows = $table->fetchAll($select);
                 <programlisting language="php"><![CDATA[
 $table = new Bugs();
 
-$select = $table->select(Zend_Db_Table::SELECT_WITH_FROM_PART)->setIntegrityCheck(false);
+$select = $table->select(Zend_Db_Table::SELECT_WITH_FROM_PART)
+                ->setIntegrityCheck(false);
 $select->where('bug_status = ?', 'NEW')
        ->join('accounts',
               'accounts.account_name = bugs.reported_by',

+ 16 - 4
documentation/manual/en/module_specs/Zend_Db_Table_Definition.xml

@@ -99,12 +99,18 @@ $authorTable = new Zend_Db_Table('author', $definition);
 $authors = $authorTable->fetchAll();
 
 foreach ($authors as $author) {
-    echo $author->id . ': ' . $author->first_name . ' ' . $author->last_name . PHP_EOL;
+    echo $author->id
+       . ': '
+       . $author->first_name
+       . ' '
+       . $author->last_name
+       . PHP_EOL;
     $books = $author->findDependentRowset('book');
     foreach ($books as $book) {
         echo '    Book: ' . $book->title . PHP_EOL;
         $genreOutputArray = array();
-        foreach ($book->findManyToManyRowset('genre', 'book_to_genre') as $genreRow) {
+        $genres = $book->findManyToManyRowset('genre', 'book_to_genre');
+        foreach ($genres as $genreRow) {
             $genreOutputArray[] = $genreRow->name;
         }
         echo '        Genre: ' . implode(', ', $genreOutputArray) . PHP_EOL;
@@ -179,12 +185,18 @@ $authorTable = new Zend_Db_Table('author', $definition);
 $authors = $authorTable->fetchAll();
 
 foreach ($authors as $author) {
-    echo $author->id . ': ' . $author->first_name . ' ' . $author->last_name . PHP_EOL;
+    echo $author->id
+       . ': '
+       . $author->first_name
+       . ' '
+       . $author->last_name
+       . PHP_EOL;
     $books = $author->findDependentRowset(new MyBook());
     foreach ($books as $book) {
         echo '    Book: ' . $book->title . PHP_EOL;
         $genreOutputArray = array();
-        foreach ($book->findManyToManyRowset('genre', 'book_to_genre') as $genreRow) {
+        $genres = $book->findManyToManyRowset('genre', 'book_to_genre');
+        foreach ($genres as $genreRow) {
             $genreOutputArray[] = $genreRow->name;
         }
         echo '        Genre: ' . implode(', ', $genreOutputArray) . PHP_EOL;

+ 2 - 1
documentation/manual/en/module_specs/Zend_Filter-RealPath.xml

@@ -38,7 +38,8 @@ $filter = new Zend_Filter_RealPath(false);
 $path   = '/www/var/path/../../non/existing/path';
 $filtered = $filter->filter($path);
 
-// returns '/www/non/existing/path' even when file_exists or realpath would return false
+// returns '/www/non/existing/path'
+// even when file_exists or realpath would return false
 ]]></programlisting>
 
 </sect2>

+ 13 - 4
documentation/manual/en/module_specs/Zend_Http_Client-Migration.xml

@@ -42,12 +42,21 @@
                 <programlisting language="php"><![CDATA[
 // Upload two files with the same form element name, as an array
 $client = new Zend_Http_Client();
-$client->setFileUpload('file1.txt', 'userfile[]', 'some raw data', 'text/plain');
-$client->setFileUpload('file2.txt', 'userfile[]', 'some other data', 'application/octet-stream');
+$client->setFileUpload('file1.txt',
+                       'userfile[]',
+                       'some raw data',
+                       'text/plain');
+$client->setFileUpload('file2.txt',
+                       'userfile[]',
+                       'some other data',
+                       'application/octet-stream');
 
-// In Zend Framework 1.8 or older, the value of the protected member $client->files is:
+// In Zend Framework 1.8 or older, the value of
+// the protected member $client->files is:
 // $client->files = array(
-//     'userfile[]' => array('file2.txt', 'application/octet-stream', 'some other data')
+//     'userfile[]' => array('file2.txt',
+                             'application/octet-stream',
+                             'some other data')
 // );
 
 // In Zend Framework 1.9 or newer, the value of $client->files is:

+ 9 - 5
documentation/manual/en/module_specs/Zend_Search_Lucene-Searching.xml

@@ -348,10 +348,13 @@ public function highlight($words, $colour = '#66ffff');
 /**
  * Highlight text using specified View helper or callback function.
  *
- * @param string|array $words  Words to highlight. Words could be organized using the array or string.
- * @param callback $callback   Callback method, used to transform (highlighting) text.
- * @param array    $params     Array of additionall callback parameters passed through into it
- *                             (first non-optional parameter is an HTML fragment for highlighting)
+ * @param string|array $words  Words to highlight. Words could be organized
+                               using the array or string.
+ * @param callback $callback   Callback method, used to transform
+                               (highlighting) text.
+ * @param array    $params     Array of additionall callback parameters passed
+                               through into it (first non-optional parameter
+                               is an HTML fragment for highlighting)
  * @return string
  * @throws Zend_Search_Lucene_Exception
  */
@@ -435,7 +438,8 @@ interface Zend_Search_Lucene_Search_Highlighter_Interface
     /**
      * Highlight specified words (method is invoked once per subquery)
      *
-     * @param string|array $words  Words to highlight. They could be organized using the array or string.
+     * @param string|array $words  Words to highlight. They could be
+                                   organized using the array or string.
      */
     public function highlight($words);
 }

+ 9 - 3
documentation/manual/en/module_specs/Zend_Test-PHPUnit-Db-Adapter.xml

@@ -50,9 +50,15 @@ $rs = $adapter->query('SELECT ...'); // Returns Statement 1
 
     <programlisting language="php"><![CDATA[
 $adapter = new Zend_Test_DbAdapter();
-$adapter->appendStatementToStack(Zend_Test_DbStatement::createInsertStatement(1));
-$adapter->appendStatementToStack(Zend_Test_DbStatement::createUpdateStatement(2));
-$adapter->appendStatementToStack(Zend_Test_DbStatement::createDeleteStatement(10));
+$adapter->appendStatementToStack(
+    Zend_Test_DbStatement::createInsertStatement(1)
+);
+$adapter->appendStatementToStack(
+    Zend_Test_DbStatement::createUpdateStatement(2)
+);
+$adapter->appendStatementToStack(
+    Zend_Test_DbStatement::createDeleteStatement(10
+));
 ]]></programlisting>
 
     <para>

+ 7 - 3
documentation/manual/en/module_specs/Zend_Test-PHPUnit-Db-Quickstart.xml

@@ -181,11 +181,14 @@ class BugsTest extends Zend_Test_PHPUnit_DatabaseTestCase
 
         $bugsTable->insert($data);
 
-        $ds = new Zend_Test_PHPUnit_Db_DataSet_QueryDataSet($this->getConnection());
+        $ds = new Zend_Test_PHPUnit_Db_DataSet_QueryDataSet(
+            $this->getConnection()
+        );
         $ds->addTable('zfbugs', 'SELECT * FROM zfbugs');
 
         $this->assertDataSetsEqual(
-            $this->createFlatXmlDataSet(dirname(__FILE__)."/_files/bugsInsertIntoAssertion.xml"),
+            $this->createFlatXmlDataSet(dirname(__FILE__)
+                                      . "/_files/bugsInsertIntoAssertion.xml"),
             $ds
         );
     }
@@ -237,7 +240,8 @@ class BugsTest extends Zend_Test_PHPUnit_DatabaseTestCase
         $ds->addTable($bugsTable);
 
         $this->assertDataSetsEqual(
-            $this->createFlatXmlDataSet(dirname(__FILE__)."/_files/bugsDeleteAssertion.xml"),
+            $this->createFlatXmlDataSet(dirname(__FILE__)
+                                      . "/_files/bugsDeleteAssertion.xml"),
             $ds
         );
     }

+ 6 - 4
documentation/manual/en/module_specs/Zend_Test-PHPUnit-Db-Testing.xml

@@ -222,12 +222,14 @@ class UserControllerTest extends Zend_Test_PHPUnit_ControllerTestCase
     public function setupDatabase()
     {
         $db = Zend_Db::factory(...);
-        $connection = Zend_Test_PHPUnit_Db_Connection($db, 'database_schema_name');
+        $connection = Zend_Test_PHPUnit_Db_Connection($db,
+                                                      'database_schema_name');
         $databaseTester = new Zend_Test_PHPUnit_Db_SimpleTester($connection);
 
-        $databaseFixture = new PHPUnit_Extensions_Database_DataSet_FlatXmlDataSet(
-            dirname(__FILE__) . '/_files/initialUserFixture.xml'
-        );
+        $databaseFixture =
+                    new PHPUnit_Extensions_Database_DataSet_FlatXmlDataSet(
+                        dirname(__FILE__) . '/_files/initialUserFixture.xml'
+                    );
 
         $databaseTester->setupDatabase($databaseFixture);
     }

+ 5 - 1
documentation/manual/en/module_specs/Zend_Translate-Plurals.xml

@@ -115,7 +115,11 @@ $translate->translate(array('Car', 'Cars', $number));
 
             <programlisting role="php"><![CDATA[
 $translate = new Zend_Translate('gettext', '/path/to/german.mo', 'de');
-$translate->translate(array('Car', 'Cars first plural', 'Cars second plural', $number, 'ru'));
+$translate->translate(array('Car',
+                            'Cars first plural',
+                            'Cars second plural',
+                            $number,
+                            'ru'));
 ]]></programlisting>
 
         </example>

+ 6 - 3
documentation/manual/en/module_specs/Zend_Validate-InArray.xml

@@ -18,7 +18,8 @@
         </para>
 
         <programlisting language="php"><![CDATA[
-$validator = new Zend_Validate_InArray(array('key' => 'value', 'otherkey' => 'othervalue'));
+$validator = new Zend_Validate_InArray(array('key' => 'value',
+                                             'otherkey' => 'othervalue'));
 if ($validator->isValid('value')) {
     // value found
 } else {
@@ -119,8 +120,10 @@ if ($validator->isValid('value')) {
 $validator = new Zend_Validate_InArray(
     array(
         'haystack' => array(
-            'firstDimension' => array('key' => 'value', 'otherkey' => 'othervalue'),
-            'secondDimension' => array('some' => 'real', 'different' => 'key')),
+            'firstDimension' => array('key' => 'value',
+                                      'otherkey' => 'othervalue'),
+            'secondDimension' => array('some' => 'real',
+                                       'different' => 'key')),
         'recursive' => true
     )
 );