cvs: phpdoc-zh /reference/classobj reference.xml

From: Date: Mon, 21 Apr 2003 14:57:07 +0000
Subject: cvs: phpdoc-zh /reference/classobj reference.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-1360@lists.php.net to get a copy of this message
nio Mon Apr 21 10:57:07 2003 EDT Modified files: /phpdoc-zh/reference/classobj reference.xml Log: Translate comments of example scripts Index: phpdoc-zh/reference/classobj/reference.xml diff -u phpdoc-zh/reference/classobj/reference.xml:1.1 phpdoc-zh/reference/classobj/reference.xml:1.2 --- phpdoc-zh/reference/classobj/reference.xml:1.1 Sat Mar 29 00:17:17 2003 +++ phpdoc-zh/reference/classobj/reference.xml Mon Apr 21 10:57:07 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: nio $ --> <!-- EN-Revision: 1.6 Maintainer: nio Status: ready --> <reference id="ref.classobj"> @@ -52,7 +52,7 @@ <![CDATA[ <?php -// base class with member properties and methods +// »ù´¡À༰ÆäÊôÐԺͷ½·¨ class Vegetable { var $edible; @@ -71,9 +71,9 @@ return $this->color; } -} // end of class Vegetable +} // Àà Vegetable µÄ½áÊø -// extends the base class +// ´Ó»ù´¡ÀàÀ©Õ¹ class Spinach extends Vegetable { var $cooked = false; @@ -90,7 +90,7 @@ return $this->cooked; } -} // end of class Spinach +} // Àà Spinach µÄ½áÊø ?> ]]> @@ -110,7 +110,7 @@ include "classes.inc"; -// utility functions +// ʵÓú¯Êý function print_vars($obj) { $arr = get_object_vars($obj); @@ -134,21 +134,21 @@ } } -// instantiate 2 objects +// ´´½¨Á½¸ö¶ÔÏóʵÀý $veggie = new Vegetable(true,"blue"); $leafy = new Spinach(); -// print out information about objects +// ´òÓ¡³ö¶ÔÏóµÄÏà¹ØÐÅÏ¢ echo "veggie: CLASS ".get_class($veggie)."\n"; echo "leafy: CLASS ".get_class($leafy); echo ", PARENT ".get_parent_class($leafy)."\n"; -// show veggie properties +// ÏÔʾ veggie µÄÊôÐÔ echo "\nveggie: Properties\n"; print_vars($veggie); -// and leafy methods +// ÏÔʾ leafy µÄ·½·¨ echo "\nleafy: Methods\n"; print_methods($leafy);

« previous php.doc.zh (#1360) next »