cvs: phpdoc-pl /reference/classobj/functions get-class.xml

From: Date: Tue, 24 Feb 2004 02:07:06 +0000
Subject: cvs: phpdoc-pl /reference/classobj/functions get-class.xml
Groups: php.doc.pl 
Request: Send a blank email to doc-pl+get-290@lists.php.net to get a copy of this message
leszek Mon Feb 23 21:07:06 2004 EDT Modified files: /phpdoc-pl/reference/classobj/functions get-class.xml Log: [dombal] Made up-to-date... http://cvs.php.net/diff.php/phpdoc-pl/reference/classobj/functions/get-class.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-pl/reference/classobj/functions/get-class.xml diff -u phpdoc-pl/reference/classobj/functions/get-class.xml:1.3 phpdoc-pl/reference/classobj/functions/get-class.xml:1.4 --- phpdoc-pl/reference/classobj/functions/get-class.xml:1.3 Sun May 5 04:35:18 2002 +++ phpdoc-pl/reference/classobj/functions/get-class.xml Mon Feb 23 21:07:06 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-2"?> -<!-- EN-Revision: 1.2 Maintainer: dombal Status: Ready --> -<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.5 Maintainer: dombal Status: Ready --> +<!-- $Revision: 1.4 $ --> <refentry id="function.get-class"> <refnamediv> <refname>get_class</refname> @@ -24,6 +24,48 @@ jest zwracana w jej oryginalnej notacji. </simpara> </note> + <para> + <example> + <title>Przyk³ad u¿ycia <function>get_class</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +class foo { + function foo() + { + // implementacja pewnej logiki... + } + + function nazwa() + { + echo "Nazywam siê " , get_class($this) , "\n"; + } +} + +// tworzymy obiekt +$bar = new foo(); + +// zewnêtrzne wo³anie +echo "Jego nazwa to " , get_class($bar) , "\n"; + +// wewnêtrzne wo³anie +$bar->nazwa(); + +?> +]]> + </programlisting> + <para> + Wynikiem jest: + </para> + <screen> +<![CDATA[ +Jego nazwa to foo +Nazywam siê foo +]]> + </screen> + </example> + </para> <simpara> Patrz tak¿e: <function>get_parent_class</function>, <function>gettype</function>,

« previous php.doc.pl (#290) next »