Zend_Db_Table_Row.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- EN-Revision: 19484 -->
  3. <!-- Reviewed: no -->
  4. <sect1 id="zend.db.table.row">
  5. <title>Zend_Db_Table_Row</title>
  6. <sect2 id="zend.db.table.row.introduction">
  7. <title>Introducción</title>
  8. <para>
  9. <classname>Zend_Db_Table_Row</classname>
  10. is a class that contains an
  11. individual row of a
  12. <classname>Zend_Db_Table</classname>
  13. object.
  14. When you run a query against a Table class, the result is returned
  15. in a set of
  16. <classname>Zend_Db_Table_Row</classname>
  17. objects. You
  18. can also use this object to create new rows and add them to the
  19. database
  20. table.
  21. </para>
  22. <para>
  23. <classname>Zend_Db_Table_Row</classname>
  24. is an implementation of the
  25. <ulink url="http://www.martinfowler.com/eaaCatalog/rowDataGateway.html">Row Data
  26. Gateway</ulink>
  27. pattern.
  28. </para>
  29. </sect2>
  30. <sect2 id="zend.db.table.row.read">
  31. <title>Fetching a Row</title>
  32. <para>
  33. <classname>Zend_Db_Table_Abstract</classname>
  34. provides methods
  35. <methodname>find()</methodname>
  36. and
  37. <methodname>fetchAll()</methodname>
  38. , which each return an object
  39. of type
  40. <classname>Zend_Db_Table_Rowset</classname>
  41. , and the method
  42. <methodname>fetchRow()</methodname>
  43. , which returns an object of
  44. type
  45. <classname>Zend_Db_Table_Row</classname>
  46. .
  47. </para>
  48. <example id="zend.db.table.row.read.example">
  49. <title>Example of fetching a row</title>
  50. <programlisting language="php"><![CDATA[
  51. $bugs = new Bugs();
  52. $row = $bugs->fetchRow($bugs->select()->where('bug_id = ?', 1));
  53. ]]></programlisting>
  54. </example>
  55. <para>
  56. A
  57. <classname>Zend_Db_Table_Rowset</classname>
  58. object contains a
  59. collection of
  60. <classname>Zend_Db_Table_Row</classname>
  61. objects. See
  62. <xref linkend="zend.db.table.rowset"/>
  63. .
  64. </para>
  65. <example id="zend.db.table.row.read.example-rowset">
  66. <title>Example of reading a row in a rowset</title>
  67. <programlisting language="php"><![CDATA[
  68. $bugs = new Bugs();
  69. $rowset = $bugs->fetchAll($bugs->select()->where('bug_status = ?', 1));
  70. $row = $rowset->current();
  71. ]]></programlisting>
  72. </example>
  73. <sect3 id="zend.db.table.row.read.get">
  74. <title>Reading column values from a row</title>
  75. <para>
  76. <classname>Zend_Db_Table_Row_Abstract</classname>
  77. provides
  78. accessor methods so you can reference columns in the row as
  79. object
  80. properties.
  81. </para>
  82. <example id="zend.db.table.row.read.get.example">
  83. <title>Example of reading a column in a row</title>
  84. <programlisting language="php"><![CDATA[
  85. $bugs = new Bugs();
  86. $row = $bugs->fetchRow($bugs->select()->where('bug_id = ?', 1));
  87. // Echo the value of the bug_description column
  88. echo $row->bug_description;
  89. ]]></programlisting>
  90. </example>
  91. <note>
  92. <para>
  93. Earlier versions of
  94. <classname>Zend_Db_Table_Row</classname>
  95. mapped these
  96. column accessors to the database column names using a string
  97. transformation called
  98. <emphasis>inflection</emphasis>
  99. .
  100. </para>
  101. <para>
  102. Currently,
  103. <classname>Zend_Db_Table_Row</classname>
  104. does
  105. not implement inflection. Accessed property names need to
  106. match the spelling
  107. of the column names as they appear in
  108. your database.
  109. </para>
  110. </note>
  111. </sect3>
  112. <sect3 id="zend.db.table.row.read.to-array">
  113. <title>Retrieving Row Data as an Array</title>
  114. <para>
  115. You can access the row's data as an array using the
  116. <methodname>toArray()</methodname>
  117. method of the Row object.
  118. This returns an associative array of the column names to
  119. the
  120. column values.
  121. </para>
  122. <example id="zend.db.table.row.read.to-array.example">
  123. <title>Example of using the toArray() method</title>
  124. <programlisting language="php"><![CDATA[
  125. $bugs = new Bugs();
  126. $row = $bugs->fetchRow($bugs->select()->where('bug_id = ?', 1));
  127. // Get the column/value associative array from the Row object
  128. $rowArray = $row->toArray();
  129. // Now use it as a normal array
  130. foreach ($rowArray as $column => $value) {
  131. echo "Column: $column\n";
  132. echo "Value: $value\n";
  133. }
  134. ]]></programlisting>
  135. </example>
  136. <para>
  137. The array returned from
  138. <methodname>toArray()</methodname>
  139. is
  140. not updateable. You can modify values in the array as you can
  141. with any array, but
  142. you cannot save changes to this array to the
  143. database directly.
  144. </para>
  145. </sect3>
  146. <sect3 id="zend.db.table.row.read.relationships">
  147. <title>Fetching data from related tables</title>
  148. <para>
  149. The
  150. <classname>Zend_Db_Table_Row_Abstract</classname>
  151. class
  152. provides methods for fetching rows and rowsets from related
  153. tables. See
  154. <xref linkend="zend.db.table.relationships"/>
  155. for
  156. more information on table relationships.
  157. </para>
  158. </sect3>
  159. </sect2>
  160. <sect2 id="zend.db.table.row.write">
  161. <title>Writing rows to the database</title>
  162. <sect3 id="zend.db.table.row.write.set">
  163. <title>Changing column values in a row</title>
  164. <para>You can set individual column values using column accessors,
  165. similar to how the
  166. columns are read as object properties in the
  167. example above.</para>
  168. <para>
  169. Using a column accessor to set a value changes the column
  170. value of the row object in
  171. your application, but it does not
  172. commit the change to the database yet. You can do
  173. that with the
  174. <methodname>save()</methodname>
  175. method.
  176. </para>
  177. <example id="zend.db.table.row.write.set.example">
  178. <title>Example of changing a column in a row</title>
  179. <programlisting language="php"><![CDATA[
  180. $bugs = new Bugs();
  181. $row = $bugs->fetchRow($bugs->select()->where('bug_id = ?', 1));
  182. // Change the value of one or more columns
  183. $row->bug_status = 'FIXED';
  184. // UPDATE the row in the database with new values
  185. $row->save();
  186. ]]></programlisting>
  187. </example>
  188. </sect3>
  189. <sect3 id="zend.db.table.row.write.insert">
  190. <title>Inserting a new row</title>
  191. <para>
  192. You can create a new row for a given table with the
  193. <methodname>createRow()</methodname>
  194. method of the table
  195. class. You can access fields of this row with the
  196. object-oriented
  197. interface, but the row is not stored in the
  198. database until you call the
  199. <methodname>save()</methodname>
  200. method.
  201. </para>
  202. <example id="zend.db.table.row.write.insert.example">
  203. <title>Example of creating a new row for a table</title>
  204. <programlisting language="php"><![CDATA[
  205. $bugs = new Bugs();
  206. $newRow = $bugs->createRow();
  207. // Set column values as appropriate for your application
  208. $newRow->bug_description = '...description...';
  209. $newRow->bug_status = 'NEW';
  210. // INSERT the new row to the database
  211. $newRow->save();
  212. ]]></programlisting>
  213. </example>
  214. <para>The optional argument to the createRow() method is an
  215. associative array, with which
  216. you can populate fields of the new
  217. row.</para>
  218. <example id="zend.db.table.row.write.insert.example2">
  219. <title>Example of populating a new row for a table</title>
  220. <programlisting language="php"><![CDATA[
  221. $data = array(
  222. 'bug_description' => '...description...',
  223. 'bug_status' => 'NEW'
  224. );
  225. $bugs = new Bugs();
  226. $newRow = $bugs->createRow($data);
  227. // INSERT the new row to the database
  228. $newRow->save();
  229. ]]></programlisting>
  230. </example>
  231. <note>
  232. <para>
  233. The
  234. <methodname>createRow()</methodname>
  235. method was
  236. called
  237. <methodname>fetchNew()</methodname>
  238. in earlier
  239. releases of
  240. <classname>Zend_Db_Table</classname>
  241. . You are
  242. encouraged to use the new method name, even though the old
  243. name
  244. continues to work for the sake of backward
  245. compatibility.
  246. </para>
  247. </note>
  248. </sect3>
  249. <sect3 id="zend.db.table.row.write.set-from-array">
  250. <title>Changing values in multiple columns</title>
  251. <para>
  252. <classname>Zend_Db_Table_Row_Abstract</classname>
  253. provides the
  254. <methodname>setFromArray()</methodname>
  255. method to enable you
  256. to set several columns in a single row at once, specified in an
  257. associative array that maps the column names to values. You may
  258. find this method
  259. convenient for setting values both for new rows
  260. and for rows you need to update.
  261. </para>
  262. <example id="zend.db.table.row.write.set-from-array.example">
  263. <title>Example of using setFromArray() to set values in a new
  264. Row</title>
  265. <programlisting language="php"><![CDATA[
  266. $bugs = new Bugs();
  267. $newRow = $bugs->createRow();
  268. // Data are arranged in an associative array
  269. $data = array(
  270. 'bug_description' => '...description...',
  271. 'bug_status' => 'NEW'
  272. );
  273. // Set all the column values at once
  274. $newRow->setFromArray($data);
  275. // INSERT the new row to the database
  276. $newRow->save();
  277. ]]></programlisting>
  278. </example>
  279. </sect3>
  280. <sect3 id="zend.db.table.row.write.delete">
  281. <title>Deleting a row</title>
  282. <para>
  283. You can call the
  284. <methodname>delete()</methodname>
  285. method on
  286. a Row object. This deletes rows in the database matching the
  287. primary key in
  288. the Row object.
  289. </para>
  290. <example id="zend.db.table.row.write.delete.example">
  291. <title>Example of deleting a row</title>
  292. <programlisting language="php"><![CDATA[
  293. $bugs = new Bugs();
  294. $row = $bugs->fetchRow('bug_id = 1');
  295. // DELETE this row
  296. $row->delete();
  297. ]]></programlisting>
  298. </example>
  299. <para>
  300. You do not have to call
  301. <methodname>save()</methodname>
  302. to
  303. apply the delete; it is executed against the database
  304. immediately.
  305. </para>
  306. </sect3>
  307. </sect2>
  308. <sect2 id="zend.db.table.row.serialize">
  309. <title>Serializing and unserializing rows</title>
  310. <para>
  311. It is often convenient to save the contents of a database row to
  312. be used later.
  313. <emphasis>Serialization</emphasis>
  314. is the name for
  315. the operation that converts an object into a form that is easy to
  316. save in
  317. offline storage (for example, a file). Objects of type
  318. <classname>Zend_Db_Table_Row_Abstract</classname>
  319. are
  320. serializable.
  321. </para>
  322. <sect3 id="zend.db.table.row.serialize.serializing">
  323. <title>Serializing a Row</title>
  324. <para>
  325. Simply use
  326. <acronym>PHP</acronym>
  327. 's
  328. <methodname>serialize()</methodname>
  329. function to create a
  330. string containing a byte-stream representation of the Row object
  331. argument.
  332. </para>
  333. <example id="zend.db.table.row.serialize.serializing.example">
  334. <title>Example of serializing a row</title>
  335. <programlisting language="php"><![CDATA[
  336. $bugs = new Bugs();
  337. $row = $bugs->fetchRow('bug_id = 1');
  338. // Convert object to serialized form
  339. $serializedRow = serialize($row);
  340. // Now you can write $serializedRow to a file, etc.
  341. ]]></programlisting>
  342. </example>
  343. </sect3>
  344. <sect3 id="zend.db.table.row.serialize.unserializing">
  345. <title>Unserializing Row Data</title>
  346. <para>
  347. Use PHP's
  348. <methodname>unserialize()</methodname>
  349. function to
  350. restore a string containing a byte-stream representation of an
  351. object. The
  352. function returns the original object.
  353. </para>
  354. <para>
  355. Note that the Row object returned is in a
  356. <emphasis>disconnected</emphasis>
  357. state. You can read the
  358. Row object and its properties, but you cannot change values
  359. in
  360. the Row or execute other methods that require a database
  361. connection (for example,
  362. queries against related tables).
  363. </para>
  364. <example id="zend.db.table.row.serialize.unserializing.example">
  365. <title>Example of unserializing a serialized row</title>
  366. <programlisting language="php"><![CDATA[
  367. $rowClone = unserialize($serializedRow);
  368. // Now you can use object properties, but read-only
  369. echo $rowClone->bug_description;
  370. ]]></programlisting>
  371. </example>
  372. <note>
  373. <title>Why do Rows unserialize in a disconnected state?</title>
  374. <para>A serialized object is a string that is readable to
  375. anyone who possesses it. It
  376. could be a security risk to
  377. store parameters such as database account and
  378. password in
  379. plain, unencrypted text in the serialized string. You would
  380. not want
  381. to store such data to a text file that is not
  382. protected, or send it in an email
  383. or other medium that is
  384. easily read by potential attackers. The reader of the
  385. serialized object should not be able to use it to gain
  386. access to your database
  387. without knowing valid credentials.</para>
  388. </note>
  389. </sect3>
  390. <sect3 id="zend.db.table.row.serialize.set-table">
  391. <title>Reactivating a Row as Live Data</title>
  392. <para>
  393. You can reactivate a disconnected Row, using the
  394. <methodname>setTable()</methodname>
  395. method. The argument to
  396. this method is a valid object of type
  397. <classname>Zend_Db_Table_Abstract</classname>
  398. , which you
  399. create. Creating a Table object requires a live connection to
  400. the
  401. database, so by reassociating the Table with the Row, the
  402. Row gains access to the
  403. database. Subsequently, you can change
  404. values in the Row object and save the changes
  405. to the database.
  406. </para>
  407. <example id="zend.db.table.row.serialize.set-table.example">
  408. <title>Example of reactivating a row</title>
  409. <programlisting language="php"><![CDATA[
  410. $rowClone = unserialize($serializedRow);
  411. $bugs = new Bugs();
  412. // Reconnect the row to a table, and
  413. // thus to a live database connection
  414. $rowClone->setTable($bugs);
  415. // Now you can make changes to the row and save them
  416. $rowClone->bug_status = 'FIXED';
  417. $rowClone->save();
  418. ]]></programlisting>
  419. </example>
  420. </sect3>
  421. </sect2>
  422. <sect2 id="zend.db.table.row.extending">
  423. <title>Extending the Row class</title>
  424. <para>
  425. <classname>Zend_Db_Table_Row</classname>
  426. is the default concrete
  427. class that extends
  428. <classname>Zend_Db_Table_Row_Abstract</classname>
  429. . You can define
  430. your own concrete class for instances of Row by extending
  431. <classname>Zend_Db_Table_Row_Abstract</classname>
  432. . To use your
  433. new Row class to store results of Table queries, specify the custom
  434. Row
  435. class by name either in the
  436. <varname>$_rowClass</varname>
  437. protected member of a Table class, or in the array argument of the
  438. constructor of a Table
  439. object.
  440. </para>
  441. <example id="zend.db.table.row.extending.example">
  442. <title>Specifying a custom Row class</title>
  443. <programlisting language="php"><![CDATA[
  444. class MyRow extends Zend_Db_Table_Row_Abstract
  445. {
  446. // ...customizations
  447. }
  448. // Specify a custom Row to be used by default
  449. // in all instances of a Table class.
  450. class Products extends Zend_Db_Table_Abstract
  451. {
  452. protected $_name = 'products';
  453. protected $_rowClass = 'MyRow';
  454. }
  455. // Or specify a custom Row to be used in one
  456. // instance of a Table class.
  457. $bugs = new Bugs(array('rowClass' => 'MyRow'));
  458. ]]></programlisting>
  459. </example>
  460. <sect3 id="zend.db.table.row.extending.overriding">
  461. <title>Row initialization</title>
  462. <para>
  463. If application-specific logic needs to be initialized when a
  464. row is constructed, you
  465. can select to move your tasks to the
  466. <methodname>init()</methodname>
  467. method, which is called
  468. after all row metadata has been processed. This is
  469. recommended
  470. over the
  471. <methodname>__construct</methodname>
  472. method if you do
  473. not need to alter the metadata in any programmatic way.
  474. <example id="zend.db.table.row.init.usage.example">
  475. <title>Example usage of init() method</title>
  476. <programlisting language="php"><![CDATA[
  477. class MyApplicationRow extends Zend_Db_Table_Row_Abstract
  478. {
  479. protected $_role;
  480. public function init()
  481. {
  482. $this->_role = new MyRoleClass();
  483. }
  484. }
  485. ]]></programlisting>
  486. </example>
  487. </para>
  488. </sect3>
  489. <sect3 id="zend.db.table.row.extending.insert-update">
  490. <title>Defining Custom Logic for Insert, Update, and Delete in
  491. Zend_Db_Table_Row</title>
  492. <para>
  493. The Row class calls protected methods
  494. <methodname>_insert()</methodname>
  495. ,
  496. <methodname>_update()</methodname>
  497. , and
  498. <methodname>_delete()</methodname>
  499. before performing the
  500. corresponding operations
  501. <methodname>INSERT</methodname>
  502. ,
  503. <methodname>UPDATE</methodname>
  504. , and
  505. <methodname>DELETE</methodname>
  506. . You can add logic to these
  507. methods in your custom Row subclass.
  508. </para>
  509. <para>
  510. If you need to do custom logic in a specific table, and the
  511. custom logic must occur
  512. for every operation on that table, it
  513. may make more sense to implement your custom
  514. code in the
  515. <methodname>insert()</methodname>
  516. ,
  517. <methodname>update()</methodname>
  518. and
  519. <methodname>delete()</methodname>
  520. methods of your Table
  521. class. However, sometimes it may be necessary to do custom
  522. logic
  523. in the Row class.
  524. </para>
  525. <para>Below are some example cases where it might make sense to
  526. implement custom logic in
  527. a Row class instead of in the Table
  528. class:</para>
  529. <example id="zend.db.table.row.extending.overriding-example1">
  530. <title>Example of custom logic in a Row class</title>
  531. <para>The custom logic may not apply in all cases of operations
  532. on the respective
  533. Table. You can provide custom logic on
  534. demand by implementing it in a Row class
  535. and creating an
  536. instance of the Table class with that custom Row class
  537. specified.
  538. Otherwise, the Table uses the default Row class.</para>
  539. <para>
  540. You need data operations on this table to record the
  541. operation to a
  542. <classname>Zend_Log</classname>
  543. object, but
  544. only if the application configuration has enabled this
  545. behavior.
  546. </para>
  547. <programlisting language="php"><![CDATA[
  548. class MyLoggingRow extends Zend_Db_Table_Row_Abstract
  549. {
  550. protected function _insert()
  551. {
  552. $log = Zend_Registry::get('database_log');
  553. $log->info(Zend_Debug::dump($this->_data,
  554. "INSERT: $this->_tableClass",
  555. false)
  556. );
  557. }
  558. }
  559. // $loggingEnabled is an example property that depends
  560. // on your application configuration
  561. if ($loggingEnabled) {
  562. $bugs = new Bugs(array('rowClass' => 'MyLoggingRow'));
  563. } else {
  564. $bugs = new Bugs();
  565. }
  566. ]]></programlisting>
  567. </example>
  568. <example id="zend.db.table.row.extending.overriding-example2">
  569. <title>Example of a Row class that logs insert data for multiple
  570. tables</title>
  571. <para>The custom logic may be common to multiple tables.
  572. Instead of implementing the
  573. same custom logic in every one
  574. of your Table classes, you can implement the code
  575. for such
  576. actions in the definition of a Row class, and use this Row
  577. in each of
  578. your Table classes.</para>
  579. <para>In this example, the logging code is identical in all
  580. table classes.</para>
  581. <programlisting language="php"><![CDATA[
  582. class MyLoggingRow extends Zend_Db_Table_Row_Abstract
  583. {
  584. protected function _insert()
  585. {
  586. $log = Zend_Registry::get('database_log');
  587. $log->info(Zend_Debug::dump($this->_data,
  588. "INSERT: $this->_tableClass",
  589. false)
  590. );
  591. }
  592. }
  593. class Bugs extends Zend_Db_Table_Abstract
  594. {
  595. protected $_name = 'bugs';
  596. protected $_rowClass = 'MyLoggingRow';
  597. }
  598. class Products extends Zend_Db_Table_Abstract
  599. {
  600. protected $_name = 'products';
  601. protected $_rowClass = 'MyLoggingRow';
  602. }
  603. ]]></programlisting>
  604. </example>
  605. </sect3>
  606. <sect3 id="zend.db.table.row.extending.inflection">
  607. <title>Define Inflection in Zend_Db_Table_Row</title>
  608. <para>
  609. Some people prefer that the table class name match a table
  610. name in the
  611. <acronym>RDBMS</acronym>
  612. by using a string
  613. transformation called
  614. <emphasis>inflection</emphasis>
  615. .
  616. </para>
  617. <para>
  618. <classname>Zend_Db</classname>
  619. classes do not implement
  620. inflection by default. See
  621. <xref linkend="zend.db.table.extending.inflection"/>
  622. for an
  623. explanation of this policy.
  624. </para>
  625. <para>
  626. If you prefer to use inflection, then you must implement the
  627. transformation yourself,
  628. by overriding the
  629. <methodname>_transformColumn()</methodname>
  630. method in a
  631. custom Row class, and using that custom Row class when you
  632. perform queries
  633. against your Table class.
  634. </para>
  635. <example id="zend.db.table.row.extending.inflection.example">
  636. <title>Example of defining an inflection transformation</title>
  637. <para>
  638. This allows you to use an inflected version of the column
  639. name in the accessors.
  640. The Row class uses the
  641. <methodname>_transformColumn()</methodname>
  642. method to
  643. change the name you use to the native column name in the
  644. database table.
  645. </para>
  646. <programlisting language="php"><![CDATA[
  647. class MyInflectedRow extends Zend_Db_Table_Row_Abstract
  648. {
  649. protected function _transformColumn($columnName)
  650. {
  651. $nativeColumnName = myCustomInflector($columnName);
  652. return $nativeColumnName;
  653. }
  654. }
  655. class Bugs extends Zend_Db_Table_Abstract
  656. {
  657. protected $_name = 'bugs';
  658. protected $_rowClass = 'MyInflectedRow';
  659. }
  660. $bugs = new Bugs();
  661. $row = $bugs->fetchNew();
  662. // Use camelcase column names, and rely on the
  663. // transformation function to change it into the
  664. // native representation.
  665. $row->bugDescription = 'New description';
  666. ]]></programlisting>
  667. </example>
  668. <para>You are responsible for writing the functions to perform
  669. inflection transformation.
  670. Zend Framework does not provide such
  671. a function.</para>
  672. </sect3>
  673. </sect2>
  674. </sect1>