cvs: peardoc /en/package/datetime/calendar faq.xml intro-decorators.xml intro-overview-methods.xml intro-overview.xml
| From: | Mehdi Achour | Date: | Wed, 24 Mar 2004 15:39:01 +0000 |
| Subject: | cvs: peardoc /en/package/datetime/calendar faq.xml intro-decorators.xml intro-overview-methods.xml intro-overview.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-3081@lists.php.net to get a copy of this message | ||
didou Wed Mar 24 10:39:01 2004 EDT
Modified files:
/peardoc/en/package/datetime/calendar faq.xml intro-decorators.xml
intro-overview-methods.xml
intro-overview.xml
Log:
s/it's/its
# wrapped some lines at the same time
http://cvs.php.net/diff.php/peardoc/en/package/datetime/calendar/faq.xml?r1=1.6&r2=1.7&ty=u Index: peardoc/en/package/datetime/calendar/faq.xml diff -u peardoc/en/package/datetime/calendar/faq.xml:1.6 peardoc/en/package/datetime/calendar/faq.xml:1.7 --- peardoc/en/package/datetime/calendar/faq.xml:1.6 Fri Mar 12 04:53:53 2004 +++ peardoc/en/package/datetime/calendar/faq.xml Wed Mar 24 10:39:00 2004 @@ -1,4 +1,4 @@ -<!-- $Id: faq.xml,v 1.6 2004/03/12 09:53:53 didou Exp $ --> +<!-- $Id: faq.xml,v 1.7 2004/03/24 15:39:00 didou Exp $ --> <refentry id="package.datetime.calendar.faq"> <refnamediv> <refname>FAQ</refname> @@ -9,7 +9,11 @@ <refsect1> <title>Why doesn't it generate HTML?</title> <para> - What if you want WML, SOAP, PDF, GIF, command line, etc. etc.? PEAR::Calendar can be used to generate any output format you like (see the examples for SOAP and WML). Tying it to a particular output content type will limit it's use (a problem that every public domain PHP Calendar library I've looked at suffers from). A PEAR::HTML_Calendar is likely to be developed using PEAR::Calendar. + What if you want WML, SOAP, PDF, GIF, command line, etc. etc.? PEAR::Calendar can be used to + generate any output format you like (see the examples for SOAP and WML). Tying it to a + particular output content type will limit its use (a problem that every public domain PHP + Calendar library I've looked at suffers from). A PEAR::HTML_Calendar is likely to be developed + using PEAR::Calendar. </para> </refsect1> <refsect1> http://cvs.php.net/diff.php/peardoc/en/package/datetime/calendar/intro-decorators.xml?r1=1.5&r2=1.6&ty=u Index: peardoc/en/package/datetime/calendar/intro-decorators.xml diff -u peardoc/en/package/datetime/calendar/intro-decorators.xml:1.5 peardoc/en/package/datetime/calendar/intro-decorators.xml:1.6 --- peardoc/en/package/datetime/calendar/intro-decorators.xml:1.5 Fri Mar 12 04:53:53 2004 +++ peardoc/en/package/datetime/calendar/intro-decorators.xml Wed Mar 24 10:39:00 2004 @@ -1,4 +1,4 @@ -<!-- $Id: intro-decorators.xml,v 1.5 2004/03/12 09:53:53 didou Exp $ --> +<!-- $Id: intro-decorators.xml,v 1.6 2004/03/24 15:39:00 didou Exp $ --> <refentry id="package.datetime.calendar.intro-decorators"> <refnamediv> <refname>Calendar Decorators</refname> @@ -9,7 +9,11 @@ <refsect1> <title>Calendar Decorators</title> <para> - The <classname>Calendar_Decorator</classname> is provided to allow you to attach functionality to existing Calendar objects without needing to subclass them. This helps in a number of situations, such as allowing results from, say, a database query to be rendered in the calendar or to modify the values returned from Calendar methods (perhaps converting a numeric month into it's textual name).</para> + The <classname>Calendar_Decorator</classname> is provided to allow you to attach + functionality to existing Calendar objects without needing to subclass them. This + helps in a number of situations, such as allowing results from, say, a database + query to be rendered in the calendar or to modify the values returned from Calendar + methods (perhaps converting a numeric month into its textual name).</para> <para>Some concrete decorators are provided with PEAR::Calendar, to address what may be common problems you encounter in using the library. These are not designed to suit everyone but instead focus on solving a more narrow problem domain. They will only be parsed by the PHP engine should you explicitly include them in your code. An example of why decorators can be useful; <programlisting role="php"> <![CDATA[ @@ -57,7 +61,12 @@ <refsect1> <title>The base Calendar_Decorator</title> <para> - The base class <classname>Calendar_Decorator</classname> "mirrors" the combined API of all the subclasses of <classname>Calendar</classname>. It accepts a Calendar object to it's constructor then "takes over" the API allowing you to make calls through it rather than directly to the original calendar object. The <classname>Calendar_Decorator</classname> simply routes calls through to the calendar object it is decorating and returns values where appropriate. + The base class <classname>Calendar_Decorator</classname> "mirrors" the combined + API of all the subclasses of <classname>Calendar</classname>. It accepts a Calendar + object to its constructor then "takes over" the API allowing you to make calls through + it rather than directly to the original calendar object. The + <classname>Calendar_Decorator</classname> simply routes calls through to the calendar + object it is decorating and returns values where appropriate. </para> </refsect1> <refsect1> http://cvs.php.net/diff.php/peardoc/en/package/datetime/calendar/intro-overview-methods.xml?r1=1.6&r2=1.7&ty=u Index: peardoc/en/package/datetime/calendar/intro-overview-methods.xml diff -u peardoc/en/package/datetime/calendar/intro-overview-methods.xml:1.6 peardoc/en/package/datetime/calendar/intro-overview-methods.xml:1.7 --- peardoc/en/package/datetime/calendar/intro-overview-methods.xml:1.6 Fri Mar 12 04:53:53 2004 +++ peardoc/en/package/datetime/calendar/intro-overview-methods.xml Wed Mar 24 10:39:00 2004 @@ -1,4 +1,4 @@ -<!-- $Id: intro-overview-methods.xml,v 1.6 2004/03/12 09:53:53 didou Exp $ --> +<!-- $Id: intro-overview-methods.xml,v 1.7 2004/03/24 15:39:00 didou Exp $ --> <refentry id="package.datetime.calendar.intro-overview-methods"> <refnamediv> <refname>Method Overview</refname> @@ -31,13 +31,13 @@ $Week = new Calendar_Week(2003, 10, 25); // week containing 25th October 2003 ]]> </programlisting> - Note that the tabular classes, <classname>Calendar_Month_Weekdays</classname> and <classname>Calendar_Month_Weeks</classname> both take an optional third argument (integer) which specifies the first day of the week and adjust tabular display (normally it defaults to Monday (1) - pass the integer value 0 to switch to Sunday as the first day, for example). <classname>Calendar_Week</classname> accepts the first day argument as the fourth to it's constructor. + Note that the tabular classes, <classname>Calendar_Month_Weekdays</classname> and <classname>Calendar_Month_Weeks</classname> both take an optional third argument (integer) which specifies the first day of the week and adjust tabular display (normally it defaults to Monday (1) - pass the integer value 0 to switch to Sunday as the first day, for example). <classname>Calendar_Week</classname> accepts the first day argument as the fourth to its constructor. </para> </refsect1> <refsect1> <title>Location Methods</title> <para> - All date and tabular date classes share the methods defined in the abstract base class <classname>Calendar</classname>. Among these are methods for an object of any of these classes to identify itself (what's it's date is) and the previous and next dates. For example; + All date and tabular date classes share the methods defined in the abstract base class <classname>Calendar</classname>. Among these are methods for an object of any of these classes to identify itself (what's its date is) and the previous and next dates. For example; <programlisting role="php"> <![CDATA[ // Create a day http://cvs.php.net/diff.php/peardoc/en/package/datetime/calendar/intro-overview.xml?r1=1.5&r2=1.6&ty=u Index: peardoc/en/package/datetime/calendar/intro-overview.xml diff -u peardoc/en/package/datetime/calendar/intro-overview.xml:1.5 peardoc/en/package/datetime/calendar/intro-overview.xml:1.6 --- peardoc/en/package/datetime/calendar/intro-overview.xml:1.5 Fri Mar 12 04:53:53 2004 +++ peardoc/en/package/datetime/calendar/intro-overview.xml Wed Mar 24 10:39:00 2004 @@ -1,4 +1,4 @@ -<!-- $Id: intro-overview.xml,v 1.5 2004/03/12 09:53:53 didou Exp $ --> +<!-- $Id: intro-overview.xml,v 1.6 2004/03/24 15:39:00 didou Exp $ --> <refentry id="package.datetime.calendar.intro-overview"> <refnamediv> <refname>Package Overview</refname> @@ -97,7 +97,7 @@ </refsect1> <refsect1 id="package.datetime.calendar.intro-overview.decorators"> <title>Decorators</title> - <para>Provide a mechanism to add functionality to the main calendar objects (the subclasses of <classname>Calendar</classname>) without needing to directly extend them (and risk overwriting fields accidentally). When you create a decorator, you pass it's constructor an instance of an existing calendar object. You can then make calls to the decorator in exactly the same way as you make calls to the original calendar object. This allows you to "overwrite" calendar methods, add new methods or even apply multiple decorators to the same calendar object. Decorators a typically either "injected" (via selection or the <classname>Calendar_Decorator_Wrapper</classname> decorator) into the loop where the calendar is rendered and / or to alter the output content (e.g. convert a numeric month into a textual month: 1 => January).</para> + <para>Provide a mechanism to add functionality to the main calendar objects (the subclasses of <classname>Calendar</classname>) without needing to directly extend them (and risk overwriting fields accidentally). When you create a decorator, you pass its constructor an instance of an existing calendar object. You can then make calls to the decorator in exactly the same way as you make calls to the original calendar object. This allows you to "overwrite" calendar methods, add new methods or even apply multiple decorators to the same calendar object. Decorators a typically either "injected" (via selection or the <classname>Calendar_Decorator_Wrapper</classname> decorator) into the loop where the calendar is rendered and / or to alter the output content (e.g. convert a numeric month into a textual month: 1 => January).</para> <para> PEAR::Calendar provides some decorator implementations for you, to help with common tasks. These are not designed to suit everyone and hence are provided as optional code for you to use as needed (avoiding the performance cost associated with parsing code you're not using). </para>
http://cvs.php.net/diff.php/peardoc/en/package/datetime/calendar/faq.xml?r1=1.6&r2=1.7&ty=u Index: peardoc/en/package/datetime/calendar/faq.xml diff -u peardoc/en/package/datetime/calendar/faq.xml:1.6 peardoc/en/package/datetime/calendar/faq.xml:1.7 --- peardoc/en/package/datetime/calendar/faq.xml:1.6 Fri Mar 12 04:53:53 2004 +++ peardoc/en/package/datetime/calendar/faq.xml Wed Mar 24 10:39:00 2004 @@ -1,4 +1,4 @@ -<!-- $Id: faq.xml,v 1.6 2004/03/12 09:53:53 didou Exp $ --> +<!-- $Id: faq.xml,v 1.7 2004/03/24 15:39:00 didou Exp $ --> <refentry id="package.datetime.calendar.faq"> <refnamediv> <refname>FAQ</refname> @@ -9,7 +9,11 @@ <refsect1> <title>Why doesn't it generate HTML?</title> <para> - What if you want WML, SOAP, PDF, GIF, command line, etc. etc.? PEAR::Calendar can be used to generate any output format you like (see the examples for SOAP and WML). Tying it to a particular output content type will limit it's use (a problem that every public domain PHP Calendar library I've looked at suffers from). A PEAR::HTML_Calendar is likely to be developed using PEAR::Calendar. + What if you want WML, SOAP, PDF, GIF, command line, etc. etc.? PEAR::Calendar can be used to + generate any output format you like (see the examples for SOAP and WML). Tying it to a + particular output content type will limit its use (a problem that every public domain PHP + Calendar library I've looked at suffers from). A PEAR::HTML_Calendar is likely to be developed + using PEAR::Calendar. </para> </refsect1> <refsect1> http://cvs.php.net/diff.php/peardoc/en/package/datetime/calendar/intro-decorators.xml?r1=1.5&r2=1.6&ty=u Index: peardoc/en/package/datetime/calendar/intro-decorators.xml diff -u peardoc/en/package/datetime/calendar/intro-decorators.xml:1.5 peardoc/en/package/datetime/calendar/intro-decorators.xml:1.6 --- peardoc/en/package/datetime/calendar/intro-decorators.xml:1.5 Fri Mar 12 04:53:53 2004 +++ peardoc/en/package/datetime/calendar/intro-decorators.xml Wed Mar 24 10:39:00 2004 @@ -1,4 +1,4 @@ -<!-- $Id: intro-decorators.xml,v 1.5 2004/03/12 09:53:53 didou Exp $ --> +<!-- $Id: intro-decorators.xml,v 1.6 2004/03/24 15:39:00 didou Exp $ --> <refentry id="package.datetime.calendar.intro-decorators"> <refnamediv> <refname>Calendar Decorators</refname> @@ -9,7 +9,11 @@ <refsect1> <title>Calendar Decorators</title> <para> - The <classname>Calendar_Decorator</classname> is provided to allow you to attach functionality to existing Calendar objects without needing to subclass them. This helps in a number of situations, such as allowing results from, say, a database query to be rendered in the calendar or to modify the values returned from Calendar methods (perhaps converting a numeric month into it's textual name).</para> + The <classname>Calendar_Decorator</classname> is provided to allow you to attach + functionality to existing Calendar objects without needing to subclass them. This + helps in a number of situations, such as allowing results from, say, a database + query to be rendered in the calendar or to modify the values returned from Calendar + methods (perhaps converting a numeric month into its textual name).</para> <para>Some concrete decorators are provided with PEAR::Calendar, to address what may be common problems you encounter in using the library. These are not designed to suit everyone but instead focus on solving a more narrow problem domain. They will only be parsed by the PHP engine should you explicitly include them in your code. An example of why decorators can be useful; <programlisting role="php"> <![CDATA[ @@ -57,7 +61,12 @@ <refsect1> <title>The base Calendar_Decorator</title> <para> - The base class <classname>Calendar_Decorator</classname> "mirrors" the combined API of all the subclasses of <classname>Calendar</classname>. It accepts a Calendar object to it's constructor then "takes over" the API allowing you to make calls through it rather than directly to the original calendar object. The <classname>Calendar_Decorator</classname> simply routes calls through to the calendar object it is decorating and returns values where appropriate. + The base class <classname>Calendar_Decorator</classname> "mirrors" the combined + API of all the subclasses of <classname>Calendar</classname>. It accepts a Calendar + object to its constructor then "takes over" the API allowing you to make calls through + it rather than directly to the original calendar object. The + <classname>Calendar_Decorator</classname> simply routes calls through to the calendar + object it is decorating and returns values where appropriate. </para> </refsect1> <refsect1> http://cvs.php.net/diff.php/peardoc/en/package/datetime/calendar/intro-overview-methods.xml?r1=1.6&r2=1.7&ty=u Index: peardoc/en/package/datetime/calendar/intro-overview-methods.xml diff -u peardoc/en/package/datetime/calendar/intro-overview-methods.xml:1.6 peardoc/en/package/datetime/calendar/intro-overview-methods.xml:1.7 --- peardoc/en/package/datetime/calendar/intro-overview-methods.xml:1.6 Fri Mar 12 04:53:53 2004 +++ peardoc/en/package/datetime/calendar/intro-overview-methods.xml Wed Mar 24 10:39:00 2004 @@ -1,4 +1,4 @@ -<!-- $Id: intro-overview-methods.xml,v 1.6 2004/03/12 09:53:53 didou Exp $ --> +<!-- $Id: intro-overview-methods.xml,v 1.7 2004/03/24 15:39:00 didou Exp $ --> <refentry id="package.datetime.calendar.intro-overview-methods"> <refnamediv> <refname>Method Overview</refname> @@ -31,13 +31,13 @@ $Week = new Calendar_Week(2003, 10, 25); // week containing 25th October 2003 ]]> </programlisting> - Note that the tabular classes, <classname>Calendar_Month_Weekdays</classname> and <classname>Calendar_Month_Weeks</classname> both take an optional third argument (integer) which specifies the first day of the week and adjust tabular display (normally it defaults to Monday (1) - pass the integer value 0 to switch to Sunday as the first day, for example). <classname>Calendar_Week</classname> accepts the first day argument as the fourth to it's constructor. + Note that the tabular classes, <classname>Calendar_Month_Weekdays</classname> and <classname>Calendar_Month_Weeks</classname> both take an optional third argument (integer) which specifies the first day of the week and adjust tabular display (normally it defaults to Monday (1) - pass the integer value 0 to switch to Sunday as the first day, for example). <classname>Calendar_Week</classname> accepts the first day argument as the fourth to its constructor. </para> </refsect1> <refsect1> <title>Location Methods</title> <para> - All date and tabular date classes share the methods defined in the abstract base class <classname>Calendar</classname>. Among these are methods for an object of any of these classes to identify itself (what's it's date is) and the previous and next dates. For example; + All date and tabular date classes share the methods defined in the abstract base class <classname>Calendar</classname>. Among these are methods for an object of any of these classes to identify itself (what's its date is) and the previous and next dates. For example; <programlisting role="php"> <![CDATA[ // Create a day http://cvs.php.net/diff.php/peardoc/en/package/datetime/calendar/intro-overview.xml?r1=1.5&r2=1.6&ty=u Index: peardoc/en/package/datetime/calendar/intro-overview.xml diff -u peardoc/en/package/datetime/calendar/intro-overview.xml:1.5 peardoc/en/package/datetime/calendar/intro-overview.xml:1.6 --- peardoc/en/package/datetime/calendar/intro-overview.xml:1.5 Fri Mar 12 04:53:53 2004 +++ peardoc/en/package/datetime/calendar/intro-overview.xml Wed Mar 24 10:39:00 2004 @@ -1,4 +1,4 @@ -<!-- $Id: intro-overview.xml,v 1.5 2004/03/12 09:53:53 didou Exp $ --> +<!-- $Id: intro-overview.xml,v 1.6 2004/03/24 15:39:00 didou Exp $ --> <refentry id="package.datetime.calendar.intro-overview"> <refnamediv> <refname>Package Overview</refname> @@ -97,7 +97,7 @@ </refsect1> <refsect1 id="package.datetime.calendar.intro-overview.decorators"> <title>Decorators</title> - <para>Provide a mechanism to add functionality to the main calendar objects (the subclasses of <classname>Calendar</classname>) without needing to directly extend them (and risk overwriting fields accidentally). When you create a decorator, you pass it's constructor an instance of an existing calendar object. You can then make calls to the decorator in exactly the same way as you make calls to the original calendar object. This allows you to "overwrite" calendar methods, add new methods or even apply multiple decorators to the same calendar object. Decorators a typically either "injected" (via selection or the <classname>Calendar_Decorator_Wrapper</classname> decorator) into the loop where the calendar is rendered and / or to alter the output content (e.g. convert a numeric month into a textual month: 1 => January).</para> + <para>Provide a mechanism to add functionality to the main calendar objects (the subclasses of <classname>Calendar</classname>) without needing to directly extend them (and risk overwriting fields accidentally). When you create a decorator, you pass its constructor an instance of an existing calendar object. You can then make calls to the decorator in exactly the same way as you make calls to the original calendar object. This allows you to "overwrite" calendar methods, add new methods or even apply multiple decorators to the same calendar object. Decorators a typically either "injected" (via selection or the <classname>Calendar_Decorator_Wrapper</classname> decorator) into the loop where the calendar is rendered and / or to alter the output content (e.g. convert a numeric month into a textual month: 1 => January).</para> <para> PEAR::Calendar provides some decorator implementations for you, to help with common tasks. These are not designed to suit everyone and hence are provided as optional code for you to use as needed (avoiding the performance cost associated with parsing code you're not using). </para>