svn: /phpdoc/ru/trunk/language/predefined/ arrayaccess.xml errorexception.xml
| From: | Alexander Moskaliov | Date: | Tue, 06 Jan 2015 21:36:42 +0000 |
| Subject: | svn: /phpdoc/ru/trunk/language/predefined/ arrayaccess.xml errorexception.xml | ||
| Groups: | php.doc.ru | ||
| Request: | Send a blank email to doc-ru+get-4875@lists.php.net to get a copy of this message | ||
irker Tue, 06 Jan 2015 21:36:42 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=335652
Log:
Update translation
Changed paths:
U phpdoc/ru/trunk/language/predefined/arrayaccess.xml
U phpdoc/ru/trunk/language/predefined/errorexception.xml
Modified: phpdoc/ru/trunk/language/predefined/arrayaccess.xml
===================================================================
--- phpdoc/ru/trunk/language/predefined/arrayaccess.xml 2015-01-06 21:33:39 UTC (rev 335651)
+++ phpdoc/ru/trunk/language/predefined/arrayaccess.xml 2015-01-06 21:36:42 UTC (rev 335652)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 301180 Maintainer: mch Status: ready -->
+<!-- EN-Revision: 335080 Maintainer: mch Status: ready -->
+<!-- Reviewed: no -->
<!-- $Revision$ -->
-<!-- Reviewed: no -->
<phpdoc:classref xml:id="class.arrayaccess" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -47,8 +47,9 @@
<programlisting role="php">
<![CDATA[
<?php
-class obj implements arrayaccess {
+class obj implements ArrayAccess {
private $container = array();
+
public function __construct() {
$this->container = array(
"one" => 1,
@@ -56,6 +57,7 @@
"three" => 3,
);
}
+
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
@@ -63,12 +65,15 @@
$this->container[$offset] = $value;
}
}
+
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
+
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
+
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
Modified: phpdoc/ru/trunk/language/predefined/errorexception.xml
===================================================================
--- phpdoc/ru/trunk/language/predefined/errorexception.xml 2015-01-06 21:33:39 UTC (rev 335651)
+++ phpdoc/ru/trunk/language/predefined/errorexception.xml 2015-01-06 21:36:42 UTC (rev 335652)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 330314 Maintainer: shein Status: ready -->
+<!-- EN-Revision: 335199 Maintainer: shein Status: ready -->
<!-- Reviewed: yes -->
<!-- $Revision$ -->
@@ -10,7 +10,7 @@
xmlns:phpdoc="http://php.net/ns/phpdoc">
<title>ErrorException</title>
<titleabbrev>ErrorException</titleabbrev>
-
+
<partintro>
<!-- {{{ ErrorException intro -->
@@ -86,7 +86,11 @@
<![CDATA[
<?php
function exception_error_handler($errno, $errstr, $errfile, $errline ) {
- throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
+ if (!(error_reporting() & $errno)) {
+ // Этот код ошибки не входит в error_reporting
+ return;
+ }
+ throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
set_error_handler("exception_error_handler");
@@ -98,12 +102,12 @@
&example.outputs.similar;
<screen>
<![CDATA[
-Fatal error: Uncaught exception 'ErrorException' with message 'Wrong parameter count
for strpos()' in /home/bjori/tmp/ex.php:8
+Fatal error: Uncaught exception 'ErrorException' with message 'strpos() expects at
least 2 parameters, 0 given' in /home/bjori/tmp/ex.php:12
Stack trace:
-#0 [internal function]: exception_error_handler(2, 'Wrong parameter...',
'/home/bjori/php...', 8, Array)
-#1 /home/bjori/php/cleandocs/test.php(8): strpos()
+#0 [internal function]: exception_error_handler(2, 'strpos() expect...',
'/home/bjori/php...', 12, Array)
+#1 /home/bjori/php/cleandocs/test.php(12): strpos()
#2 {main}
- thrown in /home/bjori/tmp/ex.php on line 8
+ thrown in /home/bjori/tmp/ex.php on line 12
]]>
</screen>
</example><!-- }}} -->