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

From: Date: Sat, 08 Mar 2008 22:07:50 +0000
Subject: cvs: phpdoc-de /reference/classobj/functions get-class.xml
Groups: php.doc.de 
Request: Send a blank email to doc-de+get-2456@lists.php.net to get a copy of this message
hholzgra Sat Mar 8 22:07:50 2008 UTC Modified files: /phpdoc-de/reference/classobj/functions get-class.xml Log: translation update http://cvs.php.net/viewvc.cgi/phpdoc-de/reference/classobj/functions/get-class.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc-de/reference/classobj/functions/get-class.xml diff -u phpdoc-de/reference/classobj/functions/get-class.xml:1.7 phpdoc-de/reference/classobj/functions/get-class.xml:1.8 --- phpdoc-de/reference/classobj/functions/get-class.xml:1.7 Sat Jun 23 13:21:30 2007 +++ phpdoc-de/reference/classobj/functions/get-class.xml Sat Mar 8 22:07:50 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- EN-Revision: 1.11 Maintainer: hholzgra Status: ready --> +<!-- $Revision: 1.8 $ --> +<!-- EN-Revision: 1.12 Maintainer: hholzgra Status: ready --> <refentry xml:id="function.get-class" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>get_class</refname> @@ -82,11 +82,6 @@ <?php class foo { - function foo() - { - // Implementation - } - function name() { echo "Mein Name ist " , get_class($this) , "\n"; @@ -113,6 +108,36 @@ ]]> </screen> </example> + <example> + <title>Einsatz von <function>get_class</function> in einer Elternklasse</title> + <programlisting role="php"> +<![CDATA[ +<?php + +abstract class bar { + public function __construct() + { + var_dump(get_class($this)); + var_dump(get_class()); + } +} + +class foo extends bar { +} + +new foo; + +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +string(3) "foo" +string(3) "bar" +]]> + </screen> + </example> </para> </refsect1> <refsect1 role="seealso">

« previous php.doc.de (#2456) next »