svn: /phpdoc/it/trunk/language/oop5/ basic.xml
| From: | Davide Pastore | Date: | Sat, 22 Jun 2013 02:47:50 +0000 |
| Subject: | svn: /phpdoc/it/trunk/language/oop5/ basic.xml | ||
| Groups: | php.doc.it | ||
| Request: | Send a blank email to doc-it+get-1626@lists.php.net to get a copy of this message | ||
pastore Sat, 22 Jun 2013 02:47:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=330614
Log:
Sync with EN
Changed paths:
U phpdoc/it/trunk/language/oop5/basic.xml
Modified: phpdoc/it/trunk/language/oop5/basic.xml
===================================================================
--- phpdoc/it/trunk/language/oop5/basic.xml 2013-06-21 16:53:38 UTC (rev 330613)
+++ phpdoc/it/trunk/language/oop5/basic.xml 2013-06-22 02:47:50 UTC (rev 330614)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 328095 Maintainer: pastore Status: ready -->
+<!-- EN-Revision: 330569 Maintainer: pastore Status: ready -->
<!-- Reviewed: yes Maintainer: cucinato -->
<sect1 xml:id="language.oop5.basic" xmlns="http://docbook.org/ns/docbook">
<title>Nozioni di base</title>
@@ -277,7 +277,41 @@
</screen>
</example>
</sect2>
+
+ <sect2 xml:id="language.oop5.basic.class.class">
+ <title>::class</title>
+ <para>
+ Da PHP 5.5, la parola chiave <literal>class</literal> è anche usata per la
risoluzione
+ del nome della classe. Si può ottenere una stringa contenente il nome completo
+ della classe <literal>ClassName</literal> utilizzando
+ <literal>ClassName::class</literal>. Questo è particolarmnete utile con
+ classi nei <link linkend="language.namespaces">namespace</link>.
+ </para>
+ <para>
+ <example xml:id="language.oop5.basic.class.class.name">
+ <title>Risoluzione del nome della classe</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+namespace NS {
+ class ClassName {
+ }
+
+ echo ClassName::class;
+}
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+NS\ClassName
+]]>
+ </screen>
+ </example>
+ </para>
+ </sect2>
</sect1>
<!-- Keep this comment at the end of the file