|
@@ -48,7 +48,7 @@ $row = $bugs->fetchRow($bugs->select()->where('bug_id = ?', 1));
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
A <classname>Zend_Db_Table_Rowset</classname> object contains a collection of
|
|
A <classname>Zend_Db_Table_Rowset</classname> object contains a collection of
|
|
|
- <classname>Zend_Db_Table_Row</classname> objects. See <xref
|
|
|
|
|
|
|
+ <classname>Zend_Db_Table_Row</classname> objects. See <link
|
|
|
linkend="zend.db.table.rowset" />.
|
|
linkend="zend.db.table.rowset" />.
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
@@ -149,7 +149,7 @@ foreach ($rowArray as $column => $value) {
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
The <classname>Zend_Db_Table_Row_Abstract</classname> class provides methods for
|
|
The <classname>Zend_Db_Table_Row_Abstract</classname> class provides methods for
|
|
|
- fetching rows and rowsets from related tables. See <xref
|
|
|
|
|
|
|
+ fetching rows and rowsets from related tables. See <link
|
|
|
linkend="zend.db.table.relationships" /> for more information on table
|
|
linkend="zend.db.table.relationships" /> for more information on table
|
|
|
relationships.
|
|
relationships.
|
|
|
</para>
|
|
</para>
|
|
@@ -226,8 +226,8 @@ $newRow->save();
|
|
|
</example>
|
|
</example>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- The optional argument to the createRow() method is an associative array, with which
|
|
|
|
|
- you can populate fields of the new row.
|
|
|
|
|
|
|
+ The optional argument to the <methodname>createRow()</methodname> method is an
|
|
|
|
|
+ associative array, with which you can populate fields of the new row.
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<example id="zend.db.table.row.write.insert.example2">
|
|
<example id="zend.db.table.row.write.insert.example2">
|
|
@@ -495,21 +495,20 @@ $bugs = new Bugs(array('rowClass' => 'MyRow'));
|
|
|
</example>
|
|
</example>
|
|
|
|
|
|
|
|
<sect3 id="zend.db.table.row.extending.overriding">
|
|
<sect3 id="zend.db.table.row.extending.overriding">
|
|
|
-
|
|
|
|
|
<title>Row initialization</title>
|
|
<title>Row initialization</title>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
If application-specific logic needs to be initialized when a row is constructed,
|
|
If application-specific logic needs to be initialized when a row is constructed,
|
|
|
you can select to move your tasks to the <methodname>init()</methodname> method,
|
|
you can select to move your tasks to the <methodname>init()</methodname> method,
|
|
|
which is called after all row metadata has been processed. This is recommended over
|
|
which is called after all row metadata has been processed. This is recommended over
|
|
|
- the <code>__construct</code> method if you do not need to alter the metadata in any
|
|
|
|
|
- programmatic way.
|
|
|
|
|
-
|
|
|
|
|
- <example id="zend.db.table.row.init.usage.example">
|
|
|
|
|
|
|
+ the <methodname>__construct()</methodname> method if you do not need to alter the
|
|
|
|
|
+ metadata in any programmatic way.
|
|
|
|
|
+ </para>
|
|
|
|
|
|
|
|
- <title>Example usage of init() method</title>
|
|
|
|
|
|
|
+ <example id="zend.db.table.row.init.usage.example">
|
|
|
|
|
+ <title>Example usage of init() method</title>
|
|
|
|
|
|
|
|
- <programlisting language="php"><![CDATA[
|
|
|
|
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
class MyApplicationRow extends Zend_Db_Table_Row_Abstract
|
|
class MyApplicationRow extends Zend_Db_Table_Row_Abstract
|
|
|
{
|
|
{
|
|
|
protected $_role;
|
|
protected $_role;
|
|
@@ -520,11 +519,7 @@ class MyApplicationRow extends Zend_Db_Table_Row_Abstract
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
]]></programlisting>
|
|
]]></programlisting>
|
|
|
-
|
|
|
|
|
- </example>
|
|
|
|
|
-
|
|
|
|
|
- </para>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ </example>
|
|
|
</sect3>
|
|
</sect3>
|
|
|
|
|
|
|
|
<sect3 id="zend.db.table.row.extending.insert-update">
|
|
<sect3 id="zend.db.table.row.extending.insert-update">
|
|
@@ -650,7 +645,7 @@ class Products extends Zend_Db_Table_Abstract
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
<classname>Zend_Db</classname> classes do not implement inflection by default. See
|
|
<classname>Zend_Db</classname> classes do not implement inflection by default. See
|
|
|
- <xref linkend="zend.db.table.extending.inflection" /> for an explanation of this
|
|
|
|
|
|
|
+ <link linkend="zend.db.table.extending.inflection" /> for an explanation of this
|
|
|
policy.
|
|
policy.
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|