svn: /phpdoc/ru/trunk/reference/classobj/functions/ property-exists.xml

From: Date: Mon, 07 Feb 2011 10:54:45 +0000
Subject: svn: /phpdoc/ru/trunk/reference/classobj/functions/ property-exists.xml
Groups: php.doc.ru 
Request: Send a blank email to doc-ru+get-1367@lists.php.net to get a copy of this message
shein Mon, 07 Feb 2011 10:54:45 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=308096 Log: Updated translation. Changed paths: U phpdoc/ru/trunk/reference/classobj/functions/property-exists.xml Modified: phpdoc/ru/trunk/reference/classobj/functions/property-exists.xml =================================================================== --- phpdoc/ru/trunk/reference/classobj/functions/property-exists.xml 2011-02-07 10:50:21 UTC (rev 308095) +++ phpdoc/ru/trunk/reference/classobj/functions/property-exists.xml 2011-02-07 10:54:45 UTC (rev 308096) @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.7 Status: ready --> +<!-- EN-Revision: 297830 Maintainer: shein Status: ready --> +<!-- Reviewed: no --> <!-- $Revision$ --> <refentry xml:id="function.property-exists" xmlns="http://docbook.org/ns/docbook"> <refnamediv> @@ -17,7 +18,7 @@ </methodsynopsis> <para> Функция проверяет, существует ли атрибут <parameter>property</parameter> - в определенном классе (и доступно ли оно из текущей области видимости). + в указанном классе. </para> <note> <para> @@ -57,6 +58,44 @@ &null; в случае ошибки. </para> </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + &note.uses-autoload; + <note> + <para> + Функция <function>property_exists</function> не определяет + магически доступные свойства с помощью метода + <link + linkend="language.oop5.overloading.members"><literal>__get</literal></link>. + </para> + </note> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.3.0</entry> + <entry> + Эта функция проверяет существование свойства вне зависимости от + его доступности. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> @@ -69,15 +108,18 @@ class myClass { public $mine; private $xpto; + static protected $test; static function test() { - var_dump(property_exists('myClass', 'xpto')); // true, отсюда есть доступ к свойству + var_dump(property_exists('myClass', 'xpto')); //true } } var_dump(property_exists('myClass', 'mine')); //true var_dump(property_exists(new myClass, 'mine')); //true -var_dump(property_exists('myClass', 'xpto')); //false, свойство не public +var_dump(property_exists('myClass', 'xpto')); //true, начиная с версии PHP 5.3.0 +var_dump(property_exists('myClass', 'bar')); //false +var_dump(property_exists('myClass', 'test')); //true, начиная с версии PHP 5.3.0 myClass::test(); ?> @@ -107,7 +149,7 @@ sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"../~/.phpdoc/manual.ced" +sgml-default-dtd-file:"~/.phpdoc/manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil

« previous php.doc.ru (#1367) next »