didou           Thu Jan 15 07:42:56 2004 EDT

  Modified files:              
    /phpdoc/en/reference/objaggregation reference.xml 
    /phpdoc/en/reference/objaggregation/functions       aggregate-info.xml 
  Log:
  CS : Function declarations follow the 'one true brace' convention
  
Index: phpdoc/en/reference/objaggregation/reference.xml
diff -u phpdoc/en/reference/objaggregation/reference.xml:1.13 
phpdoc/en/reference/objaggregation/reference.xml:1.14
--- phpdoc/en/reference/objaggregation/reference.xml:1.13       Thu Dec 18 12:46:04 
2003
+++ phpdoc/en/reference/objaggregation/reference.xml    Thu Jan 15 07:42:55 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.13 $ -->
+<!-- $Revision: 1.14 $ -->
  <reference id="ref.objaggregation">
   <title>Object Aggregation/Composition Functions</title>
   <titleabbrev>Object Aggregation</titleabbrev>
@@ -31,11 +31,13 @@
 <?php
 class DateTime {
    
-   function DateTime() {
+   function DateTime() 
+   {
        // empty constructor
    }
 
-   function now() {
+   function now() 
+   {
        return date("Y-m-d H:i:s");
    }
 }
@@ -44,12 +46,14 @@
    var $_dt;
    // more properties ...
 
-   function Report() {
+   function Report() 
+   {
        $this->_dt = new DateTime();
        // initialization code ...
    }
 
-   function generateReport() {
+   function generateReport() 
+   {
        $dateTime = $_dt->now();
        // more code ...
    }
@@ -78,11 +82,13 @@
 class DateTimePlus {
    var $_format;
    
-   function DateTimePlus($format="Y-m-d H:i:s") {
+   function DateTimePlus($format="Y-m-d H:i:s") 
+   {
        $this->_format = $format;
    }
 
-   function now() {
+   function now() 
+   {
        return date($this->_format);
    }
 }
@@ -91,15 +97,18 @@
    var $_dt;    // we'll keep the reference to DateTime here
    // more properties ...
 
-   function Report() {
+   function Report() 
+   {
        // do some initialization
    }
 
-   function setDateTime(&$dt) {
+   function setDateTime(&$dt) 
+   {
        $this->_dt =& $dt;
    }
 
-   function generateReport() {
+   function generateReport() 
+   {
        $dateTime = $this->_dt->now();
        // more code ...
    }
@@ -161,10 +170,13 @@
 class FileStorage {
     var $data;
 
-    function FileStorage($data) {
+    function FileStorage($data) 
+    {
         $this->data = $data;
     }
-    function write($name) {
+    
+    function write($name) 
+    {
         $fp = fopen(name, "w");
         fwrite($fp, $this->data);
         fclose($data);
@@ -176,12 +188,14 @@
     var $version = "1.0";
     var $_id; // "private" variable
 
-    function WDDXStorage($data) {
+    function WDDXStorage($data) 
+    {
         $this->data = $data;
         $this->_id = $this->_genID();
     }
 
-    function store() {
+    function store() 
+    {
         if ($this->_id) {
             $pid = wddx_packet_start($this->_id);
             wddx_add_vars($pid, "this->data");
@@ -195,7 +209,8 @@
     }
 
     // a private method
-    function _genID() {
+    function _genID() 
+    {
         return md5(uniqid(rand(), true));
     }
 }
@@ -204,11 +219,13 @@
     var $data;
     var $dbtype = "mysql";
 
-    function DBStorage($data) {
+    function DBStorage($data) 
+    {
         $this->data = $data;
     }
 
-    function save() {
+    function save() 
+    {
         $dbh = mysql_connect();
         mysql_select_db("storage", $dbh);
         $serdata = serialize($this->data);
@@ -237,13 +254,15 @@
 
 // some utilty functions
 
-function p_arr($arr) {
+function p_arr($arr) 
+{
     foreach ($arr as $k => $v)
         $out[] = "\t$k => $v";
     return implode("\n", $out);
 }
 
-function object_info($obj) {
+function object_info($obj) 
+{
     $out[] = "Class: " . get_class($obj);
     foreach (get_object_vars($obj) as $var=>$val) {
         if (is_array($val)) {
Index: phpdoc/en/reference/objaggregation/functions/aggregate-info.xml
diff -u phpdoc/en/reference/objaggregation/functions/aggregate-info.xml:1.3 
phpdoc/en/reference/objaggregation/functions/aggregate-info.xml:1.4
--- phpdoc/en/reference/objaggregation/functions/aggregate-info.xml:1.3 Thu Dec 18 
09:14:35 2003
+++ phpdoc/en/reference/objaggregation/functions/aggregate-info.xml     Thu Jan 15 
07:42:56 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
  <refentry id="function.aggregate-info">
    <refnamediv>
     <refname>aggregate_info</refname>
@@ -30,11 +30,13 @@
 class Slicer {
     var $vegetable;
 
-    function Slicer($vegetable) {
+    function Slicer($vegetable) 
+    {
         $this->vegetable = $vegetable;
     }
 
-    function slice_it($num_cuts) {
+    function slice_it($num_cuts) 
+    {
         echo "Doing some simple slicing\n";
         for ($i=0; $i < $num_cuts; $i++) {
             // do some slicing
@@ -46,11 +48,13 @@
     var $vegetable;
     var $rotation_angle = 90;   // degrees
 
-    function Dicer($vegetable) {
+    function Dicer($vegetable) 
+    {
         $this->vegetable = $vegetable;
     }
 
-    function dice_it($num_cuts) {
+    function dice_it($num_cuts) 
+    {
         echo "Cutting in one direction\n";
         for ($i=0; $i < $num_cuts; $i++) {
             // do some cutting
@@ -62,11 +66,13 @@
         }
     }
 
-    function rotate($deg) {
+    function rotate($deg) 
+    {
         echo "Now rotating {$this->vegetable} {$deg} degrees\n";
     }
 
-    function _secret_super_dicing($num_cuts) {
+    function _secret_super_dicing($num_cuts) 
+    {
         // so secret we cannot show you ;-)
     }
 }

Reply via email to