cvs: peardoc /en/package/database/db-dataobject/db-dataobject fetchrow.xml raiseerror.xml setfrom.xml toarray.xml

From: Date: Thu, 05 Feb 2009 18:17:06 +0000
Subject: cvs: peardoc /en/package/database/db-dataobject/db-dataobject fetchrow.xml raiseerror.xml setfrom.xml toarray.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-11533@lists.php.net to get a copy of this message
farell Thu Feb 5 18:17:06 2009 UTC Modified files: /peardoc/en/package/database/db-dataobject/db-dataobject fetchrow.xml raiseerror.xml setfrom.xml toarray.xml Log: - removed unecessary blanks (beautify) - forget to commit the remove of twice equal sign when using <initializer> docbook tag

http://cvs.php.net/viewvc.cgi/peardoc/en/package/database/db-dataobject/db-dataobject/fetchrow.xml?r1=1.5&r2=1.6&diff_format=u Index: peardoc/en/package/database/db-dataobject/db-dataobject/fetchrow.xml diff -u peardoc/en/package/database/db-dataobject/db-dataobject/fetchrow.xml:1.5 peardoc/en/package/database/db-dataobject/db-dataobject/fetchrow.xml:1.6 --- peardoc/en/package/database/db-dataobject/db-dataobject/fetchrow.xml:1.5 Thu Oct 9 15:16:22 2008 +++ peardoc/en/package/database/db-dataobject/db-dataobject/fetchrow.xml Thu Feb 5 18:17:06 2009 @@ -11,112 +11,112 @@ </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>DB_DataObject::fetchRow</function></funcdef> - + <paramdef choice="opt"> resource <parameter>$row</parameter> - = <initializer>null</initializer> + <initializer>null</initializer> </paramdef> - - + + </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsection xml:id="package.database.db-dataobject.db-dataobject.fetchrow.desc"> &title.desc; <para> - Fetches a specific row into this object variables. Not recommended - + Fetches a specific row into this object variables. Not recommended - better use <link linkend="package.database.db-dataobject.db-dataobject.fetch"><function>fetch</function></link>. </para> - </refsection> - + </refsection> + <refsection xml:id="package.database.db-dataobject.db-dataobject.fetchrow.parameter"> &title.param; <para> <itemizedlist> - + <listitem> <para> <parameter>resource $row</parameter> - row </para> - </listitem> - + </listitem> + </itemizedlist> </para> - </refsection> - - + </refsection> + + <refsection xml:id="package.database.db-dataobject.db-dataobject.fetchrow.return"> &title.returns; <para> <parameter>boolean</parameter> - &true; on success </para> - </refsection> - - + </refsection> + + <refsection xml:id="package.database.db-dataobject.db-dataobject.fetchrow.throws"> &title.throws; <para> <table><title>&title.throws.errortable;</title> - - <tgroup cols="4"> + + <tgroup cols="4"> <thead> <row> <entry>Error code</entry> - <entry>Error message</entry> - <entry>Meaning</entry> - <entry>Solution</entry> + <entry>Error message</entry> + <entry>Meaning</entry> + <entry>Solution</entry> </row> </thead> <tbody> - + <row> <entry>DB_DATAOBJECT_ERROR_INVALIDCONFIG</entry> <entry><quote>fetchrow: No table</quote></entry> <entry>Table not found</entry> <entry> - Fix configuration file - maybe a + Fix configuration file - maybe a typing mistake </entry> - </row> - + </row> + <row> <entry>DB_DATAOBJECT_ERROR_INVALIDARGS</entry> <entry><quote>fetchrow: No row specified</quote></entry> <entry/> <entry>Specify a row</entry> - </row> - + </row> + <row> <entry>DB_DATAOBJECT_ERROR_NODATA</entry> <entry><quote>fetchrow: No results avaiable</quote></entry> <entry>Result set was empty</entry> <entry/> - </row> - + </row> + </tbody> </tgroup> </table> </para> - </refsection> - - + </refsection> + + <refsection xml:id="package.database.db-dataobject.db-dataobject.fetchrow.note"> - &title.note; - + &title.note; + &note.notstatic; - - - + + + <simpara/> - </refsection> - + </refsection> + <refsection xml:id="package.database.db-dataobject.db-dataobject.fetchrow.see"> - &title.see; + &title.see; <!-- Additional links go here --> <para> <link linkend="package.database.db-dataobject.db-dataobject.fetch"><function>DB_DataObject::fetch</function></link> </para> - </refsection> + </refsection> - </refentry> + </refentry> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/en/package/database/db-dataobject/db-dataobject/raiseerror.xml?r1=1.5&r2=1.6&diff_format=u Index: peardoc/en/package/database/db-dataobject/db-dataobject/raiseerror.xml diff -u peardoc/en/package/database/db-dataobject/db-dataobject/raiseerror.xml:1.5 peardoc/en/package/database/db-dataobject/db-dataobject/raiseerror.xml:1.6 --- peardoc/en/package/database/db-dataobject/db-dataobject/raiseerror.xml:1.5 Thu Oct 9 15:16:23 2008 +++ peardoc/en/package/database/db-dataobject/db-dataobject/raiseerror.xml Thu Feb 5 18:17:06 2009 @@ -6,87 +6,87 @@ </refnamediv> <refsynopsisdiv> <funcsynopsis> - + <funcprototype> <funcdef>object <function>DB_DataObject::raiseError</function></funcdef> - + <paramdef choice="req"> int <parameter>$message</parameter> </paramdef> - + <paramdef choice="opt"> resource <parameter>$type</parameter> - = <initializer>null</initializer> + <initializer>null</initializer> </paramdef> - + <paramdef choice="opt"> resource <parameter>$behaviour</parameter> - = <initializer>null</initializer> + <initializer>null</initializer> </paramdef> - - + + </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsection xml:id="package.database.db-dataobject.db-dataobject.raiseerror.desc"> &title.desc; <para> - Default error handling is to create a <link linkend="core.pear.pear-error"><classname>PEAR::Error</classname></link>, - but never return it. - If you need to handle errors you should look at setting the + Default error handling is to create a <link linkend="core.pear.pear-error"><classname>PEAR::Error</classname></link>, + but never return it. + If you need to handle errors you should look at setting the PEAR_Error callback this is due to the fact it would wreck havoc on the internal methods! </para> - </refsection> - + </refsection> + <refsection xml:id="package.database.db-dataobject.db-dataobject.raiseerror.parameter"> &title.param; <para> <itemizedlist> - + <listitem> <para> <parameter>int $message</parameter> - message </para> - </listitem> - + </listitem> + <listitem> <para> <parameter>resource $type</parameter> - type </para> - </listitem> - + </listitem> + <listitem> <para> <parameter>resource $behaviour</parameter> - behaviour (die or continue!); </para> - </listitem> - + </listitem> + </itemizedlist> </para> - </refsection> - - + </refsection> + + <refsection xml:id="package.database.db-dataobject.db-dataobject.raiseerror.return"> &title.returns; <para> - <parameter>object [unknown]</parameter> - + <parameter>object [unknown]</parameter> - </para> - </refsection> - - - + </refsection> + + + <refsection xml:id="package.database.db-dataobject.db-dataobject.raiseerror.note"> - &title.note; - + &title.note; + &note.notstatic; - - - + + + <simpara/> - </refsection> - + </refsection> + - </refentry> + </refentry> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/en/package/database/db-dataobject/db-dataobject/setfrom.xml?r1=1.11&r2=1.12&diff_format=u Index: peardoc/en/package/database/db-dataobject/db-dataobject/setfrom.xml diff -u peardoc/en/package/database/db-dataobject/db-dataobject/setfrom.xml:1.11 peardoc/en/package/database/db-dataobject/db-dataobject/setfrom.xml:1.12 --- peardoc/en/package/database/db-dataobject/db-dataobject/setfrom.xml:1.11 Thu Oct 9 15:16:23 2008 +++ peardoc/en/package/database/db-dataobject/db-dataobject/setfrom.xml Thu Feb 5 18:17:06 2009 @@ -8,7 +8,7 @@ <funcsynopsis> <funcprototype> <funcdef>boolean <function>$DB_DataObject-&gt;setFrom</function></funcdef> - + <paramdef choice="req"> array or object <parameter>$from</parameter> </paramdef> @@ -17,7 +17,7 @@ </paramdef> <paramdef choice="opt"> bool <parameter>$skipEmpty</parameter> - = <initializer>false</initializer> + <initializer>false</initializer> </paramdef> </funcprototype> @@ -26,91 +26,91 @@ <refsection xml:id="package.database.db-dataobject.db-dataobject.setfrom.desc"> &title.desc; <para> - Copies items that are in the table definitions from an + Copies items that are in the table definitions from an array or object into the current object (It will not override key values). - + This can be used to process form posts (if the field names match the database), or cloning similar objects. </para> <para> - You can not set the value of a key column using setFrom, - It is silently ignored for security reasons. - + You can not set the value of a key column using setFrom, + It is silently ignored for security reasons. + (you can still assign it manually) </para> <para> - setFrom will attempt to call the setters + setFrom will attempt to call the setters set{columnname} methods if they exist, - It will also call fromValue(), + It will also call fromValue(), which formats dates correctly. </para> - + <para> - You may realize that this method overlaps the overloaded method - for the column name from, due to this, - the associated methods for the column name 'from' + You may realize that this method overlaps the overloaded method + for the column name from, due to this, + the associated methods for the column name 'from' are set_from and getFrom. </para> - </refsection> - + </refsection> + <refsection xml:id="package.database.db-dataobject.db-dataobject.setfrom.parameter"> &title.param; <para> <itemizedlist> - + <listitem> <para> - <parameter>array or Object $from</parameter> + <parameter>array or Object $from</parameter> - what to copy from </para> - </listitem> - + </listitem> + <listitem> <para> - <parameter>string $format</parameter> - - the format of the array or object variables + <parameter>string $format</parameter> + - the format of the array or object variables and how they relate to this object. - - For example if your input array is in the format prefix_COLNAME, + + For example if your input array is in the format prefix_COLNAME, then you can use 'prefix_%s'. </para> </listitem> - + <listitem> <para> - <parameter>bool $skipEmpty</parameter> - - If set to true, - DB_DataObject will not assign empty values + <parameter>bool $skipEmpty</parameter> + - If set to true, + DB_DataObject will not assign empty values if a column is empty (eg. '' / 0 etc) </para> - </listitem> + </listitem> </itemizedlist> - + </para> - </refsection> - - + </refsection> + + <refsection xml:id="package.database.db-dataobject.db-dataobject.setfrom.return"> &title.returns; <para> - <parameter>array or boolean</parameter> + <parameter>array or boolean</parameter> - &true; on success or an array of set*() return values in PHP4.3.2 upwards </para> - </refsection> - - - + </refsection> + + + <refsection xml:id="package.database.db-dataobject.db-dataobject.setfrom.note"> - &title.note; + &title.note; &note.notstatic; <simpara/> - </refsection> - + </refsection> + <refsection xml:id="package.database.db-dataobject.db-dataobject.setfrom.example"> &title.example; <example><info><title>Using <function>setFrom</function></title></info> - + <programlisting role="php"> <![CDATA[ @@ -155,9 +155,9 @@ $personA->setFrom($personB); $person->update(); - -]]> + +]]> </programlisting> </example> - </refsection> -</refentry> + </refsection> +</refentry> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/en/package/database/db-dataobject/db-dataobject/toarray.xml?r1=1.8&r2=1.9&diff_format=u Index: peardoc/en/package/database/db-dataobject/db-dataobject/toarray.xml diff -u peardoc/en/package/database/db-dataobject/db-dataobject/toarray.xml:1.8 peardoc/en/package/database/db-dataobject/db-dataobject/toarray.xml:1.9 --- peardoc/en/package/database/db-dataobject/db-dataobject/toarray.xml:1.8 Thu Oct 9 15:16:23 2008 +++ peardoc/en/package/database/db-dataobject/db-dataobject/toarray.xml Thu Feb 5 18:17:06 2009 @@ -6,87 +6,87 @@ </refnamediv> <refsynopsisdiv> <funcsynopsis> - + <funcprototype> <funcdef>array <function>$DB_DataObject-&gt;toArray</function></funcdef> - + <paramdef choice="opt"> string <parameter>$format = '%s'</parameter> </paramdef> - + <paramdef choice="opt"> bool <parameter>$hideEmpty</parameter> - = <initializer>false</initializer> + <initializer>false</initializer> </paramdef> - + </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsection xml:id="package.database.db-dataobject.db-dataobject.toarray.desc"> &title.desc; <para> - Allows the fetching of an associate array (with optional key formating) for + Allows the fetching of an associate array (with optional key formating) for use with other packages, like <classname>HTML_QuickForm</classname>. </para> - + <para> - From PHP4.2.3RC2 onwards, The values of each column are retrieved using getXXXX() + From PHP4.2.3RC2 onwards, The values of each column are retrieved using getXXXX() methods so you can change the formating of a row by defining a getter method. </para> - - </refsection> - + + </refsection> + <refsection xml:id="package.database.db-dataobject.db-dataobject.toarray.parameter"> &title.param; <para> <itemizedlist> - + <listitem> <para> <parameter>string $format</parameter> - a sprintf string eg. 'form[%s]' </para> </listitem> - + <listitem> <para> <parameter>bool $hideEmpty</parameter> - If set to true, empty elements (no value/null) will not be returned </para> </listitem> - + </itemizedlist> </para> - </refsection> - - - - + </refsection> + + + + <refsection xml:id="package.database.db-dataobject.db-dataobject.toarray.note"> - &title.note; - + &title.note; + &note.notstatic; - - </refsection> - + + </refsection> + <refsection xml:id="package.database.db-dataobject.db-dataobject.toarray.example"> &title.example; <example><info><title>getting arrays</title></info> - + <programlisting role="php"> - <![CDATA[ + <![CDATA[ $person = new DataObjects_Person; $person->get(2); print_r($person->toArray()); print_r($person->toArray('user[%s]')); print_r($person->toArray('user[%s]', true)); -]]> +]]> </programlisting> </example> <example><info><title>Sample Output</title></info> - + <programlisting> - <![CDATA[ + <![CDATA[ Array ( [id] => 2 @@ -114,8 +114,8 @@ [user[username]] => username [user[firstname]] => jones ) -]]> +]]> </programlisting> </example> - </refsection> - </refentry> + </refsection> + </refentry> \ No newline at end of file
« previous php.pear.doc (#11533) next »