jmcastagnetto           Sat Aug  3 21:41:54 2002 EDT

  Added files:                 
    /phpdoc/en/reference/objaggregation/functions       
                                                        
aggregate-methods-by-regexp.xml 
                                                        
aggregate-properties-by-list.xml 
                                                        
aggregate-properties-by-regexp.xml 
                                                        aggregate-properties.xml 
                                                        aggregation-info.xml 
                                                        deaggregate.xml 

  Modified files:              
    /phpdoc/en/reference/objaggregation/functions       
                                                        aggregate-methods-by-list.xml 
  Log:
  End of initial round of documentation for the aggregation extension.
  Need to add some more examples on each function doc.
  
  
Index: phpdoc/en/reference/objaggregation/functions/aggregate-methods-by-list.xml
diff -u phpdoc/en/reference/objaggregation/functions/aggregate-methods-by-list.xml:1.1 
phpdoc/en/reference/objaggregation/functions/aggregate-methods-by-list.xml:1.2
--- phpdoc/en/reference/objaggregation/functions/aggregate-methods-by-list.xml:1.1     
 Sat Aug  3 19:48:48 2002
+++ phpdoc/en/reference/objaggregation/functions/aggregate-methods-by-list.xml  Sat 
+Aug  3 21:41:54 2002
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
- <refentry id="function.aggregate-by-list">
+<!-- $Revision: 1.2 $ -->
+ <refentry id="function.aggregate-methods-by-list">
    <refnamediv>
     <refname>aggregate_methods_by_list</refname>
     <refpurpose>

Index: phpdoc/en/reference/objaggregation/functions/aggregate-methods-by-regexp.xml
+++ phpdoc/en/reference/objaggregation/functions/aggregate-methods-by-regexp.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
 <refentry id="function.aggregate-methods-by-regexp">
   <refnamediv>
    <refname>aggregate_methods_by_regexp</refname>
    <refpurpose>
     selective class methods aggregation to an object using a regular
     expression
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>void</type><methodname>aggregate_methods_by_regexp</methodname>
      <methodparam><type>object</type><parameter>object</parameter></methodparam>
      <methodparam><type>string</type><parameter>class_name</parameter></methodparam>
      <methodparam><type>string</type><parameter>regexp</parameter></methodparam>
      <methodparam 
choice='opt'><type>boolean</type><parameter>exclude</parameter></methodparam>
     </methodsynopsis>
    <para>
     Aggregates methods from a class to
     an existing object using a regular expresion to match method names. 
     The optional paramater
     <parameter>exclude</parameter> is used to decide whether the regular
     expression will select
     the names of methods to include in the aggregation (i.e.
     <parameter>exclude</paramete> is &false;, which is the default value),
     or to exclude from the aggregation (<parameter>exclude</parameter> is
     &true;).
     </para>
     <para>
     The class constructor or methods
     whose names start with an underscore character (_), which are
     considered private to the aggregated class, are always
     excluded.
    </para>
    <simpara>
     See also 
     <function>aggregate</function>,
     <function>aggregate_info</function>,
     <function>aggregate_methods</function>,
     <function>aggregate_methods_by_list</function>,
     <function>aggregate_properties</function>,
     <function>aggregate_properties_by_list</function>,
     <function>aggregate_properties_by_regexp</function>,
     <function>deaggregate</function>
    </simpara>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

Index: phpdoc/en/reference/objaggregation/functions/aggregate-properties-by-list.xml
+++ phpdoc/en/reference/objaggregation/functions/aggregate-properties-by-list.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
 <refentry id="function.aggregate-properties-by-list">
   <refnamediv>
    <refname>aggregate_properties_by_list</refname>
    <refpurpose>
     selective dynamic class properties aggregation to an object
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>void</type><methodname>aggregate_properties_by_list</methodname>
      <methodparam><type>object</type><parameter>object</parameter></methodparam>
      <methodparam><type>string</type><parameter>class_name</parameter></methodparam>
      
<methodparam><type>array</type><parameter>properties_list</parameter></methodparam>
      <methodparam 
choice='opt'><type>boolean</type><parameter>exclude</parameter></methodparam>
     </methodsynopsis>
    <para>
     Aggregates properties from a class to
     an existing object using a list of property names. The optional paramater
     <parameter>exclude</parameter> is used to decide whether the list 
     contains the names of class properties to include in the aggregation (i.e.
     <parameter>exclude</paramete> is &false;, which is the default value),
     or to exclude from the aggregation (<parameter>exclude</parameter> is
     &true;).
     </para>
     <para>
     The properties
     whose names start with an underscore character (_), which are
     considered private to the aggregated class, are always
     excluded.
    </para>
    <simpara>
     See also 
     <function>aggregate</function>,
     <function>aggregate_methods</function>,
     <function>aggregate_methods_by_list</function>,
     <function>aggregate_methods_by_regexp</function>,
     <function>aggregate_properties</function>,
     <function>aggregate_properties_by_regexp</function>,
     <function>aggregate_info</function>,
     <function>deaggregate</function>
    </simpara>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

Index: phpdoc/en/reference/objaggregation/functions/aggregate-properties-by-regexp.xml
+++ phpdoc/en/reference/objaggregation/functions/aggregate-properties-by-regexp.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
 <refentry id="function.aggregate-properties-by-regexp">
   <refnamediv>
    <refname>aggregate_properties_by_regexp</refname>
    <refpurpose>
     selective class properties aggregation to an object using a regular
     expression
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>void</type><methodname>aggregate_properties_by_regexp</methodname>
      <methodparam><type>object</type><parameter>object</parameter></methodparam>
      <methodparam><type>string</type><parameter>class_name</parameter></methodparam>
      <methodparam><type>string</type><parameter>regexp</parameter></methodparam>
      <methodparam 
choice='opt'><type>boolean</type><parameter>exclude</parameter></methodparam>
     </methodsynopsis>
    <para>
     Aggregates properties from a class to
     an existing object using a regular expresion to match their names. 
     The optional paramater
     <parameter>exclude</parameter> is used to decide whether the regular
     expression will select
     the names of class properties to include in the aggregation (i.e.
     <parameter>exclude</paramete> is &false;, which is the default value),
     or to exclude from the aggregation (<parameter>exclude</parameter> is
     &true;).
     </para>
     <para>
     The properties
     whose names start with an underscore character (_), which are
     considered private to the aggregated class, are always
     excluded.
    </para>
    <simpara>
     See also 
     <function>aggregate</function>,
     <function>aggregate_methods</function>,
     <function>aggregate_methods_by_list</function>,
     <function>aggregate_methods_by_regexp</function>,
     <function>aggregate_properties</function>,
     <function>aggregate_properties_by_list</function>,
     <function>aggregate_info</function>,
     <function>deaggregate</function>
    </simpara>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

Index: phpdoc/en/reference/objaggregation/functions/aggregate-properties.xml
+++ phpdoc/en/reference/objaggregation/functions/aggregate-properties.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
 <refentry id="function.aggregate-properties">
   <refnamediv>
    <refname>aggregate_properties</refname>
    <refpurpose>
     dynamic aggregation of  class properties to an object
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>void</type><methodname>aggregate_properties</methodname>
      <methodparam><type>object</type><parameter>object</parameter></methodparam>
      <methodparam><type>string</type><parameter>class_name</parameter></methodparam>
     </methodsynopsis>
    <para>
     Aggregates all properties defined in a class to
     an existing object, except for properties
     whose names start with an underscore character (_) which are
     considered private to the aggregated class.
    </para>
    <simpara>
     See also 
     <function>aggregate</function>,
     <function>aggregate_methods</function>,
     <function>aggregate_methods_by_list</function>,
     <function>aggregate_methods_by_regexp</function>,
     <function>aggregate_properties_by_list</function>,
     <function>aggregate_properties_by_regexp</function>,
     <function>aggregate_info</function>,
     <function>deaggregate</function>
    </simpara>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

Index: phpdoc/en/reference/objaggregation/functions/aggregation-info.xml
+++ phpdoc/en/reference/objaggregation/functions/aggregation-info.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
 <refentry id="function.aggregation-info">
   <refnamediv>
    <refname>aggregation_info</refname>
    <refpurpose>
     returns an associative array of the methods and properties from
     each class that has been aggregated to the object.
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>aggregation_info</methodname>
      <methodparam><type>object</type><parameter>object</parameter></methodparam>
     </methodsynopsis>
    <para>
     Will return the aggretaion information for a particular object
     as an associative array of arrays of methods and properties. The
     key for the main array is the name of the aggregated class.
    </para>
    <para>
     For example the code below
     <example>
      <title>Using <function>aggregation_info</function></title>
      <programlisting role='php'>
<![CDATA[
<?php

class Slicer {
    var $vegetable;

    function Slicer($vegetable) {
        $this->vegetable = $vegetable;
    }

    function slice_it($num_cuts) {
        echo "Doing some simple slicing\n";
        for ($i=0; $i < $num_cuts; $i++) {
            // do some slicing
        }
    }
}

class Dicer {
    var $vegetable;
    var $rotation_angle = 90;   // degrees

    function Dicer($vegetable) {
        $this->vegetable = $vegetable;
    }

    function dice_it($num_cuts) {
        echo "Cutting in one direction\n";
        for ($i=0; $i < $num_cuts; $i++) {
            // do some cutting
        }
        $this->rotate($this->rotation_angle);
        echo "Cutting in a second direction\n";
        for ($i=0; $i < $num_cuts; $i++) {
            // do some more cutting
        }
    }

    function rotate($deg) {
        echo "Now rotating {$this->vegetable} {$deg} degrees\n";
    }

    function _secret_super_dicing($num_cuts) {
        // so secret we cannot show you ;-)
    }
}

$obj = new Slicer('onion');
aggregate($obj, 'Dicer');
print_r(aggregate_info($obj));
?>
]]>
      </programlisting>
     </example>
    </para>
    <para>
     Will produce the output
     <informalexample>
      <programlisting>
<![CDATA[
Array
(
    [dicer] => Array
        (
            [methods] => Array
                (
                    [0] => dice_it
                    [1] => rotate
                )

            [properties] => Array
                (
                    [0] => rotation_angle
                )

        )

)
]]>
      </programlisting>
     </informalexample>
     As you can see, all properties and methods of the 
     <classname>Dicer</classname> class have been aggregated
     into our new object, with the exception of the class
     constructor and the method <methodname>_secret_super_dicing</methodname>
    </para>
    <simpara>
     See also 
     <function>aggregate</function>,
     <function>aggregate_methods</function>,
     <function>aggregate_methods_by_list</function>,
     <function>aggregate_methods_by_regexp</function>,
     <function>aggregate_properties</function>,
     <function>aggregate_properties_by_list</function>,
     <function>aggregate_properties_by_regexp</function>,
     <function>deaggregate</function>

    </simpara>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

Index: phpdoc/en/reference/objaggregation/functions/deaggregate.xml
+++ phpdoc/en/reference/objaggregation/functions/deaggregate.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
 <refentry id="function.deaggregate">
   <refnamediv>
    <refname>deaggregate</refname>
    <refpurpose>
     removes the aggregated methods and properties from an object
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>void</type><methodname>object_aggregation</methodname>
      <methodparam><type>object</type><parameter>object</parameter></methodparam>
      <methodparam 
choice='opt'><type>string</type><parameter>class_name</parameter></methodparam>
     </methodsynopsis>
    <para>
     Removes the methods and properties from classes that were aggregated to
     an object.
     If the optional <parameter>class_name</parameter> parameters is passed,
     only those methods and properties defined in that class are removed,
     otherwise all aggregated methods and properties are eliminated.
    </para>
    <simpara>
     See also
     <function>aggregate</function>,
     <function>aggregate_methods</function>,
     <function>aggregate_methods_by_list</function>,
     <function>aggregate_methods_by_regexp</function>,
     <function>aggregate_properties</function>,
     <function>aggregate_properties_by_list</function>,
     <function>aggregate_properties_by_regexp</function>,
     <function>aggregate_info</function>
    </simpara>
    </simpara>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to