diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index 68773ecab3..030de9159c 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -39,5 +39,8 @@ jobs: path: "doc-base" repository: "php/doc-base" + - name: "Quality Assurance scripts" + run: "php8.0 doc-base/scripts/qa/extensions.xml.php --check" + - name: "Build documentation for ${{ matrix.language }}" run: "php8.0 doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=${{ matrix.language }}" diff --git a/appendices/aliases.xml b/appendices/aliases.xml index 2c85c0f598..2384241d9c 100644 --- a/appendices/aliases.xml +++ b/appendices/aliases.xml @@ -221,11 +221,6 @@ ldap_unbind LDAP - - magic_quotes_runtime - set_magic_quotes_runtime - Base syntax - mbstrcut mb_strcut diff --git a/appendices/configure/misc.xml b/appendices/configure/misc.xml index d9f5d68004..a5416ec9cc 100644 --- a/appendices/configure/misc.xml +++ b/appendices/configure/misc.xml @@ -168,29 +168,6 @@ code! - - - - - - - Compile with memory limit support. - (not available since PHP 5.2.1 - always enabled) - - - - - - - - - - Disable the URL-aware fopen wrapper that allows - accessing files via HTTP or FTP. - (not available since PHP 5.2.5) - - - diff --git a/appendices/configure/servers.xml b/appendices/configure/servers.xml index e0fa3c67d3..cac0e0148f 100644 --- a/appendices/configure/servers.xml +++ b/appendices/configure/servers.xml @@ -73,7 +73,7 @@ - Enable phpdbg interactive debugger SAPI module support in PHP 5.6.x or later. + Enable phpdbg interactive debugger SAPI module support. @@ -112,100 +112,11 @@ Disable building CGI version of PHP. - As of PHP 5.3.0 this argument enables FastCGI which previously - had to be enabled using --enable-fastcgi. + This argument also enables FastCGI. - - - - - - - Enable the security check for internal server redirects. You should use - this if you are running the CGI version with Apache. - - - As of PHP 5.3.0 this argument is enabled by default and no longer - exists. To disable this, the - cgi.force_redirect ini directive - should be set to 0. - - - - - - - - - - - If this is enabled, the PHP CGI binary can safely be placed outside of - the web tree and people will not be able to circumvent &htaccess; - security. - - - As of PHP 5.3.0 this argument is disabled by default and no longer - exists. To enable this feature the cgi.discard_path ini directive - must be set to 1. - - - - - - - - - - - - - If this is enabled, the CGI module will be built with support for FastCGI - also. - - - As of PHP 5.3.0 this argument no longer exists and is enabled by - --enable-cgi instead. - - - - - - - - - - - If this is disabled, paths such as /info.php/test?a=b - will fail to work. For more information see the - Apache Manual. - - - As of PHP 5.3.0 this argument is enabled by default and no longer exists. - To disable this feature the cgi.fix_pathinfo ini directive must - be set to 0. - - - diff --git a/appendices/extensions.xml b/appendices/extensions.xml index 93533d781d..110e3a5b4d 100644 --- a/appendices/extensions.xml +++ b/appendices/extensions.xml @@ -1,5 +1,4 @@ - @@ -168,7 +155,6 @@ - @@ -178,19 +164,20 @@ - + + @@ -218,24 +205,23 @@ - + + + - + - - - @@ -252,23 +238,27 @@ + + + - - + - + + + - + @@ -279,19 +269,14 @@ - - - - - @@ -304,16 +289,15 @@ + - - @@ -326,82 +310,90 @@ &extcat.membership.pecl; - + + + - + + + - + - + - - - - - - - - + + - + + - + - + + - - - + + - + + - + + + + + + + + + @@ -414,7 +406,7 @@ &extcat.state.deprecated; - + @@ -422,11 +414,8 @@ &extcat.state.experimental; - - - diff --git a/appendices/ini.core.xml b/appendices/ini.core.xml index c071d5ada0..d8bb14dc7f 100644 --- a/appendices/ini.core.xml +++ b/appendices/ini.core.xml @@ -322,7 +322,7 @@ Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in Unk is used, both zend.multibyte and zend.script_encoding must be used. - Literal strings will be transliterated from zend.script_enconding to + Literal strings will be transliterated from zend.script_encoding to mbstring.internal_encoding, as if mb_convert_encoding would have been called. @@ -564,7 +564,7 @@ Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in Unk enable_post_data_reading "1" PHP_INI_PERDIR - Available as of PHP 5.4.0 + post_max_size @@ -975,12 +975,6 @@ Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in Unk - - See also: magic_quotes_gpc, - magic_quotes_runtime, - and - magic_quotes_sybase. -
@@ -1261,6 +1255,12 @@ include_path = ".:${USER}/pear/php" to 0 and thus disable the realpath cache. + + + open_basedir is just an extra safety net, that is in no way + comprehensive, and can therefore not be relied upon when security is needed. + + @@ -1629,6 +1629,9 @@ include_path = ".:${USER}/pear/php" The maximum size of an uploaded file. + + post_max_size must be larger than this value. + &ini.shorthandbytes; @@ -1643,7 +1646,7 @@ include_path = ".:${USER}/pear/php" The maximum number of files allowed to be uploaded simultaneously. - Starting with PHP 5.3.4, upload fields left blank on submission do not + Upload fields left blank on submission do not count towards this limit. diff --git a/appendices/ini.list.xml b/appendices/ini.list.xml index d9e751e852..072267d8b8 100644 --- a/appendices/ini.list.xml +++ b/appendices/ini.list.xml @@ -484,7 +484,6 @@ - last_modified "0" @@ -555,15 +554,9 @@ PHP_INI_ALL - - - - - - diff --git a/appendices/ini.sections.xml b/appendices/ini.sections.xml index 27d976763e..b58b6f05fb 100644 --- a/appendices/ini.sections.xml +++ b/appendices/ini.sections.xml @@ -32,12 +32,12 @@ [HOST=] PHP_INI_SYSTEM - Added in PHP 5.3.0. + [PATH=] PHP_INI_SYSTEM - Added in PHP 5.3.0. + diff --git a/appendices/migration70/incompatible/removed-functions.xml b/appendices/migration70/incompatible/removed-functions.xml index 4c7352e7c2..ffac64c434 100644 --- a/appendices/migration70/incompatible/removed-functions.xml +++ b/appendices/migration70/incompatible/removed-functions.xml @@ -27,7 +27,7 @@ All ereg* functions - All ereg functions were removed. + All ereg functions were removed. PCRE is a recommended alternative. diff --git a/appendices/migration73/other-changes.xml b/appendices/migration73/other-changes.xml index ddc026db45..d7dc8d1b23 100644 --- a/appendices/migration73/other-changes.xml +++ b/appendices/migration73/other-changes.xml @@ -46,9 +46,12 @@ syslog.filter - Specifies the filter type to filter the logged messages. There are three + Specifies the filter type to filter the logged messages, with the supported filter types - all, no-ctrl and ascii. + Starting with PHP 7.3.8, raw is also available, + restoring the way syslog behaved in previous PHP versions. + This filter will also affect calls to syslog. diff --git a/appendices/migration74/incompatible.xml b/appendices/migration74/incompatible.xml index 384c132d97..cd86a24395 100644 --- a/appendices/migration74/incompatible.xml +++ b/appendices/migration74/incompatible.xml @@ -249,6 +249,12 @@ supported and resulted in corrupted reflection objects. It has been explicitly prohibited now. + + + The values of the class constant of ReflectionClassConstant, + ReflectionMethod and ReflectionProperty + have changed. + diff --git a/appendices/migration74/new-features.xml b/appendices/migration74/new-features.xml index 7b0b89e796..51b671cffc 100644 --- a/appendices/migration74/new-features.xml +++ b/appendices/migration74/new-features.xml @@ -142,7 +142,7 @@ $fruits = ['banana', 'orange', ...$parts, 'watermelon']; Weak references - Weak references allow the programmer to retain a reference to an object + Weak references allow the programmer to retain a reference to an object that does not prevent the object from being destroyed. @@ -233,7 +233,7 @@ $fruits = ['banana', 'orange', ...$parts, 'watermelon']; The preg_replace_callback and preg_replace_callback_array functions now accept an additional flags argument, with support for the PREG_OFFSET_CAPTURE and PREG_UNMATCHED_AS_NULL flags. - This influences the format of the matches array passed to to the callback function. + This influences the format of the matches array passed to the callback function. diff --git a/appendices/migration74/new-functions.xml b/appendices/migration74/new-functions.xml index e11df1f4da..1a5bc154ec 100644 --- a/appendices/migration74/new-functions.xml +++ b/appendices/migration74/new-functions.xml @@ -1,6 +1,4 @@ - - New Functions @@ -38,6 +36,18 @@ + + Multibyte String + + + + + mb_str_split + + + + + OpenSSL @@ -80,7 +90,6 @@ - - The WeakMap class has been added. + The WeakMap class has been added. diff --git a/appendices/reserved.constants.core.xml b/appendices/reserved.constants.core.xml index 678586e1b8..d148c8abcd 100644 --- a/appendices/reserved.constants.core.xml +++ b/appendices/reserved.constants.core.xml @@ -27,7 +27,7 @@ The current PHP "major" version as an integer (e.g., int(5) - from version "5.2.7-extra"). Available since PHP 5.2.7. + from version "5.2.7-extra"). @@ -39,7 +39,7 @@ The current PHP "minor" version as an integer (e.g., int(2) - from version "5.2.7-extra"). Available since PHP 5.2.7. + from version "5.2.7-extra"). @@ -51,7 +51,7 @@ The current PHP "release" version as an integer (e.g., int(7) - from version "5.2.7-extra"). Available since PHP 5.2.7. + from version "5.2.7-extra"). @@ -64,7 +64,6 @@ The current PHP version as an integer, useful for version comparisons (e.g., int(50207) from version "5.2.7-extra"). - Available since PHP 5.2.7. @@ -77,8 +76,7 @@ The current PHP "extra" version as a string (e.g., '-extra' from version "5.2.7-extra"). Often used by distribution - vendors to indicate a package version. Available since - PHP 5.2.7. + vendors to indicate a package version. @@ -89,7 +87,7 @@ - Available since PHP 5.2.7. + @@ -100,7 +98,7 @@ - Available since PHP 5.2.7. + @@ -112,7 +110,7 @@ The maximum length of filenames (including path) supported - by this build of PHP. Available since PHP 5.3.0. + by this build of PHP. @@ -162,7 +160,6 @@ The correct 'End Of Line' symbol for this platform. - Available since PHP 5.0.2 @@ -175,7 +172,6 @@ The largest integer supported in this build of PHP. Usually int(2147483647) in 32 bit systems and int(9223372036854775807) in 64 bit systems. - Available since PHP 5.0.5 @@ -187,7 +183,7 @@ The smallest integer supported in this build of PHP. Usually int(-2147483648) in 32 bit systems and - int(-9223372036854775808) in 64 bit systems. Available since PHP 7.0.0. + int(-9223372036854775808) in 64 bit systems. Usually, PHP_INT_MIN === ~PHP_INT_MAX. @@ -199,7 +195,7 @@ - The size of an integer in bytes in this build of PHP. Available since PHP 5.0.5 + The size of an integer in bytes in this build of PHP. @@ -294,7 +290,9 @@ - + The default directory where to look for dynamically loadable extensions + (unless overridden by extension_dir). + Defaults to PHP_PREFIX (or PHP_PREFIX . "\\ext" on Windows). @@ -343,7 +341,6 @@ Specifies where the manpages were installed into. - Available since PHP 5.3.7. @@ -566,7 +563,6 @@ Error reporting constant. - Available since PHP 5.2.0 @@ -578,7 +574,6 @@ Error reporting constant. - Available since PHP 5.3.0 @@ -590,7 +585,6 @@ Error reporting constant. - Available since PHP 5.3.0 @@ -623,7 +617,7 @@ - Available since PHP 5.1.0 + @@ -686,7 +680,7 @@ - See also: Magic + See also: Magic constants. diff --git a/appendices/reserved.xml b/appendices/reserved.xml index cf00441ebe..3e3347fe56 100644 --- a/appendices/reserved.xml +++ b/appendices/reserved.xml @@ -16,12 +16,9 @@ These words have special meaning in PHP. Some of them represent things which look like functions, some look like constants, and so on - but - they're not, really: they are language constructs. You cannot use any - of the following words as constants, class names, function or method names. - Using them as variable names is generally OK, but could lead to confusion. - - - As of PHP 7.0.0 these keywords are allowed as property, constant, and + they're not, really: they are language constructs. + The following words cannot be used as constants, class names, function or method names. + They are, however, allowed as property, constant, and method names of classes, interfaces and traits, except that class may not be used as constant name. @@ -52,7 +49,7 @@ break - callable (as of PHP 5.4) + callable case @@ -137,7 +134,7 @@ final - finally (as of PHP 5.5) + finally fn (as of PHP 7.4) @@ -157,7 +154,7 @@ global - goto (as of PHP 5.3) + goto if @@ -177,7 +174,7 @@ instanceof - insteadof (as of PHP 5.4) + insteadof interface @@ -194,7 +191,7 @@ match (as of PHP 8.0) - namespace (as of PHP 5.3) + namespace new @@ -239,7 +236,7 @@ throw - trait (as of PHP 5.4) + trait try @@ -262,10 +259,10 @@ xor - yield (as of PHP 5.5) + yield - yield from (as of PHP 7.0) + yield from @@ -281,7 +278,7 @@ __CLASS__ - __DIR__ (as of PHP 5.3) + __DIR__ __FILE__ @@ -298,10 +295,10 @@ - __NAMESPACE__ (as of PHP 5.3) + __NAMESPACE__ - __TRAIT__ (as of PHP 5.4) + __TRAIT__ @@ -358,18 +355,6 @@ - - - - - Predefined classes as of PHP 5 - - - These additional predefined classes were introduced in - PHP 5.0.0. - - - Exception @@ -381,7 +366,7 @@ ErrorException - Available since PHP 5.1.0. + @@ -392,46 +377,26 @@ - - - - - Closure - - - The predefined final class Closure was introduced - in PHP 5.3.0. It is used for representing anonymous functions. - - - For more information, see its class - page. - - - - - Generator - - - The predefined final class Generator was introduced - in PHP 5.5.0. It is used for representing generators. - - - For more information, see its class - page. - - - - - Predefined interfaces and classes as of PHP 7 - - - These additional predefined interfaces and classes were introduced in - PHP 7.0.0. - - - + + Closure + + + The predefined final class Closure + is used for representing anonymous functions. + + + + + Generator + + + The predefined final class Generator + is used for representing generators. + + + ArithmeticError @@ -538,27 +503,27 @@ - int (as of PHP 7) + int - float (as of PHP 7) + float - bool (as of PHP 7) + bool - string (as of PHP 7) + string - true (as of PHP 7) + true - false (as of PHP 7) + false - null (as of PHP 7) + null void (as of PHP 7.1) @@ -589,13 +554,13 @@ - resource (as of PHP 7) + resource - mixed (as of PHP 7) + mixed - numeric (as of PHP 7) + numeric diff --git a/appendices/resources.xml b/appendices/resources.xml index e470e0bbea..1b4098ff71 100644 --- a/appendices/resources.xml +++ b/appendices/resources.xml @@ -362,31 +362,6 @@ Link to Dbase database - - dbx_link_object - - dbx_connect - - - dbx_query - - - dbx_close - - dbx connection - - - dbx_result_object - - dbx_query - - - - - None - - dbx result - enchant_broker @@ -644,7 +619,6 @@ imageinterlace, imageline, imagepolygon, - imagepstext, imagerectangle, imagerotate, imagesetpixel, @@ -704,55 +678,6 @@ Font for GD - - GMP integer - - gmp_init - - - gmp_intval, - gmp_strval, - gmp_add, - gmp_sub, - gmp_mul, - gmp_div_q, - gmp_div_r, - gmp_div_qr, - gmp_div, - gmp_mod, - gmp_divexact, - gmp_cmp, - gmp_neg, - gmp_abs, - gmp_sign, - gmp_fact, - gmp_sqrt, - gmp_sqrtrm, - gmp_perfect_square, - gmp_pow, - gmp_powm, - gmp_prob_prime, - gmp_gcd, - gmp_gcdext, - gmp_invert, - gmp_legendre, - gmp_jacobi, - gmp_random, - gmp_and, - gmp_or, - gmp_xor, - gmp_setbit, - gmp_clrbit, - gmp_scan0, - gmp_scan1, - gmp_popcount, - gmp_hamdist - - - None - - GMP Number - imap @@ -802,60 +727,6 @@ Link to IMAP, POP3 server - - ingres - - ingres_connect - - - ingres_query, - ingres_num_rows, - ingres_num_fields, - ingres_field_name, - ingres_field_type, - ingres_field_nullable, - ingres_field_length, - ingres_field_precision, - ingres_field_scale, - ingres_fetch_array, - ingres_fetch_row, - ingres_fetch_object, - ingres_rollback, - ingres_commit, - ingres_autocommit - - - ingres_close - - Link to ingresII base - - - ingres persistent - - ingres_pconnect - - - ingres_query, - ingres_num_rows, - ingres_num_fields, - ingres_field_name, - ingres_field_type, - ingres_field_nullable, - ingres_field_length, - ingres_field_precision, - ingres_field_scale, - ingres_fetch_array, - ingres_fetch_row, - ingres_fetch_object, - ingres_rollback, - ingres_commit, - ingres_autocommit - - - None - - Persistent link to ingresII base - interbase blob @@ -1023,7 +894,6 @@ mysql_affected_rows, - mysql_change_user, mysql_create_db, mysql_data_seek, mysql_db_name, @@ -1055,7 +925,6 @@ mysql_affected_rows, - mysql_change_user, mysql_create_db, mysql_data_seek, mysql_db_name, @@ -1424,7 +1293,7 @@ pg_untrace, pg_set_client_encoding, pg_client_encoding, - pg_metadata, + pg_meta_data, pg_convert, pg_insert, pg_select, @@ -1469,7 +1338,7 @@ pg_untrace, pg_set_client_encoding, pg_client_encoding, - pg_metadata, + pg_meta_data, pg_convert, pg_insert, pg_select, diff --git a/appendices/tokens.xml b/appendices/tokens.xml index f22474a11d..19fffd983a 100644 --- a/appendices/tokens.xml +++ b/appendices/tokens.xml @@ -4,30 +4,38 @@ List of Parser Tokens - Various parts of the PHP language are represented internally by types like - T_SR. PHP outputs identifiers like this one in parse errors, like - "Parse error: unexpected T_SR, expecting ',' or ';' in script.php on line 10." + Various parts of the PHP language are represented internally by tokens. + A code snippet that contains an invalid sequence of tokens may lead to errors like + Parse error: syntax error, unexpected token "==", expecting "(" in script.php on line 10." + where token == is internally represented by T_IS_EQUAL. + - You're supposed to know what T_SR means. For everybody who doesn't - know that, here is a table with those identifiers, PHP-syntax and - references to the appropriate places in the manual. + The following table lists all tokens. They are also available as PHP constants. Usage of T_* constants - All tokens listed below are also defined as PHP constants. Their value is - automatically generated based on PHP's underlying parser infrastructure. + T_* constants values are automatically generated based on PHP's underlying parser infrastructure. This means that the concrete value of a token may change between two PHP - versions. For example the T_FILE constant is - 365 in PHP 5.3, while the same value refers now to - T_TRAIT in PHP 5.4 and the value of T_FILE - is 369. This means that your code should never rely directly + versions. + This means that your code should never rely directly on the original T_* values taken from PHP version X.Y.Z, to provide some compatibility - across multiple PHP versions. Instead your code should utilize custom values - (using big numbers like 10000) and an appropriate strategy that - will work with both PHP versions and T_* values. + across multiple PHP versions. + + + + To make use of T_* constants across multiple PHP versions, undefined constants + may be defined by the user (using big numbers like 10000) with an + appropriate strategy that will work with both PHP versions and T_* values. + + + @@ -64,17 +72,22 @@ (array) type-casting - + T_AS as &foreach; + + T_ATTRIBUTE + #[ + attributes (available as of PHP 8.0.0) + T_BAD_CHARACTER anything below ASCII 32 except \t (0x09), \n (0x0a) and \r (0x0d) - (available since PHP 7.4.0) + (available as of PHP 7.4.0) @@ -149,7 +162,7 @@ ??= assignment operators - (available since PHP 7.4.0) + (available as of PHP 7.4.0) @@ -361,7 +374,7 @@ fn arrow functions - (available since PHP 7.4.0) + (available as of PHP 7.4.0) diff --git a/appendices/transports.xml b/appendices/transports.xml index 8e5732a4ca..6ccc4b6a91 100644 --- a/appendices/transports.xml +++ b/appendices/transports.xml @@ -90,7 +90,7 @@ Unix Domain: Unix and UDG unix:// and - udg:// (udg:// since PHP 5). + udg://. diff --git a/faq/installation.xml b/faq/installation.xml index c637824502..166d1fe8a8 100644 --- a/faq/installation.xml +++ b/faq/installation.xml @@ -464,38 +464,9 @@ cgi error: - There are several ways of doing this. If you are using Apache, read - their installation specific instructions (Apache 1, Apache 2), otherwise you must - set the PHPRC environment variable: - - - On Windows: - - - Go to Control Panel and open the System icon (Start → Settings - → Control Panel → System, or just Start → Control Panel - → System) - - - Go to the Advanced tab - - - Click on the 'Environment Variables' button - - - Look into the 'System variables' pane - - - Click on 'New' and enter 'PHPRC' as the variable name and the - directory where &php.ini; is located as the variable value (e.g. - C:\php) - - - Press OK and restart your computer - - + There are several ways of doing this. If you are using Apache, + refer to the Apache documentation, otherwise + you must set the PHPRC environment variable. diff --git a/faq/using.xml b/faq/using.xml index f2c894b9e6..c4474547bc 100644 --- a/faq/using.xml +++ b/faq/using.xml @@ -333,7 +333,7 @@ foreach ($headers as $name => $content) { The available options are K (for Kilobytes), M (for Megabytes) and G (for - Gigabytes; available since PHP 5.1.0), and are all case-insensitive. + Gigabytes), and are all case-insensitive. Anything else assumes bytes. 1M equals one Megabyte or 1048576 bytes. 1K equals one Kilobyte or 1024 bytes. These shorthand notations may diff --git a/features/commandline.xml b/features/commandline.xml index 00db5c71f0..a00b32660b 100644 --- a/features/commandline.xml +++ b/features/commandline.xml @@ -56,7 +56,7 @@ - As of PHP 5, the &cli; binary is distributed in the main folder as + The &cli; binary is distributed in the main folder as php.exe on Windows. The CGI version is distributed as php-cgi.exe. Additionally, a php-win.exe is distributed if PHP is configured using @@ -686,7 +686,7 @@ array(370) { --process-begin - PHP code to execute before processing stdin. Added in PHP 5. + PHP code to execute before processing stdin. @@ -695,7 +695,7 @@ array(370) { --process-code - PHP code to execute for every input line. Added in PHP 5. + PHP code to execute for every input line. There are two special variables available in this mode: @@ -711,7 +711,7 @@ array(370) { --process-file - PHP file to execute for every input line. Added in PHP 5. + PHP file to execute for every input line. @@ -720,7 +720,7 @@ array(370) { --process-end - PHP code to execute after processing the input. Added in PHP 5. + PHP code to execute after processing the input. Using the <option>-B</option>, <option>-R</option> and @@ -742,7 +742,7 @@ Total Lines: 37328 <entry> <para> Starts <link linkend="features.commandline.webserver">built-in web - server</link>. Available as of PHP 5.4.0. + server</link>. </para> </entry> </row> @@ -752,7 +752,6 @@ Total Lines: 37328 <entry> Specifies document root for <link linkend="features.commandline.webserver">built-in web server</link>. - Available as of PHP 5.4.0. </entry> </row> <row> @@ -830,8 +829,7 @@ Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies <entry>--ini</entry> <entry> <para> - Show configuration file names and scanned directories. Available as - of PHP 5.2.3. + Show configuration file names and scanned directories. <example> <title><literal>--ini</literal> example @@ -853,7 +851,7 @@ Additional .ini files parsed: (none) Show information about the given function or class method (e.g. - number and name of the parameters). Available as of PHP 5.1.2. + number and name of the parameters). This option is only available if PHP was compiled with @@ -884,7 +882,7 @@ Function [ public function var_dump ] { Show information about the given class (list of constants, properties - and methods). Available as of PHP 5.1.2. + and methods). This option is only available if PHP was compiled with @@ -933,7 +931,7 @@ Class [ class Directory ] { Show information about the given extension (list of &php.ini; options, - defined functions, constants and classes). Available as of PHP 5.1.2. + defined functions, constants and classes). This option is only available if PHP was compiled with @@ -967,7 +965,6 @@ Extension [ extension #19 json version 1.2.1 ] { Show the configuration information for the given Zend extension (the same information that is returned by phpinfo). - Available as of PHP 5.4.0. @@ -978,7 +975,7 @@ Extension [ extension #19 json version 1.2.1 ] { Show the configuration information for the given extension (the same information that is returned by phpinfo). - Available as of PHP 5.2.2. The core configuration information + The core configuration information is available using "main" as extension name. @@ -1292,7 +1289,7 @@ This is a command line PHP script with one option. On Windows, PHP can be configured to run without the need to supply the C:\php\php.exe or the .php - extension, as described in Command + extension, as described in Command Line PHP on Microsoft Windows. @@ -1413,7 +1410,7 @@ php -r 'fwrite(STDERR, "stderr\n");' Interactive shell - As of PHP 5.1.0, the &cli.sapi; provides an interactive shell using the + The &cli.sapi; provides an interactive shell using the option if PHP is compiled with the option. As of PHP 7.1.0 the interactive shell is also available on Windows, if the @@ -1492,7 +1489,7 @@ php > $foo[TAB]ThisIsAReallyLongVariableName - As of PHP 5.4.0, the &cli.sapi; provides + The &cli.sapi; provides the &php.ini; settings cli.pager and cli.prompt. The cli.pager setting allows an external program (such as less) to @@ -1502,7 +1499,7 @@ php > $foo[TAB]ThisIsAReallyLongVariableName - In PHP 5.4.0 it was also made possible to set + It is also possible to set &php.ini; settings in the interactive shell using a shorthand notation. @@ -1614,7 +1611,7 @@ php > - As of PHP 5.4.0, the &cli.sapi; provides a built-in web server. + The &cli.sapi; provides a built-in web server. @@ -1907,7 +1904,7 @@ $ php -S 0.0.0.0:8000 cli_server.color "0" PHP_INI_ALL - Available since PHP 5.4.0. + diff --git a/features/file-upload.xml b/features/file-upload.xml index 339264243f..0da46e3a5e 100644 --- a/features/file-upload.xml +++ b/features/file-upload.xml @@ -301,7 +301,7 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) { UPLOAD_ERR_NO_TMP_DIR - Value: 6; Missing a temporary folder. Introduced in PHP 5.0.3. + Value: 6; Missing a temporary folder. @@ -309,7 +309,7 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) { UPLOAD_ERR_CANT_WRITE - Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0. + Value: 7; Failed to write file to disk. @@ -319,8 +319,7 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) { Value: 8; A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to - stop; examining the list of loaded extensions with phpinfo may help. - Introduced in PHP 5.2.0. + stop; examining the list of loaded extensions with phpinfo may help. @@ -372,7 +371,7 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) { post_max_size large enough. - As of PHP 5.2.12, the + The max_file_uploads configuration setting controls the maximum number of files that can uploaded in one request. If more files are uploaded than the limit, then @@ -456,7 +455,7 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) { - As of PHP 5.2.12, the + The max_file_uploads configuration setting acts as a limit on the number of files that can be uploaded in one request. You will need to ensure that your form does not diff --git a/features/http-auth.xml b/features/http-auth.xml index 6a255689ac..527f533b3d 100644 --- a/features/http-auth.xml +++ b/features/http-auth.xml @@ -14,7 +14,7 @@ and AUTH_TYPE set to the user name, password and authentication type respectively. These predefined variables are found in the $_SERVER array. Both "Basic" and "Digest" - (since PHP 5.1.0) authentication methods are supported. See the + authentication methods are supported. See the header function for more information. diff --git a/features/remote-files.xml b/features/remote-files.xml index 70164bdc4c..2b8fdafc23 100644 --- a/features/remote-files.xml +++ b/features/remote-files.xml @@ -10,8 +10,8 @@ that take a filename as a parameter. In addition, URLs can be used with the include, include_once, require and - require_once statements (since PHP 5.2.0, - must be enabled for these). + require_once statements + ( must be enabled for these). See for more information about the protocols supported by PHP. diff --git a/install/fpm/configuration.xml b/install/fpm/configuration.xml index 4af3afce93..af874112ae 100644 --- a/install/fpm/configuration.xml +++ b/install/fpm/configuration.xml @@ -277,7 +277,7 @@ original PHP FastCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address must be separated by a comma. If this value is left blank, connections will be accepted from any ip address. Default value: any. - IPv6 addresses are allowed since PHP 5.5.20 and 5.6.4. + IPv6 addresses are allowed. @@ -326,7 +326,7 @@ When POSIX Access Control Lists are supported you can set them using this option. When set, listen.owner and listen.group - are ignored. Value is a comma separated list of user names. Since PHP 5.6.5. + are ignored. Value is a comma separated list of user names. @@ -338,7 +338,7 @@ See listen.acl_users. - Value is a comma separated list of group names. Since PHP 5.6.5. + Value is a comma separated list of group names. @@ -682,7 +682,7 @@ Clear environment in FPM workers. Prevents arbitrary environment variables from reaching FPM worker processes by clearing the environment in workers before env vars specified in this - pool configuration are added. Since PHP 5.4.27, 5.5.11, and 5.6.0. + pool configuration are added. Default value: Yes. diff --git a/install/fpm/install.xml b/install/fpm/install.xml index 0536d870f7..0449dc29a5 100644 --- a/install/fpm/install.xml +++ b/install/fpm/install.xml @@ -29,7 +29,7 @@ - --with-fpm-acl - Use POSIX Access Control Lists (default - no). Since PHP 5.6.5. + --with-fpm-acl - Use POSIX Access Control Lists (default - no). diff --git a/install/ini.xml b/install/ini.xml index 99a92cd88f..b65f222f94 100644 --- a/install/ini.xml +++ b/install/ini.xml @@ -25,13 +25,12 @@ - The PHPRC environment variable. Before PHP 5.2.0, - this was checked after the registry key mentioned below. + The PHPRC environment variable. - As of PHP 5.2.0, the location of the php.ini file + The location of the php.ini file can be set for different versions of PHP. The root of the registry keys depends on 32- or 64-bitness of the installed OS and PHP. For 32-bit PHP on a 32-bit OS or a 64-bit PHP on a 64-bit OS use [(HKEY_LOCAL_MACHINE\SOFTWARE\PHP] for 32-bit version of PHP on a 64-bit OS use [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\PHP]] instead. For same bitness installation the following registry keys @@ -138,7 +137,7 @@ include_path = ".;c:\php\lib" - Since PHP 5.1.0, it is possible to refer to existing .ini variables from + It is possible to refer to existing .ini variables from within .ini files. Example: open_basedir = ${open_basedir} ":/new/dir". @@ -148,8 +147,8 @@ include_path = ".;c:\php\lib" It is possible to configure PHP to scan for .ini files in a directory after reading &php.ini;. This can be done at compile time by setting the - option. In - PHP 5.2.0 and later, the scan directory can then be overridden at run time + option. + The scan directory can then be overridden at run time by setting the PHP_INI_SCAN_DIR environment variable. @@ -245,7 +244,7 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php .user.ini files - Since PHP 5.3.0, PHP includes support for configuration INI files on a + PHP includes support for configuration INI files on a per-directory basis. These files are processed only by the CGI/FastCGI SAPI. This functionality obsoletes the PECL htscanner extension. If you are running PHP as Apache module, use &htaccess; files for the same @@ -322,14 +321,13 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php Entry can be set in user scripts (like with ini_set) or in the Windows registry. - Since PHP 5.3, entry can be set in &user-ini; + Entry can be set in &user-ini; PHP_INI_PERDIR Entry can be set in &php.ini;, &htaccess;, &httpd.conf; or &user-ini; - (since PHP 5.3) diff --git a/install/macos/bundled.xml b/install/macos/bundled.xml index 99a0849a0b..60375b64ae 100644 --- a/install/macos/bundled.xml +++ b/install/macos/bundled.xml @@ -1,10 +1,10 @@ - Using the bundled PHP + Using the bundled PHP prior to macOS Monterey - PHP has come standard with Macs since Mac OS X version 10.0.0. Enabling PHP - with the default web server requires uncommenting a few lines in the + PHP is bundled with macOS since macOS X (10.0.0) prior to macOS Monterey (12.0.0). + Enabling PHP with the default web server requires uncommenting a few lines in the Apache configuration file httpd.conf whereas the CGI and/or CLI are enabled by default (easily accessible via the Terminal program). diff --git a/install/macos/index.xml b/install/macos/index.xml index a37789616b..6915026c1b 100644 --- a/install/macos/index.xml +++ b/install/macos/index.xml @@ -4,8 +4,8 @@ Installation on macOS This section contains notes and hints specific to installing PHP on macOS. - PHP is bundled with Macs, and compiling is similar to the - Unix installation guide. + PHP is bundled with macOS since macOS X (10.0.0) prior to macOS Monterey (12.0.0). + Compiling is similar to the Unix installation guide. &install.macos.packages; &install.macos.bundled; diff --git a/install/pecl.xml b/install/pecl.xml index c0ef29765e..64356e58c9 100644 --- a/install/pecl.xml +++ b/install/pecl.xml @@ -111,16 +111,15 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname (see next section for the download). - To compile an extension into PHP, please refer to + To compile an extension into PHP, please refer to building from source documentation. - To compile a standalone extension (aka a DLL file), please refer to + To compile a standalone extension (aka a DLL file), please refer to building from source documentation. If the DLL file is available neither with your PHP distribution nor in PECL, you may have to compile it before you can start using the extension. - Where to find an extension? diff --git a/install/unix/apache2.xml b/install/unix/apache2.xml index 9479b6ca65..00a850b961 100644 --- a/install/unix/apache2.xml +++ b/install/unix/apache2.xml @@ -177,14 +177,25 @@ cp php.ini-development /usr/local/lib/php.ini - - Edit your httpd.conf to load the PHP module. The path on the right hand - side of the LoadModule statement must point to the path of the PHP - module on your system. The make install from above may have already - added this for you, but be sure to check. - + + Edit your httpd.conf to load the PHP module. The path on the right hand + side of the LoadModule statement must point to the path of the PHP + module on your system. The make install from above may have already + added this for you, but be sure to check. + - + + + For PHP 8: + + + + + + + For PHP 7: @@ -195,20 +206,9 @@ LoadModule php7_module modules/libphp7.so - - - For PHP 5: - - - - - + - - - + Tell Apache to parse certain extensions as PHP. For example, let's have diff --git a/install/windows/apache2.xml b/install/windows/apache2.xml new file mode 100644 index 0000000000..e094309870 --- /dev/null +++ b/install/windows/apache2.xml @@ -0,0 +1,159 @@ + + + Apache 2.x on Microsoft Windows + + This section contains notes and hints specific to Apache 2.x installs + of PHP on Microsoft Windows systems. + + + + Please read the manual + installation steps first! + + + + + It is strongly recommended to consult the + Apache Documentation + to get have a basic understanding of the Apache 2.x Server. + Also consider reading the + Windows specific notes + for Apache 2.x before reading on here. + + + + Download the most recent version of + Apache 2.x + and a fitting PHP version. Follow the + Manual Installation Steps + and come back to go on with the integration of PHP and Apache. + + + + There are three ways to set up PHP to work with Apache 2.x on Windows. + PHP can be run as a handler, as a CGI, or under FastCGI. + + + ¬e.apache.slashes; + + + Installing as an Apache handler + + To load the PHP module for Apache 2.x, the following lines in the + Apache &httpd.conf; configuration file must be inserted: + + PHP and Apache 2.x as handler + + + SetHandler application/x-httpd-php + +# configure the path to php.ini +PHPIniDir "C:/php" +]]> + + + + + + The actual path to PHP must be substituted instead of + C:/php/ in the above examples. + Make sure that the file referenced in the LoadModule directive is at + the specified location. Use php7apache2_4.dll + for PHP 7, or php8apache2_4.dll for PHP 8. + + + + + + Running PHP as CGI + + + It is strongly recommended to consult the + Apache CGI documentation + for a more complete understanding of running CGI on Apache. + + + + To run PHP as CGI, the php-cgi files will need to be placed in a + directory designated as a CGI directory using the ScriptAlias directive. + + + + A #! line will need to be placed in the PHP files, + which point to the location of the PHP binary: + + + PHP and Apache 2.x as CGI + + +]]> + + + + &warn.install.cgi; + + + + Running PHP under FastCGI + + + Running PHP under FastCGI has a number of advantages over running it as a + CGI. Setting it up this way is fairly straightforward: + + + Obtain mod_fcgid from + &url.apachelounge;. + Win32 binaries are available for download from that site. + Install the module according to the instructions that will come with it. + + + Configure your web server as shown below, taking care to adjust any paths + to reflect your how you have installed things on your particular system: + + + Configure Apache to run PHP as FastCGI + + + SetHandler fcgid-script + +FcgidWrapper "c:/php/php-cgi.exe" .php +]]> + + + + Files with a .php extension will now be executed by the PHP FastCGI + wrapper. + + + + diff --git a/install/windows/legacy/building.xml b/install/windows/building.xml similarity index 78% rename from install/windows/legacy/building.xml rename to install/windows/building.xml index 1cfeab0e3f..d8eda5b675 100644 --- a/install/windows/legacy/building.xml +++ b/install/windows/building.xml @@ -1,9 +1,8 @@ - - + Building from source - This chapter teaches how to compile PHP from sources on windows, using + This chapter teaches how to compile PHP from sources on Windows, using Microsoft's tools. To compile PHP with cygwin, please refer to . @@ -11,8 +10,7 @@ See the Wiki documentation at: &url.wiki.windows.build.howto; - - + + + Command Line PHP on Microsoft Windows + + This section contains notes and hints specific to getting PHP running + from the command line for Windows. + + + + You should read the manual + installation steps first! + + + + Getting PHP to run from the command line can be performed without making + any changes to Windows. + + + + + + + But there are some easy steps that can be followed to make this simpler. + Some of these steps should already have been taken, but are repeated here + to be able to provide a complete step-by-step sequence. + + + + + Both PATH and PATHEXT are important + pre-existing system variables in Windows, + and care should be taken to not overwrite either variable, + only to add to them. + + + + + + Append the location of the PHP executable (php.exe, + php-win.exe or php-cli.exe + depending upon your PHP version and display preferences) to the + PATH environment variable. Read more about how to + add your PHP directory to PATH in the corresponding FAQ entry. + + + + + + Append the .PHP extension to the + PATHEXT environment variable. This can be done + at the same time as amending the PATH environment + variable. Follow the same steps as described in the FAQ but amend the + PATHEXT environment variable rather than the + PATH environment variable. + + + The position in which you place the .PHP will + determine which script or program is executed when there are matching + filenames. For example, placing .PHP before + .BAT will cause your script to run, rather than + the batch file, if there is a batch file with the same name. + + + + + + + + Associate the .PHP extension with a file type. This + is done by running the following command: + + + + + + + + + Associate the phpfile file type with the appropriate + PHP executable. This is done by running the following command: + + + + + + + + + + + Following these steps will allow PHP scripts to be run from any directory + without the need to type the PHP executable or the .PHP + extension and all parameters will be supplied to the script for processing. + + + + The example below details some of the registry changes that can be made manually. + + Registry changes + + + + + + + + With these changes the same command can be written as: + + + + or, if your "C:\PHP Scripts" path is in the + PATH environment variable: + + + + + + + + There is a small problem if you intend to use this technique and use your + PHP scripts as a command line filter, like the example below: + + + + or + + + + You may find that the script simply hangs and nothing is output. + To get this operational, you need to make another registry change. + + + + Further information regarding this issue can be found in this Microsoft + Knowledgebase Article : 321788. + As of Windows 10, this setting seems to be reversed, making the default install of + Windows 10 support inherited console handles automatically. This + Microsoft forum post provides the explanation. + + + + diff --git a/install/windows/figures/iis6anonauth.png b/install/windows/figures/iis6anonauth.png deleted file mode 100644 index 0a503d7af7..0000000000 Binary files a/install/windows/figures/iis6anonauth.png and /dev/null differ diff --git a/install/windows/figures/iis6defaultdoc.png b/install/windows/figures/iis6defaultdoc.png deleted file mode 100644 index 850b99255a..0000000000 Binary files a/install/windows/figures/iis6defaultdoc.png and /dev/null differ diff --git a/install/windows/figures/iis7handlericon.png b/install/windows/figures/iis7handlericon.png deleted file mode 100644 index 135943bd38..0000000000 Binary files a/install/windows/figures/iis7handlericon.png and /dev/null differ diff --git a/install/windows/figures/iis7handlermap.png b/install/windows/figures/iis7handlermap.png deleted file mode 100644 index 91c5ae0765..0000000000 Binary files a/install/windows/figures/iis7handlermap.png and /dev/null differ diff --git a/install/windows/figures/iis7vistacgi.png b/install/windows/figures/iis7vistacgi.png deleted file mode 100644 index 520486195b..0000000000 Binary files a/install/windows/figures/iis7vistacgi.png and /dev/null differ diff --git a/install/windows/figures/iis7w2k8cgi.png b/install/windows/figures/iis7w2k8cgi.png deleted file mode 100644 index a8b86eec76..0000000000 Binary files a/install/windows/figures/iis7w2k8cgi.png and /dev/null differ diff --git a/install/windows/index.xml b/install/windows/index.xml index 3bf33724ba..a9534b3fd6 100644 --- a/install/windows/index.xml +++ b/install/windows/index.xml @@ -1,98 +1,84 @@ - Installation on Windows systems - - Installing PHP on modern Microsoft Windows systems and recommended configuration with common web servers. - - + Installation on Windows systems + + Installing PHP on modern Microsoft Windows systems and recommended configuration with common web servers. + + + + The Official releases of PHP on Windows are recommended for production use. + However, you are welcome to build PHP from Source. + You will need a Visual Studio environment. + See Step by Step Build Instructions. + + + + - If you are looking for information about older systems, such as Windows XP, 2003, 98 or Apache 1.x, see the Legacy Info section. + Using PHP on Windows Command line - + + + + Installing PHP on Azure App Services + (aka Microsoft Azure, Windows Azure, or (Windows) Azure Web Apps). + + + + + + + Install Requirements - The Official releases of PHP on Windows are recommended for production use. - However, you are welcome to build PHP from Source. You will need a Visual Studio environment. See Step by Step Build Instructions. + PHP requires at least Windows 2008/Vista. + Either 32-Bit or 64-bit (AKA X86 or X64. PHP does not run on Windows RT/WOA/ARM). + As of PHP 7.2.0 Windows 2008 and Vista are no longer supported. + + + + PHP requires the Visual C runtime (CRT). Many applications require that so it may already be installed. + + + + The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable + for all these PHP versions, see + https://visualstudio.microsoft.com/downloads/. + + + + You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. + + + + If CRT is already installed, the installer will tell you that and not change anything. + + + + The CRT installer supports the /quiet and /norestart command-line switches, so you can script running it. + + + + + PECL + + PECL extensions are pre-built for Windows and available from: + http://windows.php.net/downloads/pecl/releases/ - - - - Using PHP on Windows Command line - - - - - Installing PHP on Azure App Services (aka Microsoft Azure, Windows Azure, or (Windows) Azure Web Apps). - - - + Some extensions use features specific to some Unix systems and so are not available on Windows. + Otherwise, all extensions are available for Windows. + - - Install Requirements - - - PHP 5.5+ require at least Windows 2008/Vista, or 2008r2, 2012, 2012r2, 2016 or 7, 8, 8.1, 10. Either 32-Bit or 64-bit (aka X86 or X64. PHP does not run on Windows RT/WOA/ARM). - As of PHP 7.2.0 Windows 2008 and Vista are no longer supported. - - - - PHP requires the Visual C runtime(CRT). Many applications require that so it may already be installed. - - - - PHP 5.5 and 5.6 require VC CRT 11 (Visual Studio 2012). See: https://www.microsoft.com/en-us/download/details.aspx?id=30679 - - - - PHP 7.0 and 7.1 require VC CRT 14 (Visual Studio 2015). - PHP 7.2, 7.3 and 7.4 require VC CRT 15 (Visual Studio 2017). - The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable - for all these PHP versions, see - https://visualstudio.microsoft.com/downloads/. - - - - You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. - - - - If CRT is already installed, the installer will tell you that and not change anything. - - - - The CRT installer supports the /quiet and /norestart command-line switches, so you can script running it. - - - - VC11 CRT DLLs can be copied from your local machine to a remote machine(a `Copy Deployment` installation) instead of running the installer on the remote machine (such as a web server you have restricted access to). - - - - VC14 CRT does not support a `Copy Deployment` installation. VC14 CRT has many more DLLs(most in files with names starting with api-*). If you can find them all and copy them, it will also work (try a tool like Resource Hacker to get a list of all the DLLs to copy). - - - - - - PECL - - PECL extensions are pre-built for Windows and available from: http://windows.php.net/downloads/pecl/releases/ - - - Some extensions use features specific to some Unix systems and so are not available on Windows. Otherwise, all extensions are available for Windows. - - - - - &install.windows.tools; - &install.windows.recommended; - &install.windows.manual; - &install.windows.troubleshooting; - &install.windows.legacy.index; + &install.windows.tools; + &install.windows.recommended; + &install.windows.manual; + &install.windows.building; + &install.windows.commandline; + &install.windows.apache2; + &install.windows.troubleshooting; - - Apache 1.3.x on Microsoft Windows - - This section contains notes and hints specific to Apache 1.3.x installs - of PHP on Microsoft Windows systems. There are also - - - - - Please read the manual - installation steps first! - - - - - There are two ways to set up PHP to work with Apache 1.3.x - on Windows. One is to use the CGI binary (php.exe - for PHP 4 and php-cgi.exe for PHP 5), - the other is to use the Apache Module DLL. In either case - you need to edit your &httpd.conf; to configure Apache to - work with PHP, and then restart the server. - - - - It is worth noting here that now the SAPI module has been - made more stable under Windows, we recommend it's use above - the CGI binary, since it is more transparent and secure. - - - - Although there can be a few variations of configuring PHP - under Apache, these are simple enough to be used by the - newcomer. Please consult the Apache Documentation for further - configuration directives. - - - - After changing the configuration file, remember to restart the server, for - example, NET STOP APACHE followed by - NET START APACHE, if you run Apache as a Windows - Service, or use your regular shortcuts. - - - ¬e.apache.slashes; - - - Installing as an Apache module - - You should add the following lines to your Apache &httpd.conf; file: - - - - PHP as an Apache 1.3.x module - - This assumes PHP is installed to c:\php. Adjust the - path if this is not the case. - - - For PHP 4: - - - - - - For PHP 5: - - - - - - For both: - - - conditional brace -AddType application/x-httpd-php .php - -# For syntax highlighted .phps files, also add -AddType application/x-httpd-php-source .phps -]]> - - - - - - - Installing as a CGI binary - - - If you unzipped the PHP package to C:\php\ as described - in the Manual - Installation Steps section, you need to insert - these lines to your Apache configuration file to set - up the CGI binary: - - PHP and Apache 1.3.x as CGI - - - - - Note that the second line in the list above can be found - in the actual versions of &httpd.conf;, but it is commented out. Remember - also to substitute the c:/php/ for your actual path to - PHP. - - &warn.install.cgi; - - If you would like to present PHP source files syntax highlighted, there - is no such convenient option as with the module version of PHP. - If you chose to configure Apache to use PHP as a CGI binary, you - will need to use the highlight_file function. To - do this simply create a PHP script file and add this code: - <?php highlight_file('some_php_script.php'); ?>. - - - - - - diff --git a/install/windows/legacy/apache2.xml b/install/windows/legacy/apache2.xml deleted file mode 100644 index cb4fd98613..0000000000 --- a/install/windows/legacy/apache2.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - Apache 2.x on Microsoft Windows - - This section contains notes and hints specific to Apache 2.x installs - of PHP on Microsoft Windows systems. We also - - - - - You should read the manual - installation steps first! - - - - Apache 2.2 Support - - Users of Apache 2.2 should note that the DLL file for Apache 2.2 is - named php5apache2_2.dll rather than php5apache2.dll - and is available only for PHP 5.2.0 and later. - - - - - You are strongly encouraged to consult the - Apache Documentation to get - a basic understanding of the Apache 2.x Server. Also consider - reading the Windows specific - notes for Apache 2.x before reading on here. - - - - Apache 2.x is designed to run on the Windows version designated as - server platforms, such as Windows NT 4.0, Windows 2000, - Windows XP, or Windows 7. While Apache 2.x works tolerably well on Windows 9x, - support on these platforms is incomplete, and some things will not work - correctly. There is no plan to remedy this situation. - - - - Download the most recent version of - Apache 2.x and a fitting PHP version. - Follow the Manual Installation - Steps and come back to go on with the integration of PHP and Apache. - - - - There are three ways to set up PHP to work with Apache 2.x on Windows. - You can run PHP as a handler, as a CGI, or under FastCGI. - - - ¬e.apache.slashes; - - - Installing as an Apache handler - - You need to insert the following lines into your - Apache &httpd.conf; configuration file to load the - PHP module for Apache 2.x: - - PHP and Apache 2.x as handler - - - - - - - - Remember to substitute your actual path to PHP for the - C:/php/ in the above examples. Take care to use - either php5apache2.dll or - php5apache2_2.dll in your LoadModule directive and - verify that the referenced file is in fact located at the file path - that you point to in this directive. - - - - The above configuration will enable PHP handling of any file that has a - .php extension, even if there are other file extensions. For example, a - file named example.php.txt will be executed by the - PHP handler. To ensure that only files that end in - .php are executed, use the following configuration - instead: - - - - - - SetHandler application/x-httpd-php - -]]> - - - - - - Running PHP as CGI - - - You should consult the Apache CGI - documentation for a more complete understanding of running CGI - on Apache. - - - - To run PHP as CGI, you'll need to place your php-cgi files in a - directory designated as a CGI directory using the ScriptAlias directive. - - - - You will then need to insert a #! line in the PHP files, pointing to the - location of your PHP binary: - - - PHP and Apache 2.x as CGI - - -]]> - - - - &warn.install.cgi; - - - - Running PHP under FastCGI - - - Running PHP under FastCGI has a number of advantages over running it as a - CGI. Setting it up this way is fairly straightforward: - - - Obtain mod_fcgid from - &url.apache.fcgid;. Win32 - binaries are available for download from that site. Install the module - according to the instructions that will come with it. - - - Configure your web server as shown below, taking care to adjust any paths - to reflect your how you have installed things on your particular system: - - - Configure Apache to run PHP as FastCGI - - - - - - Files with a .php extension will now be executed by the PHP FastCGI - wrapper. - - - - - - - diff --git a/install/windows/legacy/commandline.xml b/install/windows/legacy/commandline.xml deleted file mode 100644 index 7d6a295437..0000000000 --- a/install/windows/legacy/commandline.xml +++ /dev/null @@ -1,209 +0,0 @@ - - - - Command Line PHP on Microsoft Windows - - This section contains notes and hints specific to getting PHP running - from the command line for Windows. - - - - You should read the manual - installation steps first! - - - - Getting PHP to run from the command line can be performed without making - any changes to Windows. - - - - - - - But there are some easy steps that can be followed to make this simpler. - Some of these steps should already have been taken, but are repeated here - to be able to provide a complete step-by-step sequence. - - - - - - - Both PATH and PATHEXT are important pre-existing system variables in Windows, and care should be taken to not overwrite either variable, only to add to them. - - - - - - Append the location of the PHP executable (php.exe, - php-win.exe or php-cli.exe - depending upon your PHP version and display preferences) to the - PATH environment variable. Read more about how to - add your PHP directory to PATH in the corresponding FAQ entry. - - - - - - Append the .PHP extension to the - PATHEXT environment variable. This can be done - at the same time as amending the PATH environment - variable. Follow the same steps as described in the FAQ but amend the - PATHEXT environment variable rather than the - PATH environment variable. - - - The position in which you place the .PHP will - determine which script or program is executed when there are matching - filenames. For example, placing .PHP before - .BAT will cause your script to run, rather than - the batch file, if there is a batch file with the same name. - - - - - - - - Associate the .PHP extension with a file type. This - is done by running the following command: - - - - - - - - - Associate the phpfile file type with the appropriate - PHP executable. This is done by running the following command: - - - - - - - - - - - Following these steps will allow PHP scripts to be run from any directory - without the need to type the PHP executable or the .PHP - extension and all parameters will be supplied to the script for processing. - - - - The example below details some of the registry changes that can be made manually. - - Registry changes - - - - - - - - With these changes the same command can be written as: - - - - or, if your "C:\PHP Scripts" path is in the - PATH environment variable: - - - - - - - - There is a small problem if you intend to use this technique and use your - PHP scripts as a command line filter, like the example below: - - - - or - - - - You may find that the script simply hangs and nothing is output. - To get this operational, you need to make another registry change. - - - - Further information regarding this issue can be found in this Microsoft - Knowledgebase Article : 321788. - As of Windows 10, this setting seems to be reversed, making the default install of - Windows 10 support inherited console handles automatically. This - Microsoft forum post provides the explanation. - - - - - diff --git a/install/windows/legacy/extensions.xml b/install/windows/legacy/extensions.xml deleted file mode 100644 index e46f1c9168..0000000000 --- a/install/windows/legacy/extensions.xml +++ /dev/null @@ -1,371 +0,0 @@ - - - - Installation of extensions on Windows - - After installing PHP and a web server on Windows, you will probably want to - install some extensions for added functionality. You can choose which - extensions you would like to load when PHP starts by modifying your - &php.ini;. You can also load a module dynamically in your script using - dl. - - - The DLLs for PHP extensions are prefixed with php_. - - - Many extensions are built into the Windows version - of PHP. This means additional DLL files, and the - extension directive, are - not used to load these extensions. The Windows - PHP Extensions - table lists extensions that require, or used to require, additional PHP - DLL files. Here's a list of built in extensions (updated PHP 5.0.4): - BCMath, - Calendar, - COM, - Ctype, - DOM, - FTP, - LibXML, - Iconv, - ODBC, - PCRE, - Session, - SimpleXML, - SPL, - WDDX, - XML&listendand; - Zlib. - - - The default location PHP searches for extensions is - C:\php5. To change this - setting to reflect your setup of PHP edit your &php.ini; file: - - - - You will need to change the - extension_dir setting to - point to the directory where your extensions lives, or where you have - placed your php_*.dll files. For example: - - - - - - - - - - Enable the extension(s) in &php.ini; you want to use by uncommenting the - extension=php_*.dll lines in &php.ini;. This is done - by deleting the leading ; from the extension you want to load. - - Enable <link linkend="book.bzip2">Bzip2</link> extension for PHP-Windows - - - - - - - - - Some of the extensions need extra DLLs to work. Couple of them can be - found in the distribution package, in the main folder, but some, for example Oracle - (php_oci8.dll) require DLLs which are not bundled - with the distribution package. Don't forget to include C:\php in the system - PATH (this process is explained in a separate FAQ entry). - - - - - Some of these DLLs are not bundled with the PHP distribution. See each - extensions documentation page for details. Also, read the manual - section titled Installation of PECL - extensions for details on PECL. An - increasingly large number of PHP extensions are found in - PECL, and these extensions require a - separate download. - - - - - - If you are running a server module version of PHP - remember to restart your web server to reflect your changes to &php.ini;. - - - - - - The following table describes some of the extensions available and required - additional dlls. - - PHP Extensions - - - - Extension - Description - Notes - - - - - php_bz2.dll - bzip2 compression functions - None - - - php_calendar.dll - Calendar conversion functions - None - - - php_ctype.dll - ctype family functions - None - - - php_curl.dll - CURL, Client URL library functions - Requires: libeay32.dll, - ssleay32.dll (bundled), or, as of OpenSSL 1.1 - libcrypto-*.dll and libssl-*.dll (bundled) - - - php_dba.dll - DBA: DataBase (dbm-style) - Abstraction layer functions - None - - - php_dbase.dll - dBase functions - None - - - php_exif.dll - EXIF functions - - php_mbstring.dll. And, - php_exif.dll must be loaded after - php_mbstring.dll in &php.ini;. - - - - php_fbsql.dll - FrontBase functions - None - - - php_fdf.dll - FDF: Forms Data Format functions. - Requires: fdftk.dll (bundled) - - - php_filepro.dll - filePro functions - Read-only access - - - php_ftp.dll - FTP functions - None - - - php_gd2.dll - GD library image functions - GD2 - - - php_gettext.dll - Gettext functions - - PHP <= 4.2.0 requires gnu_gettext.dll (bundled), - PHP >= 4.2.3 requires libintl-1.dll, - iconv.dll (bundled). - - - - php_hyperwave.dll - HyperWave functions - None - - - php_iconv.dll - ICONV characterset conversion - - Requires: iconv-1.3.dll (bundled), iconv.dll - - - - php_iisfunc.dll - IIS management functions - None - - - php_imap.dll - IMAP POP3 and NNTP functions - None - - - php_ingres.dll - Ingres functions - Requires: Ingres libraries - - - php_interbase.dll - InterBase functions - Requires: gds32.dll (bundled) - - - php_ldap.dll - LDAP functions - - Requires libeay32.dll, - ssleay32.dll (bundled), or, as of OpenSSL 1.1 - libcrypto-*.dll and libssl-*.dll (bundled) - - - - php_mbstring.dll - Multi-Byte String functions - None - - - php_mcrypt.dll - Mcrypt Encryption functions - Requires: libmcrypt.dll - - - php_mhash.dll - Mhash functions - Requires: libmhash.dll (bundled) - - - php_mysql.dll - MySQL functions - Requires libmysql.dll (bundled) - - - php_mysqli.dll - MySQLi functions - Requires libmysql.dll - (libmysqli.dll in PHP <= 5.0.2) (bundled) - - - php_oci8.dll - Oracle 8 functions - Requires: Oracle 8.1+ client libraries - - - php_openssl.dll - OpenSSL functions - Requires: libeay32.dll (bundled), - or, as of OpenSSL 1.1, liblibcrypto-*.dll (bundled) - - - php_pgsql.dll - PostgreSQL functions - None - - - php_shmop.dll - Shared Memory functions - None - - - php_snmp.dll - SNMP get and walk functions - NT only! - - - php_soap.dll - SOAP functions - None - - - php_sockets.dll - Socket functions - None - - - php_tidy.dll - Tidy functions - None - - - php_tokenizer.dll - Tokenizer functions - None - - - php_w32api.dll - W32api functions - None - - - php_xmlrpc.dll - XML-RPC functions - Requires: iconv.dll (bundled) - - - php_xslt.dll - XSLT functions - - Requires sablot.dll, expat.dll, - iconv.dll (bundled). - - - - php_yaz.dll - YAZ functions - Requires: yaz.dll (bundled) - - - php_zip.dll - Zip File functions - Read only access - - - php_zlib.dll - ZLib compression functions - None - - - -
-
-
- - diff --git a/install/windows/legacy/iis.xml b/install/windows/legacy/iis.xml deleted file mode 100644 index 2ce4c7943a..0000000000 --- a/install/windows/legacy/iis.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - Microsoft IIS - - This section contains PHP installation instructions specific to Microsoft Internet Information Services (IIS). - - - - - Manually installing PHP on Microsoft IIS 5.1 and IIS 6.0 - - - - - Manually installing PHP on Microsoft IIS 7.0 and later - - - - - - diff --git a/install/windows/legacy/iis6.xml b/install/windows/legacy/iis6.xml deleted file mode 100644 index 83b49b4c96..0000000000 --- a/install/windows/legacy/iis6.xml +++ /dev/null @@ -1,241 +0,0 @@ - - - - - Microsoft IIS 5.1 and IIS 6.0 - - This section contains instructions for manually setting up Internet Information - Services (IIS) 5.1 and IIS 6.0 to work with PHP on Microsoft Windows XP and Windows - Server 2003. For instructions on setting up IIS 7.0 and later versions on Windows - Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2 refer to - Microsoft IIS 7.0 and later. - - - Configuring IIS to process PHP requests - - Download and install PHP in accordance to the instructions described in - manual installation steps - - - Non-thread-safe build of PHP is recommended when using IIS. The non-thread-safe - builds are available at PHP for Windows: - Binaries and Sources Releases. - - - - - Configure the CGI- and FastCGI-specific settings in php.ini file as shown below: - - CGI and FastCGI settings in <filename>php.ini</filename> - - - - - - - Download and install the Microsoft FastCGI Extension for IIS 5.1 and 6.0. - The extension is available for 32-bit and 64-bit platforms - select the right download package for your platform. - - Configure the FastCGI extension to handle PHP-specific requests by running the command shown below. - Replace the value of the "-path" parameter with the absolute file path to the - php-cgi.exe file. - - Configuring FastCGI extension to handle PHP requests - - - - - - - This command will create an IIS script mapping for *.php file extension, which will result in all URLs - that end with .php being handled by FastCGI extension. Also, it will configure FastCGI extension to - use the executable php-cgi.exe to process the PHP requests. - - - At this point the required installation and configuration steps are completed. The remaining - instructions below are optional but highly recommended for achieving optimal functionality - and performance of PHP on IIS. - - - - - - Impersonation and file system access - - It is recommended to enable FastCGI impersonation in PHP when using IIS. This - is controlled by the fastcgi.impersonate directive in php.ini file. When - impersonation is enabled, PHP will perform all the file system operations on - behalf of the user account that has been determined by IIS authentication. This - ensures that even if the same PHP process is shared across different IIS web - sites, the PHP scripts in those web sites will not be able to access each - others' files as long as different user accounts are used for IIS authentication - on each web site. - - - For example IIS 5.1 and IIS 6.0, in its default configuration, has anonymous authentication enabled - with built-in user account IUSR_<MACHINE_NAME> used as a default identity. This means that in - order for IIS to execute PHP scripts, it is necessary to grant IUSR_<MACHINE_NAME> account - read permission on those scripts. If PHP applications need to perform write operations on certain - files or write files into some folders then IUSR_<MACHINE_NAME> account should have write permission to those. - - - To determine which user account is used by IIS anonymous authentication, follow these steps: - - - In the Windows Start Menu choose "Run:", type "inetmgr" and click "Ok"; - - - Expand the list of web sites under the "Web Sites" node in the tree view, right-click on a web - site that is being used and select "Properties"; - - - - Click the "Directory Security" tab; - - - Take note of a "User name:" field in the "Authentication Methods" dialog - - - - Anonymous authenication for IIS 5.1 and IIS 6.0 - - - - - - - To modify the permissions settings on files and folders, use the Windows Explorer user interface - or icacls command. - - Configuring file access permissions - - - - - - - - Set <filename>index.php</filename> as a default document in IIS - - The IIS default documents are used for HTTP requests that do not specify a document name. With PHP applications, - index.php usually acts as a default document. To add index.php to the list of - IIS default documents, follow these steps: - - - In the Windows Start Menu choose "Run:", type "inetmgr" and click "Ok"; - - - Right-click on the "Web Sites" node in the tree view and select "Properties"; - - - Click the "Documents" tab; - - - Click the "Add..." button and enter "index.php" for the "Default content page:". - - - - Setting index.php as default document for IIS - - - - - - - - FastCGI and PHP Recycling configuration - - Configure IIS FastCGI extension settings for recycling of PHP processes by using the commands shown below. - The FastCGI setting instanceMaxRequests controls how many requests will be processed by a single - php-cgi.exe process before FastCGI extension shuts it down. The PHP environment variable - PHP_FCGI_MAX_REQUESTS controls how many requests a single php-cgi.exe process - will handle before it recycles itself. Make sure that the value specified for FastCGI InstanceMaxRequests - setting is less than or equal to the value specified for PHP_FCGI_MAX_REQUESTS. - - Configuring FastCGI and PHP recycling - - - - - - - - Configuring FastCGI timeout settings - - Increase the timeout settings for FastCGI extension if there are applications that have long running PHP scripts. - The two settings that control timeouts are ActivityTimeout and RequestTimeout. - Refer to Configuring FastCGI Extension for IIS 6.0 for more - information about those settings. - - Configuring FastCGI timeout settings - - - - - - - - Changing the Location of <filename>php.ini</filename> file - - PHP searches for php.ini file in - several locations and it is - possible to change the default locations of php.ini - file by using PHPRC environment variable. To instruct PHP - to load the configuration file from a custom location run the command shown below. - The absolute path to the directory with php.ini file should be - specified as a value of PHPRC environment variable. - - Changing the location of <filename>php.ini</filename> file - - - - - - - - - diff --git a/install/windows/legacy/iis7.xml b/install/windows/legacy/iis7.xml deleted file mode 100644 index 410133e607..0000000000 --- a/install/windows/legacy/iis7.xml +++ /dev/null @@ -1,387 +0,0 @@ - - - - - Microsoft IIS 7.0 and later - - This section contains instructions for manually setting up Internet Information - Services (IIS) 7.0 and later to work with PHP on Microsoft Windows Vista SP1, - Windows 7, Windows Server 2008 and Windows Server 2008 R2. For instructions - on setting up IIS 5.1 and IIS 6.0 on Windows XP and Windows Server 2003 refer to - Microsoft IIS 5.1 and IIS 6.0. - - - Enabling FastCGI support in IIS - - FastCGI module is disabled in default installation of IIS. The steps to enable it differ - based on the version of Windows being used. - - - To enable FastCGI support on Windows Vista SP1 and Windows 7: - - - - In the Windows Start Menu choose "Run:", type "optionalfeatures.exe" - and click "Ok"; - - - - - In the "Windows Features" dialog expand "Internet Information - Services", "World Wide Web Services", "Application Development - Features" and then enable the "CGI" checkbox; - - - - - Click OK and wait until the installation is complete. - - - - - Enabling FastCGI support for IIS7 on Windows Vista SP1 and Windows 7 - - - - - - - To enable FastCGI support on Windows Server 2008 and Windows Server 2008 R2: - - - - In the Windows Start Menu choose "Run:", type "CompMgmtLauncher" - and click "Ok"; - - - - - If the "Web Server (IIS)" role is not present under the "Roles" - node, then add it by clicking "Add Roles"; - - - - - If the "Web Server (IIS)" role is present, then click "Add Role Services" - and then enable the "CGI" checkbox under "Application Development" group; - - - - - Click "Next" and then "Install" and wait for the installation to complete. - - - - - Enabling FastCGI support on Windows Server 2008 and Windows Server 2008 R2 - - - - - - - - Configuring IIS to process PHP requests - - Download and install PHP in accordance to the instructions described in - manual installation steps - - - Non-thread-safe build of PHP is recommended when using IIS. The non-thread-safe - builds are available at PHP for Windows: - Binaries and Sources Releases. - - - - - Configure the CGI- and FastCGI-specific settings in php.ini file as shown below: - - CGI and FastCGI settings in <filename>php.ini</filename> - - - - - - - Configure IIS handler mapping for PHP by using either IIS Manager user interface or a command line tool. - - - Using IIS Manager user interface to create a handler mapping for PHP - - Follow these steps to create an IIS handler mapping for PHP in IIS Manager user interface: - - - In the Windows Start Menu choose "Run:", type "inetmgr" and click "Ok"; - - - In the IIS Manager user interface select the server node in the "Connections" tree view; - - - - In the "Features View" page open the "Handler Mappings" feature; - - Create IIS handler mapping for PHP : Locate Handler Mappings - - - - - - - - In the "Actions" pane click "Add Module Mapping..."; - - - - In the "Add Module Mapping" dialog enter the following: - - - Request path: *.php - - - Module: FastCgiModule - - - Executable: C:\[Path to PHP installation]\php-cgi.exe - - - Name: PHP_via_FastCGI - - - - - - - Click "Request Restrictions" button and then configure the mapping to invoke handler - only if request is mapped to a file or a folder; - - - - Click OK on all the dialogs to save the configuration. - - - - Create IIS handler mapping for PHP : Add Handler Mapping - - - - - - - - Using command line tool to create a handler mapping for PHP - - Use the command shown below to create an IIS FastCGI process pool which will use php-cgi.exe - executable for processing PHP requests. Replace the value of the fullPath parameter with the - absolute file path to the php-cgi.exe file. - - Creating IIS FastCGI process pool - - - - - - - Configure IIS to handle PHP specific requests by running the command shown below. Replace the value of the - scriptProcessor parameter with the absolute file path to the php-cgi.exe file. - - Creating handler mapping for PHP requests - - - - - - - This command creates an IIS handler mapping for *.php file extension, which will result in all URLs that - end with .php being handled by FastCGI module. - - - At this point the required installation and configuration steps are completed. The remaining - instructions below are optional but highly recommended for achieving optimal functionality - and performance of PHP on IIS. - - - - - - - Impersonation and file system access - - It is recommended to enable FastCGI impersonation in PHP when using IIS. This - is controlled by the fastcgi.impersonate directive in php.ini - file. When impersonation is enabled, PHP will perform all the file system operations on behalf of - the user account that has been determined by IIS authentication. This ensures that even if the - same PHP process is shared across different IIS web sites, the PHP scripts in those web sites - will not be able to access each other's files as long as different user accounts are used - for IIS authentication on each web site. - - - For example IIS 7, in its default configuration, has anonymous authentication enabled with - built-in user account IUSR used as a default identity. This means that in order for IIS to - execute PHP scripts, it is necessary to grant IUSR account read permission on those scripts. - If PHP applications need to perform write operations on certain files or write files into some - folders then IUSR account should have write permission to those. - - - To determine what user account is used as an anonymous identity in IIS 7 use the following command. - Replace the "Default Web Site" with the name of IIS web site that you use. In the output - XML configuration element look for the userName attribute. - - Determining the account used as IIS anonymous identity - - - - - - - - -]]> - - - - - If userName attribute is not present in the anonymousAuthentication element, - or is set to an empty string, then it means that the application pool identity is used as an - anonymous identity for that web site. - - - - - To modify the permissions settings on files and folders, use the Windows Explorer - user interface or icacls command. - - Configuring file access permissions - - - - - - - - Set <filename>index.php</filename> as a default document in IIS - - The IIS default documents are used for HTTP requests that do not specify a - document name. With PHP applications, index.php usually - acts as a default document. To add index.php to the list - of IIS default documents, use this command: - - Set <filename>index.php</filename> as a default document in IIS - - - - - - - - FastCGI and PHP Recycling configuration - - Configure IIS FastCGI settings for recycling of PHP processes by using the commands shown below. - The FastCGI setting instanceMaxRequests controls how many requests will be - processed by a single php-cgi.exe process before IIS shuts it down. - The PHP environment variable PHP_FCGI_MAX_REQUESTS controls how many - requests a single php-cgi.exe process will handle before it recycles - itself. Make sure that the value specified for FastCGI InstanceMaxRequests - setting is less than or equal to the value specified for PHP_FCGI_MAX_REQUESTS. - - Configuring FastCGI and PHP recycling - - - - - - - - FastCGI timeout settings - - Increase the timeout settings for FastCGI if it is expected to have long running PHP scripts. - The two settings that control timeouts are activityTimeout and - requestTimeout. Use the commands below to change the timeout settings. - Make sure to replace the value in the fullPath parameter to - contain the absolute path to the php-cgi.exe file. - - Configuring FastCGI timeout settings - - - - - - - - Changing the Location of <filename>php.ini</filename> file - - PHP searches for php.ini file in - several locations and it is - possible to change the default locations of php.ini - file by using PHPRC environment variable. To instruct PHP - to load the configuration file from a custom location run the command shown below. - The absolute path to the directory with php.ini file should be - specified as a value of PHPRC environment variable. - - Changing the location of <filename>php.ini</filename> file - - - - - - - - - diff --git a/install/windows/legacy/index.xml b/install/windows/legacy/index.xml deleted file mode 100644 index 29fb77336d..0000000000 --- a/install/windows/legacy/index.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - Installation on old Windows systems - - This section applies to Windows 98/Me and Windows NT/2000/XP/2003. PHP - will not work on 16 bit platforms such as Windows 3.1 and sometimes - we refer to the supported Windows platforms as Win32. - - - - Windows XP/2003 are no longer supported as of PHP 5.5.0. - - - - - Windows 98/Me/NT4/2000 are no longer supported as of PHP 5.3.0. - - - - - Windows 95 is no longer supported as of PHP 4.3.0. - - - - If you have a development environment such as Microsoft Visual Studio, you can also - - build PHP from the original source code. - - - Once you have PHP installed on your Windows system, you may also - want to load various extensions - for added functionality. - - - &install.windows.legacy.manual; - &install.windows.legacy.iis; - &install.windows.legacy.iis6; - &install.windows.legacy.iis7; - &install.windows.legacy.apache1; - &install.windows.legacy.apache2; - &install.windows.legacy.sambar; - &install.windows.legacy.xitami; - &install.windows.legacy.building; - &install.windows.legacy.extensions; - &install.windows.legacy.commandline; - - - diff --git a/install/windows/legacy/manual.xml b/install/windows/legacy/manual.xml deleted file mode 100644 index a29b936cea..0000000000 --- a/install/windows/legacy/manual.xml +++ /dev/null @@ -1,264 +0,0 @@ - - - - Manual Installation Steps - - This section contains instructions for manually installing and configuring - PHP on Microsoft Windows. - - - Selecting and downloading the PHP distribution package - - Download the PHP zip binary distribution from - PHP for Windows: Binaries and Sources. - There are several different versions of the zip package - to choose the right version for you, - follow the detailed guide on the download page. - - - - The PHP package structure and content - - Unpack the content of the zip archive into a directory of your choice, for - example C:\PHP\. The directory and file structure extracted from the zip will - look as below: - - PHP 5 package structure - - - - - - - Below is the list of the modules and executables included in the PHP zip - distribution: - - - - go-pear.bat - the PEAR setup script. Refer to Installation (PEAR) - for more details. - - - - - php-cgi.exe - CGI executable that can be used when running PHP on IIS via CGI or FastCGI. - - - - - php-win.exe - the PHP executable for executing PHP scripts without using a command line window - (for example PHP applications that use Windows GUI). - - - - - php.exe - the PHP executable for executing PHP scripts within a command line interface (CLI). - - - - - php5apache2_2.dll - Apache 2.2.X module. - - - - - php5apache2_2_filter.dll - Apache 2.2.X filter. - - - - - - - Changing the <filename>php.ini</filename> file - - After the php package content has been extracted, copy the php.ini-production into php.ini - in the same folder. If necessary, it is also possible to place the php.ini into any other location of your choice - but that will require additional configuration steps as described in PHP Configuration. - - - The php.ini file tells PHP how to configure itself, and how to work with the - environment that it runs in. Here are a number of settings for the php.ini file - that help PHP work better with Windows. Some of these are optional. There are - many other directives that may be relevant to your environment - refer to the - list of php.ini directives for more information. - - - Required directives: - - - - extension_dir = <path to extension directory> - The extension_dir needs - to point to the directory where PHP extensions files are stored. The path can be absolute - (i.e. "C:\PHP\ext") or relative (i.e. ".\ext"). Extensions that are listed lower in the php.ini file need - to be located in the extension_dir. - - - - - extension = xxxxx.dll - For each extension you wish to enable, you need a corresponding "extension=" - directive that tells PHP which extensions in the extension_dir to load at startup time. - - - - - log_errors = On - PHP has an error logging facility that can be used to send errors to a file, - or to a service (i.e. syslog) and works in conjunction with the error_log directive below. When running under IIS, - the log_errors should be enabled, with a valid error_log. - - - - - error_log = <path to the error log file> - The error_log needs to specify the absolute, - or relative path to the file where PHP errors should be logged. This file needs to be writable for the web server. - The most common places for this file are in various TEMP directories, for example "C:\inetpub\temp\php-errors.log". - - - - - cgi.force_redirect = 0 - This directive is required for running under IIS. - It is a directory security facility required by many other web servers. However, enabling it under IIS will - cause the PHP engine to fail on Windows. - - - - - cgi.fix_pathinfo = 1 - This lets PHP access real path info following the CGI Spec. - The IIS FastCGI implementation needs this set. - - - - - fastcgi.impersonate = 1 - FastCGI under IIS supports the ability to impersonate - security tokens of the calling client. This allows IIS to define the security context that the request runs under. - - - - - fastcgi.logging = 0 - FastCGI logging should be disabled on IIS. If it is left enabled, - then any messages of any class are treated by FastCGI as error conditions which will cause IIS to generate an HTTP 500 exception. - - - - - - Optional directives - - - - max_execution_time = ## - This directive tells PHP the maximum amount of time that it can spend - executing any given script. The default for this is 30 seconds. Increase the value of this directive if PHP application take long time to execute. - - - - - memory_limit = ###M - The amount of memory available for the PHP process, in Megabytes. - The default is 128, which is fine for most PHP applications. Some of the more complex ones might need more. - - - - - display_errors = Off - This directive tells PHP whether to include any error messages in the - stream that it returns to the Web server. If this is set to "On", then PHP will send whichever classes of errors - that you define with the error_reporting directive back to web server as part of the error stream. - For security reasons it is recommended to set it to "Off" on production servers in order not to reveal any - security sensitive information that is often included in the error messages. - - - - - open_basedir = <paths to directories, separated by semicolon>, e.g. - openbasedir="C:\inetpub\wwwroot;C:\inetpub\temp". This directive specified the directory paths where PHP - is allowed to perform file system operations. Any file operation outside of the specified paths will result in an error. - This directive is especially useful for locking down the PHP installation in shared hosting environments to prevent - PHP scripts from accessing any files outside of the web site's root directory. - - - - - upload_max_filesize = ###M and post_max_size = ###M - - The maximum allowed size of an uploaded file and post data respectively. The values of these directives should be - increased if PHP applications need to perform large uploads, such as for example photos or video files. - - - - - - PHP is now setup on your system. The next step is to choose a web - server, and enable it to run PHP. Choose a web server from the table of - contents. - - - In addition to running PHP via a web server, PHP can run from the command - line just like a .BAT script. See - - - - - - diff --git a/install/windows/legacy/sambar.xml b/install/windows/legacy/sambar.xml deleted file mode 100644 index cc4325d98e..0000000000 --- a/install/windows/legacy/sambar.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - Sambar Server on Microsoft Windows - - This section contains notes and hints specific to the - Sambar Server for Windows. - - - - You should read the manual - installation steps first! - - - - This list describes how to set up the ISAPI module to - work with the Sambar server on Windows. - - - - - - - Find the file called mappings.ini (in the config - directory) in the Sambar install directory. - - - - - Open mappings.ini and add the following line - under [ISAPI]: - - ISAPI configuration of Sambar - - - - - (This line assumes that PHP was installed in - c:\php.) - - - - - Now restart the Sambar server for the changes to take effect. - - - - - - - - If you intend to use PHP to communicate with resources which are held on - a different computer on your network, then you will need to alter the - account used by the Sambar Server Service. The default account used for - the Sambar Server Service is LocalSystem which will not have access to - remote resources. The account can be amended by using the Services - option from within the Windows Control Panel Administration Tools. - - - - - diff --git a/install/windows/legacy/xitami.xml b/install/windows/legacy/xitami.xml deleted file mode 100644 index de4683529c..0000000000 --- a/install/windows/legacy/xitami.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - Xitami on Microsoft Windows - - This section contains notes and hints specific to - Xitami on Windows. - - - - You should read the manual - installation steps first! - - - - This list describes how to set up the PHP CGI binary - to work with Xitami on Windows. - - - - Important for CGI users - - Read the faq - on cgi.force_redirect for important details. This - directive needs to be set to 0. - If you want to use $_SERVER['PHP_SELF'] you have to - enable the cgi.fix_pathinfo - directive. - - - &warn.install.cgi; - - - - - Make sure the web server is running, and point - your browser to xitamis admin console - (usually http://127.0.0.1/admin), - and click on Configuration. - - - - - Navigate to the Filters, and put the - extension which PHP should parse (i.e. .php) - into the field File extensions (.xxx). - - - - - In Filter command or script put the path and name - of your PHP CGI executable i.e. C:\php\php.exe - for PHP 4, or C:\php\php-cgi.exe for PHP 5. - - - - - Press the 'Save' icon. - - - - - Restart the server to reflect changes. - - - - - - - diff --git a/install/windows/manual.xml b/install/windows/manual.xml index 9c3174a4bc..d50d9545b1 100644 --- a/install/windows/manual.xml +++ b/install/windows/manual.xml @@ -42,8 +42,6 @@ REM Configure FastCGI Variables ]]> - - See also the old IIS installation instructions. @@ -54,7 +52,6 @@ REM Configure FastCGI Variables The Apache builds of ApacheLounge are recommended, but other options include XAMPP, WampServer and BitNami, which provide automatic installer tools. PHP can be used on Apache through mod_php or mod_fastcgi. mod_php requires a TS build of Apache built with same version of Visual C and same CPU (x86 or x64). - See also the old Apache installation instructions. @@ -75,10 +72,10 @@ REM Configure FastCGI Variables Non-Thread-Safe(NTS) - for IIS and other FastCGI web servers (Apache with mod_fastcgi) and recommended for command-line scripts
- x86 - production use of PHP 5.5 and up. + x86 - for 32-bits systems. - x64 - production use of PHP 7 (unless its a 32-bit only version of Windows). PHP 5.5 and 5.6 x64 builds are experimental. + x64 - for 64-bits systems. @@ -103,4 +100,4 @@ End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> \ No newline at end of file +--> diff --git a/install/windows/recommended.xml b/install/windows/recommended.xml index 0413b6ec57..600f0e501b 100644 --- a/install/windows/recommended.xml +++ b/install/windows/recommended.xml @@ -1,87 +1,93 @@ -Recommended Configuration on Windows systems - - + Recommended Configuration on Windows systems + OpCache - - -Highly Recommended that you enable OpCache. This extension is included with PHP for Windows. It compiles and optimizes PHP scripts and caches them in memory so that they aren't compiled every time the page is loaded. - - -In your php.ini, set - - Recommended OpCache configuration - + + It is highly recommended to enable OpCache. + This extension is included with PHP for Windows. + It compiles and optimizes PHP scripts and caches them in memory so that + they aren't compiled every time the page is loaded. + + + Set the &php.ini; to: + + Recommended OpCache configuration + - - - -And restart your web server. + + + And restart the web server. -For more info, see: OpCache Configuration - - - - + For more info, see: OpCache Configuration + + + WinCache + + It is recommended to use WinCache if using IIS, especially if in a shared + web hosting environment or using networked file storage (NAS). + Note that WinCache is no longer supported as of PHP 8.0.0. - -Recommended that you use WinCache if using IIS, especially if in a shared web hosting environment or using networked file storage (NAS). + All PHP Applications automatically benefit from WinCache's file cache feature. File system operations are cached in memory. -All PHP Applications automatically benefit from WinCache's file cache feature. File system operations are cached in memory. + WinCache also can cache user objects in memory and share them between php.exe or php-cgi.exe processes (share objects between requests). -WinCache also can cache user objects in memory and share them between php.exe or php-cgi.exe processes (share objects between requests). + Many major web applications have a plugin or extension or configuration option to make use of the WinCache user object cache. -Many major web applications have a plugin or extension or configuration option to make use of the WinCache user object cache. + If you need high performance, you should use the object cache in your applications. -If you need high performance, you should use the object cache in your applications. + See: http://pecl.php.net/package/WinCache to download a WinCache DLL (or tgz) to your PHP extensions directory (extensions_dir in your php.ini). -See: http://pecl.php.net/package/WinCache to download a WinCache DLL (or tgz) to your PHP extensions directory (extensions_dir in your php.ini). - -In your php.ini, set - - Recommended WinCache configuration - + Set the &php.ini; to: + + Recommended WinCache configuration + - - + + + For more info, see: + WinCache Configuration + + -For more info, see: http://php.net/manual/en/wincache.configuration.php - - - - - IIS Configuration - - In IIS Manager, Install FastCGI module and add a handler mapping for `.php` to the path to PHP-CGI.exe (not PHP.exe) + + IIS Configuration - - You may use the APPCMD command line tool to script IIS configuration. + In IIS Manager, Install FastCGI module and add a handler mapping for + `.php` to the path to PHP-CGI.exe + (not PHP.exe) - - + + You may use the APPCMD command line tool to script IIS configuration. + + + + Database + + You'll probably need a Database Server. + Popular databases provide PHP extensions to use them. + If your web site doesn't get a lot of traffic, + you can run your database server on the same server as your web server. + Many popular database servers run on Windows. + - You'll probably need a Database Server. Popular databases provide PHP extensions to use them. If your web site doesn't get a lot of traffic, you can run your database server on the same server as your web server. Many popular database servers run on Windows. - - PHP includes mysqli and pdo_mysql extensions. PHP 5.5 and 5.6 include mysql extension (deprecated in 7.0). - - See https://dev.mysql.com/downloads/windows/ - + PHP includes mysqli and pdo_mysql extensions. + + See https://dev.mysql.com/downloads/windows/ + + \ No newline at end of file +--> diff --git a/install/windows/tools.xml b/install/windows/tools.xml index 7a8b18431d..f69e13ab27 100644 --- a/install/windows/tools.xml +++ b/install/windows/tools.xml @@ -1,20 +1,24 @@ - - -PHP Installer Tools on Windows - - + PHP Installer Tools on Windows + PHP Install Tools - - If you want to setup PHP and are using IIS, the easiest way is to use Microsoft's Web Platform Installer (WebPI). - + + If you want to setup PHP and are using IIS, + the easiest way is to use Microsoft's Web Platform Installer (WebPI). + - XAMPP, WampServer and BitNami will setup PHP applications for use with Apache on Windows. - - Setting up and configuring Nginx on Windows requires a bit more configuration. See the Nginx documentation for additional setup help. - + + XAMPP, + WampServer and BitNami will setup PHP applications for use with Apache on Windows. + + + Setting up and configuring Nginx on Windows requires a bit more configuration. + See the Nginx documentation + for additional setup help. + + \ No newline at end of file +--> diff --git a/install/windows/troubleshooting.xml b/install/windows/troubleshooting.xml index 60c7a00218..07285d3904 100644 --- a/install/windows/troubleshooting.xml +++ b/install/windows/troubleshooting.xml @@ -1,25 +1,23 @@ - - -Troubleshooting PHP on Windows - - + Troubleshooting PHP on Windows + Check Temp Directory Permissions - - Right-click temp directory in File Explorer to get the permissions. - - - - For IIS, check that user IIS_User has MODIFY permission. You can get the temporary directory from the configuration or php info. - - + + + Right-click temp directory in File Explorer to get the permissions. + + + + + For IIS, check that user IIS_User has MODIFY permission. + You can get the temporary directory from the configuration or php info. + + - - - + \ No newline at end of file +--> diff --git a/language-snippets.ent b/language-snippets.ent index 360b095ca7..2eb0afcad3 100644 --- a/language-snippets.ent +++ b/language-snippets.ent @@ -370,12 +370,6 @@ to several possible vulnerabilities. Please read our CGI security section to learn how to defend yourself from such attacks.'> -directive note: magic_quotes_gpc -The magic_quotes_gpc -directive defaults to on. It essentially runs -addslashes on all GET, POST, and COOKIE data. -stripslashes may be used to remove them.'> - @@ -521,6 +515,8 @@ currently not documented; only its argument list is available. Output of the above example in PHP 7.1:'> +Output of the above example in PHP 7.2:'> + Output of the above example in PHP 7.3:'> Output of the above example in PHP 8:'> @@ -707,7 +703,7 @@ PHP is compiled with freetype support (
+
+ &reftitle.seealso; + See also object iteration. +
+ &language.predefined.generator.current; diff --git a/language/predefined/interfaces.xml b/language/predefined/interfaces.xml index 1a47536fdd..46ac6fde1d 100644 --- a/language/predefined/interfaces.xml +++ b/language/predefined/interfaces.xml @@ -20,6 +20,8 @@ &language.predefined.closure; &language.predefined.generator; &language.predefined.weakreference; + &language.predefined.weakmap; + &language.predefined.stringable; diff --git a/language/predefined/iterator.xml b/language/predefined/iterator.xml index 5f5f552d25..b9244b18dc 100644 --- a/language/predefined/iterator.xml +++ b/language/predefined/iterator.xml @@ -27,9 +27,9 @@ - - Iterator - + + Iterator + extends @@ -142,6 +142,10 @@ string(17) "myIterator::valid" +
+ &reftitle.seealso; + See also object iteration. +
diff --git a/language/predefined/iterator/key.xml b/language/predefined/iterator/key.xml index 69d1efc190..bcbc4f9e7d 100644 --- a/language/predefined/iterator/key.xml +++ b/language/predefined/iterator/key.xml @@ -1,6 +1,5 @@ - Iterator::key @@ -10,8 +9,8 @@ &reftitle.description; - abstract public scalarIterator::key - + abstract public mixedIterator::key + Returns the key of the current element. @@ -38,7 +37,6 @@ - - diff --git a/language/predefined/serializable.xml b/language/predefined/serializable.xml index 8234bb33cb..6ef2b2dcc9 100644 --- a/language/predefined/serializable.xml +++ b/language/predefined/serializable.xml @@ -37,9 +37,9 @@ - - Serializable - + + Serializable + diff --git a/language/predefined/serializable/unserialize.xml b/language/predefined/serializable/unserialize.xml index ff89786e36..6249f2e547 100644 --- a/language/predefined/serializable/unserialize.xml +++ b/language/predefined/serializable/unserialize.xml @@ -1,6 +1,5 @@ - Serializable::unserialize @@ -11,7 +10,7 @@ &reftitle.description; abstract public voidSerializable::unserialize - stringserialized + stringdata Called during unserialization of the object. @@ -31,7 +30,7 @@ - serialized + data The string representation of the object. @@ -61,7 +60,6 @@ - + + + + The Stringable interface + Stringable + + + + +
+ &reftitle.intro; + + The Stringable interface denotes a class as + having a __toString method. Unlike most interfaces, + Stringable is implicitly present on any class that + has the magic __toString method defined, although it + can and should be declared explicitly. + + + Its primary value is to allow functions to type check against the union + type string|Stringable to accept either a string primitive + or an object that can be cast to a string. + +
+ + +
+ &reftitle.interfacesynopsis; + + + + Stringable + + + + + Stringable + + + + + &Methods; + + + + +
+ +
+ Stringable Examples + + + Basic Stringable Usage + +oct1 = $oct1; + $this->oct2 = $oct2; + $this->oct3 = $oct3; + $this->oct4 = $oct4; + } + + public function __toString(): string { + return "$this->oct1.$this->oct2.$this->oct3.$this->oct4"; + } +} + +function showStuff(string|Stringable $value) { + // A Stringable will get converted to a string here by calling + // __toString. + print $value; +} + +$ip = new IPv4Address('123', '234', '42', '9'); + +showStuff($ip); +?> +]]> + + &example.outputs.similar; + + + + + +
+ +
+ +
+ + diff --git a/language/predefined/throwable.xml b/language/predefined/throwable.xml index 019357bd1d..261b1d4e70 100644 --- a/language/predefined/throwable.xml +++ b/language/predefined/throwable.xml @@ -35,9 +35,9 @@ - - Throwable - + + Throwable + diff --git a/language/predefined/traversable.xml b/language/predefined/traversable.xml index 39224a7eaa..cfc48acffd 100644 --- a/language/predefined/traversable.xml +++ b/language/predefined/traversable.xml @@ -50,9 +50,9 @@ - - Traversable - + + Traversable + diff --git a/language/predefined/typeerror.xml b/language/predefined/typeerror.xml index 1f83b571ad..51d3509ce1 100644 --- a/language/predefined/typeerror.xml +++ b/language/predefined/typeerror.xml @@ -16,12 +16,21 @@ &reftitle.intro; There are three scenarios where a - TypeError may be thrown. The - first is where the argument type being passed to a function does not match - its corresponding declared parameter type. The second is where a value - being returned from a function does not match the declared function return - type. The third is where an invalid number of arguments are passed to a - built-in PHP function (strict mode only). + TypeError may be thrown: + + + The argument type being passed to a function does not match + its corresponding declared parameter type. + + + A value being returned from a function does not match the + declared function return type. + + + An invalid number of arguments are passed + to a built-in PHP function (strict mode only). + + diff --git a/language/predefined/versions.xml b/language/predefined/versions.xml index 54704bf83b..66beb46532 100644 --- a/language/predefined/versions.xml +++ b/language/predefined/versions.xml @@ -98,10 +98,20 @@ - - - - + + + + + + + + + + + + + + diff --git a/language/predefined/weakmap.xml b/language/predefined/weakmap.xml new file mode 100644 index 0000000000..69e3950da7 --- /dev/null +++ b/language/predefined/weakmap.xml @@ -0,0 +1,139 @@ + + + + + + The WeakMap class + WeakMap + + + + +
+ &reftitle.intro; + + A WeakMap is map (or dictionary) that accepts objects as keys. However, unlike the + otherwise similar SplObjectStorage, an object in a key of WeakMap + does not contribute toward the object's reference count. That is, if at any point the only remaining reference + to an object is the key of a WeakMap, the object will be garbage collected and removed + from the WeakMap. Its primary use case is for building caches of data derived from + an object that do not need to live longer than the object. + + + WeakMap implements ArrayAccess, + Iterator, and Countable, + so in most cases it can be used in the same fashion as an associative array. + +
+ + +
+ &reftitle.classsynopsis; + + + + WeakMap + + + + + final + WeakMap + + + + Countable + + + + ArrayAccess + + + + IteratorAggregate + + + + + + &Methods; + + + + +
+ +
+ &reftitle.examples; + + + <classname>Weakmap</classname> usage example + + + + &example.outputs; + + + + + +
+ + +
+ + &language.predefined.weakmap.construct; + &language.predefined.weakmap.count; + &language.predefined.weakmap.getiterator; + &language.predefined.weakmap.offsetexists; + &language.predefined.weakmap.offsetget; + &language.predefined.weakmap.offsetset; + &language.predefined.weakmap.offsetunset; + +
+ + diff --git a/reference/weakref/weakmap/construct.xml b/language/predefined/weakmap/construct.xml similarity index 88% rename from reference/weakref/weakmap/construct.xml rename to language/predefined/weakmap/construct.xml index 990d994067..d882fe43af 100644 --- a/reference/weakref/weakmap/construct.xml +++ b/language/predefined/weakmap/construct.xml @@ -1,7 +1,7 @@ - + - + WeakMap::__construct Constructs a new map diff --git a/reference/weakref/weakmap/count.xml b/language/predefined/weakmap/count.xml similarity index 98% rename from reference/weakref/weakmap/count.xml rename to language/predefined/weakmap/count.xml index e332ecb84f..b0bb65d7ea 100644 --- a/reference/weakref/weakmap/count.xml +++ b/language/predefined/weakmap/count.xml @@ -1,5 +1,5 @@ - + diff --git a/reference/mongo/mongoclient/connect.xml b/language/predefined/weakmap/getiterator.xml similarity index 59% rename from reference/mongo/mongoclient/connect.xml rename to language/predefined/weakmap/getiterator.xml index 32e9aff4c4..ef6ab397d6 100644 --- a/reference/mongo/mongoclient/connect.xml +++ b/language/predefined/weakmap/getiterator.xml @@ -1,24 +1,21 @@ - - - - MongoClient::connect - Connects to a database server - - - - &mongo.noalternative.method.note; - - + + + WeakMap::getIterator + Retrieve an external iterator + &reftitle.description; - public boolMongoClient::connect - + abstract public TraversableWeakMap::getIterator + + + Returns an external iterator. + @@ -29,19 +26,20 @@ &reftitle.returnvalues; - If the connection was successful. + An instance of an object implementing Iterator or + Traversable - + &reftitle.errors; - Throws MongoConnectionException if it fails to connect - to the database. + Throws an Exception on failure. - + + +--> diff --git a/reference/weakref/weakmap/offsetexists.xml b/language/predefined/weakmap/offsetexists.xml similarity index 98% rename from reference/weakref/weakmap/offsetexists.xml rename to language/predefined/weakmap/offsetexists.xml index 28efedf360..e2186d26ea 100644 --- a/reference/weakref/weakmap/offsetexists.xml +++ b/language/predefined/weakmap/offsetexists.xml @@ -1,5 +1,5 @@ - + diff --git a/reference/weakref/weakmap/offsetget.xml b/language/predefined/weakmap/offsetget.xml similarity index 98% rename from reference/weakref/weakmap/offsetget.xml rename to language/predefined/weakmap/offsetget.xml index cd39a277b8..f5eec1d26e 100644 --- a/reference/weakref/weakmap/offsetget.xml +++ b/language/predefined/weakmap/offsetget.xml @@ -1,5 +1,5 @@ - + diff --git a/reference/weakref/weakmap/offsetset.xml b/language/predefined/weakmap/offsetset.xml similarity index 95% rename from reference/weakref/weakmap/offsetset.xml rename to language/predefined/weakmap/offsetset.xml index a3c280cfcb..cc3bb00dfc 100644 --- a/reference/weakref/weakmap/offsetset.xml +++ b/language/predefined/weakmap/offsetset.xml @@ -1,5 +1,5 @@ - + @@ -27,7 +27,7 @@ object - The object serving as key of the key-value pair. + The object serving as key of the key-value pair. @@ -35,7 +35,7 @@ value - The arbitrary data serving as value of the key-value pair. + The arbitrary data serving as value of the key-value pair. diff --git a/reference/weakref/weakmap/offsetunset.xml b/language/predefined/weakmap/offsetunset.xml similarity index 95% rename from reference/weakref/weakmap/offsetunset.xml rename to language/predefined/weakmap/offsetunset.xml index a9d1bb07d6..7ac95a9b29 100644 --- a/reference/weakref/weakmap/offsetunset.xml +++ b/language/predefined/weakmap/offsetunset.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ object - The key object to remove from the map. + The key object to remove from the map. diff --git a/language/predefined/weakreference.xml b/language/predefined/weakreference.xml index 42b606d086..8ee63f2a59 100644 --- a/language/predefined/weakreference.xml +++ b/language/predefined/weakreference.xml @@ -15,12 +15,6 @@ Weak references allow the programmer to retain a reference to an object which does not prevent the object from being destroyed. They are useful for implementing cache like structures. - - - The class WeakReference is not to be confused with the class - WeakRef of the Weakref extension. - - WeakReferences cannot be serialized. diff --git a/language/predefined/weakreference/create.xml b/language/predefined/weakreference/create.xml index 6d1dc7e984..ce689640c0 100644 --- a/language/predefined/weakreference/create.xml +++ b/language/predefined/weakreference/create.xml @@ -1,6 +1,5 @@ - WeakReference::create @@ -11,7 +10,7 @@ &reftitle.description; public static WeakReferenceWeakReference::create - objectreferent + objectobject Creates a new WeakReference. @@ -22,7 +21,7 @@ &reftitle.parameters; - referent + object The object to be weakly referenced. @@ -40,7 +39,6 @@ - + APC User Cache APCu diff --git a/reference/apcu/functions/apcu-dec.xml b/reference/apcu/functions/apcu-dec.xml index cc43e0ede1..5c3463df3c 100644 --- a/reference/apcu/functions/apcu-dec.xml +++ b/reference/apcu/functions/apcu-dec.xml @@ -68,28 +68,6 @@ - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 5.1.12 - - The ttl parameter has been added. - - - - - - - &reftitle.examples; diff --git a/reference/apcu/functions/apcu-fetch.xml b/reference/apcu/functions/apcu-fetch.xml index 562a032094..a35e061357 100644 --- a/reference/apcu/functions/apcu-fetch.xml +++ b/reference/apcu/functions/apcu-fetch.xml @@ -50,6 +50,28 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + PECL apcu 3.0.17 + + The success parameter was added. + + + + + + + &reftitle.examples; @@ -74,28 +96,6 @@ string(3) "BAR" - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL apcu 3.0.17 - - The success parameter was added. - - - - - - - &reftitle.seealso; diff --git a/reference/apcu/functions/apcu-inc.xml b/reference/apcu/functions/apcu-inc.xml index 15c5e5d0ca..ae5b6a095c 100644 --- a/reference/apcu/functions/apcu-inc.xml +++ b/reference/apcu/functions/apcu-inc.xml @@ -68,28 +68,6 @@ - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 5.1.12 - - The ttl parameter has been added. - - - - - - - &reftitle.examples; diff --git a/reference/array/constants.xml b/reference/array/constants.xml index 6325e367f6..3e05e33685 100644 --- a/reference/array/constants.xml +++ b/reference/array/constants.xml @@ -107,7 +107,7 @@ SORT_LOCALE_STRING is used to compare items as - strings, based on the current locale. Added in PHP 5.0.2. + strings, based on the current locale. @@ -119,7 +119,7 @@ SORT_NATURAL is used to compare items as - strings using "natural ordering" like natsort. Added in PHP 5.4.0. + strings using "natural ordering" like natsort. @@ -133,7 +133,7 @@ SORT_FLAG_CASE can be combined (bitwise OR) with SORT_STRING or - SORT_NATURAL to sort strings case-insensitively. Added in PHP 5.4.0. + SORT_NATURAL to sort strings case-insensitively. @@ -151,7 +151,6 @@ ARRAY_FILTER_USE_KEY is used with array_filter to pass each key as the first argument to the given callback function. - Added in PHP 5.6.0. @@ -164,7 +163,6 @@ ARRAY_FILTER_USE_BOTH is used with array_filter to pass both value and key to the given callback function. - Added in PHP 5.6.0. diff --git a/reference/array/functions/array-column.xml b/reference/array/functions/array-column.xml index 095b39f86f..efe17ae346 100644 --- a/reference/array/functions/array-column.xml +++ b/reference/array/functions/array-column.xml @@ -91,13 +91,6 @@ will no longer be cast to string and will now throw a TypeError instead.
- - 7.0.0 - - Added the ability for the array parameter to be - an array of objects. - - @@ -282,18 +275,6 @@ Array - - &reftitle.seealso; - - - - Recommended - userland implementation for PHP lower than 5.5 - - - - - + count Count all elements in an array, or something in an object + &reftitle.description; @@ -29,6 +31,7 @@ are implemented and used in PHP. + &reftitle.parameters; @@ -63,6 +66,7 @@ + &reftitle.returnvalues; @@ -74,6 +78,37 @@ 0 will be returned. + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + count will now throw TypeError on + invalid countable types passed to the value parameter. + + + + 7.2.0 + + count will now yield a warning on invalid countable types + passed to the value parameter. + + + + + + + &reftitle.examples; @@ -87,6 +122,28 @@ $a[1] = 3; $a[2] = 5; var_dump(count($a)); +$b[0] = 7; +$b[5] = 9; +$b[10] = 11; +var_dump(count($b)); +?> +]]> + + &example.outputs; + + + + + + + + <function>count</function> non Countable|array example (bad example - don't do this) + + + + &example.outputs.72; + + + + &example.outputs.8; + + @@ -134,28 +206,7 @@ echo count($food); // output 2 - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 7.2.0 - - count will now yield a warning on invalid countable types - passed to the value parameter. - - - - - - + &reftitle.seealso; @@ -168,7 +219,9 @@ echo count($food); // output 2 + + - diff --git a/reference/bc/book.xml b/reference/bc/book.xml index 579222db44..ed84830e80 100644 --- a/reference/bc/book.xml +++ b/reference/bc/book.xml @@ -16,7 +16,7 @@ Valid (aka. well-formed) BCMath numbers are strings which match the regular expression - /^[+-]?[0]*[1-9]*[.]?[0-9]*$/. + /^[+-]?[0-9]*(\.[0-9]*)?$/. @@ -24,7 +24,7 @@ a string as operand may not have the desired effect due to the way PHP converts float values to string, namely that the string may be in exponential notation (which is not - supported by BCMath), and that the decimal separator is locale dependent + supported by BCMath), and that, prior to PHP 8.0.0, the decimal separator is locale dependent (while BCMath always expects a decimal point). diff --git a/reference/bc/functions/bcpowmod.xml b/reference/bc/functions/bcpowmod.xml index 3af13bebf4..0d173eb0fd 100644 --- a/reference/bc/functions/bcpowmod.xml +++ b/reference/bc/functions/bcpowmod.xml @@ -63,17 +63,7 @@ is 0 or exponent is negative. - - - &reftitle.notes; - - - Because this method uses the modulus operation, numbers which are not - positive integers may give unexpected results. - - - - + &reftitle.changelog; @@ -118,7 +108,17 @@ $b = bcmod(bcpow($x, $y), $mod); - + + + &reftitle.notes; + + + Because this method uses the modulus operation, numbers which are not + positive integers may give unexpected results. + + + + &reftitle.seealso; diff --git a/reference/classkit/book.xml b/reference/classkit/book.xml deleted file mode 100644 index 58d5ab32d9..0000000000 --- a/reference/classkit/book.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - Classkit - - - &reftitle.intro; - - These functions allow the dynamic manipulation of PHP classes, at runtime. - - - - This extension has been replaced by - runkit, which is not limited to class - manipulation but has function manipulation, as well. - - - - - &reference.classkit.setup; - &reference.classkit.constants; - &reference.classkit.reference; - - - - - diff --git a/reference/classkit/configure.xml b/reference/classkit/configure.xml deleted file mode 100644 index cd585d0a36..0000000000 --- a/reference/classkit/configure.xml +++ /dev/null @@ -1,31 +0,0 @@ - - -
- &reftitle.install; - - &pecl.info.dead; - &url.pecl.vcs;classkit. - -
- - - diff --git a/reference/classkit/constants.xml b/reference/classkit/constants.xml deleted file mode 100644 index d8aa3ff7dd..0000000000 --- a/reference/classkit/constants.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - &reftitle.constants; - &extension.constants; - - - - - CLASSKIT_ACC_PRIVATE - (int) - - - - Marks the method private - - - - - - CLASSKIT_ACC_PROTECTED - (int) - - - - Marks the method protected - - - - - - CLASSKIT_ACC_PUBLIC - (int) - - - - Marks the method public - - - - - - - diff --git a/reference/classkit/functions/classkit-import.xml b/reference/classkit/functions/classkit-import.xml deleted file mode 100644 index 2316280353..0000000000 --- a/reference/classkit/functions/classkit-import.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - classkit_import - Import new class method definitions from a file - - - &reftitle.description; - - arrayclasskit_import - stringfilename - - ¬e.classkit.selfmanipulation; - &warn.experimental.func; - - - &reftitle.parameters; - - - - filename - - - The filename of the class method definitions to import - - - - - - - - &reftitle.returnvalues; - - Associative array of imported methods - - - - - &reftitle.examples; - - - <function>classkit_import</function> example - - -]]> - - -foo(); - -// import replacement method -classkit_import('newclass.php'); - -// output imported -echo $e->foo(); - -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - classkit_method_add - classkit_method_copy - - - - - - diff --git a/reference/classkit/functions/classkit-method-add.xml b/reference/classkit/functions/classkit-method-add.xml deleted file mode 100644 index cc2722caef..0000000000 --- a/reference/classkit/functions/classkit-method-add.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - classkit_method_add - Dynamically adds a new method to a given class - - - &reftitle.description; - - boolclasskit_method_add - stringclassname - stringmethodname - stringargs - stringcode - intflagsCLASSKIT_ACC_PUBLIC - - &warn.experimental.func; - - - &reftitle.parameters; - - - - classname - - - The class to which this method will be added - - - - - methodname - - - The name of the method to add - - - - - args - - - Comma-delimited list of arguments for the newly-created method - - - - - code - - - The code to be evaluated when methodname - is called - - - - - flags - - - The type of method to create, can be - CLASSKIT_ACC_PUBLIC, - CLASSKIT_ACC_PROTECTED or - CLASSKIT_ACC_PRIVATE - - - - This parameter is only used as of PHP 5, because, prior to this, - all methods were public. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - - <function>classkit_method_add</function> example - -add(12, 4); -?> -]]> - - &example.outputs; - - - - - - - - &reftitle.seealso; - - - classkit_method_copy - classkit_method_redefine - classkit_method_remove - classkit_method_rename - create_function - - - - - - diff --git a/reference/classkit/functions/classkit-method-copy.xml b/reference/classkit/functions/classkit-method-copy.xml deleted file mode 100644 index 755b0e32a9..0000000000 --- a/reference/classkit/functions/classkit-method-copy.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - classkit_method_copy - Copies a method from class to another - - - &reftitle.description; - - boolclasskit_method_copy - stringdClass - stringdMethod - stringsClass - stringsMethod - - &warn.experimental.func; - - - &reftitle.parameters; - - - - dClass - - - Destination class for copied method - - - - - dMethod - - - Destination method name - - - - - sClass - - - Source class of the method to copy - - - - - sMethod - - - Name of the method to copy from the source class. If this parameter is - omitted, the value of dMethod is assumed. - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - - <function>classkit_method_copy</function> example - - -]]> - - &example.outputs; - - - - - - - - &reftitle.seealso; - - - classkit_method_add - classkit_method_redefine - classkit_method_remove - classkit_method_rename - - - - - - diff --git a/reference/classkit/functions/classkit-method-redefine.xml b/reference/classkit/functions/classkit-method-redefine.xml deleted file mode 100644 index caf38d1fc1..0000000000 --- a/reference/classkit/functions/classkit-method-redefine.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - classkit_method_redefine - Dynamically changes the code of the given method - - - &reftitle.description; - - boolclasskit_method_redefine - stringclassname - stringmethodname - stringargs - stringcode - intflagsCLASSKIT_ACC_PUBLIC - - ¬e.classkit.selfmanipulation; - &warn.experimental.func; - - - &reftitle.parameters; - - - - classname - - - The class in which to redefine the method - - - - - methodname - - - The name of the method to redefine - - - - - args - - - Comma-delimited list of arguments for the redefined method - - - - - code - - - The new code to be evaluated when methodname - is called - - - - - flags - - - The redefined method can be - CLASSKIT_ACC_PUBLIC, - CLASSKIT_ACC_PROTECTED or - CLASSKIT_ACC_PRIVATE - - - - This parameter is only used as of PHP 5, because, prior to this, - all methods were public. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - - <function>classkit_method_redefine</function> example - -foo(); - -// Redefine the 'foo' method -classkit_method_redefine( - 'Example', - 'foo', - '', - 'return "bar!\n";', - CLASSKIT_ACC_PUBLIC -); - -// output Example::foo() (after redefine) -echo "After: " . $e->foo(); -?> -]]> - - &example.outputs; - - - - - - - - &reftitle.seealso; - - - classkit_method_add - classkit_method_copy - classkit_method_remove - classkit_method_rename - - - - - - diff --git a/reference/classkit/functions/classkit-method-remove.xml b/reference/classkit/functions/classkit-method-remove.xml deleted file mode 100644 index 5e3a03c98b..0000000000 --- a/reference/classkit/functions/classkit-method-remove.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - classkit_method_remove - Dynamically removes the given method - - - &reftitle.description; - - boolclasskit_method_remove - stringclassname - stringmethodname - - ¬e.classkit.selfmanipulation; - &warn.experimental.func; - - - &reftitle.parameters; - - - - classname - - - The class in which to remove the method - - - - - methodname - - - The name of the method to remove - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - - <function>classkit_method_remove</function> example - - -]]> - - &example.outputs; - - - - - - - - &reftitle.seealso; - - - classkit_method_add - classkit_method_copy - classkit_method_redefine - classkit_method_rename - - - - - - diff --git a/reference/classkit/functions/classkit-method-rename.xml b/reference/classkit/functions/classkit-method-rename.xml deleted file mode 100644 index 8f4a638a91..0000000000 --- a/reference/classkit/functions/classkit-method-rename.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - classkit_method_rename - Dynamically changes the name of the given method - - - &reftitle.description; - - boolclasskit_method_rename - stringclassname - stringmethodname - stringnewname - - ¬e.classkit.selfmanipulation; - &warn.experimental.func; - - - &reftitle.parameters; - - - - classname - - - The class in which to rename the method - - - - - methodname - - - The name of the method to rename - - - - - newname - - - The new name to give to the renamed method - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - - <function>classkit_method_rename</function> example - - -]]> - - &example.outputs; - - - - - - - - &reftitle.seealso; - - - classkit_method_add - classkit_method_copy - classkit_method_redefine - classkit_method_remove - - - - - - diff --git a/reference/classkit/ini.xml b/reference/classkit/ini.xml deleted file mode 100644 index 2dc7deb8fc..0000000000 --- a/reference/classkit/ini.xml +++ /dev/null @@ -1,27 +0,0 @@ - - -
- &reftitle.runtime; - &no.config; -
- - diff --git a/reference/classkit/reference.xml b/reference/classkit/reference.xml deleted file mode 100644 index ccbc921110..0000000000 --- a/reference/classkit/reference.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Classkit &Functions; - - &reference.classkit.entities.functions; - - - - - diff --git a/reference/classkit/setup.xml b/reference/classkit/setup.xml deleted file mode 100644 index ba2b85414d..0000000000 --- a/reference/classkit/setup.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - &no.requirement; -
- - &reference.classkit.configure; - - &reference.classkit.ini; - -
- &reftitle.resources; - &no.resource; -
- -
- - - diff --git a/reference/classkit/versions.xml b/reference/classkit/versions.xml deleted file mode 100644 index 8bfa1bdf62..0000000000 --- a/reference/classkit/versions.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/reference/classobj/examples.xml b/reference/classobj/examples.xml index dbdf80d34c..4c425474da 100644 --- a/reference/classobj/examples.xml +++ b/reference/classobj/examples.xml @@ -6,62 +6,66 @@ In this example, we first define a base class and an extension of the class. The base class describes a general vegetable, - whether it is edible or not and what is its color. The subclass + whether it is edible, and what is its color. The subclass Spinach adds a method to cook it and another to find out if it is cooked. - classes.inc + Class Definitions + Vegetable edible = $edible; - $this->color = $color; - } + public function __construct($edible, $color = "green") + { + $this->edible = $edible; + $this->color = $color; + } - function is_edible() - { - return $this->edible; - } + public function isEdible() + { + return $this->edible; + } - function what_color() - { - return $this->color; - } + public function getColor() + { + return $this->color; + } +} -} // end of class Vegetable +?> +]]> + + Spinach + +cooked = true; + } - function cook_it() - { - $this->cooked = true; - } - - function is_cooked() - { - return $this->cooked; - } - -} // end of class Spinach + public function isCooked() + { + return $this->cooked; + } +} ?> ]]> @@ -79,40 +83,37 @@ class Spinach extends Vegetable { test_script.php $val) { - echo "\t$prop = $val\n"; -} + foreach (get_object_vars($obj) as $prop => $val) { + echo "\t$prop = $val\n"; + } } -function print_methods($obj) +function printMethods($obj) { -$arr = get_class_methods(get_class($obj)); -foreach ($arr as $method) { - echo "\tfunction $method()\n"; -} + $arr = get_class_methods(get_class($obj)); + foreach ($arr as $method) { + echo "\tfunction $method()\n"; + } } -function class_parentage($obj, $class) +function objectBelongsTo($obj, $class) { -if (is_subclass_of($GLOBALS[$obj], $class)) { - echo "Object $obj belongs to class " . get_class($GLOBALS[$obj]); - echo ", a subclass of $class\n"; -} else { - echo "Object $obj does not belong to a subclass of $class\n"; -} + if (is_subclass_of($obj, $class)) { + echo "Object belongs to class " . get_class($obj); + echo ", a subclass of $class\n"; + } else { + echo "Object does not belong to a subclass of $class\n"; + } } // instantiate 2 objects - $veggie = new Vegetable(true, "blue"); $leafy = new Spinach(); @@ -123,34 +124,47 @@ echo ", PARENT " . get_parent_class($leafy) . "\n"; // show veggie properties echo "\nveggie: Properties\n"; -print_vars($veggie); +printProperties($veggie); // and leafy methods echo "\nleafy: Methods\n"; -print_methods($leafy); +printMethods($leafy); echo "\nParentage:\n"; -class_parentage("leafy", "Spinach"); -class_parentage("leafy", "Vegetable"); +objectBelongsTo($leafy, Spinach::class); +objectBelongsTo($leafy, Vegetable::class); + ?> - ]]> + &examples.outputs; + + + One important thing to note in the example above is that the object $leafy is an instance of the class Spinach which is a subclass of - Vegetable, - therefore the last part of the script above will output: + Vegetable. - - - @@ -175,4 +189,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> - diff --git a/reference/classobj/functions/class-alias.xml b/reference/classobj/functions/class-alias.xml index b2da5a50ff..60190f2051 100644 --- a/reference/classobj/functions/class-alias.xml +++ b/reference/classobj/functions/class-alias.xml @@ -9,13 +9,13 @@ &reftitle.description; boolclass_alias - stringoriginal + stringclass stringalias boolautoload&true; Creates an alias named alias - based on the user defined class original. + based on the user defined class class. The aliased class is exactly the same as the original class.
@@ -24,7 +24,7 @@ - original + class The original class. @@ -112,7 +112,6 @@ bool(true) - - trait_exists @@ -11,8 +10,8 @@ &reftitle.description; booltrait_exists - stringtraitname - boolautoload + stringtrait + boolautoload&true; @@ -24,7 +23,7 @@ &reftitle.parameters; - traitname + trait Name of the trait to check @@ -51,7 +50,6 @@ - - + diff --git a/reference/cmark/book.xml b/reference/cmark/book.xml index 4f8a2ee721..be707687e1 100644 --- a/reference/cmark/book.xml +++ b/reference/cmark/book.xml @@ -2,6 +2,7 @@ + CommonMark CommonMark diff --git a/reference/com/functions/com-create-guid.xml b/reference/com/functions/com-create-guid.xml index fed10db617..dcee44dc0c 100644 --- a/reference/com/functions/com-create-guid.xml +++ b/reference/com/functions/com-create-guid.xml @@ -19,6 +19,12 @@ Microsoft convention is to enclose a GUID in curly braces. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/componere/book.xml b/reference/componere/book.xml index 42f3d408ab..8f2756fab3 100644 --- a/reference/componere/book.xml +++ b/reference/componere/book.xml @@ -2,6 +2,7 @@ + Componere Componere diff --git a/reference/componere/functions/componere.cast.xml b/reference/componere/functions/componere.cast.xml index d9c6783d83..894b2771c3 100644 --- a/reference/componere/functions/componere.cast.xml +++ b/reference/componere/functions/componere.cast.xml @@ -45,8 +45,8 @@ - - Exceptions + + &reftitle.errors; Shall throw InvalidArgumentException if the type of object is or is derived from an internal class diff --git a/reference/componere/functions/componere.cast_by_ref.xml b/reference/componere/functions/componere.cast_by_ref.xml index 8d7f8a8b4e..e53bc29150 100644 --- a/reference/componere/functions/componere.cast_by_ref.xml +++ b/reference/componere/functions/componere.cast_by_ref.xml @@ -45,8 +45,8 @@ - - Exceptions + + &reftitle.errors; Shall throw InvalidArgumentException if the type of object is or is derived from an internal class diff --git a/reference/cubrid/book.xml b/reference/cubrid/book.xml index 59ba003623..44e8869f4a 100644 --- a/reference/cubrid/book.xml +++ b/reference/cubrid/book.xml @@ -2,6 +2,7 @@ + CUBRID CUBRID diff --git a/reference/cubrid/cubridmysql/cubrid-unbuffered-query.xml b/reference/cubrid/cubridmysql/cubrid-unbuffered-query.xml index 140464c707..88bb745f83 100644 --- a/reference/cubrid/cubridmysql/cubrid-unbuffered-query.xml +++ b/reference/cubrid/cubridmysql/cubrid-unbuffered-query.xml @@ -49,18 +49,6 @@ - - &reftitle.notes; - - - The benefits of cubrid_unbuffered_query come - at a cost: you cannot use cubrid_num_rows and - cubrid_data_seek on a result set returned from - cubrid_unbuffered_query. - - - - &reftitle.examples; @@ -89,6 +77,18 @@ + + &reftitle.notes; + + + The benefits of cubrid_unbuffered_query come + at a cost: you cannot use cubrid_num_rows and + cubrid_data_seek on a result set returned from + cubrid_unbuffered_query. + + + +
- &reftitle.classsynopsis; + &reftitle.interfacesynopsis; @@ -28,9 +28,9 @@ - - DateTimeInterface - + + DateTimeInterface + @@ -228,7 +228,7 @@ DATE_RFC3339 - Same as DATE_ATOM (since PHP 5.1.3) + Same as DATE_ATOM @@ -238,7 +238,7 @@ DATE_RFC3339_EXTENDED - RFC 3339 EXTENDED format (since PHP 7.0.0) (example: 2005-08-15T15:52:01.000+00:00) + RFC 3339 EXTENDED format (example: 2005-08-15T15:52:01.000+00:00) @@ -286,14 +286,6 @@ on DateTimeInterface. - - 5.5.8 - - Trying to implement DateTimeInterface raises a - fatal error now. Formerly implementing the interface didn't raise an - error, but the behavior was erroneous. - - diff --git a/reference/datetime/datetimeinterface/diff.xml b/reference/datetime/datetimeinterface/diff.xml index dc6467a927..8353df4b9e 100644 --- a/reference/datetime/datetimeinterface/diff.xml +++ b/reference/datetime/datetimeinterface/diff.xml @@ -114,7 +114,7 @@ echo $interval->format('%R%a days'); <classname>DateTime</classname> object comparison - As of PHP 5.2.2, DateTime objects can be compared using + DateTime objects can be compared using comparison operators. diff --git a/reference/datetime/datetimeinterface/format.xml b/reference/datetime/datetimeinterface/format.xml index a3a8c078fd..3e3f11eb04 100644 --- a/reference/datetime/datetimeinterface/format.xml +++ b/reference/datetime/datetimeinterface/format.xml @@ -243,7 +243,7 @@ v - Milliseconds (added in PHP 7.0.0). Same note applies as for + Milliseconds. Same note applies as for u. Example: 654 @@ -280,8 +280,8 @@ T - Timezone abbreviation - Examples: EST, MDT ... + Timezone abbreviation, if known; otherwise the GMT offset. + Examples: EST, MDT, +05 Z diff --git a/reference/datetime/datetimeinterface/gettimestamp.xml b/reference/datetime/datetimeinterface/gettimestamp.xml index bdb1d7b896..9c602dadee 100644 --- a/reference/datetime/datetimeinterface/gettimestamp.xml +++ b/reference/datetime/datetimeinterface/gettimestamp.xml @@ -99,15 +99,6 @@ echo date_timestamp_get($date); - - &reftitle.notes; - - Using U as the parameter to - DateTime::format - is an alternative when using PHP 5.2. - - - &reftitle.seealso; diff --git a/reference/datetime/datetimezone/construct.xml b/reference/datetime/datetimezone/construct.xml index 527b6b9891..5b4e866951 100644 --- a/reference/datetime/datetimezone/construct.xml +++ b/reference/datetime/datetimezone/construct.xml @@ -56,30 +56,6 @@ recognised as a valid timezone. - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.5.10 - - The timezone parameter accepts offset values. - - - - - - - &reftitle.examples; diff --git a/reference/datetime/datetimezone/getoffset.xml b/reference/datetime/datetimezone/getoffset.xml index 7f5a3d4723..f853ec35d9 100644 --- a/reference/datetime/datetimezone/getoffset.xml +++ b/reference/datetime/datetimezone/getoffset.xml @@ -68,14 +68,6 @@ Prior to this version, &false; was returned on failure. - - 5.5.19, 5.6.3 - - datetime type changed to - DateTimeInterface. - Previously, DateTime. - - diff --git a/reference/datetime/datetimezone/listabbreviations.xml b/reference/datetime/datetimezone/listabbreviations.xml index be530cc8ea..4b55ad143d 100644 --- a/reference/datetime/datetimezone/listabbreviations.xml +++ b/reference/datetime/datetimezone/listabbreviations.xml @@ -26,6 +26,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/datetime/examples.xml b/reference/datetime/examples.xml index c9192d94f3..1c854718c3 100644 --- a/reference/datetime/examples.xml +++ b/reference/datetime/examples.xml @@ -100,7 +100,7 @@ End: 2016-03-02 00:00:00 -05:00 To get the last day of the next month (i.e. to prevent the overflow), - the last day of format is available as of PHP 5.3.0. + the last day of format is available. - 5.6.23, 7.0.8 + 7.0.8 Weeks always start on monday. Formerly, sunday would also be considered to start a week. - - 5.3.3 - - "first day" and "last day" changed to behave has "+1 day" and "-1 day", - respectively. Previously, the behaviour was as "first day of" and "last day of". - - diff --git a/reference/datetime/functions/date-default-timezone-get.xml b/reference/datetime/functions/date-default-timezone-get.xml index a96fbb8d4e..2d2c9e6bb7 100644 --- a/reference/datetime/functions/date-default-timezone-get.xml +++ b/reference/datetime/functions/date-default-timezone-get.xml @@ -22,12 +22,6 @@ date_default_timezone_set function (if any) - - - Prior to PHP 5.4.0 only: Reading the TZ - environment variable (if non empty) - - Reading the value of the date.timezone ini option @@ -36,10 +30,7 @@ - Prior to PHP 5.4.0 only: Querying the host operating system (if supported - and allowed by the OS). This uses an algorithm - that has to guess the timezone. This is by no means going to work correctly for - every situation. A warning is shown when this stage is reached. Do not rely on it to be guessed + A warning is shown when this stage is reached. Do not rely on it to be guessed correctly, and set date.timezone to the correct timezone instead. @@ -52,6 +43,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/datetime/functions/date-sunset.xml b/reference/datetime/functions/date-sunset.xml index 7641976bec..84eab50da1 100644 --- a/reference/datetime/functions/date-sunset.xml +++ b/reference/datetime/functions/date-sunset.xml @@ -146,13 +146,6 @@ - - &reftitle.errors; - - &date.timezone.errors.description; - - - &reftitle.returnvalues; @@ -162,6 +155,13 @@ the year. + + + &reftitle.errors; + + &date.timezone.errors.description; + + &reftitle.changelog; diff --git a/reference/datetime/functions/date.xml b/reference/datetime/functions/date.xml index 9368fb91ff..a5a599d685 100644 --- a/reference/datetime/functions/date.xml +++ b/reference/datetime/functions/date.xml @@ -86,7 +86,7 @@ Timestamp of the start of the request is available in - $_SERVER['REQUEST_TIME'] since PHP 5.1. + $_SERVER['REQUEST_TIME']. diff --git a/reference/datetime/functions/gmmktime.xml b/reference/datetime/functions/gmmktime.xml index 7ebfdf399c..1c968c82fc 100644 --- a/reference/datetime/functions/gmmktime.xml +++ b/reference/datetime/functions/gmmktime.xml @@ -98,20 +98,6 @@ - - isDST - - - Parameters always represent a GMT date so isDST - doesn't influence the result. - - - - This parameter has been removed in PHP 7.0.0. - - - - diff --git a/reference/datetime/functions/localtime.xml b/reference/datetime/functions/localtime.xml index 4950920016..25f41c375e 100644 --- a/reference/datetime/functions/localtime.xml +++ b/reference/datetime/functions/localtime.xml @@ -31,64 +31,8 @@ associative - If set to &false; or not supplied then the array is returned as a regular, - numerically indexed array. If the argument is set to &true; then - localtime returns an associative array containing - all the different elements of the structure returned by the C - function call to localtime. The names of the different keys of - the associative array are as follows: - - - - - - "tm_sec" - seconds, 0 to 59 - - - - - "tm_min" - minutes, 0 to 59 - - - - - "tm_hour" - hours, 0 to 23 - - - - - "tm_mday" - day of the month, 1 to 31 - - - - - "tm_mon" - month of the year, 0 (Jan) to 11 (Dec) - - - - - "tm_year" - years since 1900 - - - - - "tm_wday" - day of the week, 0 (Sun) to 6 (Sat) - - - - - "tm_yday" - day of the year, 0 to 365 - - - - - "tm_isdst" - is daylight savings time in effect? - - - Positive if yes, 0 if not, negative if unknown. - - - + Determines whether the function should return a regular, numerically indexed array, + or an associative one. @@ -96,6 +40,71 @@ + + &reftitle.returnvalues; + + If associative is set to &false; or not supplied then + the array is returned as a regular, numerically indexed array. + If associative is set to &true; then + localtime returns an associative array containing + all the different elements of the structure returned by the C + function call to localtime. + The names of the different keys of the associative array are as follows: + + + + + + "tm_sec" - seconds, 0 to 59 + + + + + "tm_min" - minutes, 0 to 59 + + + + + "tm_hour" - hours, 0 to 23 + + + + + "tm_mday" - day of the month, 1 to 31 + + + + + "tm_mon" - month of the year, 0 (Jan) to 11 (Dec) + + + + + "tm_year" - years since 1900 + + + + + "tm_wday" - day of the week, 0 (Sun) to 6 (Sat) + + + + + "tm_yday" - day of the year, 0 to 365 + + + + + "tm_isdst" - is daylight savings time in effect? + + + Positive if yes, 0 if not, negative if unknown. + + + + + + &reftitle.errors; diff --git a/reference/datetime/functions/microtime.xml b/reference/datetime/functions/microtime.xml index bbf7acd859..c176a9635d 100644 --- a/reference/datetime/functions/microtime.xml +++ b/reference/datetime/functions/microtime.xml @@ -61,34 +61,7 @@ &reftitle.examples; - Timing script execution with <function>microtime</function> - - -]]> - - - - Timing script execution in PHP 5 + Timing script execution - <function>microtime</function> and <literal>REQUEST_TIME_FLOAT</literal> (as of PHP 5.4.0) + <function>microtime</function> and <literal>REQUEST_TIME_FLOAT</literal> year - is somewhere between 1901 and 2038. However, before PHP 5.1.0 this - range was limited from 1970 to 2038 on some systems (e.g. Windows). + is somewhere between 1901 and 2038. - - isDST - - - This parameter can be set to 1 if the time is during daylight savings time (DST), - 0 if it is not, or -1 (the default) if it is unknown whether the time is within - daylight savings time or not. If it's unknown, PHP tries to figure it out itself. - This can cause unexpected (but not incorrect) results. - Some times are invalid if DST is enabled on the system PHP is running on or - isDST is set to 1. If DST is enabled in e.g. 2:00, all times - between 2:00 and 3:00 are invalid and mktime returns an undefined - (usually negative) value. - Some systems (e.g. Solaris 8) enable DST at midnight so time 0:30 of the day when DST - is enabled is evaluated as 23:30 of the previous day. - - - - As of PHP 5.1.0, this parameter became deprecated. As a result, the - new timezone handling features should be used instead. - - - - - This parameter has been removed in PHP 7.0.0. - - - - @@ -190,7 +161,7 @@ - - &reftitle.notes; - - - Before PHP 5.1.0, negative timestamps were not supported under any known - version of Windows and some other systems as well. Therefore the range of - valid years was limited to 1970 through 2038. - - - - &reftitle.seealso; diff --git a/reference/datetime/functions/strftime.xml b/reference/datetime/functions/strftime.xml index e4a3d503e2..bc28758169 100644 --- a/reference/datetime/functions/strftime.xml +++ b/reference/datetime/functions/strftime.xml @@ -332,7 +332,7 @@ - macOS only: The %P modifier + macOS and musl only: The %P modifier is not supported in the macOS implementation of this function. diff --git a/reference/datetime/functions/strptime.xml b/reference/datetime/functions/strptime.xml index 94e691829d..33214f1486 100644 --- a/reference/datetime/functions/strptime.xml +++ b/reference/datetime/functions/strptime.xml @@ -167,7 +167,7 @@ Array function provided by the system's C library. This function can exhibit noticeably different behaviour across different operating systems. The use of date_parse_from_format, which does not - suffer from these issues, is recommended on PHP 5.3.0 and later. + suffer from these issues, is recommended. @@ -178,13 +178,6 @@ Array on leap seconds. - - - Prior to PHP 5.2.0, this function could return undefined behaviour. Notably, - the "tm_sec", "tm_min" and "tm_hour" - entries would return undefined values. - - diff --git a/reference/datetime/functions/strtotime.xml b/reference/datetime/functions/strtotime.xml index 91dbef017f..1867ca3fa3 100644 --- a/reference/datetime/functions/strtotime.xml +++ b/reference/datetime/functions/strtotime.xml @@ -125,7 +125,6 @@ echo strtotime("last Monday"), "\n"; - - Prior to PHP 5.1.0, not all platforms support negative timestamps, therefore - your date range may be limited to no earlier than the Unix epoch. This - means that e.g. dates prior to Jan 1, 1970 will not work on Windows, - some Linux distributions, and a few other operating systems. - For 64-bit versions of PHP, the valid range of a timestamp is effectively infinite, as 64 bits can represent approximately 293 billion years in either @@ -189,8 +182,7 @@ if (($timestamp = strtotime($str)) === false) { Using this function for mathematical operations is not advisable. It is better to use DateTime::add and - DateTime::sub in PHP 5.3 and later, or - DateTime::modify in PHP 5.2. + DateTime::sub. diff --git a/reference/datetime/functions/time.xml b/reference/datetime/functions/time.xml index a7ecf79ce3..35607fc512 100644 --- a/reference/datetime/functions/time.xml +++ b/reference/datetime/functions/time.xml @@ -18,6 +18,18 @@ + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns the current timestamp. + + + &reftitle.examples; @@ -52,7 +64,7 @@ Next Week: 2005-04-06 Timestamp of the start of the request is available in - $_SERVER['REQUEST_TIME'] since PHP 5.1. + $_SERVER['REQUEST_TIME']. diff --git a/reference/datetime/functions/timezone-version-get.xml b/reference/datetime/functions/timezone-version-get.xml index f15aae528e..9add0a0d9d 100644 --- a/reference/datetime/functions/timezone-version-get.xml +++ b/reference/datetime/functions/timezone-version-get.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/datetime/ini.xml b/reference/datetime/ini.xml index ff137d2c97..1fcb39bfaa 100644 --- a/reference/datetime/ini.xml +++ b/reference/datetime/ini.xml @@ -44,7 +44,7 @@ date.timezone "" PHP_INI_ALL - Available as of PHP 5.1.0. + @@ -63,7 +63,9 @@ - The default latitude. + The default latitude + ranging from 0 at the equator, + to +90 northward, and -90 southward. @@ -75,7 +77,9 @@ - The default longitude. + The default longitude + ranging from 00 at the prime meridian + to +180 eastward and −180 westward. @@ -111,9 +115,8 @@ - The default timezone used by all date/time functions. Prior to PHP 5.4.0, - this would only work if the TZ environment variable - was not set. The precedence order for which timezone is used if none + The default timezone used by all date/time functions. + The precedence order for which timezone is used if none is explicitly mentioned is described in the date_default_timezone_get page. See for a list of supported timezones. diff --git a/reference/dba/configure.xml b/reference/dba/configure.xml index 56355bb7c5..46ef883d9e 100644 --- a/reference/dba/configure.xml +++ b/reference/dba/configure.xml @@ -213,7 +213,7 @@ . - This was added in PHP 5.4.0. The Tokyo Cabinet library can be downloaded from + The Tokyo Cabinet library can be downloaded from . diff --git a/reference/dba/functions/dba-list.xml b/reference/dba/functions/dba-list.xml index db5344baee..fa35dc69b2 100644 --- a/reference/dba/functions/dba-list.xml +++ b/reference/dba/functions/dba-list.xml @@ -15,6 +15,12 @@ dba_list list all open database files. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; @@ -22,7 +28,6 @@ - - - - - DB++ - - - - &reftitle.intro; - - db++, made by the German company Concept asa, is a relational - database system with high performance and low memory and disk - usage in mind. While providing SQL as an additional language - interface, it is not really an SQL database in the first place but - provides its own AQL query language which is much more influenced - by the relational algebra than SQL is. - - - Concept asa always had an interest in supporting open source - languages, db++ has had Perl and Tcl call interfaces for years - now and uses Tcl as its internal stored procedure language. - - - - &pecl.moved-ver;4.3.0 - - - &warn.experimental; - - - - &reference.dbplus.setup; - &reference.dbplus.constants; - &reference.dbplus.reference; - - - - - diff --git a/reference/dbplus/configure.xml b/reference/dbplus/configure.xml deleted file mode 100644 index a5f7c43e9e..0000000000 --- a/reference/dbplus/configure.xml +++ /dev/null @@ -1,48 +0,0 @@ - - -
- &reftitle.install; - - &pecl.moved-ver;4.3.0 - - - &pecl.info; - &url.pecl.package;dbplus. - - - In order to build this extension yourself you need the db++ client libraries - and header files to be installed on your system (these are included in the - db++ installation archives by default). You have to run - configure with option to - build this extension. - - - configure looks for the client libraries and header files - under the default paths /usr/dbplus, - /usr/local/dbplus and /opt/dblus. - If you have installed db++ in a different place you have add the installation - path to the configure option like this: - . - -
- - diff --git a/reference/dbplus/constants.xml b/reference/dbplus/constants.xml deleted file mode 100644 index 7f5f2105e9..0000000000 --- a/reference/dbplus/constants.xml +++ /dev/null @@ -1,367 +0,0 @@ - - - - &reftitle.constants; - &extension.constants; -
- db++ error codes - - - DB++ Error Codes - - - - PHP Constant - db++ constant - meaning - - - - - - DBPLUS_ERR_NOERR - (int) - - ERR_NOERR - Null error condition - - - - DBPLUS_ERR_DUPLICATE - (int) - - ERR_DUPLICATE - Tried to insert a duplicate tuple - - - - DBPLUS_ERR_EOSCAN - (int) - - ERR_EOSCAN - End of scan from rget() - - - - DBPLUS_ERR_EMPTY - (int) - - ERR_EMPTY - Relation is empty (server) - - - - DBPLUS_ERR_CLOSE - (int) - - ERR_CLOSE - The server can't close - - - - DBPLUS_ERR_WLOCKED - (int) - - ERR_WLOCKED - The record is write locked - - - - DBPLUS_ERR_LOCKED - (int) - - ERR_LOCKED - Relation was already locked - - - - DBPLUS_ERR_NOLOCK - (int) - - ERR_NOLOCK - Relation cannot be locked - - - - DBPLUS_ERR_READ - (int) - - ERR_READ - Read error on relation - - - - DBPLUS_ERR_WRITE - (int) - - ERR_WRITE - Write error on relation - - - - DBPLUS_ERR_CREATE - (int) - - ERR_CREATE - Create() system call failed - - - - DBPLUS_ERR_LSEEK - (int) - - ERR_LSEEK - Lseek() system call failed - - - - DBPLUS_ERR_LENGTH - (int) - - ERR_LENGTH - Tuple exceeds maximum length - - - - DBPLUS_ERR_OPEN - (int) - - ERR_OPEN - Open() system call failed - - - - DBPLUS_ERR_WOPEN - (int) - - ERR_WOPEN - Relation already opened for writing - - - - DBPLUS_ERR_MAGIC - (int) - - ERR_MAGIC - File is not a relation - - - - DBPLUS_ERR_VERSION - (int) - - ERR_VERSION - File is a very old relation - - - - DBPLUS_ERR_PGSIZE - (int) - - ERR_PGSIZE - Relation uses a different page size - - - - DBPLUS_ERR_CRC - (int) - - ERR_CRC - Invalid crc in the superpage - - - - DBPLUS_ERR_PIPE - (int) - - ERR_PIPE - Piped relation requires lseek() - - - - DBPLUS_ERR_NIDX - (int) - - ERR_NIDX - Too many secondary indices - - - - DBPLUS_ERR_MALLOC - (int) - - ERR_MALLOC - Malloc() call failed - - - - DBPLUS_ERR_NUSERS - (int) - - ERR_NUSERS - Error use of max users - - - - DBPLUS_ERR_PREEXIT - (int) - - ERR_PREEXIT - Caused by invalid usage - - - - DBPLUS_ERR_ONTRAP - (int) - - ERR_ONTRAP - Caused by a signal - - - - DBPLUS_ERR_PREPROC - (int) - - ERR_PREPROC - Error in the preprocessor - - - - DBPLUS_ERR_DBPARSE - (int) - - ERR_DBPARSE - Error in the parser - - - - DBPLUS_ERR_DBRUNERR - (int) - - ERR_DBRUNERR - Run error in db - - - - DBPLUS_ERR_DBPREEXIT - (int) - - ERR_DBPREEXIT - Exit condition caused by prexit() * procedure - - - - DBPLUS_ERR_WAIT - (int) - - ERR_WAIT - Wait a little (Simple only) - - - - DBPLUS_ERR_CORRUPT_TUPLE - (int) - - ERR_CORRUPT_TUPLE - A client sent a corrupt tuple - - - - DBPLUS_ERR_WARNING0 - (int) - - ERR_WARNING0 - - The Simple routines encountered a non fatal error which was - corrected - - - - - DBPLUS_ERR_PANIC - (int) - - ERR_PANIC - - The server should not really die but after a disaster - send ERR_PANIC to all its clients - - - - - DBPLUS_ERR_FIFO - (int) - - ERR_FIFO - Can't create a fifo - - - - DBPLUS_ERR_PERM - (int) - - ERR_PERM - Permission denied - - - - DBPLUS_ERR_TCL - (int) - - ERR_TCL - TCL_error - - - - DBPLUS_ERR_RESTRICTED - (int) - - ERR_RESTRICTED - Only two users - - - - DBPLUS_ERR_USER - (int) - - ERR_USER - - An error in the use of the library by an application - programmer - - - - - DBPLUS_ERR_UNKNOWN - (int) - - ERR_UNKNOWN - - - - -
-
-
-
- - diff --git a/reference/dbplus/functions/dbplus-add.xml b/reference/dbplus/functions/dbplus-add.xml deleted file mode 100644 index a1d78e0ef8..0000000000 --- a/reference/dbplus/functions/dbplus-add.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - dbplus_add - Add a tuple to a relation - - - - &reftitle.description; - - - intdbplus_add - resourcerelation - arraytuple - - - Adds a tuple to a relation. - - - - - &reftitle.parameters; - - - - relation - - - - - - - tuple - - - An array of attribute/value pairs to be inserted into the given - relation. - - - After successful execution this array will contain the complete data - of the newly created tuple, including all implicitly set domain fields - like sequences. - - - - - - - - - &reftitle.returnvalues; - - The function will return DBPLUS_ERR_NOERR on success - or a db++ error code on failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_errcode - - - - - - - diff --git a/reference/dbplus/functions/dbplus-aql.xml b/reference/dbplus/functions/dbplus-aql.xml deleted file mode 100644 index d628c1951b..0000000000 --- a/reference/dbplus/functions/dbplus-aql.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - dbplus_aql - Perform AQL query - - - - &reftitle.description; - - resourcedbplus_aql - stringquery - stringserver - stringdbpath - - - Executes an AQL query on the given - server and dbpath. - - - - - &reftitle.parameters; - - - - query - - - The AQL query to be executed. Further information on the AQL (Algebraic - Query Language) is provided in the original db++ manual. - - - - - server - - - - - - - dbpath - - - - - - - - - - - &reftitle.returnvalues; - - Returns a relation handle on success. The result data may be fetched from - this relation by calling dbplus_next and - dbplus_curr. Other relation access functions will - not work on a result relation. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-chdir.xml b/reference/dbplus/functions/dbplus-chdir.xml deleted file mode 100644 index 3e0b1e4a3b..0000000000 --- a/reference/dbplus/functions/dbplus-chdir.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - dbplus_chdir - Get/Set database virtual current directory - - - - &reftitle.description; - - stringdbplus_chdir - stringnewdir - - - Changes the virtual current directory where relation files will be looked - for by dbplus_open. - - - - - &reftitle.parameters; - - - - newdir - - - The new directory for relation files. You can omit this parameter to - query the current working directory. - - - - - - - - - &reftitle.returnvalues; - - Returns the absolute path of the current directory. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-close.xml b/reference/dbplus/functions/dbplus-close.xml deleted file mode 100644 index 75a0d7ef08..0000000000 --- a/reference/dbplus/functions/dbplus-close.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - dbplus_close - Close a relation - - - - &reftitle.description; - - mixeddbplus_close - resourcerelation - - - Closes a relation previously opened by dbplus_open. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success or DBPLUS_ERR_UNKNOWN on - failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-curr.xml b/reference/dbplus/functions/dbplus-curr.xml deleted file mode 100644 index ff60f8c41a..0000000000 --- a/reference/dbplus/functions/dbplus-curr.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - dbplus_curr - Get current tuple from relation - - - - &reftitle.description; - - intdbplus_curr - resourcerelation - arraytuple - - - Reads the data for the current tuple for the given - relation. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - tuple - - - The data will be passed back in this parameter, as an associative - array. - - - - - - - - - &reftitle.returnvalues; - - The function will return zero (aka. DBPLUS_ERR_NOERR) on success - or a db++ error code on failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_first - dbplus_prev - dbplus_next - dbplus_last - dbplus_errcode - - - - - - - diff --git a/reference/dbplus/functions/dbplus-errcode.xml b/reference/dbplus/functions/dbplus-errcode.xml deleted file mode 100644 index 5c86f0fa93..0000000000 --- a/reference/dbplus/functions/dbplus-errcode.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - dbplus_errcode - Get error string for given errorcode or last error - - - - &reftitle.description; - - stringdbplus_errcode - interrno - - - Returns a clear error string for the given error code. - - - - - &reftitle.parameters; - - - - errno - - - The error code. If not provided, the result code of the last db++ - operation is assumed. - - - - - - - - - &reftitle.returnvalues; - - Returns the error message. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-errno.xml b/reference/dbplus/functions/dbplus-errno.xml deleted file mode 100644 index d526ff884a..0000000000 --- a/reference/dbplus/functions/dbplus-errno.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - dbplus_errno - Get error code for last operation - - - - &reftitle.description; - - intdbplus_errno - - - - Returns the error code returned by the last db++ operation. - - - - - &reftitle.returnvalues; - - Returns the error code, as an integer. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_errcode - - - - - - - diff --git a/reference/dbplus/functions/dbplus-find.xml b/reference/dbplus/functions/dbplus-find.xml deleted file mode 100644 index 67ef13f3b8..0000000000 --- a/reference/dbplus/functions/dbplus-find.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - dbplus_find - Set a constraint on a relation - - - - &reftitle.description; - - intdbplus_find - resourcerelation - arrayconstraints - mixedtuple - - - Places a constraint on the given relation. - - - Further calls to functions like dbplus_curr or - dbplus_next will only return tuples matching the - given constraints. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - constraints - - - Constraints are triplets of strings containing of a domain name, - a comparison operator and a comparison value. The - constraints parameter array may consist of - a collection of string arrays, each of which contains a domain, an - operator and a value, or of a single string array containing a - multiple of three elements. - - - The comparison operator may be one of the following strings: - '==', '>', '>=', '<', '<=', '!=', '~' for a regular - expression match and 'BAND' or 'BOR' for bitwise operations. - - - - - tuple - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_unselect - - - - - - - diff --git a/reference/dbplus/functions/dbplus-first.xml b/reference/dbplus/functions/dbplus-first.xml deleted file mode 100644 index 8300bbd907..0000000000 --- a/reference/dbplus/functions/dbplus-first.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - dbplus_first - Get first tuple from relation - - - - &reftitle.description; - - intdbplus_first - resourcerelation - arraytuple - - - Reads the data for the first tuple for the given - relation, makes it the current tuple and pass it - back as an associative array in tuple. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - tuple - - - - - - - - - - - &reftitle.returnvalues; - - Returns DBPLUS_ERR_NOERR on success or a db++ error - code on failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_curr - dbplus_prev - dbplus_next - dbplus_last - dbplus_errcode - - - - - - - diff --git a/reference/dbplus/functions/dbplus-flush.xml b/reference/dbplus/functions/dbplus-flush.xml deleted file mode 100644 index ee59125539..0000000000 --- a/reference/dbplus/functions/dbplus-flush.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - dbplus_flush - Flush all changes made on a relation - - - - &reftitle.description; - - intdbplus_flush - resourcerelation - - - Writes all changes applied to relation since the - last flush to disk. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - Returns DBPLUS_ERR_NOERR on success or a db++ error - code on failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_errcode - - - - - - - diff --git a/reference/dbplus/functions/dbplus-freealllocks.xml b/reference/dbplus/functions/dbplus-freealllocks.xml deleted file mode 100644 index 36408ea1d3..0000000000 --- a/reference/dbplus/functions/dbplus-freealllocks.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - dbplus_freealllocks - Free all locks held by this client - - - - &reftitle.description; - - intdbplus_freealllocks - - - - Frees all tuple locks held by this client. - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_getlock - dbplus_freelock - dbplus_freerlocks - - - - - - - diff --git a/reference/dbplus/functions/dbplus-freelock.xml b/reference/dbplus/functions/dbplus-freelock.xml deleted file mode 100644 index d15db87bd8..0000000000 --- a/reference/dbplus/functions/dbplus-freelock.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - dbplus_freelock - Release write lock on tuple - - - - &reftitle.description; - - intdbplus_freelock - resourcerelation - stringtuple - - - Releases a write lock on the given tuple previously - obtained by dbplus_getlock. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - tuple - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_getlock - dbplus_freerlocks - dbplus_freealllocks - - - - - - - diff --git a/reference/dbplus/functions/dbplus-freerlocks.xml b/reference/dbplus/functions/dbplus-freerlocks.xml deleted file mode 100644 index 1d15c438ff..0000000000 --- a/reference/dbplus/functions/dbplus-freerlocks.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - dbplus_freerlocks - Free all tuple locks on given relation - - - - &reftitle.description; - - intdbplus_freerlocks - resourcerelation - - - Frees all tuple locks held on the given relation. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_getlock - dbplus_freelock - dbplus_freealllocks - - - - - - - diff --git a/reference/dbplus/functions/dbplus-getlock.xml b/reference/dbplus/functions/dbplus-getlock.xml deleted file mode 100644 index 51e6b0b143..0000000000 --- a/reference/dbplus/functions/dbplus-getlock.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - dbplus_getlock - Get a write lock on a tuple - - - - &reftitle.description; - - intdbplus_getlock - resourcerelation - stringtuple - - - Requests a write lock on the specified tuple. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - tuple - - - - - - - - - - - &reftitle.returnvalues; - - Returns zero on success or a non-zero error code, especially - DBPLUS_ERR_WLOCKED on failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_freelock - dbplus_freerlocks - dbplus_freealllocks - - - - - - - diff --git a/reference/dbplus/functions/dbplus-getunique.xml b/reference/dbplus/functions/dbplus-getunique.xml deleted file mode 100644 index 28272797d0..0000000000 --- a/reference/dbplus/functions/dbplus-getunique.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - dbplus_getunique - Get an id number unique to a relation - - - - &reftitle.description; - - intdbplus_getunique - resourcerelation - intuniqueid - - - Obtains a number guaranteed to be unique for the given - relation and will pass it back in the variable - given as uniqueid. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - uniqueid - - - - - - - - - - - &reftitle.returnvalues; - - Returns DBPLUS_ERR_NOERR on success or a db++ error - code on failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-info.xml b/reference/dbplus/functions/dbplus-info.xml deleted file mode 100644 index 3a3ce27460..0000000000 --- a/reference/dbplus/functions/dbplus-info.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - dbplus_info - Get information about a relation - - - - &reftitle.description; - - intdbplus_info - resourcerelation - stringkey - arrayresult - - &warn.undocumented.func; - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - key - - - - - - - result - - - - - - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-last.xml b/reference/dbplus/functions/dbplus-last.xml deleted file mode 100644 index 13c64b69d6..0000000000 --- a/reference/dbplus/functions/dbplus-last.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - dbplus_last - Get last tuple from relation - - - - &reftitle.description; - - intdbplus_last - resourcerelation - arraytuple - - - Reads the data for the last tuple for the given - relation, makes it the current tuple and pass it - back as an associative array in tuple. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - tuple - - - - - - - - - - - &reftitle.returnvalues; - - Returns DBPLUS_ERR_NOERR on success or a db++ error - code on failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_first - dbplus_curr - dbplus_prev - dbplus_next - - - - - - - diff --git a/reference/dbplus/functions/dbplus-lockrel.xml b/reference/dbplus/functions/dbplus-lockrel.xml deleted file mode 100644 index ff35fa8772..0000000000 --- a/reference/dbplus/functions/dbplus-lockrel.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - dbplus_lockrel - Request write lock on relation - - - - &reftitle.description; - - intdbplus_lockrel - resourcerelation - - - Requests a write lock on the given relation. - - - Other clients may still query the relation, but can't alter it while it is - locked. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-next.xml b/reference/dbplus/functions/dbplus-next.xml deleted file mode 100644 index acd393e3aa..0000000000 --- a/reference/dbplus/functions/dbplus-next.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - dbplus_next - Get next tuple from relation - - - - &reftitle.description; - - intdbplus_next - resourcerelation - arraytuple - - - Reads the data for the next tuple for the given - relation, makes it the current tuple and will pass - it back as an associative array in tuple. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - tuple - - - - - - - - - - - &reftitle.returnvalues; - - Returns DBPLUS_ERR_NOERR on success or a db++ error - code on failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_first - dbplus_curr - dbplus_prev - dbplus_last - - - - - - - diff --git a/reference/dbplus/functions/dbplus-open.xml b/reference/dbplus/functions/dbplus-open.xml deleted file mode 100644 index 945e3cccaa..0000000000 --- a/reference/dbplus/functions/dbplus-open.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - dbplus_open - Open relation file - - - - &reftitle.description; - - resourcedbplus_open - stringname - - - Opens the given relation file. - - - - - &reftitle.parameters; - - - - name - - - Can be either a file name or a relative or absolute path name. This - will be mapped in any case to an absolute relation file path on a - specific host machine and server. - - - - - - - - - &reftitle.returnvalues; - - On success a relation file resource (cursor) is returned which must - be used in any subsequent commands referencing the relation. - Failure leads to a zero return value, the actual error code may - be asked for by calling dbplus_errno. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-prev.xml b/reference/dbplus/functions/dbplus-prev.xml deleted file mode 100644 index 5834db9151..0000000000 --- a/reference/dbplus/functions/dbplus-prev.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - dbplus_prev - Get previous tuple from relation - - - - &reftitle.description; - - intdbplus_prev - resourcerelation - arraytuple - - - Reads the data for the previous tuple for the given - relation, makes it the current tuple and will pass - it back as an associative array in tuple. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - tuple - - - - - - - - - - - &reftitle.returnvalues; - - Returns DBPLUS_ERR_NOERR on success or a db++ error - code on failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_first - dbplus_curr - dbplus_next - dbplus_last - - - - - - - diff --git a/reference/dbplus/functions/dbplus-rchperm.xml b/reference/dbplus/functions/dbplus-rchperm.xml deleted file mode 100644 index 1b8efad20b..0000000000 --- a/reference/dbplus/functions/dbplus-rchperm.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - dbplus_rchperm - Change relation permissions - - - - &reftitle.description; - - intdbplus_rchperm - resourcerelation - intmask - stringuser - stringgroup - - - Changes access permissions as specified by mask, - user and group. The - values for these are operating system specific. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - mask - - - - - - - user - - - - - - - group - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-rcreate.xml b/reference/dbplus/functions/dbplus-rcreate.xml deleted file mode 100644 index ca25c9e35f..0000000000 --- a/reference/dbplus/functions/dbplus-rcreate.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - dbplus_rcreate - Creates a new DB++ relation - - - - &reftitle.description; - - resourcedbplus_rcreate - stringname - mixeddomlist - booloverwrite - - - Creates a new relation. Any existing relation sharing the same - name will be overwritten if the relation is - currently not in use and overwrite is set to TRUE. - - - - - &reftitle.parameters; - - - - name - - - - - - - domlist - - - A combination of domains. May be passed as a single domain name string - or as an array of domain names. - - - This parameter should contain the domain specification for the new - relation within an array of domain description strings. A domain - description string consists of a domain name unique to this - relation, a slash and a type specification character. See the - db++ documentation, especially the dbcreate(1) manpage, for a - description of available type specifiers and their meanings. - - - - This function will also accept a string with space delimited domain - description strings, but it is recommended to use an array - - - - - - overwrite - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-rcrtexact.xml b/reference/dbplus/functions/dbplus-rcrtexact.xml deleted file mode 100644 index 172555401e..0000000000 --- a/reference/dbplus/functions/dbplus-rcrtexact.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - dbplus_rcrtexact - Creates an exact but empty copy of a relation including indices - - - - &reftitle.description; - - mixeddbplus_rcrtexact - stringname - resourcerelation - booloverwrite - - - dbplus_rcrtexact will create an exact but - empty copy of the given relation under a - new name. - - - - - &reftitle.parameters; - - - - name - - - - - - - relation - - - The copied relation, opened by dbplus_open. - - - - - overwrite - - - An existing relation by the same name will only - be overwritten if this parameter is set to &true; and no other process - is currently using the relation. - - - - - - - - - &reftitle.returnvalues; - - Returns resource on success or DBPLUS_ERR_UNKNOWN on - failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-rcrtlike.xml b/reference/dbplus/functions/dbplus-rcrtlike.xml deleted file mode 100644 index d06c7a4f92..0000000000 --- a/reference/dbplus/functions/dbplus-rcrtlike.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - dbplus_rcrtlike - Creates an empty copy of a relation with default indices - - - - &reftitle.description; - - mixeddbplus_rcrtlike - stringname - resourcerelation - intoverwrite - - - dbplus_rcrtexact will create an empty copy - of the given relation under a new - name, but with default indices. - - - - - &reftitle.parameters; - - - - name - - - - - - - relation - - - The copied relation, opened by dbplus_open. - - - - - overwrite - - - An existing relation by the same name will only - be overwritten if this parameter is set to &true; and no other process - is currently using the relation. - - - - - - - - - &reftitle.returnvalues; - - Returns resource on success or DBPLUS_ERR_UNKNOWN on - failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-resolve.xml b/reference/dbplus/functions/dbplus-resolve.xml deleted file mode 100644 index e349640509..0000000000 --- a/reference/dbplus/functions/dbplus-resolve.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - dbplus_resolve - Resolve host information for relation - - - - &reftitle.description; - - arraydbplus_resolve - stringrelation_name - - - dbplus_resolve will try to resolve the given - relation_name and find out internal server - id, real hostname and the database path on this host. - - - - - &reftitle.parameters; - - - - relation_name - - - The relation name. - - - - - - - - - &reftitle.returnvalues; - - Returns an array containing these values under the keys - sid, host and - host_path or &false; on error. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_tcl - - - - - - - diff --git a/reference/dbplus/functions/dbplus-restorepos.xml b/reference/dbplus/functions/dbplus-restorepos.xml deleted file mode 100644 index 77b9e7e168..0000000000 --- a/reference/dbplus/functions/dbplus-restorepos.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - dbplus_restorepos - Restore position - - - - &reftitle.description; - - intdbplus_restorepos - resourcerelation - arraytuple - - &warn.undocumented.func; - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - tuple - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-rkeys.xml b/reference/dbplus/functions/dbplus-rkeys.xml deleted file mode 100644 index 77f5bbdfce..0000000000 --- a/reference/dbplus/functions/dbplus-rkeys.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - dbplus_rkeys - Specify new primary key for a relation - - - - &reftitle.description; - - mixeddbplus_rkeys - resourcerelation - mixeddomlist - - - dbplus_rkeys will replace the current - primary key for relation with the - combination of domains specified by domlist. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - domlist - - - A combination of domains. May be passed as a single domain name - string or as an array of domain names. - - - - - - - - - &reftitle.returnvalues; - - Returns resource on success or DBPLUS_ERR_UNKNOWN on - failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-ropen.xml b/reference/dbplus/functions/dbplus-ropen.xml deleted file mode 100644 index e6c6b94792..0000000000 --- a/reference/dbplus/functions/dbplus-ropen.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - dbplus_ropen - Open relation file local - - - - &reftitle.description; - - resourcedbplus_ropen - stringname - - - dbplus_ropen will open the relation - file locally for quick access without any - client/server overhead. Access is read only and only - dbplus_curr and - dbplus_next may be applied to the returned - relation. - - - - - &reftitle.parameters; - - - - name - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-rquery.xml b/reference/dbplus/functions/dbplus-rquery.xml deleted file mode 100644 index 5dc0b3126a..0000000000 --- a/reference/dbplus/functions/dbplus-rquery.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - dbplus_rquery - Perform local (raw) AQL query - - - - &reftitle.description; - - resourcedbplus_rquery - stringquery - stringdbpath - - - dbplus_rquery performs a local (raw) AQL - query using an AQL interpreter embedded into the db++ client - library. dbplus_rquery is faster than - dbplus_aql but will work on local data only. - - - - - &reftitle.parameters; - - - - query - - - - - - - dbpath - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-rrename.xml b/reference/dbplus/functions/dbplus-rrename.xml deleted file mode 100644 index 470ef02a65..0000000000 --- a/reference/dbplus/functions/dbplus-rrename.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - dbplus_rrename - Rename a relation - - - - &reftitle.description; - - intdbplus_rrename - resourcerelation - stringname - - - dbplus_rrename will change the name of - relation to name. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - name - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-rsecindex.xml b/reference/dbplus/functions/dbplus-rsecindex.xml deleted file mode 100644 index 7720181937..0000000000 --- a/reference/dbplus/functions/dbplus-rsecindex.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - dbplus_rsecindex - Create a new secondary index for a relation - - - - &reftitle.description; - - mixeddbplus_rsecindex - resourcerelation - mixeddomlist - inttype - - - dbplus_rsecindex will create a new secondary - index for relation with consists of the - domains specified by domlist and is of - type type - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - domlist - - - A combination of domains. May be passed as a single domain name - string or as an array of domain names. - - - - - type - - - - - - - - - - - &reftitle.returnvalues; - - Returns resource on success or DBPLUS_ERR_UNKNOWN on - failure. - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-runlink.xml b/reference/dbplus/functions/dbplus-runlink.xml deleted file mode 100644 index e35b2e6503..0000000000 --- a/reference/dbplus/functions/dbplus-runlink.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - dbplus_runlink - Remove relation from filesystem - - - - &reftitle.description; - - intdbplus_runlink - resourcerelation - - - dbplus_runlink will close and remove the - relation. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-rzap.xml b/reference/dbplus/functions/dbplus-rzap.xml deleted file mode 100644 index 329eede6e5..0000000000 --- a/reference/dbplus/functions/dbplus-rzap.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - dbplus_rzap - Remove all tuples from relation - - - - &reftitle.description; - - intdbplus_rzap - resourcerelation - - - dbplus_rzap will remove all tuples from - relation. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-savepos.xml b/reference/dbplus/functions/dbplus-savepos.xml deleted file mode 100644 index af8e9dca2f..0000000000 --- a/reference/dbplus/functions/dbplus-savepos.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - dbplus_savepos - Save position - - - - &reftitle.description; - - intdbplus_savepos - resourcerelation - - &warn.undocumented.func; - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-setindex.xml b/reference/dbplus/functions/dbplus-setindex.xml deleted file mode 100644 index 10fc76b994..0000000000 --- a/reference/dbplus/functions/dbplus-setindex.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - dbplus_setindex - Set index - - - - &reftitle.description; - - intdbplus_setindex - resourcerelation - stringidx_name - - &warn.undocumented.func; - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - idx_name - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-setindexbynumber.xml b/reference/dbplus/functions/dbplus-setindexbynumber.xml deleted file mode 100644 index efe4c7cb71..0000000000 --- a/reference/dbplus/functions/dbplus-setindexbynumber.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - dbplus_setindexbynumber - Set index by number - - - - &reftitle.description; - - intdbplus_setindexbynumber - resourcerelation - intidx_number - - &warn.undocumented.func; - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - idx_number - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-sql.xml b/reference/dbplus/functions/dbplus-sql.xml deleted file mode 100644 index 2f34923765..0000000000 --- a/reference/dbplus/functions/dbplus-sql.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - dbplus_sql - Perform SQL query - - - - &reftitle.description; - - resourcedbplus_sql - stringquery - stringserver - stringdbpath - - &warn.undocumented.func; - - - - &reftitle.parameters; - - - - query - - - - - - - server - - - - - - - dbpath - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-tcl.xml b/reference/dbplus/functions/dbplus-tcl.xml deleted file mode 100644 index 4a0dad4c4a..0000000000 --- a/reference/dbplus/functions/dbplus-tcl.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - dbplus_tcl - Execute TCL code on server side - - - - &reftitle.description; - - stringdbplus_tcl - intsid - stringscript - - - A db++ server will prepare a TCL interpreter for each client - connection. This interpreter will enable the server to execute - TCL code provided by the client as a sort of stored procedures to - improve the performance of database operations by avoiding - client/server data transfers and context switches. - - - dbplus_tcl needs to pass the client - connection id the TCL script code should - be executed by. dbplus_resolve will provide - this connection id. The function will return whatever the TCL - code returns or a TCL error message if the TCL code fails. - - - - - &reftitle.parameters; - - - - sid - - - - - - - script - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_resolve - - - - - - - diff --git a/reference/dbplus/functions/dbplus-tremove.xml b/reference/dbplus/functions/dbplus-tremove.xml deleted file mode 100644 index 1cc0a65c00..0000000000 --- a/reference/dbplus/functions/dbplus-tremove.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - dbplus_tremove - Remove tuple and return new current tuple - - - - &reftitle.description; - - intdbplus_tremove - resourcerelation - arraytuple - arraycurrent - - - dbplus_tremove removes - tuple from relation - if it perfectly matches a tuple within the - relation. current, if given, will contain - the data of the new current tuple after calling - dbplus_tremove. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - tuple - - - - - - - current - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-undo.xml b/reference/dbplus/functions/dbplus-undo.xml deleted file mode 100644 index 9965d147c9..0000000000 --- a/reference/dbplus/functions/dbplus-undo.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - dbplus_undo - Undo - - - - &reftitle.description; - - intdbplus_undo - resourcerelation - - &warn.undocumented.func; - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-undoprepare.xml b/reference/dbplus/functions/dbplus-undoprepare.xml deleted file mode 100644 index 7e672cfce5..0000000000 --- a/reference/dbplus/functions/dbplus-undoprepare.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - dbplus_undoprepare - Prepare undo - - - - &reftitle.description; - - intdbplus_undoprepare - resourcerelation - - &warn.undocumented.func; - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-unlockrel.xml b/reference/dbplus/functions/dbplus-unlockrel.xml deleted file mode 100644 index 4857e5b8be..0000000000 --- a/reference/dbplus/functions/dbplus-unlockrel.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - dbplus_unlockrel - Give up write lock on relation - - - - &reftitle.description; - - intdbplus_unlockrel - resourcerelation - - - Release a write lock previously obtained by - dbplus_lockrel. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-unselect.xml b/reference/dbplus/functions/dbplus-unselect.xml deleted file mode 100644 index cc9a4c5014..0000000000 --- a/reference/dbplus/functions/dbplus-unselect.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - dbplus_unselect - Remove a constraint from relation - - - - &reftitle.description; - - intdbplus_unselect - resourcerelation - - - Calling dbplus_unselect will remove a - constraint previously set by dbplus_find on - relation. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-update.xml b/reference/dbplus/functions/dbplus-update.xml deleted file mode 100644 index 95a8d72067..0000000000 --- a/reference/dbplus/functions/dbplus-update.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - dbplus_update - Update specified tuple in relation - - - - &reftitle.description; - - intdbplus_update - resourcerelation - arrayold - arraynew - - - dbplus_update replaces the old - tuple with the data from the new one, only if the - old completely matches a tuple within - relation. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - old - - - The old tuple. - - - - - new - - - The new tuple. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/functions/dbplus-xlockrel.xml b/reference/dbplus/functions/dbplus-xlockrel.xml deleted file mode 100644 index 1a385727ba..0000000000 --- a/reference/dbplus/functions/dbplus-xlockrel.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - dbplus_xlockrel - Request exclusive lock on relation - - - - &reftitle.description; - - intdbplus_xlockrel - resourcerelation - - - Request an exclusive lock on relation preventing - even read access from other clients. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - &reftitle.seealso; - - - dbplus_xunlockrel - - - - - - - diff --git a/reference/dbplus/functions/dbplus-xunlockrel.xml b/reference/dbplus/functions/dbplus-xunlockrel.xml deleted file mode 100644 index d43da04b04..0000000000 --- a/reference/dbplus/functions/dbplus-xunlockrel.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - dbplus_xunlockrel - Free exclusive lock on relation - - - - &reftitle.description; - - intdbplus_xunlockrel - resourcerelation - - - Releases an exclusive lock previously obtained by - dbplus_xlockrel. - - - - - &reftitle.parameters; - - - - relation - - - A relation opened by dbplus_open. - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.notes; - &warn.experimental.func; - - - - - diff --git a/reference/dbplus/reference.xml b/reference/dbplus/reference.xml deleted file mode 100644 index 78b17a9524..0000000000 --- a/reference/dbplus/reference.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - DB++ &Functions; - - &reference.dbplus.entities.functions; - - - - diff --git a/reference/dbplus/setup.xml b/reference/dbplus/setup.xml deleted file mode 100644 index eefe40d2fc..0000000000 --- a/reference/dbplus/setup.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - &reftitle.setup; - - -
- &reftitle.required; - - This extension relies on external client libraries so you have - to have a db++ client installed on the system you want to use - this extension on. - - - Concept asa provides - db++ Demo versions - and documentation - for Linux, some other Unix versions. There is also a Windows - version of db++, but this extension doesn't support it (yet). - -
- - - - &reference.dbplus.configure; - - - -
- &reftitle.runtime; - &no.config; -
- - - -
- &reftitle.resources; -
- dbplus_relation - - Most db++ functions operate on or return - dbplus_relation resources. A - dbplus_relation is a handle to a stored - relation or a relation generated as the result of a query. - -
-
- - -
- - - diff --git a/reference/dbplus/versions.xml b/reference/dbplus/versions.xml deleted file mode 100644 index 35365fa859..0000000000 --- a/reference/dbplus/versions.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/reference/dio/book.xml b/reference/dio/book.xml index 473337172b..07c04ac323 100644 --- a/reference/dio/book.xml +++ b/reference/dio/book.xml @@ -2,6 +2,7 @@ + Direct IO @@ -17,11 +18,6 @@ filesystem functions are more than adequate. - - - &pecl.moved-ver;5.1.0. - - diff --git a/reference/dir/constants.xml b/reference/dir/constants.xml index c0cc9aefc8..5baaeaea8f 100644 --- a/reference/dir/constants.xml +++ b/reference/dir/constants.xml @@ -32,7 +32,7 @@ - Available since PHP 5.4.0. + @@ -43,7 +43,7 @@ - Available since PHP 5.4.0. + @@ -54,7 +54,7 @@ - Available since PHP 5.4.0. + diff --git a/reference/dir/functions/chroot.xml b/reference/dir/functions/chroot.xml index 396ee466b9..270bb11807 100644 --- a/reference/dir/functions/chroot.xml +++ b/reference/dir/functions/chroot.xml @@ -23,6 +23,10 @@ only when using the CLI, CGI or Embed SAPI. Also, this function requires root privileges. + + Calling this function does not change the values of the __DIR__ + and __FILE__ magic constants. + diff --git a/reference/dir/functions/closedir.xml b/reference/dir/functions/closedir.xml index d2b6bc28e8..fcff744b0c 100644 --- a/reference/dir/functions/closedir.xml +++ b/reference/dir/functions/closedir.xml @@ -39,6 +39,13 @@ + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.examples; diff --git a/reference/dir/functions/getcwd.xml b/reference/dir/functions/getcwd.xml index 00cfe16735..1b412cb1e6 100644 --- a/reference/dir/functions/getcwd.xml +++ b/reference/dir/functions/getcwd.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; @@ -33,18 +38,6 @@ - - - - If the PHP interpreter has been built with ZTS (Zend Thread Safety) enabled, - the current working directory returned by getcwd - may be different from that returned by operating system interfaces. - External libraries (invoked through FFI) - which depend on the current working directory will be affected. - - - - &reftitle.examples; @@ -76,6 +69,18 @@ echo getcwd() . "\n"; + + + + If the PHP interpreter has been built with ZTS (Zend Thread Safety) enabled, + the current working directory returned by getcwd + may be different from that returned by operating system interfaces. + External libraries (invoked through FFI) + which depend on the current working directory will be affected. + + + + &reftitle.seealso; diff --git a/reference/dom/domattr/isid.xml b/reference/dom/domattr/isid.xml index 01256deff4..f38451cc9e 100644 --- a/reference/dom/domattr/isid.xml +++ b/reference/dom/domattr/isid.xml @@ -23,6 +23,12 @@ or DOMDocument::validateOnParse before using this function. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/dom/domdocument/createdocumentfragment.xml b/reference/dom/domdocument/createdocumentfragment.xml index a26e762387..71260f12cc 100644 --- a/reference/dom/domdocument/createdocumentfragment.xml +++ b/reference/dom/domdocument/createdocumentfragment.xml @@ -16,6 +16,12 @@ DOMDocumentFragment. &dom.node.inserted; + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/dom/domdocument/getelementsbytagnamens.xml b/reference/dom/domdocument/getelementsbytagnamens.xml index 10a04a992b..2c6e44ff1b 100644 --- a/reference/dom/domdocument/getelementsbytagnamens.xml +++ b/reference/dom/domdocument/getelementsbytagnamens.xml @@ -11,7 +11,7 @@ &reftitle.description; public DOMNodeListDOMDocument::getElementsByTagNameNS - stringnamespace + stringnullnamespace stringlocalName @@ -51,6 +51,29 @@ elements. + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.3 + + namespace is nullable now. + + + + + + + &reftitle.examples; diff --git a/reference/dom/domdocument/loadhtml.xml b/reference/dom/domdocument/loadhtml.xml index e3e62e9f69..e7822edb5f 100644 --- a/reference/dom/domdocument/loadhtml.xml +++ b/reference/dom/domdocument/loadhtml.xml @@ -39,7 +39,7 @@ options - Since PHP 5.4.0 and Libxml 2.6.0, you may also use the + Since Libxml 2.6.0, you may also use the options parameter to specify additional Libxml parameters. diff --git a/reference/dom/domdocument/loadhtmlfile.xml b/reference/dom/domdocument/loadhtmlfile.xml index 6bd21be477..b0abdf4d4f 100644 --- a/reference/dom/domdocument/loadhtmlfile.xml +++ b/reference/dom/domdocument/loadhtmlfile.xml @@ -36,7 +36,7 @@ options - Since PHP 5.4.0 and Libxml 2.6.0, you may also use the + Since Libxml 2.6.0, you may also use the options parameter to specify additional Libxml parameters. diff --git a/reference/dom/domdocument/normalizedocument.xml b/reference/dom/domdocument/normalizedocument.xml index 25434eec77..ed12e84e9d 100644 --- a/reference/dom/domdocument/normalizedocument.xml +++ b/reference/dom/domdocument/normalizedocument.xml @@ -17,6 +17,11 @@ document in a "normal" form. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/dom/domdocument/schemavalidate.xml b/reference/dom/domdocument/schemavalidate.xml index ea87005edb..214eb0751c 100644 --- a/reference/dom/domdocument/schemavalidate.xml +++ b/reference/dom/domdocument/schemavalidate.xml @@ -35,7 +35,7 @@ A bitmask of Libxml schema validation flags. Currently the only supported value is LIBXML_SCHEMA_CREATE. Available since PHP 5.5.2 and Libxml 2.6.14. + linkend="libxml.constants">LIBXML_SCHEMA_CREATE. Available since Libxml 2.6.14. @@ -48,29 +48,7 @@ &return.success; - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.5.2 - - Added the flags parameter - - - - - - - + &reftitle.seealso; diff --git a/reference/dom/domdocument/schemavalidatesource.xml b/reference/dom/domdocument/schemavalidatesource.xml index 8b143754d7..eede54637c 100644 --- a/reference/dom/domdocument/schemavalidatesource.xml +++ b/reference/dom/domdocument/schemavalidatesource.xml @@ -34,7 +34,7 @@ flags - A bitmask of Libxml schema validation flags. Currently the only supported value is LIBXML_SCHEMA_CREATE. Available since PHP 5.5.2 and Libxml 2.6.14. + A bitmask of Libxml schema validation flags. Currently the only supported value is LIBXML_SCHEMA_CREATE. Available since Libxml 2.6.14. @@ -47,29 +47,7 @@ &return.success; - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.5.2 - - Added the flags parameter - - - - - - - + &reftitle.seealso; diff --git a/reference/dom/domdocument/validate.xml b/reference/dom/domdocument/validate.xml index 68c885a8f8..1f0186b590 100644 --- a/reference/dom/domdocument/validate.xml +++ b/reference/dom/domdocument/validate.xml @@ -21,6 +21,12 @@ DOMDocument to make a DTD validation. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/dom/domdocument/xinclude.xml b/reference/dom/domdocument/xinclude.xml index ce15da4f02..0cdf30e0f0 100644 --- a/reference/dom/domdocument/xinclude.xml +++ b/reference/dom/domdocument/xinclude.xml @@ -32,7 +32,7 @@ libxml parameters. Available - since PHP 5.1.0 and Libxml 2.6.7. + since Libxml 2.6.7. diff --git a/reference/dom/domelement/getelementsbytagnamens.xml b/reference/dom/domelement/getelementsbytagnamens.xml index 6ad757a34d..4d0fa6ed0d 100644 --- a/reference/dom/domelement/getelementsbytagnamens.xml +++ b/reference/dom/domelement/getelementsbytagnamens.xml @@ -9,7 +9,7 @@ &reftitle.description; public DOMNodeListDOMElement::getElementsByTagNameNS - stringnamespace + stringnullnamespace stringlocalName @@ -49,6 +49,29 @@ which they are encountered in a preorder traversal of this element tree. + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.3 + + namespace is nullable now. + + + + + + + &reftitle.seealso; diff --git a/reference/dom/domimplementation/construct.xml b/reference/dom/domimplementation/construct.xml index 4e2b839f1f..9fbdabdd88 100644 --- a/reference/dom/domimplementation/construct.xml +++ b/reference/dom/domimplementation/construct.xml @@ -17,6 +17,12 @@ Creates a new DOMImplementation object. + + + &reftitle.parameters; + &no.function.parameters; + + -
- &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.1 - - The textContent property has been made writable (formerly it has been - readonly). - - - - - - -
-
&reftitle.seealso; diff --git a/reference/dom/domnode/hasattributes.xml b/reference/dom/domnode/hasattributes.xml index b591131d3a..9509870ae7 100644 --- a/reference/dom/domnode/hasattributes.xml +++ b/reference/dom/domnode/hasattributes.xml @@ -18,6 +18,12 @@ an XML_ELEMENT_NODE. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/dom/domnode/haschildnodes.xml b/reference/dom/domnode/haschildnodes.xml index 7e7cf23766..65481964d1 100644 --- a/reference/dom/domnode/haschildnodes.xml +++ b/reference/dom/domnode/haschildnodes.xml @@ -17,6 +17,12 @@ This function checks if the node has children. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/dom/domnode/normalize.xml b/reference/dom/domnode/normalize.xml index 1e7748d8cc..b83af869c1 100644 --- a/reference/dom/domnode/normalize.xml +++ b/reference/dom/domnode/normalize.xml @@ -18,6 +18,12 @@ its children. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/dom/domtext/iswhitespaceinelementcontent.xml b/reference/dom/domtext/iswhitespaceinelementcontent.xml index 65bd207fbe..b6a5cd7829 100644 --- a/reference/dom/domtext/iswhitespaceinelementcontent.xml +++ b/reference/dom/domtext/iswhitespaceinelementcontent.xml @@ -19,6 +19,12 @@ the load of the document. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/dom/functions/dom-import-simplexml.xml b/reference/dom/functions/dom-import-simplexml.xml index c12bf94684..7e3cffdfc1 100644 --- a/reference/dom/functions/dom-import-simplexml.xml +++ b/reference/dom/functions/dom-import-simplexml.xml @@ -11,7 +11,7 @@ &reftitle.description; - DOMElementnulldom_import_simplexml + DOMElementdom_import_simplexml objectnode @@ -39,9 +39,32 @@ &reftitle.returnvalues; - The DOMElement node added or &false; if any errors occur. + The DOMElement node added. + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + This function no longer returns &null; on failure. + + + + + + + &reftitle.examples; diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml index e8d0684eb4..945858152a 100644 --- a/reference/dom/versions.xml +++ b/reference/dom/versions.xml @@ -4,159 +4,159 @@ Do NOT translate this file --> - - - + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - + + - + - + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - + + - - - - + + + + - - - - - - - + + + + + + + - - - + + + - + - - + + - - - + + + - + - - - - - - + + + + + + - + diff --git a/reference/ds/book.xml b/reference/ds/book.xml index c2d3fff7cd..a5ff64cbf0 100644 --- a/reference/ds/book.xml +++ b/reference/ds/book.xml @@ -2,6 +2,7 @@ + Data Structures diff --git a/reference/ds/ds/map/diff.xml b/reference/ds/ds/map/diff.xml index 83e7370d7d..07f63ee640 100644 --- a/reference/ds/ds/map/diff.xml +++ b/reference/ds/ds/map/diff.xml @@ -48,7 +48,7 @@ See Also - Compliment on Wikipedia + Complement on Wikipedia diff --git a/reference/ds/ds/set/construct.xml b/reference/ds/ds/set/construct.xml index 6157581d45..a8701a7968 100644 --- a/reference/ds/ds/set/construct.xml +++ b/reference/ds/ds/set/construct.xml @@ -11,7 +11,7 @@ &reftitle.description; public Ds\Set::__construct - mixedvalues + mixedvalues[] Creates a new instance, using either a traversable diff --git a/reference/ds/ds/set/diff.xml b/reference/ds/ds/set/diff.xml index 38c12da196..431bd9063c 100644 --- a/reference/ds/ds/set/diff.xml +++ b/reference/ds/ds/set/diff.xml @@ -46,7 +46,7 @@ See Also - Compliment on Wikipedia + Complement on Wikipedia diff --git a/reference/eio/book.xml b/reference/eio/book.xml index 4222731bad..1172df96a7 100644 --- a/reference/eio/book.xml +++ b/reference/eio/book.xml @@ -2,6 +2,7 @@ + Eio Eio diff --git a/reference/eio/functions/eio-busy.xml b/reference/eio/functions/eio-busy.xml index bab6bef9c3..96a162124e 100644 --- a/reference/eio/functions/eio-busy.xml +++ b/reference/eio/functions/eio-busy.xml @@ -66,7 +66,7 @@ &reftitle.returnvalues; - eio_busy returns request resource on success or &false; on error. + eio_busy returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-chmod.xml b/reference/eio/functions/eio-chmod.xml index 6d6e0ad251..6d8538bf50 100644 --- a/reference/eio/functions/eio-chmod.xml +++ b/reference/eio/functions/eio-chmod.xml @@ -73,7 +73,7 @@ &reftitle.returnvalues; - eio_chmod returns request resource on success or &false; on error. + eio_chmod returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-chown.xml b/reference/eio/functions/eio-chown.xml index 8c2d883f91..9909c9f668 100644 --- a/reference/eio/functions/eio-chown.xml +++ b/reference/eio/functions/eio-chown.xml @@ -81,7 +81,7 @@ &reftitle.returnvalues; - eio_chown returns request resource on success or &false; on error. + eio_chown returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-close.xml b/reference/eio/functions/eio-close.xml index 109ae60e1b..0c15afe386 100644 --- a/reference/eio/functions/eio-close.xml +++ b/reference/eio/functions/eio-close.xml @@ -63,7 +63,7 @@ &reftitle.returnvalues; - eio_close returns request resource on success or &false; on error. + eio_close returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-custom.xml b/reference/eio/functions/eio-custom.xml index ef7b9c63db..d833642d8a 100644 --- a/reference/eio/functions/eio-custom.xml +++ b/reference/eio/functions/eio-custom.xml @@ -76,7 +76,7 @@ &reftitle.returnvalues; - eio_custom returns request resource on success or &false; on error. + eio_custom returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-dup2.xml b/reference/eio/functions/eio-dup2.xml index e2a79505c6..c68f970d31 100644 --- a/reference/eio/functions/eio-dup2.xml +++ b/reference/eio/functions/eio-dup2.xml @@ -72,7 +72,7 @@ &reftitle.returnvalues; - eio_dup2 returns request resource on success or &false; on error. + eio_dup2 returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-event-loop.xml b/reference/eio/functions/eio-event-loop.xml index bb0905c994..f25bb5f6da 100644 --- a/reference/eio/functions/eio-event-loop.xml +++ b/reference/eio/functions/eio-event-loop.xml @@ -27,7 +27,7 @@ &reftitle.returnvalues; - eio_event_loop returns &true; on success or &false; on error. + eio_event_loop returns &true; on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-fallocate.xml b/reference/eio/functions/eio-fallocate.xml index d97982f6d4..ad42c0c658 100644 --- a/reference/eio/functions/eio-fallocate.xml +++ b/reference/eio/functions/eio-fallocate.xml @@ -104,7 +104,7 @@ &reftitle.returnvalues; - eio_fallocate returns request resource on success or &false; on error. + eio_fallocate returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-fchmod.xml b/reference/eio/functions/eio-fchmod.xml index 8463398930..a129e6f55d 100644 --- a/reference/eio/functions/eio-fchmod.xml +++ b/reference/eio/functions/eio-fchmod.xml @@ -72,7 +72,7 @@ &reftitle.returnvalues; - eio_fchmod returns request resource on success or &false; on error. + eio_fchmod returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-fchown.xml b/reference/eio/functions/eio-fchown.xml index e12e0fc72e..c037e9b792 100644 --- a/reference/eio/functions/eio-fchown.xml +++ b/reference/eio/functions/eio-fchown.xml @@ -78,6 +78,13 @@ + + &reftitle.returnvalues; + + eio_chmod returns request resource on success,&return.falseforfailure;. + + + &reftitle.seealso; diff --git a/reference/eio/functions/eio-fdatasync.xml b/reference/eio/functions/eio-fdatasync.xml index d9f70b7961..6f3d7f6d14 100644 --- a/reference/eio/functions/eio-fdatasync.xml +++ b/reference/eio/functions/eio-fdatasync.xml @@ -62,7 +62,7 @@ &reftitle.returnvalues; - eio_fdatasync returns request resource on success or &false; on error. + eio_fdatasync returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-fstat.xml b/reference/eio/functions/eio-fstat.xml index b97ac78443..71a73b6a39 100644 --- a/reference/eio/functions/eio-fstat.xml +++ b/reference/eio/functions/eio-fstat.xml @@ -60,7 +60,7 @@ &reftitle.returnvalues; - eio_busy returns request resource on success or &false; on error. + eio_busy returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-fstatvfs.xml b/reference/eio/functions/eio-fstatvfs.xml index 2b3a59459a..a73afcda60 100644 --- a/reference/eio/functions/eio-fstatvfs.xml +++ b/reference/eio/functions/eio-fstatvfs.xml @@ -60,7 +60,7 @@ &reftitle.returnvalues; - eio_fstatvfs returns request resource on success or &false; on error. + eio_fstatvfs returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-fsync.xml b/reference/eio/functions/eio-fsync.xml index a73cfb28ed..b099e16883 100644 --- a/reference/eio/functions/eio-fsync.xml +++ b/reference/eio/functions/eio-fsync.xml @@ -62,7 +62,7 @@ &reftitle.returnvalues; - eio_fsync returns request resource on success or &false; on error. + eio_fsync returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-ftruncate.xml b/reference/eio/functions/eio-ftruncate.xml index 662e32fff0..f38be23666 100644 --- a/reference/eio/functions/eio-ftruncate.xml +++ b/reference/eio/functions/eio-ftruncate.xml @@ -73,7 +73,7 @@ &reftitle.returnvalues; - eio_ftruncate returns request resource on success or &false; on error. + eio_ftruncate returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-futime.xml b/reference/eio/functions/eio-futime.xml index 61401ff033..70cc60ece0 100644 --- a/reference/eio/functions/eio-futime.xml +++ b/reference/eio/functions/eio-futime.xml @@ -82,7 +82,7 @@ &reftitle.returnvalues; - eio_futime returns request resource on success or &false; on error. + eio_futime returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-grp-add.xml b/reference/eio/functions/eio-grp-add.xml index 52620886e3..144ed69c50 100644 --- a/reference/eio/functions/eio-grp-add.xml +++ b/reference/eio/functions/eio-grp-add.xml @@ -45,7 +45,7 @@ &reftitle.returnvalues; - eio_grp_add doesn't return a value. + &return.void; diff --git a/reference/eio/functions/eio-grp.xml b/reference/eio/functions/eio-grp.xml index 64a0c21208..bc70b58bec 100644 --- a/reference/eio/functions/eio-grp.xml +++ b/reference/eio/functions/eio-grp.xml @@ -44,7 +44,7 @@ &reftitle.returnvalues; - eio_grp returns request group resource on success or &false; on error. + eio_grp returns request group resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-init.xml b/reference/eio/functions/eio-init.xml index f18b8e76c8..d113190a97 100644 --- a/reference/eio/functions/eio-init.xml +++ b/reference/eio/functions/eio-init.xml @@ -16,14 +16,11 @@ eio_init (re-)initializes Eio. It allocates memory for internal structures of libeio and Eio itself. You may call eio_init before using Eio functions. Otherwise it will be called internally first time you invoke an Eio function in a process. - - - - &removed.php.future; - Since Eio 1.1.0 eio_init is deprecated. In Eio 1.0.0 because of libeio's restrictions you must call eio_init in child process, if you fork one by any means. You have to avoid using Eio in parent process, if you use it in childs. - - - + + + This function was removed in version 3.0.0RC1 of the eio extension for PHP version 8 and higher. + + diff --git a/reference/eio/functions/eio-mkdir.xml b/reference/eio/functions/eio-mkdir.xml index 600878e2c7..eb87f64578 100644 --- a/reference/eio/functions/eio-mkdir.xml +++ b/reference/eio/functions/eio-mkdir.xml @@ -72,7 +72,7 @@ &reftitle.returnvalues; - eio_mkdir returns request resource on success or &false; on error. + eio_mkdir returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-mknod.xml b/reference/eio/functions/eio-mknod.xml index 7dcb41a7b2..40c4165a70 100644 --- a/reference/eio/functions/eio-mknod.xml +++ b/reference/eio/functions/eio-mknod.xml @@ -98,7 +98,7 @@ &reftitle.returnvalues; - eio_mknod returns request resource on success or &false; on error. + eio_mknod returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-nop.xml b/reference/eio/functions/eio-nop.xml index c280dd25df..46f887eb33 100644 --- a/reference/eio/functions/eio-nop.xml +++ b/reference/eio/functions/eio-nop.xml @@ -54,7 +54,7 @@ &reftitle.returnvalues; - eio_nop returns request resource on success or &false; on error. + eio_nop returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-readahead.xml b/reference/eio/functions/eio-readahead.xml index ae9781e1a9..a16dfde1c7 100644 --- a/reference/eio/functions/eio-readahead.xml +++ b/reference/eio/functions/eio-readahead.xml @@ -81,7 +81,7 @@ &reftitle.returnvalues; - eio_readahead returns request resource on success or &false; on error. + eio_readahead returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-readdir.xml b/reference/eio/functions/eio-readdir.xml index 3f7fe1c861..23c4a90c29 100644 --- a/reference/eio/functions/eio-readdir.xml +++ b/reference/eio/functions/eio-readdir.xml @@ -72,8 +72,8 @@ &reftitle.returnvalues; - eio_readdir returns request resource on success, or - &false; on error. Sets result argument of + eio_readdir returns request resource on success,&return.falseforfailure;. + Sets result argument of callback function according to flags: diff --git a/reference/eio/functions/eio-readlink.xml b/reference/eio/functions/eio-readlink.xml index 8e029c69fe..1e83fd452f 100644 --- a/reference/eio/functions/eio-readlink.xml +++ b/reference/eio/functions/eio-readlink.xml @@ -60,7 +60,7 @@ &reftitle.returnvalues; - eio_readlink returns request resource on success or &false; on error. + eio_readlink returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-rename.xml b/reference/eio/functions/eio-rename.xml index d0991174d5..8e0d88e6b4 100644 --- a/reference/eio/functions/eio-rename.xml +++ b/reference/eio/functions/eio-rename.xml @@ -71,7 +71,7 @@ &reftitle.returnvalues; - eio_rename returns request resource on success or &false; on error. + eio_rename returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-rmdir.xml b/reference/eio/functions/eio-rmdir.xml index 45660de688..6af9e4ae9a 100644 --- a/reference/eio/functions/eio-rmdir.xml +++ b/reference/eio/functions/eio-rmdir.xml @@ -62,7 +62,7 @@ &reftitle.returnvalues; - eio_rmdir returns request resource on success or &false; on error. + eio_rmdir returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-seek.xml b/reference/eio/functions/eio-seek.xml index 2abecc289c..3e2f39b8d9 100644 --- a/reference/eio/functions/eio-seek.xml +++ b/reference/eio/functions/eio-seek.xml @@ -85,7 +85,7 @@ &reftitle.returnvalues; - eio_seek returns request resource on success or &false; on error. + eio_seek returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-sendfile.xml b/reference/eio/functions/eio-sendfile.xml index 2251e7c142..eb3a7dc7aa 100644 --- a/reference/eio/functions/eio-sendfile.xml +++ b/reference/eio/functions/eio-sendfile.xml @@ -87,7 +87,7 @@ &reftitle.returnvalues; - eio_sendfile returns request resource on success or &false; on error. + eio_sendfile returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-statvfs.xml b/reference/eio/functions/eio-statvfs.xml index 79e852f675..91d4ddf1ba 100644 --- a/reference/eio/functions/eio-statvfs.xml +++ b/reference/eio/functions/eio-statvfs.xml @@ -59,8 +59,8 @@ &reftitle.returnvalues; - eio_statvfs returns request resource on success or - &false; on error. On success assigns result argument of + eio_statvfs returns request resource on success,&return.falseforfailure;. + On success assigns result argument of callback to an array. diff --git a/reference/eio/functions/eio-symlink.xml b/reference/eio/functions/eio-symlink.xml index 5447da7a64..a929345ebc 100644 --- a/reference/eio/functions/eio-symlink.xml +++ b/reference/eio/functions/eio-symlink.xml @@ -73,7 +73,7 @@ &reftitle.returnvalues; - eio_symlink returns request resource on success or &false; on error. + eio_symlink returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-sync-file-range.xml b/reference/eio/functions/eio-sync-file-range.xml index 90a5ce6590..186b1c9ab7 100644 --- a/reference/eio/functions/eio-sync-file-range.xml +++ b/reference/eio/functions/eio-sync-file-range.xml @@ -97,7 +97,7 @@ &reftitle.returnvalues; - eio_sync_file_range returns request resource on success or &false; on error. + eio_sync_file_range returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-sync.xml b/reference/eio/functions/eio-sync.xml index 6e9a54cc3e..124dda28ea 100644 --- a/reference/eio/functions/eio-sync.xml +++ b/reference/eio/functions/eio-sync.xml @@ -29,7 +29,7 @@ &reftitle.returnvalues; - eio_sync returns request resource on success or &false; on error. + eio_sync returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-syncfs.xml b/reference/eio/functions/eio-syncfs.xml index 8cb959b556..2db4610a15 100644 --- a/reference/eio/functions/eio-syncfs.xml +++ b/reference/eio/functions/eio-syncfs.xml @@ -63,7 +63,7 @@ &reftitle.returnvalues; - eio_syncfs returns request resource on success or &false; on error. + eio_syncfs returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-truncate.xml b/reference/eio/functions/eio-truncate.xml index 320dacad31..0f0ad4da24 100644 --- a/reference/eio/functions/eio-truncate.xml +++ b/reference/eio/functions/eio-truncate.xml @@ -72,7 +72,7 @@ &reftitle.returnvalues; - eio_busy returns request resource on success or &false; on error. + eio_busy returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-unlink.xml b/reference/eio/functions/eio-unlink.xml index 4eee0f6046..043ea2e0a8 100644 --- a/reference/eio/functions/eio-unlink.xml +++ b/reference/eio/functions/eio-unlink.xml @@ -62,7 +62,7 @@ &reftitle.returnvalues; - eio_unlink returns request resource on success or &false; on error. + eio_unlink returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-utime.xml b/reference/eio/functions/eio-utime.xml index b6e38f7af3..e312897735 100644 --- a/reference/eio/functions/eio-utime.xml +++ b/reference/eio/functions/eio-utime.xml @@ -80,7 +80,7 @@ &reftitle.returnvalues; - eio_utime returns request resource on success or &false; on error. + eio_utime returns request resource on success,&return.falseforfailure;. diff --git a/reference/eio/functions/eio-write.xml b/reference/eio/functions/eio-write.xml index 4fc3cde0ee..98323450ad 100644 --- a/reference/eio/functions/eio-write.xml +++ b/reference/eio/functions/eio-write.xml @@ -91,7 +91,7 @@ &reftitle.returnvalues; - eio_write returns request resource on success or &false; on error. + eio_write returns request resource on success,&return.falseforfailure;. diff --git a/reference/enchant/configure.xml b/reference/enchant/configure.xml index 003d55340a..92c452e8e3 100644 --- a/reference/enchant/configure.xml +++ b/reference/enchant/configure.xml @@ -14,6 +14,26 @@ option when compiling PHP. + + Windows users must enable php_enchant.dll + in order to use this extension. + + + Additional setup on Windows + + &ext.windows.path.dll; + libenchant.dll, + glib-2.dll, + gmodule-2.dll. + + + Furthermore, it is necessary to copy at least one of the shipped providers in + lib/enchant/ to C:\enchant_plugins. + This path can be customized by creating the registry value + HKEY_CURRENT_USER\SOFTWARE\Enchant\Config\Module_Dir + and setting it to the desired path. + +
- + error_reporting Sets which PHP errors are reported @@ -10,14 +10,14 @@ &reftitle.description; interror_reporting - intlevel + intnullerror_level&null; The error_reporting function sets the error_reporting directive at runtime. PHP has many levels of errors, using this function sets that level for the duration (runtime) of - your script. If the optional level is + your script. If the optional error_level is not set, error_reporting will just return the current error reporting level. @@ -28,7 +28,7 @@ - level + error_level The new error_reporting @@ -52,11 +52,33 @@ &reftitle.returnvalues; Returns the old error_reporting - level or the current level if no level parameter is + level or the current level if no error_level parameter is given. + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + error_level is nullable now. + + + + + + + &reftitle.examples; @@ -126,7 +148,6 @@ ini_set('error_reporting', E_ALL); - - + Ev Ev diff --git a/reference/ev/evwatcher/construct.xml b/reference/ev/evwatcher/construct.xml index 324da96323..0024700cf6 100644 --- a/reference/ev/evwatcher/construct.xml +++ b/reference/ev/evwatcher/construct.xml @@ -19,6 +19,12 @@ classes. + + + &reftitle.parameters; + &no.function.parameters; + + + Event Event diff --git a/reference/event/event.xml b/reference/event/event.xml index e98f6644cf..1ce039fab2 100644 --- a/reference/event/event.xml +++ b/reference/event/event.xml @@ -11,7 +11,7 @@ Event class represents and event firing on a file descriptor being ready to read from or write to; a file descriptor becoming ready to read from or write - to(edge-triggered I/O only); a timeout expiring; a signal occuring; a + to(edge-triggered I/O only); a timeout expiring; a signal occurring; a user-triggered event. diff --git a/reference/event/event/add.xml b/reference/event/event/add.xml index 44c4f0624f..81bc4fdc11 100644 --- a/reference/event/event/add.xml +++ b/reference/event/event/add.xml @@ -50,7 +50,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false; + &return.success; diff --git a/reference/event/event/del.xml b/reference/event/event/del.xml index dfb5d18caf..575446872f 100644 --- a/reference/event/event/del.xml +++ b/reference/event/event/del.xml @@ -25,7 +25,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false; + &return.success; diff --git a/reference/event/event/set.xml b/reference/event/event/set.xml index 99baad5a02..f2604ede0a 100644 --- a/reference/event/event/set.xml +++ b/reference/event/event/set.xml @@ -105,7 +105,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/event/setpriority.xml b/reference/event/event/setpriority.xml index 047cf8de6e..8de04b48c6 100644 --- a/reference/event/event/setpriority.xml +++ b/reference/event/event/setpriority.xml @@ -38,7 +38,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/event/settimer.xml b/reference/event/event/settimer.xml index e3edac60f6..4da62cd8f9 100644 --- a/reference/event/event/settimer.xml +++ b/reference/event/event/settimer.xml @@ -74,7 +74,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbase/dispatch.xml b/reference/event/eventbase/dispatch.xml index 16c33cc22c..1bdf12924c 100644 --- a/reference/event/eventbase/dispatch.xml +++ b/reference/event/eventbase/dispatch.xml @@ -33,7 +33,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbase/exit.xml b/reference/event/eventbase/exit.xml index f1c2bcfa43..ef05e72fe0 100644 --- a/reference/event/eventbase/exit.xml +++ b/reference/event/eventbase/exit.xml @@ -39,7 +39,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbase/getfeatures.xml b/reference/event/eventbase/getfeatures.xml index f45deb9d00..3e97dc27ea 100644 --- a/reference/event/eventbase/getfeatures.xml +++ b/reference/event/eventbase/getfeatures.xml @@ -40,7 +40,7 @@ // Avoiding "select" method $cfg = new EventConfig(); if ($cfg->avoidMethod("select")) { - echo "`select' method avoided\n"; + echo "'select' method avoided\n"; } $base = new EventBase($cfg); diff --git a/reference/event/eventbase/getmethod.xml b/reference/event/eventbase/getmethod.xml index 48188b9279..85ba688275 100644 --- a/reference/event/eventbase/getmethod.xml +++ b/reference/event/eventbase/getmethod.xml @@ -35,7 +35,7 @@ avoidMethod("select")) { - echo "`select' method avoided\n"; + echo "'select' method avoided\n"; } // Create event_base associated with the config diff --git a/reference/event/eventbase/loop.xml b/reference/event/eventbase/loop.xml index 06b012d890..a4545f81f0 100644 --- a/reference/event/eventbase/loop.xml +++ b/reference/event/eventbase/loop.xml @@ -48,7 +48,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbase/priorityinit.xml b/reference/event/eventbase/priorityinit.xml index 19cea85788..466f0e408a 100644 --- a/reference/event/eventbase/priorityinit.xml +++ b/reference/event/eventbase/priorityinit.xml @@ -38,7 +38,7 @@ &reftitle.returnvalues; - Returns &true; on success, otherwise &false;. + &return.success; diff --git a/reference/event/eventbase/reinit.xml b/reference/event/eventbase/reinit.xml index 279b7c8895..ddbb9f8083 100644 --- a/reference/event/eventbase/reinit.xml +++ b/reference/event/eventbase/reinit.xml @@ -24,7 +24,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbase/stop.xml b/reference/event/eventbase/stop.xml index 5e864b7aff..b466e9e492 100644 --- a/reference/event/eventbase/stop.xml +++ b/reference/event/eventbase/stop.xml @@ -24,7 +24,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbuffer/add.xml b/reference/event/eventbuffer/add.xml index 8e86d9a1c8..ac232c362d 100644 --- a/reference/event/eventbuffer/add.xml +++ b/reference/event/eventbuffer/add.xml @@ -38,7 +38,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbuffer/addbuffer.xml b/reference/event/eventbuffer/addbuffer.xml index ffdac1123c..591b1fb9f5 100644 --- a/reference/event/eventbuffer/addbuffer.xml +++ b/reference/event/eventbuffer/addbuffer.xml @@ -43,7 +43,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbuffer/drain.xml b/reference/event/eventbuffer/drain.xml index 630c961257..dc6e7fdaea 100644 --- a/reference/event/eventbuffer/drain.xml +++ b/reference/event/eventbuffer/drain.xml @@ -42,7 +42,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbuffer/expand.xml b/reference/event/eventbuffer/expand.xml index 3b95234c69..e0fcec65e8 100644 --- a/reference/event/eventbuffer/expand.xml +++ b/reference/event/eventbuffer/expand.xml @@ -41,7 +41,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbuffer/freeze.xml b/reference/event/eventbuffer/freeze.xml index 303da0d800..d93a047051 100644 --- a/reference/event/eventbuffer/freeze.xml +++ b/reference/event/eventbuffer/freeze.xml @@ -38,7 +38,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbuffer/prepend.xml b/reference/event/eventbuffer/prepend.xml index aee45706d7..5984c6d073 100644 --- a/reference/event/eventbuffer/prepend.xml +++ b/reference/event/eventbuffer/prepend.xml @@ -38,7 +38,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbuffer/prependbuffer.xml b/reference/event/eventbuffer/prependbuffer.xml index 77fdecf5ca..a5409dda19 100644 --- a/reference/event/eventbuffer/prependbuffer.xml +++ b/reference/event/eventbuffer/prependbuffer.xml @@ -40,7 +40,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbuffer/search.xml b/reference/event/eventbuffer/search.xml index c535e01956..bec82794ff 100644 --- a/reference/event/eventbuffer/search.xml +++ b/reference/event/eventbuffer/search.xml @@ -81,7 +81,7 @@ &reftitle.returnvalues; - Returns numeric position of the first occurance of the string in the + Returns numeric position of the first occurrence of the string in the buffer, or &false; if string is not found. &return.falseproblem; @@ -94,7 +94,7 @@ &reftitle.returnvalues; - Returns numeric position of the first occurance of end-of-line symbol in + Returns numeric position of the first occurrence of end-of-line symbol in the buffer, or &false; if not found. &return.falseproblem; diff --git a/reference/event/eventbuffer/unfreeze.xml b/reference/event/eventbuffer/unfreeze.xml index 182c9642e2..4e09c071e3 100644 --- a/reference/event/eventbuffer/unfreeze.xml +++ b/reference/event/eventbuffer/unfreeze.xml @@ -38,7 +38,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbuffer/unlock.xml b/reference/event/eventbuffer/unlock.xml index e335c4e30f..0cf1f84a66 100644 --- a/reference/event/eventbuffer/unlock.xml +++ b/reference/event/eventbuffer/unlock.xml @@ -26,7 +26,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbufferevent/connect.xml b/reference/event/eventbufferevent/connect.xml index db5d814a2d..7595999cee 100644 --- a/reference/event/eventbufferevent/connect.xml +++ b/reference/event/eventbufferevent/connect.xml @@ -63,7 +63,7 @@ unix:path &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbufferevent/connecthost.xml b/reference/event/eventbufferevent/connecthost.xml index dae098ec36..524f6c32fc 100644 --- a/reference/event/eventbufferevent/connecthost.xml +++ b/reference/event/eventbufferevent/connecthost.xml @@ -137,7 +137,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbufferevent/disable.xml b/reference/event/eventbufferevent/disable.xml index e775fc0d29..0b95587767 100644 --- a/reference/event/eventbufferevent/disable.xml +++ b/reference/event/eventbufferevent/disable.xml @@ -44,7 +44,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbufferevent/enable.xml b/reference/event/eventbufferevent/enable.xml index a832c07d33..515db6b2fe 100644 --- a/reference/event/eventbufferevent/enable.xml +++ b/reference/event/eventbufferevent/enable.xml @@ -53,7 +53,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbufferevent/readbuffer.xml b/reference/event/eventbufferevent/readbuffer.xml index aa23526313..c11a91fd6d 100644 --- a/reference/event/eventbufferevent/readbuffer.xml +++ b/reference/event/eventbufferevent/readbuffer.xml @@ -40,7 +40,7 @@ &reftitle.returnvalues; - Returns &true; on success; Otherwise &false;. + &return.success; diff --git a/reference/event/eventbufferevent/setpriority.xml b/reference/event/eventbufferevent/setpriority.xml index 9f359fe463..55b7549bad 100644 --- a/reference/event/eventbufferevent/setpriority.xml +++ b/reference/event/eventbufferevent/setpriority.xml @@ -43,7 +43,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbufferevent/settimeouts.xml b/reference/event/eventbufferevent/settimeouts.xml index f7c8501e59..1436c22e39 100644 --- a/reference/event/eventbufferevent/settimeouts.xml +++ b/reference/event/eventbufferevent/settimeouts.xml @@ -52,7 +52,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbufferevent/sslerror.xml b/reference/event/eventbufferevent/sslerror.xml index 257bbd4bcb..0ae350d82f 100644 --- a/reference/event/eventbufferevent/sslerror.xml +++ b/reference/event/eventbufferevent/sslerror.xml @@ -44,7 +44,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventbufferevent/writebuffer.xml b/reference/event/eventbufferevent/writebuffer.xml index 3cd10187bb..59e364feb5 100644 --- a/reference/event/eventbufferevent/writebuffer.xml +++ b/reference/event/eventbufferevent/writebuffer.xml @@ -41,7 +41,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventconfig/avoidmethod.xml b/reference/event/eventconfig/avoidmethod.xml index 00caa3c6c8..4566e41a88 100644 --- a/reference/event/eventconfig/avoidmethod.xml +++ b/reference/event/eventconfig/avoidmethod.xml @@ -45,7 +45,7 @@ &reftitle.returnvalues; - Returns &true; on success, otherwise &false;. + &return.success; @@ -58,7 +58,7 @@ avoidMethod("select")) { - echo "`select' method avoided\n"; + echo "'select' method avoided\n"; } ?> ]]> diff --git a/reference/event/eventconfig/construct.xml b/reference/event/eventconfig/construct.xml index f55ad7121d..6c25ada340 100644 --- a/reference/event/eventconfig/construct.xml +++ b/reference/event/eventconfig/construct.xml @@ -41,7 +41,7 @@ // Avoiding "select" method $cfg = new EventConfig(); if ($cfg->avoidMethod("select")) { - echo "`select' method avoided\n"; + echo "'select' method avoided\n"; } // Create event_base associated with the config diff --git a/reference/event/eventconfig/requirefeatures.xml b/reference/event/eventconfig/requirefeatures.xml index 6c899de75b..092445499d 100644 --- a/reference/event/eventconfig/requirefeatures.xml +++ b/reference/event/eventconfig/requirefeatures.xml @@ -40,7 +40,9 @@ &reftitle.returnvalues; - + + &return.success; + &reftitle.examples; diff --git a/reference/event/eventconfig/setflags.xml b/reference/event/eventconfig/setflags.xml new file mode 100644 index 0000000000..2b082f34ca --- /dev/null +++ b/reference/event/eventconfig/setflags.xml @@ -0,0 +1,74 @@ + + + + + EventConfig::setFlags + Sets one or more flags to configure the eventual EventBase will be initialized + + + &reftitle.description; + + public + bool + EventConfig::setFlags + + int + flags + + + + Sets one or more flags to configure what parts of + the eventual EventBase will be initialized, and how they'll work. + + + + &reftitle.parameters; + + + + flags + + + + One of EventBase::LOOP_* constants. + See EventBase constants. + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.seealso; + + + EventBase::getFeatures + + + + + diff --git a/reference/event/eventconfig/setmaxdispatchinterval.xml b/reference/event/eventconfig/setmaxdispatchinterval.xml index 9ccb3592d7..9afb177760 100644 --- a/reference/event/eventconfig/setmaxdispatchinterval.xml +++ b/reference/event/eventconfig/setmaxdispatchinterval.xml @@ -90,7 +90,7 @@ &reftitle.returnvalues; - Returns &true; on success, otherwise &false;. + &return.success; diff --git a/reference/event/eventdnsbase/addnameserverip.xml b/reference/event/eventdnsbase/addnameserverip.xml index c6044e667e..845068efc3 100644 --- a/reference/event/eventdnsbase/addnameserverip.xml +++ b/reference/event/eventdnsbase/addnameserverip.xml @@ -43,7 +43,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventdnsbase/loadhosts.xml b/reference/event/eventdnsbase/loadhosts.xml index ee79cc465f..008e56d333 100644 --- a/reference/event/eventdnsbase/loadhosts.xml +++ b/reference/event/eventdnsbase/loadhosts.xml @@ -40,7 +40,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventdnsbase/parseresolvconf.xml b/reference/event/eventdnsbase/parseresolvconf.xml index 73be1dda7f..d4b96eda07 100644 --- a/reference/event/eventdnsbase/parseresolvconf.xml +++ b/reference/event/eventdnsbase/parseresolvconf.xml @@ -81,7 +81,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventdnsbase/setoption.xml b/reference/event/eventdnsbase/setoption.xml index d1b5c916d1..9502a3be4e 100644 --- a/reference/event/eventdnsbase/setoption.xml +++ b/reference/event/eventdnsbase/setoption.xml @@ -62,7 +62,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventdnsbase/setsearchndots.xml b/reference/event/eventdnsbase/setsearchndots.xml index ec23fe2e11..257df8baa9 100644 --- a/reference/event/eventdnsbase/setsearchndots.xml +++ b/reference/event/eventdnsbase/setsearchndots.xml @@ -41,7 +41,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventhttp/accept.xml b/reference/event/eventhttp/accept.xml index 71725185de..0c0195da3d 100644 --- a/reference/event/eventhttp/accept.xml +++ b/reference/event/eventhttp/accept.xml @@ -57,7 +57,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventhttp/addserveralias.xml b/reference/event/eventhttp/addserveralias.xml index 2370cca2d2..46cbeeedd0 100644 --- a/reference/event/eventhttp/addserveralias.xml +++ b/reference/event/eventhttp/addserveralias.xml @@ -38,7 +38,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventhttp/bind.xml b/reference/event/eventhttp/bind.xml index cdcd8c579c..741958ee3c 100644 --- a/reference/event/eventhttp/bind.xml +++ b/reference/event/eventhttp/bind.xml @@ -58,7 +58,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventhttp/removeserveralias.xml b/reference/event/eventhttp/removeserveralias.xml index f452662524..efe300a196 100644 --- a/reference/event/eventhttp/removeserveralias.xml +++ b/reference/event/eventhttp/removeserveralias.xml @@ -39,7 +39,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventhttp/setcallback.xml b/reference/event/eventhttp/setcallback.xml index ce3aa763cc..5bb97465ed 100644 --- a/reference/event/eventhttp/setcallback.xml +++ b/reference/event/eventhttp/setcallback.xml @@ -111,7 +111,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventhttp/setdefaultcallback.xml b/reference/event/eventhttp/setdefaultcallback.xml index 1de8512aee..031f3e84de 100644 --- a/reference/event/eventhttp/setdefaultcallback.xml +++ b/reference/event/eventhttp/setdefaultcallback.xml @@ -96,7 +96,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventhttpconnection/makerequest.xml b/reference/event/eventhttpconnection/makerequest.xml index b24b3d91a2..f6fb05bc85 100644 --- a/reference/event/eventhttpconnection/makerequest.xml +++ b/reference/event/eventhttpconnection/makerequest.xml @@ -73,7 +73,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventhttprequest/addheader.xml b/reference/event/eventhttprequest/addheader.xml index 519e0a8428..7a46aefc90 100644 --- a/reference/event/eventhttprequest/addheader.xml +++ b/reference/event/eventhttprequest/addheader.xml @@ -69,7 +69,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventlistener/disable.xml b/reference/event/eventlistener/disable.xml index 8ddef4e068..e39fe8efb4 100644 --- a/reference/event/eventlistener/disable.xml +++ b/reference/event/eventlistener/disable.xml @@ -24,7 +24,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventlistener/enable.xml b/reference/event/eventlistener/enable.xml index e6020f03d5..7ccfad89f1 100644 --- a/reference/event/eventlistener/enable.xml +++ b/reference/event/eventlistener/enable.xml @@ -24,7 +24,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventlistener/getsocketname.xml b/reference/event/eventlistener/getsocketname.xml index aa2d54fea2..96900c135d 100644 --- a/reference/event/eventlistener/getsocketname.xml +++ b/reference/event/eventlistener/getsocketname.xml @@ -54,7 +54,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventutil/getsocketname.xml b/reference/event/eventutil/getsocketname.xml index 412a86a265..f7828b4637 100644 --- a/reference/event/eventutil/getsocketname.xml +++ b/reference/event/eventutil/getsocketname.xml @@ -72,7 +72,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/eventutil/setsocketoption.xml b/reference/event/eventutil/setsocketoption.xml index a98e7ed741..aca1846d2a 100644 --- a/reference/event/eventutil/setsocketoption.xml +++ b/reference/event/eventutil/setsocketoption.xml @@ -103,7 +103,7 @@ &reftitle.returnvalues; - Returns &true; on success. Otherwise &false;. + &return.success; diff --git a/reference/event/examples.xml b/reference/event/examples.xml index 497cf5429f..6656d8320b 100644 --- a/reference/event/examples.xml +++ b/reference/event/examples.xml @@ -590,7 +590,7 @@ foreach (Event::getSupportedMethods() as $m) { // Avoiding "select" method $cfg = new EventConfig(); if ($cfg->avoidMethod("select")) { - echo "`select' method avoided\n"; + echo "'select' method avoided\n"; } // Create event_base associated with the config diff --git a/reference/event/versions.xml b/reference/event/versions.xml index 5fc02869ec..99ee6a823e 100644 --- a/reference/event/versions.xml +++ b/reference/event/versions.xml @@ -39,6 +39,8 @@ + + diff --git a/reference/exec/functions/escapeshellcmd.xml b/reference/exec/functions/escapeshellcmd.xml index 08a65fe8b4..53a7d0082c 100644 --- a/reference/exec/functions/escapeshellcmd.xml +++ b/reference/exec/functions/escapeshellcmd.xml @@ -86,6 +86,20 @@ system($escaped_command); escapeshellarg should be used instead. + + + Spaces will not be escaped by escapeshellcmd + which can be problematic on Windows with paths like: + C:\Program Files\ProgramName\program.exe. + This can be mitigated using the following code snippet: + + + + + diff --git a/reference/exec/functions/proc-nice.xml b/reference/exec/functions/proc-nice.xml index b80c971613..d4a7d8975b 100644 --- a/reference/exec/functions/proc-nice.xml +++ b/reference/exec/functions/proc-nice.xml @@ -101,24 +101,6 @@ - - &reftitle.examples; - - - Using <function>proc_nice</function> to set the process priority to high - - -]]> - - - - - - &reftitle.changelog; @@ -143,6 +125,24 @@ proc_nice(-20); + + &reftitle.examples; + + + Using <function>proc_nice</function> to set the process priority to high + + +]]> + + + + + + &reftitle.notes; diff --git a/reference/exec/functions/shell-exec.xml b/reference/exec/functions/shell-exec.xml index 5595f01c24..faf4d5b8a4 100644 --- a/reference/exec/functions/shell-exec.xml +++ b/reference/exec/functions/shell-exec.xml @@ -10,7 +10,7 @@ &reftitle.description; - stringshell_exec + stringfalsenullshell_exec stringcmd @@ -45,8 +45,8 @@ &reftitle.returnvalues; - The output from the executed command or &null; if an error occurred or the - command produces no output. + A &string; containing the output from the executed command, &false; if the pipe + cannot be established or &null; if an error occurs or the command produces no output. @@ -57,6 +57,14 @@ + + + &reftitle.errors; + + An E_WARNING level error is generated + when the pipe cannot be established. + + &reftitle.examples; diff --git a/reference/exif/functions/exif-imagetype.xml b/reference/exif/functions/exif-imagetype.xml index 8518be4cb5..07f96afa3d 100644 --- a/reference/exif/functions/exif-imagetype.xml +++ b/reference/exif/functions/exif-imagetype.xml @@ -46,42 +46,6 @@ same value that getimagesize returns in index 2 but exif_imagetype is much faster. - - - - exif_imagetype will emit an E_NOTICE - and return &false; if it is unable to read enough bytes from the file to - determine the image type. - - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 7.1.0 - - Added WebP support. - - - - - - - - - &reftitle.constants; The following constants are defined, and represent possible exif_imagetype return values: @@ -173,7 +137,42 @@ + + + + exif_imagetype will emit an E_NOTICE + and return &false; if it is unable to read enough bytes from the file to + determine the image type. + + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 7.1.0 + + Added WebP support. + + + + + + + + &reftitle.examples; diff --git a/reference/exif/functions/exif-read-data.xml b/reference/exif/functions/exif-read-data.xml index 956316c578..48097b62d7 100644 --- a/reference/exif/functions/exif-read-data.xml +++ b/reference/exif/functions/exif-read-data.xml @@ -59,11 +59,6 @@ to the EXIF specification (&url.exifspec;, page 20). - - - Windows Me/XP can both wipe the Exif headers when connecting to a camera. - - &reftitle.parameters; diff --git a/reference/exif/functions/exif-thumbnail.xml b/reference/exif/functions/exif-thumbnail.xml index d7cfa151c0..42f7a02856 100644 --- a/reference/exif/functions/exif-thumbnail.xml +++ b/reference/exif/functions/exif-thumbnail.xml @@ -77,6 +77,32 @@ thumbnail. + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 7.2.0 + + The file parameter now supports both local files + and stream resources. + + + + + + + + &reftitle.examples; @@ -101,30 +127,7 @@ if ($image!==false) { - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 7.2.0 - - The file parameter now supports both local files - and stream resources. - - - - - - - + &reftitle.notes; diff --git a/reference/expect/book.xml b/reference/expect/book.xml index 4246652b46..89fc0c6744 100644 --- a/reference/expect/book.xml +++ b/reference/expect/book.xml @@ -2,6 +2,7 @@ + Expect diff --git a/reference/fann/book.xml b/reference/fann/book.xml index 59ccfc8d43..2f0a021684 100644 --- a/reference/fann/book.xml +++ b/reference/fann/book.xml @@ -2,6 +2,7 @@ + FANN (Fast Artificial Neural Network) FANN diff --git a/reference/fann/functions/fann-get-activation-steepness.xml b/reference/fann/functions/fann-get-activation-steepness.xml index 686b03aec6..144202bc5f 100644 --- a/reference/fann/functions/fann-get-activation-steepness.xml +++ b/reference/fann/functions/fann-get-activation-steepness.xml @@ -24,7 +24,7 @@ The steepness of an activation function says something about how fast the activation function goes - from the minimum to the maximum. A high value for the activation function will also give a more agressive training. + from the minimum to the maximum. A high value for the activation function will also give a more aggressive training. When training neural networks where the output values should be at the extremes diff --git a/reference/fann/functions/fann-read-train-from-file.xml b/reference/fann/functions/fann-read-train-from-file.xml index 562a603f3a..4780e144ed 100644 --- a/reference/fann/functions/fann-read-train-from-file.xml +++ b/reference/fann/functions/fann-read-train-from-file.xml @@ -30,15 +30,15 @@ diff --git a/reference/fann/functions/fann-set-activation-steepness.xml b/reference/fann/functions/fann-set-activation-steepness.xml index 305dd3002a..098dc48dcb 100644 --- a/reference/fann/functions/fann-set-activation-steepness.xml +++ b/reference/fann/functions/fann-set-activation-steepness.xml @@ -25,7 +25,7 @@ The steepness of an activation function says something about how fast the activation function goes from - the minimum to the maximum. A high value for the activation function will also give a more agressive training. + the minimum to the maximum. A high value for the activation function will also give a more aggressive training. When training neural networks where the output values should be at the extremes diff --git a/reference/fdf/book.xml b/reference/fdf/book.xml index 028bd3e352..3aac7c4c16 100644 --- a/reference/fdf/book.xml +++ b/reference/fdf/book.xml @@ -2,6 +2,7 @@ + Forms Data Format FDF diff --git a/reference/fdf/configure.xml b/reference/fdf/configure.xml index 2d04cc8f46..ae724f9f32 100644 --- a/reference/fdf/configure.xml +++ b/reference/fdf/configure.xml @@ -7,7 +7,7 @@ &url.pecl.vcs;fdf. - This extension is no longer bundled with PHP as of PHP 5.3.0. + This extension is no longer bundled with PHP. diff --git a/reference/fdf/functions/fdf-create.xml b/reference/fdf/functions/fdf-create.xml index d8057698e1..bbf0f8458d 100644 --- a/reference/fdf/functions/fdf-create.xml +++ b/reference/fdf/functions/fdf-create.xml @@ -21,6 +21,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/fdf/functions/fdf-errno.xml b/reference/fdf/functions/fdf-errno.xml index dbe1e5590d..e659316365 100644 --- a/reference/fdf/functions/fdf-errno.xml +++ b/reference/fdf/functions/fdf-errno.xml @@ -21,6 +21,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/fdf/functions/fdf-header.xml b/reference/fdf/functions/fdf-header.xml index 76f4d65eb9..8b83c600dd 100644 --- a/reference/fdf/functions/fdf-header.xml +++ b/reference/fdf/functions/fdf-header.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/fdf/functions/fdf-set-value.xml b/reference/fdf/functions/fdf-set-value.xml index 06494a26d9..4ba87927fd 100644 --- a/reference/fdf/functions/fdf-set-value.xml +++ b/reference/fdf/functions/fdf-set-value.xml @@ -61,8 +61,8 @@ The value is no longer used in the current toolkit version 5.0. For - compatibility reasons it is still supported as an optional parameter - beginning with PHP 4.3, but ignored internally. + compatibility reasons it is still supported as an optional parameter, + but ignored internally. @@ -78,31 +78,6 @@ - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 4.3.0 - - Support for arrays in the value parameter was - added. - - - - - - - - &reftitle.seealso; diff --git a/reference/ffi/book.xml b/reference/ffi/book.xml index c92bf86f94..1bd9da7985 100644 --- a/reference/ffi/book.xml +++ b/reference/ffi/book.xml @@ -2,6 +2,7 @@ + Foreign Function Interface FFI diff --git a/reference/ffi/ffi/cast.xml b/reference/ffi/ffi/cast.xml index ecffb6882c..eb781cc257 100644 --- a/reference/ffi/ffi/cast.xml +++ b/reference/ffi/ffi/cast.xml @@ -1,6 +1,5 @@ - FFI::cast @@ -15,7 +14,7 @@ FFI\CDataintfloatboolnullptr - public FFI\CDatanullFFI::cast + public static FFI\CDatanullFFI::cast FFI\CTypestringtype FFI\CDataintfloatboolnullptr @@ -62,7 +61,6 @@ - - + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - +
&reftitle.required; - - Before PHP 5.3.0, the magic_open library is needed to build - this extension. - + &no.requirement;
diff --git a/reference/filepro/book.xml b/reference/filepro/book.xml deleted file mode 100644 index 585b4b7016..0000000000 --- a/reference/filepro/book.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - filePro - - - - &reftitle.intro; - - These functions allow read-only access to data stored in filePro databases. - - - filePro is a registered trademark of fP Technologies, Inc. You can find more - information about filePro at &url.filepro;. - - - - &pecl.moved-ver;5.2.0. - - - - - - &reference.filepro.setup; - &reference.filepro.constants; - &reference.filepro.reference; - - - - - diff --git a/reference/filepro/configure.xml b/reference/filepro/configure.xml deleted file mode 100644 index 8af52dd4aa..0000000000 --- a/reference/filepro/configure.xml +++ /dev/null @@ -1,33 +0,0 @@ - - -
- &reftitle.install; - - &pecl.moved-ver;5.2.0 - - - &pecl.info; - &url.pecl.package;filepro. - -
- - diff --git a/reference/filepro/constants.xml b/reference/filepro/constants.xml deleted file mode 100644 index 49d24ee824..0000000000 --- a/reference/filepro/constants.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - &reftitle.constants; - &no.constants; - - - - diff --git a/reference/filepro/functions/filepro-fieldcount.xml b/reference/filepro/functions/filepro-fieldcount.xml deleted file mode 100644 index 15a1a0f922..0000000000 --- a/reference/filepro/functions/filepro-fieldcount.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - filepro_fieldcount - Find out how many fields are in a filePro database - - - &reftitle.description; - - intfilepro_fieldcount - - - - Returns the number of fields (columns) in the opened filePro - database. - - - - &reftitle.returnvalues; - - Returns the number of fields in the opened filePro database, or &false; on - errors. - - - - &reftitle.seealso; - - - filepro - - - - - - diff --git a/reference/filepro/functions/filepro-fieldname.xml b/reference/filepro/functions/filepro-fieldname.xml deleted file mode 100644 index f31e7f87c1..0000000000 --- a/reference/filepro/functions/filepro-fieldname.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - filepro_fieldname - Gets the name of a field - - - &reftitle.description; - - stringfilepro_fieldname - intfield_number - - - Returns the name of the field corresponding to - field_number. - - - - &reftitle.parameters; - - - - field_number - - - The field number. - - - - - - - - &reftitle.returnvalues; - - Returns the name of the field as a string, or &false; on errors. - - - - - diff --git a/reference/filepro/functions/filepro-fieldtype.xml b/reference/filepro/functions/filepro-fieldtype.xml deleted file mode 100644 index bfb594e38b..0000000000 --- a/reference/filepro/functions/filepro-fieldtype.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - filepro_fieldtype - Gets the type of a field - - - &reftitle.description; - - stringfilepro_fieldtype - intfield_number - - - Returns the edit type of the field corresponding to field_number. - - - - &reftitle.parameters; - - - - field_number - - - The field number. - - - - - - - - &reftitle.returnvalues; - - Returns the edit type of the field as a string, or &false; on errors. - - - - - diff --git a/reference/filepro/functions/filepro-fieldwidth.xml b/reference/filepro/functions/filepro-fieldwidth.xml deleted file mode 100644 index 330d5706f4..0000000000 --- a/reference/filepro/functions/filepro-fieldwidth.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - filepro_fieldwidth - Gets the width of a field - - - &reftitle.description; - - intfilepro_fieldwidth - intfield_number - - - Returns the width of the field corresponding to field_number. - - - - &reftitle.parameters; - - - - field_number - - - The field number. - - - - - - - - &reftitle.returnvalues; - - Returns the width of the field as a integer, or &false; on errors. - - - - - diff --git a/reference/filepro/functions/filepro-retrieve.xml b/reference/filepro/functions/filepro-retrieve.xml deleted file mode 100644 index 55251bd8ae..0000000000 --- a/reference/filepro/functions/filepro-retrieve.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - filepro_retrieve - Retrieves data from a filePro database - - - &reftitle.description; - - stringfilepro_retrieve - introw_number - intfield_number - - - Returns the data from the specified location in the database. - - - - &reftitle.parameters; - - - - row_number - - - The row number. Must be between zero and the total number of rows - minus one (0..filepro_rowcount - 1) - - - - - field_number - - - The field number. Accepts values between zero and the total number of - fields minus one (0..filepro_fieldcount - 1) - - - - - - - - &reftitle.returnvalues; - - Returns the specified data, or &false; on errors. - - - - - diff --git a/reference/filepro/functions/filepro-rowcount.xml b/reference/filepro/functions/filepro-rowcount.xml deleted file mode 100644 index f8898ddc79..0000000000 --- a/reference/filepro/functions/filepro-rowcount.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - filepro_rowcount - Find out how many rows are in a filePro database - - - &reftitle.description; - - intfilepro_rowcount - - - - Returns the number of rows in the opened filePro database. - - - - &reftitle.returnvalues; - - Returns the number of rows in the opened filePro database, or &false; on - errors. - - - - &reftitle.seealso; - - - filepro - - - - - - diff --git a/reference/filepro/functions/filepro.xml b/reference/filepro/functions/filepro.xml deleted file mode 100644 index d05a2e4608..0000000000 --- a/reference/filepro/functions/filepro.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - filepro - Read and verify the map file - - - &reftitle.description; - - boolfilepro - stringdirectory - - - This reads and verifies the map file, storing the field count - and info. - - - No locking is done, so you should avoid modifying your filePro - database while it may be opened in PHP. - - - - &reftitle.parameters; - - - - directory - - - The map directory. - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - diff --git a/reference/filepro/reference.xml b/reference/filepro/reference.xml deleted file mode 100644 index 9a9f25672a..0000000000 --- a/reference/filepro/reference.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - filePro &Functions; - -&reference.filepro.entities.functions; - - - - diff --git a/reference/filepro/setup.xml b/reference/filepro/setup.xml deleted file mode 100644 index 766344eb9b..0000000000 --- a/reference/filepro/setup.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - &reftitle.setup; - - -
- &reftitle.required; - &no.requirement; -
- - - - &reference.filepro.configure; - - - -
- &reftitle.runtime; - &no.config; -
- - - -
- &reftitle.resources; - &no.resource; -
- - -
- - - diff --git a/reference/filepro/versions.xml b/reference/filepro/versions.xml deleted file mode 100644 index d524b3a63a..0000000000 --- a/reference/filepro/versions.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/reference/filesystem/constants.xml b/reference/filesystem/constants.xml index 4e08337aca..25982f7b10 100644 --- a/reference/filesystem/constants.xml +++ b/reference/filesystem/constants.xml @@ -198,7 +198,7 @@ - Since PHP 5.2.0. + @@ -265,7 +265,7 @@ - Binary mode (since PHP 5.2.7). + Binary mode. This constant has no effect, and is only available for @@ -283,7 +283,7 @@ - Text mode (since PHP 5.2.7). + Text mode. This constant has no effect, and is only available for @@ -301,7 +301,7 @@ - Normal INI scanner mode (since PHP 5.3). + Normal INI scanner mode. @@ -313,7 +313,7 @@ - Raw INI scanner mode (since PHP 5.3). + Raw INI scanner mode. @@ -325,7 +325,7 @@ - Typed INI scanner mode (since PHP 5.6.1). + Typed INI scanner mode. diff --git a/reference/filesystem/functions/fgetcsv.xml b/reference/filesystem/functions/fgetcsv.xml index 3bb9734ab8..a27a7621b8 100644 --- a/reference/filesystem/functions/fgetcsv.xml +++ b/reference/filesystem/functions/fgetcsv.xml @@ -65,7 +65,7 @@ separator - The optional separator parameter sets the field separator (one character only). + The optional separator parameter sets the field separator (one single-byte character only). @@ -73,7 +73,7 @@ enclosure - The optional enclosure parameter sets the field enclosure character (one character only). + The optional enclosure parameter sets the field enclosure character (one single-byte character only). @@ -81,7 +81,7 @@ escape - The optional escape parameter sets the escape character (at most one character). + The optional escape parameter sets the escape character (at most one single-byte character). An empty string ("") disables the proprietary escape mechanism. diff --git a/reference/filesystem/functions/file-exists.xml b/reference/filesystem/functions/file-exists.xml index cd6616c819..31831206da 100644 --- a/reference/filesystem/functions/file-exists.xml +++ b/reference/filesystem/functions/file-exists.xml @@ -58,6 +58,11 @@ &fs.file.32bit; + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -80,11 +85,6 @@ if (file_exists($filename)) { - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/file-get-contents.xml b/reference/filesystem/functions/file-get-contents.xml index 773eee5234..42be2fa387 100644 --- a/reference/filesystem/functions/file-get-contents.xml +++ b/reference/filesystem/functions/file-get-contents.xml @@ -14,13 +14,13 @@ booluse_include_path&false; resourcecontext intoffset0 - intmaxlen + intlength This function is similar to file, except that file_get_contents returns the file in a string, starting at the specified offset - up to maxlen bytes. On failure, + up to length bytes. On failure, file_get_contents will return &false;. @@ -89,7 +89,7 @@ - maxlen + length Maximum length of data read. The default is to read until end @@ -113,7 +113,7 @@ &reftitle.errors; - An E_WARNING level error is generated if filename cannot be found, maxlength + An E_WARNING level error is generated if filename cannot be found, length is less than zero, or if seeking to the specified offset in the stream fails. @@ -123,6 +123,30 @@ + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 7.1.0 + + Support for negative offsets has been added. + + + + + + + + &reftitle.examples; @@ -192,30 +216,6 @@ $file = file_get_contents('http://www.example.com/', false, $context); - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 7.1.0 - - Support for negative offsets has been added. - - - - - - - &reftitle.notes; diff --git a/reference/filesystem/functions/file.xml b/reference/filesystem/functions/file.xml index 2be3e227fc..d0aae99e72 100644 --- a/reference/filesystem/functions/file.xml +++ b/reference/filesystem/functions/file.xml @@ -137,10 +137,7 @@ foreach ($lines as $line_num => $line) { echo "Line #{$line_num} : " . htmlspecialchars($line) . "
\n"; } -// Another example, let's get a web page into a string. See also file_get_contents(). -$html = implode('', file('http://www.example.com/')); - -// Using the optional flags parameter since PHP 5 +// Using the optional flags parameter $trimmed = file('somefile.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); ?> ]]> @@ -158,11 +155,11 @@ $trimmed = file('somefile.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); &reftitle.seealso; + file_get_contents readfile fopen fsockopen popen - file_get_contents include stream_context_create diff --git a/reference/filesystem/functions/fileatime.xml b/reference/filesystem/functions/fileatime.xml index 78e36ac51a..f2aeb5cafb 100644 --- a/reference/filesystem/functions/fileatime.xml +++ b/reference/filesystem/functions/fileatime.xml @@ -41,6 +41,11 @@
+ + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -64,11 +69,6 @@ if (file_exists($filename)) { - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; diff --git a/reference/filesystem/functions/filectime.xml b/reference/filesystem/functions/filectime.xml index fa9c02a67f..b97af1ee59 100644 --- a/reference/filesystem/functions/filectime.xml +++ b/reference/filesystem/functions/filectime.xml @@ -41,6 +41,11 @@
+ + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -64,11 +69,6 @@ if (file_exists($filename)) { - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; diff --git a/reference/filesystem/functions/filegroup.xml b/reference/filesystem/functions/filegroup.xml index 42aa65b4e9..63ac863d73 100644 --- a/reference/filesystem/functions/filegroup.xml +++ b/reference/filesystem/functions/filegroup.xml @@ -44,6 +44,13 @@
+ + &reftitle.errors; + + Upon failure, an E_WARNING is emitted. + + + &reftitle.examples; @@ -61,13 +68,6 @@ print_r(posix_getgrgid(filegroup($filename))); - - &reftitle.errors; - - Upon failure, an E_WARNING is emitted. - - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/fileinode.xml b/reference/filesystem/functions/fileinode.xml index 924ccfe236..6ec8d09dc9 100644 --- a/reference/filesystem/functions/fileinode.xml +++ b/reference/filesystem/functions/fileinode.xml @@ -40,6 +40,11 @@
+ + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -59,11 +64,6 @@ if (getmyinode() == fileinode($filename)) { - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/filemtime.xml b/reference/filesystem/functions/filemtime.xml index 66862bc8ee..1f702de7f0 100644 --- a/reference/filesystem/functions/filemtime.xml +++ b/reference/filesystem/functions/filemtime.xml @@ -43,6 +43,11 @@
+ + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -64,11 +69,6 @@ if (file_exists($filename)) { - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.filesystem-time-res; diff --git a/reference/filesystem/functions/fileowner.xml b/reference/filesystem/functions/fileowner.xml index 7ecc9a8e31..0828a5fc2d 100644 --- a/reference/filesystem/functions/fileowner.xml +++ b/reference/filesystem/functions/fileowner.xml @@ -42,6 +42,11 @@
+ + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -59,11 +64,6 @@ print_r(posix_getpwuid(fileowner($filename))); - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/fileperms.xml b/reference/filesystem/functions/fileperms.xml index 1b861a23d3..d7f14d9892 100644 --- a/reference/filesystem/functions/fileperms.xml +++ b/reference/filesystem/functions/fileperms.xml @@ -56,6 +56,11 @@ + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -145,11 +150,6 @@ echo $info; - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/filesize.xml b/reference/filesystem/functions/filesize.xml index ea9c104723..e7c14236be 100644 --- a/reference/filesystem/functions/filesize.xml +++ b/reference/filesystem/functions/filesize.xml @@ -42,6 +42,11 @@ &fs.file.32bit; + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -63,11 +68,6 @@ echo $filename . ': ' . filesize($filename) . ' bytes'; - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/filetype.xml b/reference/filesystem/functions/filetype.xml index 6ac4e41e8c..edb4d86525 100644 --- a/reference/filesystem/functions/filetype.xml +++ b/reference/filesystem/functions/filetype.xml @@ -46,6 +46,11 @@ + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -65,11 +70,6 @@ echo filetype('/etc/'); // dir - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/flock.xml b/reference/filesystem/functions/flock.xml index 625ecb0523..d6eedaca2c 100644 --- a/reference/filesystem/functions/flock.xml +++ b/reference/filesystem/functions/flock.xml @@ -20,9 +20,8 @@ derivatives and even Windows). - On versions of PHP before 5.3.2, the lock is released also by - fclose (which is also called automatically when script - finished). + The lock is released also by fclose, + or when stream is garbage collected. PHP supports a portable way of locking complete files in an advisory way @@ -190,6 +189,12 @@ fclose($fp); return &false; under these environments. + + + On Windows, if the locking process opens the file a second time, it cannot + access the file through this second handle until it unlocks the file. + + diff --git a/reference/filesystem/functions/fopen.xml b/reference/filesystem/functions/fopen.xml index 5fb9c2b399..b7da18d2fe 100644 --- a/reference/filesystem/functions/fopen.xml +++ b/reference/filesystem/functions/fopen.xml @@ -123,9 +123,8 @@ $handle = fopen("c:\\folder\\resource.txt", "r"); 'w+' - Open for reading and writing; place the file pointer at - the beginning of the file and truncate the file to zero - length. If the file does not exist, attempt to create it. + Open for reading and writing; otherwise it has the + same behavior as 'w'. diff --git a/reference/filesystem/functions/fpassthru.xml b/reference/filesystem/functions/fpassthru.xml index 8e3ae01dcb..b94c116f74 100644 --- a/reference/filesystem/functions/fpassthru.xml +++ b/reference/filesystem/functions/fpassthru.xml @@ -46,9 +46,7 @@ &reftitle.returnvalues; - If an error occurs, fpassthru returns - &false;. Otherwise, fpassthru returns - the number of characters read from stream + Returns the number of characters read from stream and passed through to the output. diff --git a/reference/filesystem/functions/fputcsv.xml b/reference/filesystem/functions/fputcsv.xml index 145b64781c..f6298697cf 100644 --- a/reference/filesystem/functions/fputcsv.xml +++ b/reference/filesystem/functions/fputcsv.xml @@ -12,7 +12,7 @@ intfalsefputcsv resourcehandle arrayfields - stringdelimiter"," + stringseparator"," stringenclosure'"' stringescape_char"\\" @@ -42,11 +42,11 @@
- delimiter + separator - The optional delimiter parameter sets the field - delimiter (one character only). + The optional separator parameter sets the field + delimiter (one single-byte character only). @@ -55,7 +55,7 @@ The optional enclosure parameter sets the field - enclosure (one character only). + enclosure (one single-byte character only). @@ -64,7 +64,7 @@ The optional escape_char parameter sets the - escape character (at most one character). + escape character (at most one single-byte character). An empty string ("") disables the proprietary escape mechanism. @@ -106,12 +106,6 @@ string to disable the proprietary escape mechanism. - - 5.5.4 - - The escape_char parameter was added - - diff --git a/reference/filesystem/functions/fread.xml b/reference/filesystem/functions/fread.xml index 05ac6b0e18..f0d0619ab3 100644 --- a/reference/filesystem/functions/fread.xml +++ b/reference/filesystem/functions/fread.xml @@ -132,7 +132,6 @@ fclose($handle); string is reached, whichever comes first. - - Note that if the length argument is given, - then the magic_quotes_runtime - configuration option will be ignored and no slashes will be - stripped from string. - @@ -69,68 +62,6 @@ - - &reftitle.notes; - - - Writing to a network stream may end before the whole string is written. - Return value of fwrite may be checked: - - -]]> - - - - - - - On systems which differentiate between binary and text files - (i.e. Windows) the file must be opened with 'b' included in - fopen mode parameter. - - - - - If handle was fopened in - append mode, fwrites are atomic (unless the size of - string exceeds the filesystem's block size, on some - platforms, and as long as the file is on a local filesystem). That is, - there is no need to flock a resource before calling - fwrite; all of the data will be written without - interruption. - - - - - If writing twice to the file pointer, then the data will be appended to - the end of the file content: - - -]]> - - - - - &reftitle.examples; @@ -173,6 +104,68 @@ if (is_writable($filename)) { + + &reftitle.notes; + + + Writing to a network stream may end before the whole string is written. + Return value of fwrite may be checked: + + +]]> + + + + + + + On systems which differentiate between binary and text files + (i.e. Windows) the file must be opened with 'b' included in + fopen mode parameter. + + + + + If handle was fopened in + append mode, fwrites are atomic (unless the size of + string exceeds the filesystem's block size, on some + platforms, and as long as the file is on a local filesystem). That is, + there is no need to flock a resource before calling + fwrite; all of the data will be written without + interruption. + + + + + If writing twice to the file pointer, then the data will be appended to + the end of the file content: + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/filesystem/functions/is-dir.xml b/reference/filesystem/functions/is-dir.xml index fd557caf8c..8657c1a1fd 100644 --- a/reference/filesystem/functions/is-dir.xml +++ b/reference/filesystem/functions/is-dir.xml @@ -46,6 +46,11 @@ + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -73,11 +78,6 @@ bool(true) - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/is-executable.xml b/reference/filesystem/functions/is-executable.xml index 2edf1f49b5..75c6518567 100644 --- a/reference/filesystem/functions/is-executable.xml +++ b/reference/filesystem/functions/is-executable.xml @@ -41,6 +41,11 @@ + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -65,11 +70,6 @@ if (is_executable($file)) { - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/is-file.xml b/reference/filesystem/functions/is-file.xml index 426e4a5d46..5c578ac02d 100644 --- a/reference/filesystem/functions/is-file.xml +++ b/reference/filesystem/functions/is-file.xml @@ -42,6 +42,11 @@ &fs.file.32bit; + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -66,11 +71,6 @@ bool(false) - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/is-link.xml b/reference/filesystem/functions/is-link.xml index 6e0cb851f6..e97dc083ac 100644 --- a/reference/filesystem/functions/is-link.xml +++ b/reference/filesystem/functions/is-link.xml @@ -41,6 +41,11 @@ + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -63,11 +68,6 @@ if (is_link($link)) { - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/is-readable.xml b/reference/filesystem/functions/is-readable.xml index 17f1f37c77..375790ed1e 100644 --- a/reference/filesystem/functions/is-readable.xml +++ b/reference/filesystem/functions/is-readable.xml @@ -41,6 +41,11 @@ + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -62,17 +67,11 @@ if (is_readable($filename)) { - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; Keep in mind that PHP may be accessing the file as the user - id that the web server runs as (often 'nobody'). Safe mode - limitations are not taken into account before PHP 5.1.5. + id that the web server runs as (often 'nobody'). ¬e.clearstatcache; &tip.fopen-wrapper.stat; diff --git a/reference/filesystem/functions/is-writable.xml b/reference/filesystem/functions/is-writable.xml index 423005626f..7eac0d6ed5 100644 --- a/reference/filesystem/functions/is-writable.xml +++ b/reference/filesystem/functions/is-writable.xml @@ -48,6 +48,11 @@ + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -69,11 +74,6 @@ if (is_writable($filename)) { - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; diff --git a/reference/filesystem/functions/lstat.xml b/reference/filesystem/functions/lstat.xml index 2e6ecc74a6..3c3b6561fa 100644 --- a/reference/filesystem/functions/lstat.xml +++ b/reference/filesystem/functions/lstat.xml @@ -49,6 +49,11 @@ + + &reftitle.errors; + &fs.emits.warning.on.failure; + + &reftitle.examples; @@ -86,11 +91,6 @@ Array - - &reftitle.errors; - &fs.emits.warning.on.failure; - - &reftitle.notes; ¬e.clearstatcache; diff --git a/reference/filesystem/functions/mkdir.xml b/reference/filesystem/functions/mkdir.xml index f188296c1d..230204e1e2 100644 --- a/reference/filesystem/functions/mkdir.xml +++ b/reference/filesystem/functions/mkdir.xml @@ -10,13 +10,13 @@ &reftitle.description; boolmkdir - stringpathname - intmode0777 + stringdirectory + intpermissions0777 boolrecursive&false; resourcecontext - Attempts to create the directory specified by pathname. + Attempts to create the directory specified by directory. @@ -25,7 +25,7 @@ - pathname + directory The directory path. @@ -33,21 +33,21 @@ - mode + permissions - The mode is 0777 by default, which means the widest possible - access. For more information on modes, read the details + The permissions are 0777 by default, which means the widest possible + access. For more information on permissions, read the details on the chmod page. - mode is ignored on Windows. + permissions is ignored on Windows. - Note that you probably want to specify the mode as an octal number, - which means it should have a leading zero. The mode is also modified + Note that you probably want to specify the permissions as an octal number, + which means it should have a leading zero. The permissions is also modified by the current umask, which you can change using umask. @@ -58,7 +58,7 @@ Allows the creation of nested directories specified in the - pathname. + directory. @@ -79,6 +79,18 @@ + + &reftitle.errors; + + Emits an E_WARNING level error if the directory + already exists. + + + Emits an E_WARNING level error if the relevant + permissions prevent creating the directory. + + + &reftitle.examples; @@ -99,14 +111,14 @@ mkdir("/path/to/my/dir", 0700); - - &reftitle.errors; - - Emits an E_WARNING level error if the directory - already exists. - - - Emits an E_WARNING level error if the relevant - permissions prevent creating the directory. - - - &reftitle.seealso; diff --git a/reference/filesystem/functions/parse-ini-file.xml b/reference/filesystem/functions/parse-ini-file.xml index ce592c3ac5..b0b5fe3a68 100644 --- a/reference/filesystem/functions/parse-ini-file.xml +++ b/reference/filesystem/functions/parse-ini-file.xml @@ -203,8 +203,7 @@ function yesno($expression) return($expression ? 'Yes' : 'No'); } -// Get the path to php.ini using the php_ini_loaded_file() -// function available as of PHP 5.2.4 +// Get the path to php.ini using the php_ini_loaded_file() function $ini_path = php_ini_loaded_file(); // Parse php.ini @@ -296,7 +295,7 @@ also_five = ${five} Values null, off, no and false result in "", and values on, yes and true result - in "1", unless INI_SCANNER_TYPED mode is used (as of PHP 5.6.1). + in "1", unless INI_SCANNER_TYPED mode is used. Characters ?{}|&~!()^" must not be used anywhere in the key and have a special meaning in the value. diff --git a/reference/filesystem/functions/pathinfo.xml b/reference/filesystem/functions/pathinfo.xml index 403fd7b157..da328a319f 100644 --- a/reference/filesystem/functions/pathinfo.xml +++ b/reference/filesystem/functions/pathinfo.xml @@ -25,6 +25,13 @@ predefined reserved variables. + + + pathinfo operates naively on the input string, + and is not aware of the actual filesystem, or path components such + as "..". + + pathinfo is locale aware, so for it to parse a path @@ -116,7 +123,7 @@ $path_parts = pathinfo('/www/htdocs/inc/lib.inc.php'); echo $path_parts['dirname'], "\n"; echo $path_parts['basename'], "\n"; echo $path_parts['extension'], "\n"; -echo $path_parts['filename'], "\n"; // since PHP 5.2.0 +echo $path_parts['filename'], "\n"; ?> ]]> diff --git a/reference/filesystem/functions/realpath-cache-get.xml b/reference/filesystem/functions/realpath-cache-get.xml index e9e0839bac..64a0b0d3e4 100644 --- a/reference/filesystem/functions/realpath-cache-get.xml +++ b/reference/filesystem/functions/realpath-cache-get.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/filesystem/functions/realpath-cache-size.xml b/reference/filesystem/functions/realpath-cache-size.xml index c65c6a8a36..a14d8bfc48 100644 --- a/reference/filesystem/functions/realpath-cache-size.xml +++ b/reference/filesystem/functions/realpath-cache-size.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/filesystem/functions/rmdir.xml b/reference/filesystem/functions/rmdir.xml index d5e82d332f..8e51b21a64 100644 --- a/reference/filesystem/functions/rmdir.xml +++ b/reference/filesystem/functions/rmdir.xml @@ -10,11 +10,11 @@ &reftitle.description; boolrmdir - stringdirname + stringdirectory resourcecontext - Attempts to remove the directory named by dirname. + Attempts to remove the directory named by directory. The directory must be empty, and the relevant permissions must permit this. A E_WARNING level error will be generated on failure. @@ -25,7 +25,7 @@ - dirname + directory Path to the directory. diff --git a/reference/filesystem/functions/stat.xml b/reference/filesystem/functions/stat.xml index 02f9764262..6e3bbd5e7a 100644 --- a/reference/filesystem/functions/stat.xml +++ b/reference/filesystem/functions/stat.xml @@ -70,7 +70,7 @@ 2 mode - inode protection mode + inode protection mode ***** 3 @@ -145,6 +145,11 @@ which is a 64-bit unsigned integer, so may overflow. Previously, it was always 0. + + ***** On Windows, the writable permission bit is set according to the read-only + file attribute, and the same value is reported for all users, group and owner. + The ACL is not taken into account, contrary to is_writable. + The value of mode contains information read by several functions. When written in octal, starting from the right, the first three digits are returned by diff --git a/reference/filesystem/functions/tmpfile.xml b/reference/filesystem/functions/tmpfile.xml index ca3c9ba262..ee559e993c 100644 --- a/reference/filesystem/functions/tmpfile.xml +++ b/reference/filesystem/functions/tmpfile.xml @@ -29,6 +29,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/filesystem/functions/touch.xml b/reference/filesystem/functions/touch.xml index 0d91f6095a..9cb0c9fa5e 100644 --- a/reference/filesystem/functions/touch.xml +++ b/reference/filesystem/functions/touch.xml @@ -112,12 +112,6 @@ if (!touch('some_file.txt', $time)) { &reftitle.notes; ¬e.filesystem-time-res; - - - Prior to PHP 5.3.0 it was not possible to change the modification time - of a directory with this function under Windows. - - diff --git a/reference/filesystem/ini.xml b/reference/filesystem/ini.xml index f36d265143..0b480bd107 100644 --- a/reference/filesystem/ini.xml +++ b/reference/filesystem/ini.xml @@ -26,7 +26,7 @@ allow_url_include "0" PHP_INI_SYSTEM - Available since PHP 5.2.0. Deprecated as of PHP 7.4.0. + Deprecated as of PHP 7.4.0. user_agent @@ -56,7 +56,7 @@ sys_temp_dir "" PHP_INI_SYSTEM - Available since PHP 5.5.0. + diff --git a/reference/filter/configure.xml b/reference/filter/configure.xml index f3400942d8..1ee2e82213 100644 --- a/reference/filter/configure.xml +++ b/reference/filter/configure.xml @@ -3,12 +3,8 @@
&reftitle.install; - The filter extension is enabled by default as of PHP 5.2.0. + The filter extension is enabled by default. To disable the filter extension, use . - - - Before PHP 5.2 an experimental PECL extension was used, however, the PECL version - is no longer recommended or updated.
diff --git a/reference/filter/constants.xml b/reference/filter/constants.xml index 669e71730f..82beb19e09 100644 --- a/reference/filter/constants.xml +++ b/reference/filter/constants.xml @@ -150,6 +150,17 @@ + + + FILTER_VALIDATE_BOOL + (int) + + + + Alias of FILTER_VALIDATE_BOOLEAN. + + + FILTER_VALIDATE_BOOLEAN @@ -236,7 +247,6 @@ ID of "validate_mac_address" filter. - (Available as of PHP 5.5.0) @@ -359,7 +369,9 @@ ID of "magic_quotes" filter. - (Deprecated per PHP 7.3.0, use FILTER_SANITIZE_ADD_SLASHES instead.) + (DEPRECATED as of PHP 7.3.0 and + REMOVED as of PHP 8.0.0, + use FILTER_SANITIZE_ADD_SLASHES instead.) @@ -438,7 +450,6 @@ Strips backtick characters. - (Available as of PHP 5.3.2) diff --git a/reference/filter/filters.xml b/reference/filter/filters.xml index fb90bfe713..8f87672f34 100644 --- a/reference/filter/filters.xml +++ b/reference/filter/filters.xml @@ -21,7 +21,10 @@ - FILTER_VALIDATE_BOOLEAN + + FILTER_VALIDATE_BOOLEAN, + FILTER_VALIDATE_BOOL + "boolean" default @@ -48,7 +51,8 @@ default - FILTER_FLAG_HOSTNAME + FILTER_FLAG_HOSTNAME, + FILTER_NULL_ON_FAILURE @@ -71,15 +75,16 @@ default - FILTER_FLAG_EMAIL_UNICODE + FILTER_FLAG_EMAIL_UNICODE, + FILTER_NULL_ON_FAILURE Validates whether the value is a valid e-mail address. - In general, this validates e-mail addresses against the syntax in - RFC 822, with the exceptions that comments and whitespace folding + In general, this validates e-mail addresses against the addr-specsyntax in + RFC 822, with the exceptions that comments and whitespace folding and dotless domain names are not supported. @@ -95,7 +100,8 @@ max_range - FILTER_FLAG_ALLOW_THOUSAND + FILTER_FLAG_ALLOW_THOUSAND, + FILTER_NULL_ON_FAILURE Validates value as float, optionally from the specified range, and converts to float on success. @@ -109,7 +115,8 @@ FILTER_FLAG_ALLOW_OCTAL, - FILTER_FLAG_ALLOW_HEX + FILTER_FLAG_ALLOW_HEX, + FILTER_NULL_ON_FAILURE Validates value as integer, optionally from the specified range, and converts to int on success. @@ -123,7 +130,8 @@ FILTER_FLAG_IPV4, FILTER_FLAG_IPV6, FILTER_FLAG_NO_PRIV_RANGE, - FILTER_FLAG_NO_RES_RANGE + FILTER_FLAG_NO_RES_RANGE, + FILTER_NULL_ON_FAILURE Validates value as IP address, optionally only IPv4 or IPv6 or not @@ -136,7 +144,9 @@ default - + + FILTER_NULL_ON_FAILURE + Validates value as MAC address. @@ -146,7 +156,9 @@ default, regexp - + + FILTER_NULL_ON_FAILURE + Validates value against regexp, a Perl-compatible regular expression. @@ -162,7 +174,8 @@ FILTER_FLAG_SCHEME_REQUIRED, FILTER_FLAG_HOST_REQUIRED, FILTER_FLAG_PATH_REQUIRED, - FILTER_FLAG_QUERY_REQUIRED + FILTER_FLAG_QUERY_REQUIRED, + FILTER_NULL_ON_FAILURE Validates value as URL (according to &url.rfc;2396), optionally with required components. Beware a valid URL may not specify the HTTP protocol http:// so further validation may be required to determine the URL uses an expected protocol, e.g. ssh:// or mailto:. Note that the function will only find ASCII URLs to be valid; internationalized domain names (containing non-ASCII characters) will fail. @@ -172,13 +185,8 @@
- As of PHP 5.4.11, the numbers +0 and -0 validate as both integers as well - as floats (using FILTER_VALIDATE_FLOAT and - FILTER_VALIDATE_INT). Before PHP 5.4.11 they only - validated as floats (using FILTER_VALIDATE_FLOAT). - - - When default is set to option, default's value is used if value is not validated. + When default is set to option, + default's value is used if value is not validated. @@ -194,6 +202,13 @@ + + 8.0.0 + + Added FILTER_VALIDATE_BOOL as an alias for FILTER_VALIDATE_BOOLEAN. + Using FILTER_VALIDATE_BOOL is preferred. + + 7.4.0 @@ -207,20 +222,6 @@ Added FILTER_FLAG_HOSTNAME and FILTER_VALIDATE_DOMAIN. - - 5.5.0 - - Added FILTER_VALIDATE_MAC. - - - - 5.2.1 - - FILTER_VALIDATE_URL now implicitly uses - FILTER_FLAG_SCHEME_REQUIRED and - FILTER_FLAG_HOST_REQUIRED. - - @@ -271,7 +272,18 @@ FILTER_SANITIZE_MAGIC_QUOTES "magic_quotes" - Apply addslashes. + + Apply addslashes. + (DEPRECATED as of PHP 7.3.0 and + REMOVED as of PHP 8.0.0, + use FILTER_SANITIZE_ADD_SLASHES instead.) + + + + FILTER_SANITIZE_ADD_SLASHES + "add_slashes" + + Apply addslashes. (Available as of PHP 7.3.0) FILTER_SANITIZE_NUMBER_FLOAT @@ -304,7 +316,7 @@ FILTER_FLAG_ENCODE_HIGH - HTML-escape '"<>& and characters with + HTML-encode '"<>& and characters with ASCII value less than 32, optionally strip or encode other special characters. @@ -335,7 +347,11 @@ FILTER_FLAG_ENCODE_HIGH, FILTER_FLAG_ENCODE_AMP - Strip tags, optionally strip or encode special characters. + + Strip tags and HTML-encode double and single quotes, optionally strip + or encode special characters. Encoding quotes can be + disabled by setting FILTER_FLAG_NO_ENCODE_QUOTES. + FILTER_SANITIZE_STRIPPED @@ -403,10 +419,22 @@ filter.default_flags = 0 - 5.2.11/5.3.1 + 8.0.0 - Slashes (/) are removed by - FILTER_SANITIZE_EMAIL. Prior they were retained. + FILTER_SANITIZE_MAGIC_QUOTES has been removed. + + + + 7.3.0 + + FILTER_SANITIZE_ADD_SLASHES was added as a + replacement for FILTER_SANITIZE_MAGIC_QUOTES + + + + 7.3.0 + + FILTER_SANITIZE_MAGIC_QUOTES has been deprecated. @@ -578,10 +606,10 @@ filter.default_flags = 0 FILTER_NULL_ON_FAILURE - FILTER_VALIDATE_BOOLEAN + any FILTER_VALIDATE_* - Returns &null; for unrecognized boolean values. + Returns &null; for unrecognized values. @@ -666,6 +694,10 @@ filter.default_flags = 0 ::1/128, ::/128, ::ffff:0:0/96 and fe80::/10. + + These are the ranges that are marked as Reserved-By-Protocol in + RFC 6890. + @@ -759,18 +791,6 @@ filter.default_flags = 0 FILTER_FLAG_EMAIL_UNICODE has been added. - - 5.3.2 - - FILTER_FLAG_STRIP_BACKTICK has been added. - - - - 5.2.10 - - FILTER_FLAG_NO_RES_RANGE supports also IPv6 addresses. - - diff --git a/reference/filter/functions/filter-list.xml b/reference/filter/functions/filter-list.xml index 0345c35da6..a6561efa39 100644 --- a/reference/filter/functions/filter-list.xml +++ b/reference/filter/functions/filter-list.xml @@ -14,6 +14,12 @@
+ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/filter/ini.xml b/reference/filter/ini.xml index 771943b719..bdac02248c 100644 --- a/reference/filter/ini.xml +++ b/reference/filter/ini.xml @@ -20,13 +20,13 @@ filter.default "unsafe_raw" PHP_INI_PERDIR - PHP_INI_ALL in filter <= 0.9.4. Available since PHP 5.2.0. + filter.default_flags NULL PHP_INI_PERDIR - PHP_INI_ALL in filter <= 0.9.4. Available since PHP 5.2.0. + diff --git a/reference/fpm/book.xml b/reference/fpm/book.xml index 0748549b12..613b36d31e 100644 --- a/reference/fpm/book.xml +++ b/reference/fpm/book.xml @@ -12,7 +12,7 @@ with some additional features (mostly) useful for heavy-loaded sites. - This SAPI is bundled with PHP 5.3.3 and later. + This SAPI is bundled with PHP.
diff --git a/reference/fpm/functions/fastcgi-finish-request.xml b/reference/fpm/functions/fastcgi-finish-request.xml index 683b4167ea..04e9c38153 100644 --- a/reference/fpm/functions/fastcgi-finish-request.xml +++ b/reference/fpm/functions/fastcgi-finish-request.xml @@ -20,6 +20,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/ftp/configure.xml b/reference/ftp/configure.xml index 81cf5789e2..a386e6bf12 100644 --- a/reference/ftp/configure.xml +++ b/reference/ftp/configure.xml @@ -8,11 +8,7 @@ installing PHP. - The Windows version of PHP 5 has built-in support for this extension. You do - not need to load any additional extensions in order to use these functions. - - - As of PHP 7.0.0 on Windows this extension is always built as shared extension + On Windows this extension is always built as shared extension and as such has to be enabled in &php.ini;.
diff --git a/reference/ftp/constants.xml b/reference/ftp/constants.xml index 629feaafda..b9f3701c15 100644 --- a/reference/ftp/constants.xml +++ b/reference/ftp/constants.xml @@ -115,7 +115,6 @@ See ftp_set_option for information. - Available as of PHP 5.6.0. diff --git a/reference/funchand/functions/call-user-func-array.xml b/reference/funchand/functions/call-user-func-array.xml index 2d54fb6c74..e3ff3e274c 100644 --- a/reference/funchand/functions/call-user-func-array.xml +++ b/reference/funchand/functions/call-user-func-array.xml @@ -99,10 +99,8 @@ class Foo { } } -// As of PHP 5.3.0 call_user_func_array(__NAMESPACE__ .'\Foo::test', array('Hannes')); -// As of PHP 5.3.0 call_user_func_array(array(__NAMESPACE__ .'\Foo', 'test'), array('Philip')); ?> @@ -126,7 +124,7 @@ $func = function($arg1, $arg2) { return $arg1 * $arg2; }; -var_dump(call_user_func_array($func, array(2, 4))); /* As of PHP 5.3.0 */ +var_dump(call_user_func_array($func, array(2, 4))); ?> ]]> @@ -168,24 +166,6 @@ global $bar=55 &reftitle.notes; - - - Before PHP 5.4, referenced variables in args - are passed to the function by reference, regardless of whether the function - expects the respective parameter to be passed by reference. This form of - call-time pass by reference does not emit a deprecation notice, but it is - nonetheless deprecated, and has been removed in PHP 5.4. - Furthermore, this does not apply to internal functions, for which - the function signature is honored. Passing by value when the function - expects a parameter by reference results in a warning and having - call_user_func return &false; (there is, however, an - exception for passed values with reference count = 1, such as in literals, - as these can be turned into references without ill effects — but also - without writes to that value having any effect —; do not rely - in this behavior, though, as the reference count is an implementation - detail and the soundness of this behavior is questionable). - - ¬e.func-callback-exceptions; diff --git a/reference/funchand/functions/call-user-func.xml b/reference/funchand/functions/call-user-func.xml index 0a553e0ddd..608452babb 100644 --- a/reference/funchand/functions/call-user-func.xml +++ b/reference/funchand/functions/call-user-func.xml @@ -125,8 +125,8 @@ class Foo { } } -call_user_func(__NAMESPACE__ .'\Foo::test'); // As of PHP 5.3.0 -call_user_func(array(__NAMESPACE__ .'\Foo', 'test')); // As of PHP 5.3.0 +call_user_func(__NAMESPACE__ .'\Foo::test'); +call_user_func(array(__NAMESPACE__ .'\Foo', 'test')); ?> ]]> @@ -155,7 +155,7 @@ class myclass { $classname = "myclass"; call_user_func(array($classname, 'say_hello')); -call_user_func($classname .'::say_hello'); // As of 5.2.3 +call_user_func($classname .'::say_hello'); $myobject = new myclass(); @@ -178,7 +178,7 @@ Hello! ]]> diff --git a/reference/funchand/functions/create-function.xml b/reference/funchand/functions/create-function.xml index 6f85c9a595..e68786033c 100644 --- a/reference/funchand/functions/create-function.xml +++ b/reference/funchand/functions/create-function.xml @@ -28,7 +28,7 @@ and memory usage characteristics. - If you are using PHP 5.3.0 or newer a native + A native anonymous function should be used instead.
diff --git a/reference/funchand/functions/func-get-arg.xml b/reference/funchand/functions/func-get-arg.xml index ec83247a56..3e55ab2bb8 100644 --- a/reference/funchand/functions/func-get-arg.xml +++ b/reference/funchand/functions/func-get-arg.xml @@ -10,7 +10,7 @@ &reftitle.description; mixedfunc_get_arg - intarg_num + intposition Gets the specified argument from a user-defined function's argument list. @@ -27,7 +27,7 @@ - arg_num + position The argument offset. Function arguments are counted starting from @@ -50,7 +50,7 @@ &reftitle.errors; Generates a warning if called from outside of a user-defined function, or - if arg_num is greater than the number of arguments + if position is greater than the number of arguments actually passed. @@ -81,50 +81,6 @@ foo(1, 2, 3); - - - - - - <function>func_get_arg</function> example before and - after PHP 5.3 - - - -fga.inc - -]]> - - - Output previous to PHP 5.3: - - - - - - Output in PHP 5.3 and later: - - - @@ -154,18 +110,11 @@ byRef($arg); ?> ]]> - &example.outputs.7; + &example.outputs; As passed : 'bar' After change : 'baz' As passed : 'bar' -After change : 'baz' - - &example.outputs.5; - -As passed : 'bar' -After change : 'bar' -As passed : 'bar' After change : 'baz' @@ -175,7 +124,6 @@ After change : 'baz' &reftitle.notes; - ¬e.funcnoparam; ¬e.funcbyref; @@ -189,7 +137,7 @@ After change : 'baz' &reftitle.seealso; - ... syntax in PHP 5.6+ + ... syntax func_get_args func_num_args @@ -197,7 +145,6 @@ After change : 'baz' - + Gearman Gearman diff --git a/reference/gender/book.xml b/reference/gender/book.xml index fd23e8933c..f71f6a8caa 100644 --- a/reference/gender/book.xml +++ b/reference/gender/book.xml @@ -2,6 +2,7 @@ + Determine gender of firstnames Gender diff --git a/reference/geoip/book.xml b/reference/geoip/book.xml index ce81383a72..9cd3a2e33b 100644 --- a/reference/geoip/book.xml +++ b/reference/geoip/book.xml @@ -1,7 +1,6 @@ - - + Geo IP Location GeoIP @@ -45,4 +44,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> - diff --git a/reference/geoip/functions/geoip-db-get-all-info.xml b/reference/geoip/functions/geoip-db-get-all-info.xml index ea7c3594bd..4144e61bae 100644 --- a/reference/geoip/functions/geoip-db-get-all-info.xml +++ b/reference/geoip/functions/geoip-db-get-all-info.xml @@ -47,6 +47,12 @@ + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/gettext/functions/bindtextdomain.xml b/reference/gettext/functions/bindtextdomain.xml index bac3a5fc17..2fbecd2d0e 100644 --- a/reference/gettext/functions/bindtextdomain.xml +++ b/reference/gettext/functions/bindtextdomain.xml @@ -36,6 +36,7 @@ The directory path. + An empty string means the current directory. If &null;, the currently set directory is returned. diff --git a/reference/gmagick/book.xml b/reference/gmagick/book.xml index 5625069e72..6865a38395 100644 --- a/reference/gmagick/book.xml +++ b/reference/gmagick/book.xml @@ -2,6 +2,7 @@ + Gmagick Gmagick diff --git a/reference/gmagick/constants.xml b/reference/gmagick/constants.xml index 9a6a07703d..047d80486a 100644 --- a/reference/gmagick/constants.xml +++ b/reference/gmagick/constants.xml @@ -3029,6 +3029,75 @@ + + + + + + Interlace constants + + + Gmagick::INTERLACE_UNDEFINED + (int) + + + + + + + + + + Gmagick::INTERLACE_NO + (int) + + + + + + + + + + Gmagick::INTERLACE_NONE + (int) + + + + + + + + + + Gmagick::INTERLACE_LINE + (int) + + + + + + + + + + Gmagick::INTERLACE_PLANE + (int) + + + + + + + + + + Gmagick::INTERLACE_PARTITION + (int) + + + + diff --git a/reference/gmagick/gmagick/annotateimage.xml b/reference/gmagick/gmagick/annotateimage.xml index 3a2e43a190..f4353795e0 100644 --- a/reference/gmagick/gmagick/annotateimage.xml +++ b/reference/gmagick/gmagick/annotateimage.xml @@ -30,7 +30,7 @@ GmagickDraw - The GmagickDraw object that contains settings for drawing the text + The GmagickDraw object that contains settings for drawing the text. @@ -38,7 +38,7 @@ x - Horizontal offset in pixels to the left of text + Horizontal offset in pixels to the left of text. @@ -46,7 +46,7 @@ y - Vertical offset in pixels to the baseline of text + Vertical offset in pixels to the baseline of text. @@ -54,7 +54,7 @@ angle - The angle at which to write the text + The angle at which to write the text. @@ -62,7 +62,7 @@ text - The string to draw + The string to draw. @@ -73,7 +73,7 @@ &reftitle.returnvalues; - The Gmagick object with annotation made. + The Gmagick object with annotation made. diff --git a/reference/gmagick/gmagick/blurimage.xml b/reference/gmagick/gmagick/blurimage.xml index 3b23dedb54..e5d90869b2 100644 --- a/reference/gmagick/gmagick/blurimage.xml +++ b/reference/gmagick/gmagick/blurimage.xml @@ -47,7 +47,7 @@ &reftitle.returnvalues; - The blurred Gmagick object + The blurred Gmagick object diff --git a/reference/gmagick/gmagick/borderimage.xml b/reference/gmagick/gmagick/borderimage.xml index 0c8cfd7fbb..598bb653ff 100644 --- a/reference/gmagick/gmagick/borderimage.xml +++ b/reference/gmagick/gmagick/borderimage.xml @@ -16,7 +16,7 @@ intheight - Surrounds the image with a border of the color defined by the bordercolor GmagickPixel object or a color string. + Surrounds the image with a border of the color defined by the bordercolor GmagickPixel object or a color string. @@ -28,7 +28,7 @@ color - GmagickPixel object or a string containing the border color + GmagickPixel object or a string containing the border color. @@ -36,7 +36,7 @@ width - Border width + Border width. @@ -44,7 +44,7 @@ height - Border height + Border height. @@ -55,7 +55,7 @@ &reftitle.returnvalues; - The Gmagick object with border defined + The Gmagick object with border defined. diff --git a/reference/gmagick/gmagick/charcoalimage.xml b/reference/gmagick/gmagick/charcoalimage.xml index 0515d7ffd6..93e613104a 100644 --- a/reference/gmagick/gmagick/charcoalimage.xml +++ b/reference/gmagick/gmagick/charcoalimage.xml @@ -27,7 +27,7 @@ radius - The radius of the Gaussian, in pixels, not counting the center pixel + The radius of the Gaussian, in pixels, not counting the center pixel. @@ -35,7 +35,7 @@ sigma - The standard deviation of the Gaussian, in pixels + The standard deviation of the Gaussian, in pixels. @@ -46,7 +46,7 @@ &reftitle.returnvalues; - The Gmagick object with charcoal simulation + The Gmagick object with charcoal simulation. diff --git a/reference/gmagick/gmagick/chopimage.xml b/reference/gmagick/gmagick/chopimage.xml index c900e55491..44512bb76c 100644 --- a/reference/gmagick/gmagick/chopimage.xml +++ b/reference/gmagick/gmagick/chopimage.xml @@ -29,7 +29,7 @@ width - Width of the chopped area + Width of the chopped area. @@ -37,7 +37,7 @@ height - Height of the chopped area + Height of the chopped area. @@ -45,7 +45,7 @@ x - X origo of the chopped area + X origo of the chopped area. @@ -53,7 +53,7 @@ y - Y origo of the chopped area + Y origo of the chopped area. @@ -64,7 +64,7 @@ &reftitle.returnvalues; - The chopped Gmagick object + The chopped Gmagick object. diff --git a/reference/gmagick/gmagick/clear.xml b/reference/gmagick/gmagick/clear.xml index d1383bbfa6..8a883ff78c 100644 --- a/reference/gmagick/gmagick/clear.xml +++ b/reference/gmagick/gmagick/clear.xml @@ -14,7 +14,7 @@ - Clears all resources associated to Gmagick object + Clears all resources associated to Gmagick object. @@ -26,7 +26,7 @@ &reftitle.returnvalues; - The cleared Gmagick object + The cleared Gmagick object. diff --git a/reference/gmagick/gmagick/commentimage.xml b/reference/gmagick/gmagick/commentimage.xml index f8bd339f91..50985e63af 100644 --- a/reference/gmagick/gmagick/commentimage.xml +++ b/reference/gmagick/gmagick/commentimage.xml @@ -26,7 +26,7 @@ comment - The comment to add + The comment to add. @@ -37,7 +37,7 @@ &reftitle.returnvalues; - The Gmagick object with comment added. + The Gmagick object with comment added. diff --git a/reference/gmagick/gmagick/compositeimage.xml b/reference/gmagick/gmagick/compositeimage.xml index 063c16a574..f18e49a207 100644 --- a/reference/gmagick/gmagick/compositeimage.xml +++ b/reference/gmagick/gmagick/compositeimage.xml @@ -20,8 +20,6 @@ Composite one image onto another at the specified offset. - - @@ -32,7 +30,7 @@ source - Gmagick object which holds the composite image + Gmagick object which holds the composite image. @@ -48,7 +46,7 @@ x - The column offset of the composited image + The column offset of the composited image. @@ -56,7 +54,7 @@ y - The row offset of the composited image + The row offset of the composited image. @@ -67,7 +65,7 @@ &reftitle.returnvalues; - The Gmagick object with compositions. + The Gmagick object with compositions. diff --git a/reference/gmagick/gmagick/construct.xml b/reference/gmagick/gmagick/construct.xml index d5f1475485..5a9d26536c 100644 --- a/reference/gmagick/gmagick/construct.xml +++ b/reference/gmagick/gmagick/construct.xml @@ -14,7 +14,7 @@ stringfilename - The Gmagick constructor. + The Gmagick constructor. @@ -27,7 +27,7 @@ filename - The path to an image to load or array of paths + The path to an image to load or array of paths. @@ -38,7 +38,7 @@ &reftitle.returnvalues; - Returns a new Gmagick object on success. + Returns a new Gmagick object. diff --git a/reference/gmagick/gmagick/cropimage.xml b/reference/gmagick/gmagick/cropimage.xml index 6f3f381afb..8f8094eb1f 100644 --- a/reference/gmagick/gmagick/cropimage.xml +++ b/reference/gmagick/gmagick/cropimage.xml @@ -40,7 +40,7 @@ - The width of the crop + The width of the crop. @@ -50,7 +50,7 @@ - The height of the crop + The height of the crop. @@ -58,7 +58,7 @@ x - The X coordinate of the cropped region's top left corner + The X coordinate of the cropped region's top left corner. @@ -66,7 +66,7 @@ y - The Y coordinate of the cropped region's top left corner + The Y coordinate of the cropped region's top left corner. @@ -77,7 +77,7 @@ &reftitle.returnvalues; - The cropped Gmagick object + The cropped Gmagick object. diff --git a/reference/gmagick/gmagick/cropthumbnailimage.xml b/reference/gmagick/gmagick/cropthumbnailimage.xml index 7d470f152d..532bb7471f 100644 --- a/reference/gmagick/gmagick/cropthumbnailimage.xml +++ b/reference/gmagick/gmagick/cropthumbnailimage.xml @@ -27,7 +27,7 @@ width - The width of the thumbnail + The width of the thumbnail. @@ -35,7 +35,7 @@ height - The Height of the thumbnail + The Height of the thumbnail. @@ -46,7 +46,7 @@ &reftitle.returnvalues; - The cropped Gmagick object + The cropped Gmagick object. diff --git a/reference/gmagick/gmagick/deconstructimages.xml b/reference/gmagick/gmagick/deconstructimages.xml index 50e365c091..3caf02a023 100644 --- a/reference/gmagick/gmagick/deconstructimages.xml +++ b/reference/gmagick/gmagick/deconstructimages.xml @@ -27,7 +27,7 @@ Compares each image with the next in a sequence and returns the maximum bounding &reftitle.returnvalues; - Returns a new Gmagick object on success. + Returns a new Gmagick object. diff --git a/reference/gmagick/gmagick/despeckleimage.xml b/reference/gmagick/gmagick/despeckleimage.xml index 33ee1347d3..123080aea9 100644 --- a/reference/gmagick/gmagick/despeckleimage.xml +++ b/reference/gmagick/gmagick/despeckleimage.xml @@ -26,7 +26,7 @@ &reftitle.returnvalues; - The despeckled Gmagick object on success. + The despeckled Gmagick object. @@ -59,15 +59,6 @@ - - &reftitle.seealso; - - - Classname::Method - - - - - -
- &reftitle.resources; - - Prior to PHP 5.6, most GMP functions operate on or return GMP number - resources. PHP 5.6 onwards uses GMP objects in place - of GMP number resources. - -
- - + GNU Privacy Guard GnuPG diff --git a/reference/hash/book.xml b/reference/hash/book.xml index ab67472c88..4c6ffab544 100644 --- a/reference/hash/book.xml +++ b/reference/hash/book.xml @@ -1,7 +1,5 @@ - - HASH Message Digest Framework @@ -23,7 +21,6 @@ &reference.hash.reference; - - diff --git a/reference/hash/functions/hash-algos.xml b/reference/hash/functions/hash-algos.xml index 8a36714f89..d71b0c496a 100644 --- a/reference/hash/functions/hash-algos.xml +++ b/reference/hash/functions/hash-algos.xml @@ -13,6 +13,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/hash/functions/hash-hmac-algos.xml b/reference/hash/functions/hash-hmac-algos.xml index 9dfbb6cc6b..3a4ae1291f 100644 --- a/reference/hash/functions/hash-hmac-algos.xml +++ b/reference/hash/functions/hash-hmac-algos.xml @@ -15,6 +15,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/hrtime/book.xml b/reference/hrtime/book.xml index d1e0f532a9..cce8f0680c 100644 --- a/reference/hrtime/book.xml +++ b/reference/hrtime/book.xml @@ -2,6 +2,7 @@ + High resolution timing HRTime diff --git a/reference/ibase/book.xml b/reference/ibase/book.xml index a3885704e3..b424561aa6 100644 --- a/reference/ibase/book.xml +++ b/reference/ibase/book.xml @@ -2,12 +2,18 @@ - + Firebird/InterBase &reftitle.intro; + + + &pecl.info.dead.git; + &url.php.git.mirror;pecl-database-interbase. + + Firebird is a relational database offering many ISO SQL-2003 features that runs on Linux, Windows, and a variety of Unix platforms. Firebird diff --git a/reference/ibase/functions/ibase-errcode.xml b/reference/ibase/functions/ibase-errcode.xml index 76a0e51bf6..916d1bad4f 100644 --- a/reference/ibase/functions/ibase-errcode.xml +++ b/reference/ibase/functions/ibase-errcode.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/ibase/functions/ibase-errmsg.xml b/reference/ibase/functions/ibase-errmsg.xml index 434f659b59..bb1236c419 100644 --- a/reference/ibase/functions/ibase-errmsg.xml +++ b/reference/ibase/functions/ibase-errmsg.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/ibm_db2/book.xml b/reference/ibm_db2/book.xml index c39ea1ca86..24df3ec6e6 100644 --- a/reference/ibm_db2/book.xml +++ b/reference/ibm_db2/book.xml @@ -2,6 +2,7 @@ + IBM DB2, Cloudscape and Apache Derby IBM DB2 diff --git a/reference/ibm_db2/functions/db2-prepare.xml b/reference/ibm_db2/functions/db2-prepare.xml index e59f82a930..14224acfa6 100644 --- a/reference/ibm_db2/functions/db2-prepare.xml +++ b/reference/ibm_db2/functions/db2-prepare.xml @@ -155,7 +155,7 @@ if ($stmt) { In the following example, assume that the PHP script has been placed on - a publically accessible Web server and the application provides + a publicly accessible Web server and the application provides different levels of access for different users. We shall also assume that the application issues an SQL statement that updates the privilege level of a newly registered user to the lowest level, taking the user ID diff --git a/reference/iconv/functions/iconv-mime-decode-headers.xml b/reference/iconv/functions/iconv-mime-decode-headers.xml index 0fc1b063ae..f17a1da41e 100644 --- a/reference/iconv/functions/iconv-mime-decode-headers.xml +++ b/reference/iconv/functions/iconv-mime-decode-headers.xml @@ -105,7 +105,7 @@ If more than one field of the same name are present, iconv_mime_decode_headers automatically incorporates them into a numerically indexed array in the order of occurrence. - Note that header names are are not case-insensitive. + Note that header names are not case-insensitive. diff --git a/reference/image/functions/gd-info.xml b/reference/image/functions/gd-info.xml index 0f53436ead..f32da9c001 100644 --- a/reference/image/functions/gd-info.xml +++ b/reference/image/functions/gd-info.xml @@ -16,6 +16,12 @@ library. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/image/functions/image2wbmp.xml b/reference/image/functions/image2wbmp.xml index 8b29f8889a..2e946ff94d 100644 --- a/reference/image/functions/image2wbmp.xml +++ b/reference/image/functions/image2wbmp.xml @@ -27,7 +27,15 @@ &reftitle.parameters; - &gd.image.description; + + image + + + An image resource, returned by one of the image creation functions, + such as imagecreatetruecolor. + + + filename diff --git a/reference/image/functions/imageaffine.xml b/reference/image/functions/imageaffine.xml index 5b09ac2aa1..b0162e1fdb 100644 --- a/reference/image/functions/imageaffine.xml +++ b/reference/image/functions/imageaffine.xml @@ -1,6 +1,5 @@ - imageaffine @@ -10,10 +9,10 @@ &reftitle.description; - resourcefalseimageaffine - resourceimage + GdImagefalseimageaffine + GdImageimage arrayaffine - arrayclip + arraynullclip&null; @@ -39,7 +38,7 @@ clip - Array with keys "x", "y", "width" and "height". + Array with keys "x", "y", "width" and "height"; or &null;. @@ -49,12 +48,40 @@ &reftitle.returnvalues; - Return affined image resource on success&return.falseforfailure;. + Return affined image object on success&return.falseforfailure;. - + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + clip is now nullable. + + + + 8.0.0 + + On success, this function returns a GDImage instance now; + previously, a resource was returned. + + + + + + + - imageaffinematrixconcat @@ -11,8 +10,8 @@ &reftitle.description; arrayfalseimageaffinematrixconcat - arraym1 - arraym2 + arraymatrix1 + arraymatrix2 Returns the concatenation of two affine transformation matrices, @@ -25,7 +24,7 @@ &reftitle.parameters; - m1 + matrix1 An affine transformation matrix (an array with keys @@ -34,7 +33,7 @@ - m2 + matrix2 An affine transformation matrix (an array with keys @@ -96,7 +95,6 @@ Array - - imageaffinematrixget @@ -12,7 +11,7 @@ arrayfalseimageaffinematrixget inttype - mixedoptions + arrayfloatoptions Returns an affine transformation matrix. @@ -98,7 +97,6 @@ Array - - + imagecolorclosesthwb Get the index of the color which has the hue, white and blackness @@ -9,7 +9,7 @@ &reftitle.description; intimagecolorclosesthwb - resourceimage + GdImageimage intred intgreen intblue @@ -53,6 +53,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &gd.changelog.image-param; + + + + + &reftitle.examples; @@ -86,7 +103,6 @@ HWB: 33 - - + imagecreatefromgd Create a new image from GD file or URL @@ -8,7 +8,7 @@ &reftitle.description; - resourceimagecreatefromgd + GdImagefalseimagecreatefromgd stringfilename @@ -35,6 +35,30 @@ &reftitle.returnvalues; &gd.return.identifier; + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + On success, this function returns a GDImage instance now; + previously, a resource was returned. + + + + + + + &reftitle.examples; @@ -47,7 +71,7 @@ $im = @imagecreatefromgd('./test.gd'); // Test if the image was loaded -if(!is_resource($im)) +if(!$im) { die('Unable to load gd image!'); } @@ -70,7 +94,6 @@ imagedestroy($im); - - + imagecreatefromgd2 Create a new image from GD2 file or URL @@ -8,7 +8,7 @@ &reftitle.description; - resourceimagecreatefromgd2 + GdImagefalseimagecreatefromgd2 stringfilename @@ -35,6 +35,30 @@ &reftitle.returnvalues; &gd.return.identifier; + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + On success, this function returns a GDImage instance now; + previously, a resource was returned. + + + + + + + &reftitle.examples; @@ -69,7 +93,6 @@ imagedestroy($im); - - + imagecreatefromgd2part Create a new image from a given part of GD2 file or URL @@ -8,10 +8,10 @@ &reftitle.description; - resourceimagecreatefromgd2part + GdImagefalseimagecreatefromgd2part stringfilename - intsrcX - intsrcY + intx + inty intwidth intheight @@ -33,7 +33,7 @@ - srcX + x x-coordinate of source point. @@ -41,7 +41,7 @@ - srcY + y y-coordinate of source point. @@ -67,6 +67,30 @@ &reftitle.returnvalues; &gd.return.identifier; + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + On success, this function returns a GDImage instance now; + previously, a resource was returned. + + + + + + + &reftitle.examples; @@ -104,7 +128,6 @@ imagedestroy($im); - - imagecrop @@ -10,9 +9,9 @@ &reftitle.description; - resourcefalseimagecrop - resourceimage - arrayrect + GdImagefalseimagecrop + GdImageimage + arrayrectangle Crops an image to the given rectangular area and returns the resulting image. @@ -26,7 +25,7 @@ &gd.image.description; - rect + rectangle The cropping rectangle as array with keys @@ -41,10 +40,34 @@ &reftitle.returnvalues; - Return cropped image resource on success&return.falseforfailure;. + Return cropped image object on success&return.falseforfailure;. + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &gd.changelog.image-param; + + 8.0.0 + + On success, this function returns a GDImage instance now; + previously, a resource was returned. + + + + + + + &reftitle.examples; @@ -77,7 +100,6 @@ imagedestroy($im); - - imagecropauto @@ -10,10 +9,10 @@ &reftitle.description; - resourcefalseimagecropauto - resourceimage + GdImagefalseimagecropauto + GdImageimage intmodeIMG_CROP_DEFAULT - floatthreshold.5 + floatthreshold0.5 intcolor-1 @@ -125,7 +124,7 @@ &reftitle.returnvalues; - Returns a cropped image resource on success&return.falseforfailure;. + Returns a cropped image object on success&return.falseforfailure;. If the complete image was cropped, imagecrop returns &false;. @@ -141,6 +140,14 @@ + &gd.changelog.image-param; + + 8.0.0 + + On success, this function returns a GDImage instance now; + previously, a resource was returned. + + 7.4.0 @@ -172,7 +179,7 @@ As noted in the return value section, imagecropauto returns &false; if the whole image - was cropped. In this example we have an image resource + was cropped. In this example we have an image object $im which should be automatically cropped only if there is something to crop; otherwise we want to proceed with the original image. @@ -180,7 +187,7 @@ - - + imageftbbox Give the bounding box of a text using fonts via freetype2 @@ -8,12 +8,12 @@ &reftitle.description; - arrayimageftbbox + arrayfalseimageftbbox floatsize floatangle - stringfontfile - stringtext - arrayextrainfo + stringfont_filename + stringstring + arrayoptions[] This function calculates and returns the bounding box in pixels @@ -21,9 +21,10 @@ - imageftbbox is an extended variant of - imagettfbbox which additionally supports the - extrainfo. + Prior to PHP 8.0.0, imageftbbox was an extended variant of + imagettfbbox which additionally supported the + options. + As of PHP 8.0.0, imagettfbbox is an alias of imageftbbox. @@ -41,13 +42,13 @@ angle - Angle in degrees in which text will be + Angle in degrees in which string will be measured. - fontfile + font_filename The name of the TrueType font file (can be a URL). Depending on @@ -58,7 +59,7 @@ - text + string The string to be measured. @@ -66,11 +67,11 @@ - extrainfo + options - Possible array indexes for <parameter>extrainfo</parameter> + Possible array indexes for <parameter>options</parameter> @@ -144,6 +145,9 @@ angle, so "upper left" means in the top left-hand corner seeing the text horizontally. + + On failure, &false; is returned. + &reftitle.examples; @@ -197,7 +201,6 @@ imagedestroy($im); - - + imagefttext Write text to the image using fonts using FreeType 2 @@ -8,22 +8,23 @@ &reftitle.description; - arrayimagefttext - resourceimage + arrayfalseimagefttext + GdImageimage floatsize floatangle intx inty intcolor - stringfontfile + stringfont_filename stringtext - arrayextrainfo + arrayoptions[] - imagefttext is an extended variant of - imagettftext which additionally supports the - extrainfo. + Prior to PHP 8.0.0, imagefttext was an extended variant of + imagettftext which additionally supported the + options. + As of PHP 8.0.0, imagettftext is an alias of imagefttext. @@ -83,14 +84,14 @@ - fontfile + font_filename The path to the TrueType font you wish to use. Depending on which version of the GD library PHP is using, when - fontfile does not begin with a leading + font_filename does not begin with a leading / then .ttf will be appended to the filename and the library will attempt to search for that filename along a library-defined font path. @@ -108,7 +109,7 @@ - extrainfo + options
- Possible array indexes for <parameter>extrainfo</parameter> + Possible array indexes for <parameter>options</parameter> @@ -199,7 +200,28 @@ $font = 'SomeFont'; + + On failure, &false; is returned. + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &gd.changelog.image-param; + + + + + &reftitle.examples; @@ -246,7 +268,6 @@ imagedestroy($im); - - + imagegd Output GD image to browser or file @@ -9,11 +9,11 @@ &reftitle.description; boolimagegd - resourceimage - mixedtoNULL + GdImageimage + stringnullfile&null; - Outputs a GD image to the given to. + Outputs a GD image to the given file. @@ -22,7 +22,7 @@ &gd.image.description; - to + file &gd.image.path; @@ -50,6 +50,13 @@ + + 8.0.3 + + file is now nullable. + + + &gd.changelog.image-param; 7.2.0 @@ -126,7 +133,6 @@ imagedestroy($im); - - imagegetclip @@ -9,10 +8,9 @@ &reftitle.description; - + arrayimagegetclip - - resourceim + GdImageimage imagegetclip retrieves the current clipping rectangle, @@ -49,6 +47,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &gd.changelog.image-param; + + + + + &reftitle.examples; @@ -87,7 +102,6 @@ Array - &reftitle.returnvalues; - Returns an image resource identifier on success, &false; on failure. + Returns an image object on success, &false; on failure. + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + On success, this function returns a GDImage instance now; + previously, a resource was returned. + + + + + + + - diff --git a/reference/image/functions/imagegrabwindow.xml b/reference/image/functions/imagegrabwindow.xml index 8d39405115..e6bde9788f 100644 --- a/reference/image/functions/imagegrabwindow.xml +++ b/reference/image/functions/imagegrabwindow.xml @@ -9,9 +9,9 @@ &reftitle.description; - resourceimagegrabwindow - intwindow_handle - boolclient_area0 + GdImagefalseimagegrabwindow + inthandle + boolclient_area&false; Grabs a window or its client area using a windows handle (HWND property in COM instance) @@ -28,7 +28,7 @@ - window_handle + handle The HWND window ID. @@ -50,14 +50,14 @@ &reftitle.returnvalues; - Returns an image resource identifier on success, &false; on failure. + Returns an image object on success, &false; on failure. &reftitle.errors; - E_NOTICE is issued if window_handle is invalid + E_NOTICE is issued if handle is invalid window handle. E_WARNING is issued if the Windows API is too old. @@ -74,6 +74,13 @@ + + 8.0.0 + + On success, this function returns a GDImage instance now; + previously, a resource was returned. + + 8.0.0 @@ -140,7 +147,6 @@ imagedestroy($im); - - diff --git a/reference/image/functions/imageinterlace.xml b/reference/image/functions/imageinterlace.xml index de871a7e96..5bc51c9722 100644 --- a/reference/image/functions/imageinterlace.xml +++ b/reference/image/functions/imageinterlace.xml @@ -9,7 +9,7 @@ &reftitle.description; boolimageinterlace - resourceimage + GdImageimage boolnullenable&null; @@ -63,6 +63,7 @@ (non-zero for interlaced images, zero otherwise). + &gd.changelog.image-param; 8.0.0 @@ -99,7 +100,6 @@ imagedestroy($im); - - + imageloadfont Load a new font @@ -8,8 +8,8 @@ &reftitle.description; - intimageloadfont - stringfile + intfalseimageloadfont + stringfilename imageloadfont loads a user-defined bitmap and returns @@ -21,7 +21,7 @@ - file + filename The font file format is currently binary and architecture @@ -125,7 +125,6 @@ imagedestroy($im); - - imageopenpolygon @@ -11,7 +10,7 @@ &reftitle.description; boolimageopenpolygon - resourceimage + GdImageimage arraypoints intnum_points intcolor @@ -19,7 +18,7 @@ Alternative signature (as of PHP 8.0.0) boolimageopenpolygon - resourceimage + GdImageimage arraypoints intcolor @@ -97,6 +96,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &gd.changelog.image-param; + + + + + &reftitle.examples; @@ -147,7 +163,6 @@ imagedestroy($image); - - imageresolution @@ -9,22 +8,18 @@ &reftitle.description; - - mixedimageresolution - resourceimage - - - mixedimageresolution - resourceimage - intres_x - intres_y$res_x + + arrayboolimageresolution + GdImageimage + intnullresolution_x&null; + intnullresolution_y&null; imageresolution allows to set and get the resolution of - an image in DPI (dots per inch). If none of the optional parameters is given, - the current resolution is returned as indexed array. If only - res_x is given, the horizontal and vertical resolution - are set to this value. If both optional parameters are given, the horizontal + an image in DPI (dots per inch). If the optional parameters are &null;, + the current resolution is returned as an indexed array. If only + resolution_x is not &null;, the horizontal and vertical resolution + are set to this value. If none of the optional parameters are &null;, the horizontal and vertical resolution are set to these values, respectively. @@ -40,7 +35,7 @@ &gd.image.description; - res_x + resolution_x The horizontal resolution in DPI. @@ -48,7 +43,7 @@ - res_y + resolution_y The vertical resolution in DPI. @@ -61,14 +56,37 @@ &reftitle.returnvalues; - When used as getter (first signature), + When used as getter, it returns an indexed array of the horizontal and vertical resolution on success, &return.falseforfailure;. - When used as setter (second signature), it returns + When used as setter, it returns &true; on success, &return.falseforfailure;. + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + resolution_x and resolution_y are now nullable. + + + + + + + &reftitle.examples; @@ -103,7 +121,6 @@ Array - - imagesavealpha @@ -11,8 +10,8 @@ &reftitle.description; boolimagesavealpha - resourceimage - boolsaveflag + GdImageimage + boolenable imagesavealpha sets the flag which determines whether to retain @@ -31,7 +30,7 @@ &gd.image.description; - saveflag + enable Whether to save the alpha channel or not. Defaults to &false;. @@ -48,6 +47,24 @@ &return.success; + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &gd.changelog.image-param; + + + + + &reftitle.examples; @@ -86,7 +103,6 @@ imagedestroy($png); - - diff --git a/reference/image/functions/imagescale.xml b/reference/image/functions/imagescale.xml index b3feb37d99..ce55588c60 100644 --- a/reference/image/functions/imagescale.xml +++ b/reference/image/functions/imagescale.xml @@ -1,6 +1,5 @@ - imagescale @@ -10,11 +9,11 @@ &reftitle.description; - resourcefalseimagescale - resourceimage - intnew_width - intnew_height-1 - intmodeIMG_BILINEAR_FIXED + GdImagefalseimagescale + GdImageimage + intwidth + intheight-1 + intmodeIMG_BILINEAR_FIXED imagescale scales an image using the given @@ -34,7 +33,7 @@ &gd.image.description; - new_width + width The width to scale the image to. @@ -42,7 +41,7 @@ - new_height + height The height to scale the image to. If omitted or negative, the aspect @@ -73,10 +72,34 @@ &reftitle.returnvalues; - Return the scaled image resource on success&return.falseforfailure;. + Return the scaled image object on success&return.falseforfailure;. + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + On success, this function returns a GDImage instance now; + previously, a resource was returned. + + + &gd.changelog.image-param; + + + + + &reftitle.seealso; @@ -86,7 +109,6 @@ - - imagesetclip @@ -11,7 +10,7 @@ &reftitle.description; boolimagesetclip - resourceim + GdImageimage intx1 inty1 intx2 @@ -69,6 +68,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &gd.changelog.image-param; + + + + + &reftitle.seealso; @@ -77,7 +93,6 @@ - + Image Processing (ImageMagick) ImageMagick diff --git a/reference/imagick/imagick/averageimages.xml b/reference/imagick/imagick/averageimages.xml index 0497cc5f56..e08ec9b18f 100644 --- a/reference/imagick/imagick/averageimages.xml +++ b/reference/imagick/imagick/averageimages.xml @@ -21,6 +21,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/imagick/imagick/clear.xml b/reference/imagick/imagick/clear.xml index 33d7b60097..719bfb159f 100644 --- a/reference/imagick/imagick/clear.xml +++ b/reference/imagick/imagick/clear.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/imagick/imagick/clipimage.xml b/reference/imagick/imagick/clipimage.xml index 0a74968a0a..49fcc0c647 100644 --- a/reference/imagick/imagick/clipimage.xml +++ b/reference/imagick/imagick/clipimage.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/imagick/imagick/clone.xml b/reference/imagick/imagick/clone.xml index 9014b3e2fe..5da16980ec 100644 --- a/reference/imagick/imagick/clone.xml +++ b/reference/imagick/imagick/clone.xml @@ -24,24 +24,9 @@ - - &reftitle.examples; - - - Imagick object cloning in different versions of imagick - -clone(); - -// Cloning an Imagick object from 3.1.0 on: -$newImage = clone $image; -?> -]]> - - - + + &reftitle.parameters; + &no.function.parameters; @@ -76,6 +61,26 @@ $newImage = clone $image; + + &reftitle.examples; + + + Imagick object cloning in different versions of imagick + +clone(); + +// Cloning an Imagick object from 3.1.0 on: +$newImage = clone $image; +?> +]]> + + + + + diff --git a/reference/imagick/imagick/setimageartifact.xml b/reference/imagick/imagick/setimageartifact.xml index b6bc7dc07e..30b54d061d 100644 --- a/reference/imagick/imagick/setimageartifact.xml +++ b/reference/imagick/imagick/setimageartifact.xml @@ -58,18 +58,6 @@ - - &reftitle.seealso; - - - Imagick::getImageArtifact - Imagick::deleteImageArtifact - - - - - - &reftitle.examples; @@ -99,6 +87,16 @@ function setImageArtifact() { + + &reftitle.seealso; + + + Imagick::getImageArtifact + Imagick::deleteImageArtifact + + + + - - - Ingres DBMS, EDBC, and Enterprise Access Gateways - Ingres - - - - &reftitle.intro; - - The Ingres driver for PHP enables you to connect to and query the Ingres - DBMS, EDBC, and Enterprise Access Gateways. - - - - &pecl.moved-ver;5.1.0. - - - - - - &reference.ingres-ii.setup; - &reference.ingres-ii.constants; - &reference.ingres-ii.examples; - &reference.ingres-ii.reference; - - - - - diff --git a/reference/ingres-ii/configure.xml b/reference/ingres-ii/configure.xml deleted file mode 100644 index 1605fabce4..0000000000 --- a/reference/ingres-ii/configure.xml +++ /dev/null @@ -1,83 +0,0 @@ - - -
- &reftitle.install; - - &pecl.moved; - &pecl.info; - &url.pecl.package;ingres. - - - You can download the DLL for this PECL extension from &url.ingres.peclext;. - - - To have these functions available, you must download and compile - this extension, enabling Ingres support using the - option, where DIR is - the Ingres base directory. If the II_SYSTEM environment variable is not - set correctly you may need to use - - to specify your Ingres installation directory. - - - PHP code written for version 2.x and later is not backward-compatible with - earlier versions of this PHP extension. However, it is possible to run two - incompatible releases within the same PHP environment using the option. This configuration option - renames the extension to ingres2, changing function names, configuration - settings, and constants. For example, with this option enabled, - ingres_connect becomes - ingres2_connect. - - - To use this extension the system environment variable II_SYSTEM must be - defined. Linux and UNIX users will also need to define the shared library - search path, for example, LD_LIBRARY_PATH. When used with the Apache web server - these variables must be - set explicitly in the startup script for Apache. In addition, the PassEnv - directive is required for the Ingres extension to load the correct shared - libraries. For example: - - - Example usage of PassEnv for Ingres - - - PassEnv II_SYSTEM - PassEnv LD_LIBRARY_PATH - -]]> - - - - - For example configurations for different web servers and operating - systems see &url.ingres.wiki;Ingres_Articles#Ingres_and_Web_Servers. - - - -
- - diff --git a/reference/ingres-ii/constants.xml b/reference/ingres-ii/constants.xml deleted file mode 100644 index 98f8f8f861..0000000000 --- a/reference/ingres-ii/constants.xml +++ /dev/null @@ -1,424 +0,0 @@ - - - - &reftitle.constants; - &extension.constants; - - - - INGRES_ASSOC - (int) - - - - Columns are returned into the array having the fieldname as the array - index. Used with ingres_fetch_array. - - - - - - INGRES_NUM - (int) - - - - Columns are returned into the array having a numerical index to the - fields. By default this index starts at 1, the first field in the result. - To change this value, see ingres.array_index_start. - Used with ingres_fetch_array. - - - - - - INGRES_BOTH - (int) - - - - Columns are returned into the array having both a numerical index and - the fieldname as the array index. Used with - ingres_fetch_array. - - - - - - INGRES_EXT_VERSION - (string) - - - - Specifies the version of the Ingres Extension. Available since version 1.2.0 of the PECL extension. - - - - - - INGRES_API_VERSION - (int) - - - - Specifies the version of Ingres OpenAPI that the extension was built against. Available since version 1.2.0 of the PECL extension. - - - - - - INGRES_CURSOR_READONLY - (int) - - - - Specifies that Ingres cursors should be opened in "readonly" mode. - Available since version 1.2.0 of the PECL extension. Used with ingres.cursor_mode. - - - - - - INGRES_CURSOR_UPDATE - (int) - - - - Specifies that Ingres cursors should be opened "for update." - Available since version 1.2.0 of the PECL extension. Used with ingres.cursor_mode. - - - - - - INGRES_DATE_MULTINATIONAL - (int) - - - - Equivalent to the II_DATE_FORMAT setting of MULTINATIONAL. Available - since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_DATE_MULTINATIONAL4 - (int) - - - - Equivalent to the II_DATE_FORMAT setting of MULTINATIONAL4. Available since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_DATE_FINNISH - (int) - - - - Equivalent to the II_DATE_FORMAT setting of FINNISH. Available since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_DATE_ISO - (int) - - - - Equivalent to the II_DATE_FORMAT setting of ISO. Available since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_DATE_ISO4 - (int) - - - - Equivalent to the II_DATE_FORMAT setting of ISO4. Available since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_DATE_GERMAN - (int) - - - - Equivalent to the II_DATE_FORMAT setting of GERMAN. Available since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_DATE_MDY - (int) - - - - Equivalent to the II_DATE_FORMAT setting of MDY. Available since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_DATE_DMY - (int) - - - - Equivalent to the II_DATE_FORMAT setting of DMY. Available since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_DATE_YMD - (int) - - - - Equivalent to the II_DATE_FORMAT setting of YMD. Available since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_MONEY_LEADING - (int) - - - - Specifies the currency character that should be placed at the start of a money - value. Equivalent to setting II_MONEY_FORMAT to "L:". Available since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_MONEY_TRAILING - (int) - - - - Specifies the currency character that should be placed at the end of a money - value. Equivalent to setting II_MONEY_FORMAT to "T:". Available since version 1.2.0 of the PECL extension. - Used with - ingres_connect, ingres_pconnect - and ingres_set_environment. See options - in ingres_set_environment. - - - - - - INGRES_STRUCTURE_BTREE - (int) - - - - Specifies the default table or index structure to BTREE when used in combination with the - options or index_structure option when connecting. Available since version 1.4.0 of the PECL extension. - Used with ingres_connect and - ingres_pconnect. See options - in ingres_connect. - - - - - - INGRES_STRUCTURE_CBTREE - (int) - - - - Specifies the default table or index structure to COMPRESSED BTREE when used in combination with the - options or index_structure option when connecting. Available since version 1.4.0 of the PECL extension. - Used with ingres_connect and - ingres_pconnect. See options - in ingres_connect. - - - - - - INGRES_STRUCTURE_HASH - (int) - - - - Specifies the default table or index structure to HASH when used in combination with the - options or index_structure option when connecting. Available since version 1.4.0 of the PECL extension. - Used with ingres_connect and - ingres_pconnect. See options - in ingres_connect. - - - - - - INGRES_STRUCTURE_CHASH - (int) - - - - Specifies the default table or index structure to COMPRESSED HASH when used in combination with the - options or index_structure option when connecting. Available since version 1.4.0 of the PECL extension. - Used with ingres_connect and - ingres_pconnect. See options - in ingres_connect. - - - - - - INGRES_STRUCTURE_HEAP - (int) - - - - Specifies the default table structure to HEAP when used in combination with the - options option when connecting. Available since version 1.4.0 of the PECL extension. - Used with ingres_connect and - ingres_pconnect. See options - in ingres_connect. - - - - - - INGRES_STRUCTURE_CHEAP - (int) - - - - Specifies the default table structure to COMPRESSED HEAP when used in combination with the - options option when connecting. Available since version 1.4.0 of the PECL extension. - Used with ingres_connect and - ingres_pconnect. See options - in ingres_connect. - - - - - - INGRES_STRUCTURE_ISAM - (int) - - - - Specifies the default table or index structure to ISAM when used in combination with the - options or index_structure option when connecting. Available since version 1.4.0 of the PECL extension. - Used with ingres_connect and - ingres_pconnect. See options - in ingres_connect. - - - - - - INGRES_STRUCTURE_CISAM - (int) - - - - Specifies the default table or index structure to COMPRESSED ISAM when used in combination with the - options or index_structure option when connecting. Available since version 1.4.0 of the PECL extension. - Used with ingres_connect and - ingres_pconnect. See options - in ingres_connect. - - - - - - - diff --git a/reference/ingres-ii/examples.xml b/reference/ingres-ii/examples.xml deleted file mode 100644 index 4961a83564..0000000000 --- a/reference/ingres-ii/examples.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - &reftitle.examples; -
- Basic usage - - The following simple example shows how to connect to an Ingres database, - execute a query, print - resulting rows and disconnect from the database. - - Simple Ingres Example - -\n"; -while ($iitables = ingres_fetch_object($result)) { - echo "\t
\n"; - echo "\t\t\n"; - echo "\t\t\n"; - echo "\t\n"; -} -echo "
" . $iitables->relid . "" . $iitables->relowner . "
\n"; - -// Free results -ingres_free_result($result); - -// Commit transaction -ingres_commit($link); - -// Closing connection -ingres_close($link); -?> -]]> - - -
- - - - - diff --git a/reference/ingres-ii/functions/ingres-autocommit-state.xml b/reference/ingres-ii/functions/ingres-autocommit-state.xml deleted file mode 100644 index d6933615cc..0000000000 --- a/reference/ingres-ii/functions/ingres-autocommit-state.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - ingres_autocommit_state - Test if the connection is using autocommit - - - - &reftitle.description; - - boolingres_autocommit_state - resourcelink - - - ingres_autocommit_state is called to determine whether - the current link has autocommit enabled or not. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - - - - - &reftitle.returnvalues; - - Returns &true; if autocommit is enabled or &false; when autocommit is - disabled - - - - - &reftitle.seealso; - - - ingres_autocommit - ingres_query - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-autocommit.xml b/reference/ingres-ii/functions/ingres-autocommit.xml deleted file mode 100644 index 0eedb4c2c0..0000000000 --- a/reference/ingres-ii/functions/ingres-autocommit.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - ingres_autocommit - Switch autocommit on or off - - - - &reftitle.description; - - boolingres_autocommit - resourcelink - - - ingres_autocommit is called before opening a - transaction (before the first call to - ingres_query or just after a call to - ingres_rollback or - ingres_commit) to switch the - autocommit mode of the server on or off (when the script begins - the autocommit mode is off). - - - When autocommit mode is on, every query is automatically - committed by the server, as if ingres_commit - was called after every call to ingres_query. - To see if autocommit is enabled use, - ingres_autocommit_state. - - - By default Ingres will rollback any uncommitted transactions at the end of - a request. Use this function or ingres_commit to - ensure your data is committed to the database. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - ingres_autocommit_state - ingres_query - ingres_rollback - ingres_commit - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-charset.xml b/reference/ingres-ii/functions/ingres-charset.xml deleted file mode 100644 index dec1d4aab1..0000000000 --- a/reference/ingres-ii/functions/ingres-charset.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - ingres_charset - Returns the installation character set - - - - &reftitle.description; - - stringingres_charset - resourcelink - - - ingres_charset is called to determine the character - set being used by the Ingres client, from II_CHARSETxx (where xx is the - installation code). - - - - You can override the value returned by using the function - putenv. Changing the value of II_CHARSETxx in a - running Ingres installation can cause data corruption. - - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - - - - - &reftitle.returnvalues; - - Returns a string with the value for II_CHARSETxx or returns NULL if the value - could not be determined. - - - - - &reftitle.examples; - - - <function>ingres_charset</function> - Get the installation character set - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_connect - ingres_query - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-close.xml b/reference/ingres-ii/functions/ingres-close.xml deleted file mode 100644 index e18855af88..0000000000 --- a/reference/ingres-ii/functions/ingres-close.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - ingres_close - Close an Ingres database connection - - - - &reftitle.description; - - boolingres_close - resourcelink - - - ingres_close closes the connection to - the Ingres server that is associated with the specified link. - - - ingres_close is usually unnecessary, as it - will not close persistent connections and all non-persistent connections - are automatically closed at the end of the script. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - ingres_connect - ingres_pconnect - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-commit.xml b/reference/ingres-ii/functions/ingres-commit.xml deleted file mode 100644 index c01ffa2e9c..0000000000 --- a/reference/ingres-ii/functions/ingres-commit.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - ingres_commit - Commit a transaction - - - - &reftitle.description; - - boolingres_commit - resourcelink - - - ingres_commit commits the currently open - transaction, making all changes made to the database permanent. - - - This closes the transaction. A new transaction can be opened by sending a - query with ingres_query. - - - You can also have the server commit automatically after every - query by calling ingres_autocommit before - opening the transaction. - - - By default Ingres will roll back any uncommitted transactions at the end of - a request. Use this function or ingres_autocommit to - ensure your that data is committed to the database. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - ingres_query - ingres_rollback - ingres_autocommit - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-connect.xml b/reference/ingres-ii/functions/ingres-connect.xml deleted file mode 100644 index 4964b642f5..0000000000 --- a/reference/ingres-ii/functions/ingres-connect.xml +++ /dev/null @@ -1,314 +0,0 @@ - - - - - ingres_connect - Open a connection to an Ingres database - - - - &reftitle.description; - - resourcefalseingres_connect - stringdatabase - stringusername - stringpassword - arrayoptions - - - ingres_connect opens a connection with the - given Ingres database. - - - The connection is closed when the script ends or when - ingres_close is called on this link. - - - - - &reftitle.parameters; - - If some parameters are missing, ingres_connect - uses the values in &php.ini; for - ingres.default_database, - ingres.default_user and - ingres.default_password. - - - - - database - - - The database name. Must follow the syntax: - - - [vnode::]dbname[/svr_class] - - - - - username - - - The Ingres user name - - - - - password - - - The password associated with username - - - - - options - - - ingres_connect options - - - - - Option name - Option type - Description - Example - - - - - date_century_boundary - int - The threshold by which a 2-digit year is determined to be in - the current century or in the next century. Equivalent to II_DATE_CENTURY_BOUNDARY. - 50 - - - group - string - Specifies the group ID of the user, equivalent to the "-G" - flag - payroll - - - role - string - The role ID of the application. If a role password is - required, the parameter value should be specified as "role/password" - - - effective_user - string - The ingres user account being impersonated, equivalent to the "-u" flag - another_user - - - dbms_password - string - The internal database password for the user connecting to Ingres - s3cr3t - - - table_structure - string - - The default structure for new tables. - Valid values for table_structure are: - - INGRES_STRUCTURE_BTREE - INGRES_STRUCTURE_HASH - INGRES_STRUCTURE_HEAP - INGRES_STRUCTURE_ISAM - INGRES_STRUCTURE_CBTREE - INGRES_STRUCTURE_CISAM - INGRES_STRUCTURE_CHASH - INGRES_STRUCTURE_CHEAP - - - - INGRES_STRUCTURE_BTREE - - - index_structure - string - - The default structure for new secondary indexes. Valid values - for index_structure are: - - INGRES_STRUCTURE_CBTREE - INGRES_STRUCTURE_CISAM - INGRES_STRUCTURE_CHASH - INGRES_STRUCTURE_BTREE - INGRES_STRUCTURE_HASH - INGRES_STRUCTURE_ISAM - - - - INGRES_STRUCTURE_HASH - - - login_local - bool - Determines how the connection user ID and password are - used when a VNODE is included in the target database string. - If set to TRUE, the user ID and password are used to locally access - the VNODE, and the VNODE login information is used to establish the DBMS - connection. If set to FALSE, the process user ID is used to access - the VNODE, and the connection user ID and password are used in place - of the VNODE login information to establish the DBMS connection. - This parameter is ignored if no VNODE is included in the target - database string. The default is FALSE. - TRUE - - - timezone - string - Controls the timezone of the session. If not set it will - default to the value defined by II_TIMEZONE_NAME. If - II_TIMEZONE_NAME is not defined, NA-PACIFIC (GMT-8 with Daylight - Savings) is used. - - - date_format - int - Sets the allowable input and output format for Ingres dates. - Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is - not set the default date format is US, e.g. mm/dd/yy. Valid values - for date_format are: - - INGRES_DATE_DMY - INGRES_DATE_FINISH - INGRES_DATE_GERMAN - INGRES_DATE_ISO - INGRES_DATE_ISO4 - INGRES_DATE_MDY - INGRES_DATE_MULTINATIONAL - INGRES_DATE_MULTINATIONAL4 - INGRES_DATE_YMD - INGRES_DATE_US - - - - INGRES_DATE_MULTINATIONAL4 - - - decimal_separator - string - The character identifier for decimal data - "," - - - money_lort - int - Leading or trailing currency sign. Valid values for money_lort - are: - - INGRES_MONEY_LEADING - INGRES_MONEY_TRAILING - - - - INGRES_MONEY_TRAILING - - - money_sign - string - The currency symbol to be used with the MONEY datatype - - - - money_precision - int - The precision of the MONEY datatype - 3 - - - float4_precision - int - Precision of the FLOAT4 datatype - 10 - - - float8_precision - int - Precision of the FLOAT8 data - 10 - - - blob_segment_length - int - The amount of data in bytes to fetch at a time when retrieving - BLOB or CLOB data, defaults to 4096 bytes when not explicitly set - 8192 - - - - - - - - - - - - - &reftitle.returnvalues; - - Returns a Ingres link resource on success&return.falseforfailure; - - - - - &reftitle.examples; - - - Open a connection to an Ingres database - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_pconnect - ingres_close - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-cursor.xml b/reference/ingres-ii/functions/ingres-cursor.xml deleted file mode 100644 index 24533fe33f..0000000000 --- a/reference/ingres-ii/functions/ingres-cursor.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - ingres_cursor - Get a cursor name for a given result resource - - - - &reftitle.description; - - stringingres_cursor - resourceresult - - - Returns a string with the active cursor name. If no cursor is active then - NULL is returned. - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - - - - - &reftitle.returnvalues; - - Returns a string containing the active cursor name. If no cursor is - active then NULL is returned. - - - - - - &reftitle.examples; - - - Get cursor name for a query resource - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_prepare - ingres_execute - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-errno.xml b/reference/ingres-ii/functions/ingres-errno.xml deleted file mode 100644 index abad6863bf..0000000000 --- a/reference/ingres-ii/functions/ingres-errno.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - ingres_errno - Get the last Ingres error number generated - - - - &reftitle.description; - - intingres_errno - resourcelink - - - Returns an integer containing the last error number. If no error was - reported 0 is returned. - - - If a link resource is passed to - ingres_errno it returns the last error recorded for - the link. If no link is passed, then ingres_errno - returns the last error reported using the default link. - - - The function, ingres_errno, should always be called - after executing a database query. Calling another function before - ingres_errno is called will reset or change any - error code from the last Ingres function call. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - - - - - &reftitle.returnvalues; - - Returns an integer containing the last error number. If no error was - reported, 0 is returned. - - - - - - &reftitle.examples; - - - Get the last Ingres error number generated - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_error - ingres_errsqlstate - ingres_next_error - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-error.xml b/reference/ingres-ii/functions/ingres-error.xml deleted file mode 100644 index d3f6e3ea3d..0000000000 --- a/reference/ingres-ii/functions/ingres-error.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - ingres_error - Get a meaningful error message for the last error generated - - - - &reftitle.description; - - stringingres_error - resourcelink - - - Returns a string containing the last error, or NULL if no error has - occurred. - - - If a link resource is passed to - ingres_error, it returns the last error recorded for - the link. If no link is passed then ingres_error - returns the last error reported using the default link. - - - The function, ingres_error, should always be called - after executing any database query. Calling another function before - ingres_error is called will reset or change any - error message from the last Ingres function call. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - - - - - &reftitle.returnvalues; - - Returns a string containing the last error, or NULL if no error has - occurred. - - - - - - &reftitle.examples; - - - Get a message for the last error generated - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_errno - ingres_errsqlstate - ingres_next_error - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-errsqlstate.xml b/reference/ingres-ii/functions/ingres-errsqlstate.xml deleted file mode 100644 index f6804d6f9d..0000000000 --- a/reference/ingres-ii/functions/ingres-errsqlstate.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - ingres_errsqlstate - Get the last SQLSTATE error code generated - - - - &reftitle.description; - - stringingres_errsqlstate - resourcelink - - - Returns a string containing the last SQLSTATE, or NULL if no error has - occurred. - - - If a link resource is passed to - ingres_errsqlstate, it returns the last error - recorded for the link. If no link is passed, then - ingres_errsqlstate returns the last error reported - using the default link. - - - The function, ingres_errsqlstate, should always be - called after executing any database query. Calling another function - before ingres_errsqlstate is called will reset or - change any error message from the last Ingres function call. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - - - - - &reftitle.returnvalues; - - Returns a string containing the last SQLSTATE, or NULL if no error has - occurred. - - - - - - &reftitle.examples; - - - Get the last SQLSTATE error code generated - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_errno - ingres_error - ingres_next_error - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-escape-string.xml b/reference/ingres-ii/functions/ingres-escape-string.xml deleted file mode 100644 index 9cdd77018b..0000000000 --- a/reference/ingres-ii/functions/ingres-escape-string.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - ingres_escape_string - Escape special characters for use in a query - - - - &reftitle.description; - - stringingres_escape_string - resourcelink - stringsource_string - - - ingres_escape_string is used to escape certain - characters within a string before it is sent to the database server. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - source_string - - - The source string to be parsed - - - - - - - - - &reftitle.returnvalues; - - Returns a string containing the escaped data. - - - - - &reftitle.examples; - - - Escape special characters for use in a query - -up_first . '
'; -} - -ingres_commit($link); - -ingres_close($link); - -?> -]]> -
-
-
-
- - - &reftitle.seealso; - - - ingres_query - - - - -
- - diff --git a/reference/ingres-ii/functions/ingres-execute.xml b/reference/ingres-ii/functions/ingres-execute.xml deleted file mode 100644 index f2ea6bde66..0000000000 --- a/reference/ingres-ii/functions/ingres-execute.xml +++ /dev/null @@ -1,186 +0,0 @@ - - - - - ingres_execute - Execute a prepared query - - - - &reftitle.description; - - boolingres_execute - resourceresult - arrayparams - stringtypes - - - Execute a query prepared using ingres_prepare. - - - - Related Configurations - - See also the ingres.describe, - ingres.scrollable and - ingres.utf8 directives in - Runtime Configuration. - - - - - - &reftitle.parameters; - - - - result - - - The result query identifier - - - - - params - - - An array of parameter values to be used with the query - - - - - types - - - A string containing a sequence of types for the parameter values - passed. See the types parameter in - ingres_query for the list of type codes. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - - &reftitle.seealso; - - - ingres_unbuffered_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - ingres_commit - ingres_rollback - ingres_autocommit - ingres_set_environment - ingres_errno - ingres_error - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-fetch-array.xml b/reference/ingres-ii/functions/ingres-fetch-array.xml deleted file mode 100644 index 478ad253d4..0000000000 --- a/reference/ingres-ii/functions/ingres-fetch-array.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - ingres_fetch_array - Fetch a row of result into an array - - - - &reftitle.description; - - arrayingres_fetch_array - resourceresult - intresult_type - - - This function is an extended version of - ingres_fetch_row. In addition to storing - the data in the numeric indices of the result array, it also - stores the data in associative indices, using the field names as - keys. - - - If two or more columns of the result have the same field names, - the last column will take precedence. To access the another - column or columns of the same name, you must use the numeric index of the - column or make an alias for the column. For example: - - - -]]> - - - - - With regard to speed, the function is identical to - ingres_fetch_object, and almost as quick as - ingres_fetch_row (the difference is - insignificant). - - - By default, arrays created by ingres_fetch_array start - from position 1 and not 0 as with other DBMS extensions. The starting position - can be adjusted to 0 using the configuration parameter ingres.array_index_start. - - - Related Configurations - - See also the ingres.array_index_start, ingres.fetch_buffer_size - and ingres.utf8 - directives in Runtime - Configuration. - - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - result_type - - - The result type. This result_type can be INGRES_NUM for - enumerated array, INGRES_ASSOC for associative array, or - INGRES_BOTH (default). - - - - - - - - - &reftitle.returnvalues; - - Returns an array that corresponds to the fetched row, - or &false; if there are no more rows - - - - - &reftitle.examples; - - - Fetch a row of result into an array - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_query - ingres_num_fields - ingres_field_name - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-fetch-assoc.xml b/reference/ingres-ii/functions/ingres-fetch-assoc.xml deleted file mode 100644 index 4566357a6d..0000000000 --- a/reference/ingres-ii/functions/ingres-fetch-assoc.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - ingres_fetch_assoc - Fetch a row of result into an associative array - - - - &reftitle.description; - - arrayingres_fetch_assoc - resourceresult - - - This function is stores the data fetched from a query executed using - ingres_query in an associative array, using the - field names as keys. - - - With regard to speed, the function is identical to - ingres_fetch_object, and almost as quick as - ingres_fetch_row (the difference is - insignificant). - - - By default, arrays created by ingres_fetch_assoc start - from position 1 and not 0 as with other DBMS extensions. The starting position - can be adjusted to 0 using the configuration parameter ingres.array_index_start. - - - Related Configurations - - See also the ingres.array_index_start, ingres.fetch_buffer_size - and ingres.utf8 - directives in Runtime - Configuration. - - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - - - - - &reftitle.returnvalues; - - Returns an associative array that corresponds to the fetched row, - or &false; if there are no more rows - - - - - &reftitle.examples; - - - Fetch a row into an associative array - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_query - ingres_num_fields - ingres_field_name - ingres_fetch_array - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-fetch-object.xml b/reference/ingres-ii/functions/ingres-fetch-object.xml deleted file mode 100644 index fee8dd7902..0000000000 --- a/reference/ingres-ii/functions/ingres-fetch-object.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - ingres_fetch_object - Fetch a row of result into an object - - - - &reftitle.description; - - objectingres_fetch_object - resourceresult - intresult_type - - - This function is similar to - ingres_fetch_array, with one difference - an - object is returned instead of an array. Indirectly, this means - that you can access the data only by the field names and not by - their offsets (numbers are illegal property names). - - - With regard to speed, the function is identical to - ingres_fetch_array, and almost as quick as - ingres_fetch_row (the difference is - insignificant). - - - Related Configurations - - See also the ingres.fetch_buffer_size - and ingres.utf8 - directives in Runtime - Configuration. - - - - - - &reftitle.parameters; - - - - link - - - The query result identifier - - - - - result_type - - - (Optional argument.) result_type is a - constant and can take the following values: INGRES_ASSOC, - INGRES_NUM, and INGRES_BOTH. - - - - - - - - - &reftitle.returnvalues; - - Returns an object that corresponds to the fetched row, - or &false; if there are no more rows - - - - - &reftitle.examples; - - - Fetch a row into an object - -user_id; - echo $row->fullname; -} -?> -]]> - - - - - - - &reftitle.seealso; - - - ingres_query - ingres_num_fields - ingres_field_name - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-fetch-proc-return.xml b/reference/ingres-ii/functions/ingres-fetch-proc-return.xml deleted file mode 100644 index c7b7233a06..0000000000 --- a/reference/ingres-ii/functions/ingres-fetch-proc-return.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - ingres_fetch_proc_return - Get the return value from a procedure call - - - - &reftitle.description; - - intingres_fetch_proc_return - resourceresult - - - This function is used to retrieve the return value following the execution - of an Ingres database procedure (stored procedure). - - - - If used with a row-producing procedure, this function should be called after all the - rows from the procedure have been fetched using - ingres_fetch_array, - ingres_fetch_object or - ingres_fetch_row. This function will eliminate any - rows yet to be fetched should there be any left over. - - - - - - &reftitle.parameters; - - - - result - - - The result identifier for a query - - - - - - - - - &reftitle.returnvalues; - - Returns an int if there is a return value otherwise it will - return &null;. - - - - - &reftitle.examples; - - - Get the return value from a procedure call - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-fetch-row.xml b/reference/ingres-ii/functions/ingres-fetch-row.xml deleted file mode 100644 index 9b130318d2..0000000000 --- a/reference/ingres-ii/functions/ingres-fetch-row.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - ingres_fetch_row - Fetch a row of result into an enumerated array - - - - &reftitle.description; - - arrayingres_fetch_row - resourceresult - - - ingres_fetch_row returns an array that - corresponds to the fetched row, or &false; if there are no more - rows. Each result column is stored in an array offset, starting - at offset 1. - - - Subsequent calls to ingres_fetch_row - return the next row in the result set, or &false; if there are no - more rows. - - - By default, arrays created by ingres_fetch_row start - from position 1 and not 0 as with other DBMS extensions. The starting position - can be adjusted to 0 using the configuration parameter ingres.array_index_start. - - - Related Configurations - - See also the ingres.array_index_start, ingres.fetch_buffer_size - and ingres.utf8 - directives in Runtime - Configuration. - - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - - - - - &reftitle.returnvalues; - - Returns an array that corresponds to the fetched row, - or &false; if there are no more rows - - - - - &reftitle.examples; - - - Fetch a row of result into an enumerated array - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_num_fields - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-field-length.xml b/reference/ingres-ii/functions/ingres-field-length.xml deleted file mode 100644 index bbd85e3703..0000000000 --- a/reference/ingres-ii/functions/ingres-field-length.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - ingres_field_length - Get the length of a field - - - - &reftitle.description; - - intingres_field_length - resourceresult - intindex - - - ingres_field_length returns the length of a - field. This is the number of bytes the server uses to store - the field. For detailed information, see the Ingres OpenAPI User - Guide, Appendix "Data Types" in the Ingres documentation. - - - Related Configurations - - See ingres.array_index_start - in Runtime Configuration - - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - index - - - index is the column number whose length - will be retrieved. - - - The possible values of index depend upon - the value - of ingres.array_index_start. - If ingres.array_index_start - is 1 (the default) - then index must be - between 1 and the value returned - by ingres_num_fields. If ingres.array_index_start - is 0 then index must - be between 0 - and ingres_num_fields - - 1. - - - - - - - - - &reftitle.returnvalues; - - Returns the length of a field. - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-field-name.xml b/reference/ingres-ii/functions/ingres-field-name.xml deleted file mode 100644 index 0f439dac6e..0000000000 --- a/reference/ingres-ii/functions/ingres-field-name.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - ingres_field_name - Get the name of a field in a query result - - - - &reftitle.description; - - stringfalseingres_field_name - resourceresult - intindex - - - ingres_field_name returns the name of a field - in a query result. - - - Related Configurations - - See ingres.array_index_start - in Runtime Configuration - - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - index - - - index is the field whose name will be - retrieved. - - - The possible values of index depend upon - the value - of ingres.array_index_start. - If ingres.array_index_start - is 1 (the default) - then index must be - between 1 and the value returned - by ingres_num_fields. If ingres.array_index_start - is 0 then index must - be between 0 - and ingres_num_fields - - 1. - - - - - - - - - &reftitle.returnvalues; - - Returns the name of a field - in a query result&return.falseforfailure; - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-field-nullable.xml b/reference/ingres-ii/functions/ingres-field-nullable.xml deleted file mode 100644 index 3f3076b547..0000000000 --- a/reference/ingres-ii/functions/ingres-field-nullable.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - ingres_field_nullable - Test if a field is nullable - - - - &reftitle.description; - - boolingres_field_nullable - resourceresult - intindex - - - Test if a field is nullable. - - - Related Configurations - - See ingres.array_index_start - in Runtime Configuration - - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - index - - - index is the field whose nullability will be - retrieved. - - - The possible values of index depend upon - the value - of ingres.array_index_start. - If ingres.array_index_start - is 1 (the default) - then index must be - between 1 and the value returned - by ingres_num_fields. If ingres.array_index_start - is 0 then index must - be between 0 - and ingres_num_fields - - 1. - - - - - - - - - &reftitle.returnvalues; - - ingres_field_nullable returns &true; if the - field can be set to the &null; value and &false; if it cannot - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-field-precision.xml b/reference/ingres-ii/functions/ingres-field-precision.xml deleted file mode 100644 index f9bcf04e7e..0000000000 --- a/reference/ingres-ii/functions/ingres-field-precision.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - ingres_field_precision - Get the precision of a field - - - - &reftitle.description; - - intingres_field_precision - resourceresult - intindex - - - ingres_field_precision returns the precision - of a field. This value is used only for decimal, float, and money - SQL data types. For detailed information, see the Ingres OpenAPI - User Guide, Appendix "Data Types" in the Ingres documentation. - - - Related Configurations - - See ingres.array_index_start - in Runtime Configuration - - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - index - - - index is the field whose precision will be - retrieved. - - - The possible values of index depend upon - the value - of ingres.array_index_start. - If ingres.array_index_start - is 1 (the default) - then index must be - between 1 and the value returned - by ingres_num_fields. If ingres.array_index_start - is 0 then index must - be between 0 - and ingres_num_fields - - 1. - - - - - - - - - &reftitle.returnvalues; - - Returns the field precision as an integer - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-field-scale.xml b/reference/ingres-ii/functions/ingres-field-scale.xml deleted file mode 100644 index f5cd1b4e8e..0000000000 --- a/reference/ingres-ii/functions/ingres-field-scale.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - ingres_field_scale - Get the scale of a field - - - - &reftitle.description; - - intingres_field_scale - resourceresult - intindex - - - ingres_field_scale returns the scale of a - field. This value is used only for the decimal SQL data - type. For detailed information, see the Ingres OpenAPI User - Guide, Appendix "Data Types" in the Ingres documentation. - - - Related Configurations - - See ingres.array_index_start - in Runtime Configuration - - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - index - - - index is the field whose scale will be - retrieved. - - - The possible values of index depend upon - the value - of ingres.array_index_start. - If ingres.array_index_start - is 1 (the default) - then index must be - between 1 and the value returned - by ingres_num_fields. If ingres.array_index_start - is 0 then index must - be between 0 - and ingres_num_fields - - 1. - - - - - - - - - &reftitle.returnvalues; - - Returns the scale of the field, as an integer - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-field-type.xml b/reference/ingres-ii/functions/ingres-field-type.xml deleted file mode 100644 index f45b34a2c2..0000000000 --- a/reference/ingres-ii/functions/ingres-field-type.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - ingres_field_type - Get the type of a field in a query result - - - - &reftitle.description; - - stringfalseingres_field_type - resourceresult - intindex - - - Get the type of a field in a query result. - - - Related Configurations - - See ingres.array_index_start - in Runtime Configuration - - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - index - - - index is the field whose type will be - retrieved. - - - The possible values of index depend upon - the value - of ingres.array_index_start. - If ingres.array_index_start - is 1 (the default) - then index must be - between 1 and the value returned - by ingres_num_fields. If ingres.array_index_start - is 0 then index must - be between 0 - and ingres_num_fields - - 1. - - - - - - - - - &reftitle.returnvalues; - - ingres_field_type returns the type of a - field in a query result&return.falseforfailure;. Examples of - types returned are IIAPI_BYTE_TYPE, - IIAPI_CHA_TYPE, IIAPI_DTE_TYPE, - IIAPI_FLT_TYPE, IIAPI_INT_TYPE, - IIAPI_VCH_TYPE. Some of these types can map to more - than one SQL type depending on the length of the field (see - ingres_field_length). For example - IIAPI_FLT_TYPE can be a float4 or a float8. For detailed - information, see the Ingres OpenAPI User Guide, Appendix - "Data Types" in the Ingres documentation. - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-free-result.xml b/reference/ingres-ii/functions/ingres-free-result.xml deleted file mode 100644 index b54db1e144..0000000000 --- a/reference/ingres-ii/functions/ingres-free-result.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - ingres_free_result - Free the resources associated with a result identifier - - - - &reftitle.description; - - boolingres_free_result - resourceresult - - - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - - Free a result resource - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_query - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-next-error.xml b/reference/ingres-ii/functions/ingres-next-error.xml deleted file mode 100644 index f0fcd983a2..0000000000 --- a/reference/ingres-ii/functions/ingres-next-error.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - ingres_next_error - Get the next Ingres error - - - - &reftitle.description; - - boolingres_next_error - resourcelink - - - Get the next Ingres error for the last executed query. Each call to - ingres_next_error can be followed by a call to - ingres_errno, ingres_error - or ingres_errsqlstate to get the respective error - number, error text, or SQL STATE. While - ingres_next_error returns &true;, there are more errors - to fetch. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - - - - &reftitle.returnvalues; - - ingres_next_error returns &true; if there is another - error to retrieve or &false; when there are no more errors - - - - - &reftitle.seealso; - - - ingres_errno - ingres_error - ingres_errsqlstate - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-num-fields.xml b/reference/ingres-ii/functions/ingres-num-fields.xml deleted file mode 100644 index c4f6edc1ba..0000000000 --- a/reference/ingres-ii/functions/ingres-num-fields.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - ingres_num_fields - Get the number of fields returned by the last query - - - - &reftitle.description; - - intingres_num_fields - resourceresult - - - ingres_num_fields returns the number of - fields in the results returned by the Ingres server after a call - to ingres_query. - - - - - &reftitle.parameters; - - - - result - - - The query result identifier - - - - - - - - - &reftitle.returnvalues; - - Returns the number of fields - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-num-rows.xml b/reference/ingres-ii/functions/ingres-num-rows.xml deleted file mode 100644 index e38e485d2f..0000000000 --- a/reference/ingres-ii/functions/ingres-num-rows.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - ingres_num_rows - Get the number of rows affected or returned by a query - - - - &reftitle.description; - - intingres_num_rows - resourceresult - - - This function primarily is meant to get the number of rows - modified in the database. However, it can be used to retrieve the number of - rows to fetch for a SELECT statement. - - - - If scrollable cursors are disabled and - this function is called before - using ingres_fetch_array, - ingres_fetch_object, or - ingres_fetch_row, the server will delete - the result's data and the script will be unable to get them. - - - Instead, you should retrieve the result's data using one of - these fetch functions in a loop until it returns &false;, - indicating that no more results are available. - - - - - - &reftitle.parameters; - - - - result - - - The result identifier for a query - - - - - - - - - &reftitle.returnvalues; - - For delete, insert, or update queries, - ingres_num_rows returns the number of rows - affected by the query. For other queries, - ingres_num_rows returns the number of rows - in the query's result. - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-pconnect.xml b/reference/ingres-ii/functions/ingres-pconnect.xml deleted file mode 100644 index a0cac9b749..0000000000 --- a/reference/ingres-ii/functions/ingres-pconnect.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - ingres_pconnect - Open a persistent connection to an Ingres database - - - - &reftitle.description; - - resourcefalseingres_pconnect - stringdatabase - stringusername - stringpassword - arrayoptions - - - Open a persistent connection to an Ingres database. - - - There are only two differences between this function and - ingres_connect: First, when connecting, the - function will initially try to find a (persistent) link that is - already opened with the same parameters. If one is found, an - identifier for it will be returned instead of opening a new - connection. Second, the connection to the Ingres server will not - be closed when the execution of the script ends. Instead, the - link will remain open for future use - (ingres_close will not close links - established by ingres_pconnect). This type - of link is therefore called "persistent". - - - - - &reftitle.parameters; - - - - database - - - The database name. Must follow the syntax: - - - [vnode::]dbname[/svr_class] - - - - - username - - - The Ingres user name - - - - - password - - - The password associated with username - - - - - options - - - See ingres_connect for the list of options that - can be passed - - - - - - - - - &reftitle.returnvalues; - - Returns an Ingres link resource on success&return.falseforfailure; - - - - - &reftitle.seealso; - - - ingres_connect - ingres_close - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-prepare.xml b/reference/ingres-ii/functions/ingres-prepare.xml deleted file mode 100644 index b70933baa6..0000000000 --- a/reference/ingres-ii/functions/ingres-prepare.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - ingres_prepare - Prepare a query for later execution - - - - &reftitle.description; - - mixedingres_prepare - resourcelink - stringquery - - - Prepares a query for execution by ingres_execute. - - - The query becomes part of the currently open transaction. If - there is no open transaction, ingres_query - opens a new transaction. To close the transaction, you can - call either ingres_commit to commit the changes - made to the database or ingres_rollback to - cancel these changes. When the script ends, any open transaction - is rolled back (by calling - ingres_rollback). You can also use - ingres_autocommit before opening a new - transaction to have every SQL query immediately committed. - - - - Related Configurations - - See also the ingres.describe, - ingres.scrollable and - ingres.utf8 directives in - Runtime Configuration. - - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - query - - - A valid SQL query (see the Ingres SQL reference - guide) in the Ingres documentation. - See the query - parameter in ingres_query for a list of SQL - statements which cannot be executed using - ingres_prepare - - - - - - - - - &reftitle.returnvalues; - - ingres_prepare returns a query result identifier that - is used with ingres_execute to execute the query. To see - if an error occurred, use ingres_errno, - ingres_error, or - ingres_errsqlstate. - - - - - - - &reftitle.seealso; - - - ingres_unbuffered_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - ingres_commit - ingres_rollback - ingres_autocommit - ingres_set_environment - ingres_errno - ingres_error - - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-query.xml b/reference/ingres-ii/functions/ingres-query.xml deleted file mode 100644 index a56f6b3b13..0000000000 --- a/reference/ingres-ii/functions/ingres-query.xml +++ /dev/null @@ -1,335 +0,0 @@ - - - - - ingres_query - Send an SQL query to Ingres - - - - &reftitle.description; - - mixedingres_query - resourcelink - stringquery - arrayparams - stringtypes - - - ingres_query sends the given - query to the Ingres server. - - - The query becomes part of the currently open transaction. If - there is no open transaction, ingres_query - opens a new transaction. To close the transaction, you can - call either ingres_commit to commit the changes - made to the database or ingres_rollback to - cancel these changes. When the script ends, any open transaction - is rolled back (by calling - ingres_rollback). You can also use - ingres_autocommit before opening a new - transaction to have every SQL query immediately committed. - - - Related Configurations - - See also the ingres.describe, - ingres.scrollable and - ingres.utf8 directives in - Runtime Configuration - - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier. - - - - - query - - - A valid SQL query (see the Ingres SQL reference - guide) in the Ingres documentation. - - - Data inside the query should be properly escaped. - - - The following types of SQL queries cannot be sent with this function: - - - - close (see ingres_close) - - - - - commit (see ingres_commit) - - - - - connect (see ingres_connect) - - - - - disconnect (see ingres_close) - - - - get dbevent - - - prepare to commit - - - - rollback (see ingres_rollback) - - - savepoint - - - set autocommit (see ingres_autocommit) - - - - all cursor-related queries are unsupported - - - - - - - params - - - An array of parameter values to be used with the query - - - - - types - - - A string containing a sequence of types for the parameter values - passed. When ingres.describe - is enabled, this parameter can be ignored as the driver automatically - fetches the expected parameter types from the server. - - - - - - Type code - Ingres type - - - - - a - BOOLEAN - - - b - BYTE - - - B - LONG BYTE/BLOB - - - c - CHAR - - - d - DATE/ANSIDATE/TIMESTAMP/TIME - - - f - FLOAT - - - i - INTEGER - - - L - LONG TEXT - - - m - MONEY - - - M - LONG NVARCHAR - - - n - NCHAR - - - N - NVARCHAR - - - t - TEXT - - - v - VARCHAR - - - V - LONG VARCHAR - - - - - - - - - - - - &reftitle.returnvalues; - - ingres_query returns a query result identifier on - success else it returns &false;. To see if an error - occurred use ingres_errno, - ingres_error or - ingres_errsqlstate. - - - - - &reftitle.examples; - - - Send a simple select - - -]]> - - - - Passing query parameters to <function>ingres_query</function> - - -]]> - - - - Inserting a BLOB with parameter types - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_unbuffered_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - ingres_commit - ingres_rollback - ingres_autocommit - ingres_set_environment - ingres_errno - ingres_error - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-result-seek.xml b/reference/ingres-ii/functions/ingres-result-seek.xml deleted file mode 100644 index 0e0d3938f2..0000000000 --- a/reference/ingres-ii/functions/ingres-result-seek.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - ingres_result_seek - Set the row position before fetching data - - - - &reftitle.description; - - boolingres_result_seek - resourceresult - intposition - - - This function is used to position the cursor associated with the result - resource before issuing a fetch. If ingres.array_index_start - is set to 0 then the first row is 0 else it is 1. - ingres_result_seek can be used only with queries that - make use of scrollable - cursors. It cannot be used with - ingres_unbuffered_query. - - - - Related Configurations - - See also the ingres.scrollable - and ingres.array_index_start directives in - Runtime Configuration. - - - - - - &reftitle.parameters; - - - - result - - - The result identifier for a query - - - - - position - - - The row to position the cursor on. If ingres.array_index_start - is set to 0, then the first row is 0, else it is 1 - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - - Position the cursor on the 3rd row - -ap_iatacode . " - " . $airport->ap_name . "\n"; - } -} - -ingres_commit($link); - -?> -]]> - - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-rollback.xml b/reference/ingres-ii/functions/ingres-rollback.xml deleted file mode 100644 index 92545e8b4b..0000000000 --- a/reference/ingres-ii/functions/ingres-rollback.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - ingres_rollback - Roll back a transaction - - - - &reftitle.description; - - boolingres_rollback - resourcelink - - - ingres_rollback rolls back the currently - open transaction, actually cancelling all changes made to the - database during the transaction. - - - This closes the transaction. A new transaction can be opened by sending a - query with ingres_query. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - ingres_query - ingres_commit - ingres_autocommit - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-set-environment.xml b/reference/ingres-ii/functions/ingres-set-environment.xml deleted file mode 100644 index 016ab5f310..0000000000 --- a/reference/ingres-ii/functions/ingres-set-environment.xml +++ /dev/null @@ -1,236 +0,0 @@ - - - - - ingres_set_environment - Set environment features controlling output options - - - - &reftitle.description; - - boolingres_set_environment - resourcelink - arrayoptions - - - ingres_set_environment is called to set environmental - options that affect the output of certain values from Ingres, such as the - timezone, date format, decimal character separator, and float precision. - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - options - - - An enumerated array of option name/value pairs. The following table - lists the option name and the expected type - - - - - - - Option name - Option type - Description - Example - - - - - date_century_boundary - int - The threshold by which a 2-digit year is determined to be in - the current century or in the next century. Equivalent to II_DATE_CENTURY_BOUNDARY - 50 - - - timezone - string - Controls the timezone of the session. If not set, it will - default the value defined by II_TIMEZONE_NAME. If - II_TIMEZONE_NAME is not defined, NA-PACIFIC (GMT-8 with Daylight - Savings) is used. - UNITED-KINGDOM - - - date_format - int - Sets the allowable input and output format for Ingres dates. - Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is - not set, the default date format is US, for example mm/dd/yy. Valid values - for date_format are: - - INGRES_DATE_DMY - INGRES_DATE_FINISH - INGRES_DATE_GERMAN - INGRES_DATE_ISO - INGRES_DATE_ISO4 - INGRES_DATE_MDY - INGRES_DATE_MULTINATIONAL - INGRES_DATE_MULTINATIONAL4 - INGRES_DATE_YMD - INGRES_DATE_US - - - - INGRES_DATE_ISO4 - - - decimal_separator - string - The character identifier for decimal data - "," - - - money_lort - int - Leading or trailing currency sign. Valid values for money_lort - are: - - INGRES_MONEY_LEADING - INGRES_MONEY_TRAILING - - - - INGRES_MONEY_LEADING - - - money_sign - string - The currency symbol to be used with the MONEY datatype - - - - money_precision - int - The precision of the MONEY datatype - 2 - - - float4_precision - int - Precision of the FLOAT4 datatype - 10 - - - float8_precision - int - Precision of the FLOAT8 data - 10 - - - blob_segment_length - int - The amount of data in bytes to fetch at a time when retrieving - BLOB or CLOB data. Defaults to 4096 bytes when not set explicitly - 8192 - - - - - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - &reftitle.examples; - - - Set date_format to ISO4 - - INGRES_DATE_ISO4 ); - -if (ingres_set_environment($link, $options)) -{ - $result=ingres_query($link,"select date('now') as date"); - - while ( $object = ingres_fetch_object ($result) ) { - echo $object->date."\n"; - } -} -?> -]]> - - - - Set timezone to HONG-KONG - - "HONG-KONG"); - -if (ingres_set_environment($link, $options)) -{ - $result=ingres_query($link,"select date('now') as date"); - - while ( $object = ingres_fetch_object ($result) ) { - echo $object->date."\n"; - } -} -?> -]]> - - - - - - - - &reftitle.seealso; - - - ingres_connect - ingres_query - - - - - - - diff --git a/reference/ingres-ii/functions/ingres-unbuffered-query.xml b/reference/ingres-ii/functions/ingres-unbuffered-query.xml deleted file mode 100644 index 1fabc70c40..0000000000 --- a/reference/ingres-ii/functions/ingres-unbuffered-query.xml +++ /dev/null @@ -1,224 +0,0 @@ - - - - - ingres_unbuffered_query - Send an unbuffered SQL query to Ingres - - - - &reftitle.description; - - mixedingres_unbuffered_query - resourcelink - stringquery - arrayparams - stringtypes - - - ingres_unbuffered_query sends the given - query to the Ingres server. - - - The query becomes part of the currently open transaction. If - there is no open transaction, ingres_unbuffered_query - opens a new transaction. To close the transaction, you can - call either ingres_commit to commit the changes - made to the database or ingres_rollback to - cancel these changes. When the script ends, any open transaction - is rolled back (by calling - ingres_rollback). You can also use - ingres_autocommit before opening a new - transaction to have every SQL query immediately committed. - Ingres allows only a single unbuffered statement to be active at any - one time. The extension will close any active unbuffered statements before - executing any SQL. In addition you cannot use - ingres_result_seek to position the row before - fetching. - - - - Related Configurations - - See also the ingres.describe - and ingres.utf8 directives in - Runtime Configuration. - - - - - - &reftitle.parameters; - - - - link - - - The connection link identifier - - - - - query - - - A valid SQL query (see the Ingres SQL reference - guide) in the Ingres documentation. - See the query - parameter in ingres_query for a list of SQL - statements that cannot be executed via - ingres_unbuffered_query. - - - Data inside the query should be properly escaped. - - - - - params - - - An array of parameter values to be used with the query - - - - - types - - - A string containing a sequence of types for the parameter values - passed. See the types parameter in - ingres_query for the list of type codes. - - - - - - - - - &reftitle.returnvalues; - - ingres_unbuffered_query returns a query result identifier when - there are rows to fetch; else it returns &false; when there are no rows, as - is the case of an INSERT, UPDATE, or DELETE statement. To see if an error - occurred, use ingres_errno, - ingres_error, or - ingres_errsqlstate. - - - - - &reftitle.examples; - - - Issue a simple un-buffered select - - -]]> - - - - Passing query parameters to <function>ingres_unbuffered_query</function> - - -]]> - - - - Inserting a BLOB with parameter types - - -]]> - - - - - - - &reftitle.seealso; - - - ingres_query - ingres_fetch_array - ingres_fetch_assoc - ingres_fetch_object - ingres_fetch_row - ingres_commit - ingres_rollback - ingres_autocommit - ingres_set_environment - ingres_errno - ingres_error - - - - - - - diff --git a/reference/ingres-ii/ini.xml b/reference/ingres-ii/ini.xml deleted file mode 100644 index 9df1fc4892..0000000000 --- a/reference/ingres-ii/ini.xml +++ /dev/null @@ -1,391 +0,0 @@ - - -
- &reftitle.runtime; - &extension.runtime; - - - Ingres configuration options - - - - &Name; - &Default; - &Changeable; - &Changelog; - - - - - ingres.allow_persistent - "1" - PHP_INI_SYSTEM - Available since ingres 1.0.0 - - - ingres.array_index_start - "1" - PHP_INI_ALL - Available since ingres 1.4.0. - - - ingres.auto - "1" - PHP_INI_ALL - Available since ingres 2.0.0. - - - ingres.blob_segment_length - "4096" - PHP_INI_ALL - Available since ingres 1.2.0. - - - ingres.cursor_mode - "0" - PHP_INI_ALL - Available since ingres 1.1.0. - - - ingres.default_database - NULL - PHP_INI_ALL - Available since ingres 1.0.0 - - - ingres.default_password - NULL - PHP_INI_ALL - Available since ingres 1.0.0 - - - ingres.default_user - NULL - PHP_INI_ALL - Available since ingres 1.0.0 - - - ingres.describe - 1 - PHP_INI_ALL - Available since ingres 2.1.0 - - - ingres.fetch_buffer_size - 100 - PHP_INI_ALL - Available since ingres 2.1.0 - - - ingres.max_links - "-1" - PHP_INI_SYSTEM - Available since ingres 1.0.0 - - - ingres.max_persistent - "-1" - PHP_INI_SYSTEM - Available since ingres 1.0.0 - - - ingres.reuse_connection - "1" - PHP_INI_ALL - Available since ingres 2.0.0 - - - ingres.scrollable - "1" - PHP_INI_ALL - Available since ingres 2.0.0. - - - ingres.trace - "0" - PHP_INI_ALL - Available since ingres 2.0.0. - - - ingres.trace_connect - "0" - PHP_INI_ALL - Available since ingres 1.2.1. - - - ingres.utf8 - "1" - PHP_INI_ALL - Available since ingres 2.0.0. - - - -
- &ini.php.constants; -
- - &ini.descriptions.title; - - - - - - ingres.allow_persistent - bool - - - - Specifies whether to allow - persistent connections - to Ingres - - - - - - ingres.array_index_start - int - - - - Specifies the start value for an integer key for arrays - generated by ingres_fetch_row or - ingres_fetch_array. By default - ingres.array_index_start is set to 1. If you wish - to make the ingres extension behave like other database extensions set - this configuration option to 0. - - - - - - ingres.auto - bool - - - - Enables or disables autocommit emulation. Ingres cannot have multiple cursors - open with autocommit enabled. When enabled, the driver emulates autocommit. - - - - - - ingres.blob_segment_length - int - - - - Specifies the amount of memory to use when reading BLOB data, in bytes - - - - - - ingres.cursor_mode - int - - - - Specifies the default mode for cursors opened with ingres_prepare(). Valid values - are INGRES_CURSOR_UPDATE or INGRES_CURSOR_READONLY. - - - - - - ingres.default_database - string - - - - Specifies the default database name to use when connecting to the database - server if no other name is specified. Does not apply in - &sqlsafemode;. - - - - - - ingres.default_password - string - - - - Specifies the default password to use when connecting to the database - server if no other name is specified. Does not apply in - &sqlsafemode;. - - - - - - ingres.default_user - string - - - - Specifies the default user name to use when connecting to the database - server if no other name is specified. Does not apply in - &sqlsafemode;. - - - - - - ingres.describe - bool - - - - Enables the use of DESCRIBE INPUT to determine the expected data types - for queries that use parameters. Available with Ingres 9.1.0 and later. - When disabled, queries that have parameters passed may need to manually - describe the types of those parameters using the types parameter in - ingres_query. - - - - Enabling this feature with ingres_query will cause additional - communications traffic between this extension and the server. To - minimize this additional traffic, use ingres_prepare and - ingres_execute. - - - - - - - ingres.fetch_buffer_size - int - - - - Specifies the number of pre-fetch rows that ingres_fetch_array, - ingres_fetch_object and - ingres_fetch_row will try and fetch in one fetch operation. - - - - - - ingres.max_links - int - - - - Specifies the maximum number of Ingres sessions allowed per process or thread. - The number of sessions should not exceed the total number of - connected sessions configured within Ingres. - - - - - - ingres.max_persistent - int - - - - Specifies the maximum number of persistent Ingres sessions allowed per process or - thread. The number of sessions should not exceed the total - number of connected sessions configured within Ingres. - - - - - - ingres.reuse_connection - bool - - - - Reuses an existing active connection if connecting to the same database - with the same user name - - - - - - ingres.scrollable - bool - - - - Enables support for scrollable cursors. When fetching CLOB or BLOB data, this - should be set to &false;. Available with Ingres 9.2.0 or later. - - - - - - ingres.trace - bool - - - - Enables simple tracing using E_NOTICE messages - - - - - - ingres.trace_connect - bool - - - - Prints E_NOTICE messages during - ingres_connect or ingres_pconnect calls - - - - - - ingres.utf8 - bool - - - - Assumes that strings being passed to National Character column types - (NVARCHAR or NCHAR) are using UTF8 encoding and converts them to UTF16 - for the server - - - - - - -
- - - diff --git a/reference/ingres-ii/reference.xml b/reference/ingres-ii/reference.xml deleted file mode 100644 index 13741b366a..0000000000 --- a/reference/ingres-ii/reference.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Ingres &Functions; - -&reference.ingres-ii.entities.functions; - - - - diff --git a/reference/ingres-ii/setup.xml b/reference/ingres-ii/setup.xml deleted file mode 100644 index f1c993624b..0000000000 --- a/reference/ingres-ii/setup.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - &reftitle.setup; - - -
- &reftitle.required; - - To use or build the PHP extension for Ingres you must have a working Ingres - client environment. You can download the client software for Ingres from - &url.ingres.downloads;. - -
- - - - &reference.ingres-ii.configure; - - - - &reference.ingres-ii.ini; - - - -
- &reftitle.resources; - - ingres_connect and - ingres_pconnect return an Ingres link identifier. - - - ingres_query and ingres_unbuffered_query return an Ingres result identifier. - -
- - -
- - - diff --git a/reference/ingres-ii/versions.xml b/reference/ingres-ii/versions.xml deleted file mode 100644 index 4d76950806..0000000000 --- a/reference/ingres-ii/versions.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reference/inotify/book.xml b/reference/inotify/book.xml index 62d51a78c0..b030f1a1da 100644 --- a/reference/inotify/book.xml +++ b/reference/inotify/book.xml @@ -2,6 +2,7 @@ + Inotify diff --git a/reference/inotify/functions/inotify-init.xml b/reference/inotify/functions/inotify-init.xml index 3acbf2f768..e3f566c568 100644 --- a/reference/inotify/functions/inotify-init.xml +++ b/reference/inotify/functions/inotify-init.xml @@ -18,6 +18,11 @@ inotify_add_watch + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/intl/collator/asort.xml b/reference/intl/collator/asort.xml index 8db6521af3..670950d837 100644 --- a/reference/intl/collator/asort.xml +++ b/reference/intl/collator/asort.xml @@ -82,9 +82,9 @@ - Default $sort_flag value is + Default flags value is Collator::SORT_REGULAR. - It is also used if an invalid $sort_flag value has been specified. + It is also used if an invalid flags value has been specified.
@@ -104,7 +104,7 @@ &reftitle.examples; - <function>collator_asort</function>example + <function>collator_asort</function> example - On error - bool - &false; - is returned. + Returns &false; on failure. &return.falseproblem; @@ -99,7 +96,7 @@ &reftitle.examples; - <function>collator_compare</function>example + <function>collator_compare</function> example stringlocale - Creates a new instance of Collator. + Creates a new instance of Collator. @@ -25,12 +25,12 @@ The locale whose collation rules should be used. Special values for - locales can be passed in - if null is passed for the locale, the - default locale's collation rules will be used. If "root" is passed, - UCA rules will be used. + locales can be passed in - if &null; is passed for the locale, the + default locale's collation rules will be used. If "root" is passed, + UCA rules will be used. - The Locale attribute is typically the most important attribute for + The locale attribute is typically the most important attribute for correct sorting and matching, according to the user expectations in different countries and regions. The default UCA @@ -68,17 +68,16 @@ &reftitle.returnvalues; - Returns Collator instance. + Returns Collator instance. &reftitle.errors; - Returns an "empty" object on error. You can use - intl_get_error_code - and/or - intl_get_error_message + Returns an "empty" object on error. + Use intl_get_error_code + and/or intl_get_error_message to know what happened. @@ -91,7 +90,7 @@ ]]> diff --git a/reference/intl/collator/create.xml b/reference/intl/collator/create.xml index cd3666d281..32014e32f1 100644 --- a/reference/intl/collator/create.xml +++ b/reference/intl/collator/create.xml @@ -35,7 +35,7 @@ The locale containing the required collation rules. Special values for - locales can be passed in - if null is passed for the locale, the + locales can be passed in - if &null; is passed for the locale, the default locale collation rules will be used. If empty string ("") or "root" are passed, UCA rules will be used. diff --git a/reference/intl/collator/get-attribute.xml b/reference/intl/collator/get-attribute.xml index 6ccd4325f4..2c37d53fca 100644 --- a/reference/intl/collator/get-attribute.xml +++ b/reference/intl/collator/get-attribute.xml @@ -57,7 +57,7 @@ &reftitle.returnvalues; - Attribute value, or bool &false; on error. + Attribute value,&return.falseforfailure;. diff --git a/reference/intl/collator/get-locale.xml b/reference/intl/collator/get-locale.xml index 85832a8c8f..e218cabaed 100644 --- a/reference/intl/collator/get-locale.xml +++ b/reference/intl/collator/get-locale.xml @@ -61,8 +61,7 @@ &reftitle.returnvalues; Real locale name from which the collation data comes. If the collator was - instantiated from rules or an error occurred, returns - bool &false;. + instantiated from rules or an error occurred, returns &false;. diff --git a/reference/intl/collator/get-sort-key.xml b/reference/intl/collator/get-sort-key.xml index 0b5b3ccd45..1fbf215cbc 100644 --- a/reference/intl/collator/get-sort-key.xml +++ b/reference/intl/collator/get-sort-key.xml @@ -62,28 +62,6 @@ &return.falseproblem; - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 5.3.15, 5.4.5 - - Sort keys do no longer contain any NUL bytes. - - - - - - - &reftitle.examples; diff --git a/reference/intl/collator/get-strength.xml b/reference/intl/collator/get-strength.xml index f90ee3ec91..142f3e737c 100644 --- a/reference/intl/collator/get-strength.xml +++ b/reference/intl/collator/get-strength.xml @@ -48,7 +48,7 @@ &reftitle.returnvalues; - Returns current collation strength, or bool &false; on error. + Returns current collation strength,&return.falseforfailure;. diff --git a/reference/intl/collator/set-attribute.xml b/reference/intl/collator/set-attribute.xml index 25c1cf700a..aca102bc33 100644 --- a/reference/intl/collator/set-attribute.xml +++ b/reference/intl/collator/set-attribute.xml @@ -39,7 +39,7 @@ object - Collator object. + Collator object. diff --git a/reference/intl/collator/set-strength.xml b/reference/intl/collator/set-strength.xml index 2b8ec65262..f51808c71c 100644 --- a/reference/intl/collator/set-strength.xml +++ b/reference/intl/collator/set-strength.xml @@ -37,21 +37,21 @@ - Primary Level: + Primary Level: Typically, this is used to denote differences between base characters (for example, "a" < "b"). It is the strongest difference. For example, dictionaries are divided into different sections by base - character. This is also called the level1 strength. + character. This is also called the level 1 strength. - Secondary Level: + Secondary Level: Accents in the characters are considered secondary differences (for example, "as" < "às" < "at"). Other differences between letters can also be considered secondary differences, depending on the language. A secondary difference is ignored when there is a primary difference - anywhere in the strings. This is also called the level2 strength. + anywhere in the strings. This is also called the level 2 strength. Note: In some languages (such as Danish), certain accented letters are @@ -64,40 +64,40 @@ - Tertiary Level: + Tertiary Level: Upper and lower case differences in characters are distinguished at the tertiary level (for example, "ao" < "Ao" < "aò"). In addition, a variant of a letter differs from the base form on the tertiary level (such as "A" and " "). Another example is the difference between large and small Kana. A tertiary difference is ignored when there is a primary or secondary difference anywhere in the strings. This is also called the - level3 strength. + level 3 strength. - Quaternary Level: - When punctuation is ignored (see Ignoring Punctuations ) at level 13, + Quaternary Level: + When punctuation is ignored (see Ignoring Punctuations ) at levels 1-3, an additional level can be used to distinguish words with and without punctuation (for example, "ab" < "a-b" < "aB"). This difference is ignored when there is a primary, secondary or tertiary difference. This - is also known as the level4 strength. The quaternary level should only + is also known as the level 4 strength. The quaternary level should only be used if ignoring punctuation is required or when processing Japanese text (see Hiragana processing). - Identical Level: + Identical Level: When all other levels are equal, the identical level is used as a tiebreaker. The Unicode code point values of the NFD form of each string are compared at this level, just in case there is no difference at - levels 14. For example, Hebrew cantillation marks are only distinguished + levels 1-4. For example, Hebrew cantillation marks are only distinguished at this level. This level should be used sparingly, as only code point values differences between two strings is an extremely rare occurrence. Using this level substantially decreases the performance for both incremental comparison and sort key generation (as well as increasing - the sort key length). It is also known as level 5 strength. + the sort key length). It is also known as level 5 strength. diff --git a/reference/intl/dateformatter/get-timezone-id.xml b/reference/intl/dateformatter/get-timezone-id.xml index f42286dc72..7f95d22e32 100644 --- a/reference/intl/dateformatter/get-timezone-id.xml +++ b/reference/intl/dateformatter/get-timezone-id.xml @@ -65,9 +65,9 @@ $fmt = datefmt_create( 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); -echo 'timezone_id of the formatter is : ' . datefmt_get_timezone_id($fmt); -datefmt_set_timezone_id($fmt, 'CN'); -echo 'Now timezone_id of the formatter is : ' . datefmt_get_timezone_id($fmt); +echo 'timezone_id of the formatter is: ' . datefmt_get_timezone_id($fmt) . "\n"; +datefmt_set_timezone($fmt, 'Europe/Madrid'); +echo 'Now timezone_id of the formatter is: ' . datefmt_get_timezone_id($fmt); ?> ]]> @@ -85,9 +85,9 @@ $fmt = new IntlDateFormatter( 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); -echo 'timezone_id of the formatter is : ' . $fmt->getTimezoneId(); -$fmt->setTimezoneId('CN'); -echo 'Now timezone_id of the formatter is : ' . $fmt->getTimezoneId(); +echo 'timezone_id of the formatter is: ' . $fmt->getTimezoneId() . "\n"; +$fmt->setTimezone('Europe/Madrid'); +echo 'Now timezone_id of the formatter is: ' . $fmt->getTimezoneId(); ?> ]]> @@ -96,8 +96,8 @@ echo 'Now timezone_id of the formatter is : ' . $fmt->getTimezoneId(); &example.outputs; @@ -106,7 +106,7 @@ Now timezone_id of the formatter is : CN &reftitle.seealso; - datefmt_set_timezone_id + datefmt_set_timezone datefmt_create diff --git a/reference/intl/functions/intl-get-error-code.xml b/reference/intl/functions/intl-get-error-code.xml index 26c26e836e..0ffdd11089 100644 --- a/reference/intl/functions/intl-get-error-code.xml +++ b/reference/intl/functions/intl-get-error-code.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/intl/functions/intl-get-error-message.xml b/reference/intl/functions/intl-get-error-message.xml index e599b14012..c4fab7f55d 100644 --- a/reference/intl/functions/intl-get-error-message.xml +++ b/reference/intl/functions/intl-get-error-message.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/intl/ini.xml b/reference/intl/ini.xml index 88e3ee5627..405afbf3dc 100644 --- a/reference/intl/ini.xml +++ b/reference/intl/ini.xml @@ -34,7 +34,7 @@ intl.use_exceptions 0 PHP_INI_ALL - Available since PHP 5.5 and PECL 3.0.0a1 + Available since PECL 3.0.0a1 diff --git a/reference/intl/intlcalendar/geterrormessage.xml b/reference/intl/intlcalendar/geterrormessage.xml index b5e797633b..a862283d31 100644 --- a/reference/intl/intlcalendar/geterrormessage.xml +++ b/reference/intl/intlcalendar/geterrormessage.xml @@ -48,7 +48,7 @@ &reftitle.returnvalues; The error message associated with last error that occurred in a function call - on this object, or a string indicating the non-existance of an error. + on this object, or a string indicating the non-existence of an error. diff --git a/reference/intl/intlchar/chartype.xml b/reference/intl/intlchar/chartype.xml index 5020cacc51..65a40e30b6 100644 --- a/reference/intl/intlchar/chartype.xml +++ b/reference/intl/intlchar/chartype.xml @@ -10,8 +10,8 @@ &reftitle.description; - public static intIntlChar::charType - mixedcodepoint + public static intnullIntlChar::charType + intstringcodepoint Returns the general category value for the code point. @@ -82,6 +82,7 @@ var_dump(IntlChar::charType("A") === IntlChar::CHAR_CATEGORY_UPPERCASE_LETTER); var_dump(IntlChar::charType(".") === IntlChar::CHAR_CATEGORY_OTHER_PUNCTUATION); var_dump(IntlChar::charType("\t") === IntlChar::CHAR_CATEGORY_CONTROL_CHAR); var_dump(IntlChar::charType("\u{2603}") === IntlChar::CHAR_CATEGORY_OTHER_SYMBOL); +var_dump(IntlChar::charType("multiple chars") === null); ?> ]]> @@ -92,6 +93,7 @@ bool(true) bool(true) bool(true) bool(true) +bool(true) ]]> diff --git a/reference/intl/intlchar/chr.xml b/reference/intl/intlchar/chr.xml index b6776cadfb..68ee72709b 100644 --- a/reference/intl/intlchar/chr.xml +++ b/reference/intl/intlchar/chr.xml @@ -17,7 +17,7 @@ Returns a string containing the character specified by the Unicode code point value. - This function compliments IntlChar::ord. + This function complements IntlChar::ord. @@ -71,6 +71,7 @@ string(3) "☃" IntlChar::ord + mb_chr chr diff --git a/reference/intl/intlchar/getpropertyenum.xml b/reference/intl/intlchar/getpropertyenum.xml index 63d84bc325..3451f3305d 100644 --- a/reference/intl/intlchar/getpropertyenum.xml +++ b/reference/intl/intlchar/getpropertyenum.xml @@ -22,7 +22,7 @@ IntlChar::PROPERTY_GENERAL_CATEGORY_MASK. These names are not in PropertyAliases.txt. - This function compliments IntlChar::getPropertyName. + This function complements IntlChar::getPropertyName. diff --git a/reference/intl/intlchar/getpropertyname.xml b/reference/intl/intlchar/getpropertyname.xml index c5b76b3d5a..96259e5ac2 100644 --- a/reference/intl/intlchar/getpropertyname.xml +++ b/reference/intl/intlchar/getpropertyname.xml @@ -22,7 +22,7 @@ synthetic names "gcm" / "General_Category_Mask". These names are not in PropertyAliases.txt. - This function compliments IntlChar::getPropertyEnum. + This function complements IntlChar::getPropertyEnum. diff --git a/reference/intl/intlchar/isxdigit.xml b/reference/intl/intlchar/isxdigit.xml index 085d4acf67..e59c1fdf8e 100644 --- a/reference/intl/intlchar/isxdigit.xml +++ b/reference/intl/intlchar/isxdigit.xml @@ -46,22 +46,6 @@ - - &reftitle.notes; - - - In order to narrow the definition of hexadecimal digits to only ASCII characters use: - - - -]]> - - - - &reftitle.examples; @@ -86,6 +70,22 @@ bool(false) + + &reftitle.notes; + + + In order to narrow the definition of hexadecimal digits to only ASCII characters use: + + + +]]> + + + + &reftitle.seealso; diff --git a/reference/intl/intlchar/ord.xml b/reference/intl/intlchar/ord.xml index 280d8d40bd..d7f9a46e63 100644 --- a/reference/intl/intlchar/ord.xml +++ b/reference/intl/intlchar/ord.xml @@ -17,7 +17,7 @@ Returns the Unicode code point value of the given character. - This function compliments IntlChar::chr. + This function complements IntlChar::chr. @@ -27,9 +27,7 @@ character - - A Unicode character. - + &intl.codepoint.parameter; @@ -70,9 +68,8 @@ int(9731) &reftitle.seealso; - IntlChar::isalnum - IntlChar::isdigit IntlChar::chr + mb_ord ord diff --git a/reference/intl/locale/compose-locale.xml b/reference/intl/locale/compose-locale.xml index ddeb9af1b6..b43c944aee 100644 --- a/reference/intl/locale/compose-locale.xml +++ b/reference/intl/locale/compose-locale.xml @@ -42,22 +42,22 @@ subtags - an array containing a list of key-value pairs, where the keys identify + An &array; containing a list of key-value pairs, where the keys identify the particular locale ID subtags, and the values are the associated - subtag values. + subtag values. - The 'variant' and 'private' subtags can take maximum 15 values - whereas 'extlang' can take maximum 3 values.e.g. Variants are allowed + The 'variant' and 'private' subtags can take maximum 15 values + whereas 'extlang' can take maximum 3 values. For instance, variants are allowed with the suffix ranging from 0-14. Hence the keys for the input array - can be variant0, variant1, ...,variant14. In the returned locale id, - the subtag is ordered by suffix resulting in variant0 followed by - variant1 followed by variant2 and so on. + can be variant0, variant1, …,variant14. In the returned locale id, + the subtag is ordered by suffix resulting in variant0 followed by + variant1 followed by variant2 and so on. - The 'variant', 'private' and 'extlang' multiple values can be specified both - as array under specific key (e.g. 'variant') and as multiple numbered keys - (e.g. 'variant0', 'variant1', etc.). + Alternatively, the 'variant', 'private' and 'extlang' values can be specified + as array under specific key (e.g. 'variant'). + In this case no limits on the number of recognized subtags apply. @@ -83,15 +83,15 @@ 'en' , - 'script' =>'Hans' , + 'language'=>'en', + 'script' =>'Hans', 'region' =>'CN', - 'variant2'=>'rozaj' , - 'variant1'=>'nedis' , - 'private1'=>'prv1' , - 'private2'=>'prv2' + 'variant2'=>'rozaj', + 'variant1'=>'nedis', + 'private1'=>'prv1', + 'private2'=>'prv2', ); -echo locale_compose( $arr ); +echo locale_compose($arr); ?> ]]> @@ -103,14 +103,14 @@ echo locale_compose( $arr ); 'en' , - 'script' =>'Hans' , + 'script' =>'Hans', 'region' =>'CN', - 'variant2'=>'rozaj' , - 'variant1'=>'nedis' , - 'private1'=>'prv1' , - 'private2'=>'prv2' + 'variant2'=>'rozaj', + 'variant1'=>'nedis', + 'private1'=>'prv1', + 'private2'=>'prv2', ); -echo Locale::composeLocale( $arr ); +echo Locale::composeLocale($arr); ?> ]]> @@ -119,6 +119,47 @@ echo Locale::composeLocale( $arr ); + + + + Subtag limits + + If subtags are given as separate keys with numeric suffix, + unsupported keys are silently ignored (in this case 'extlang3'), + and ordered in the result by numeric suffix. + There are no limits, if subtags are given as &array;; the order is as given. + + + 'en', + 'script' => 'Hans', + 'region' => 'CN', + 'extlang3' => 'd', + 'extlang2' => 'c', + 'extlang1' => 'b', + 'extlang0' => 'a', +); +echo locale_compose($arr), PHP_EOL; + +$arr = array( + 'language' => 'en', + 'script' => 'Hans', + 'region' => 'CN', + 'extlang' => ['a', 'b', 'c', 'd'], +); +echo locale_compose($arr), PHP_EOL; +?> +]]> + + + &example.outputs; + + diff --git a/reference/intl/versions.xml b/reference/intl/versions.xml index 12c676286e..47d021cde7 100644 --- a/reference/intl/versions.xml +++ b/reference/intl/versions.xml @@ -4,437 +4,437 @@ Do NOT translate this file --> - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + JavaScript Object Notation JSON @@ -11,9 +11,8 @@ This extension implements the JavaScript Object Notation (JSON) - data-interchange format. The decoding in PHP 5 is handled by a parser based on - the JSON_checker by Douglas Crockford. PHP 7 comes with a completely new and - improved parser that is specifically written for PHP and licensed under the + data-interchange format. PHP comes with a parser + that is specifically written for PHP and licensed under the PHP license. &json.implementation.superset; diff --git a/reference/json/constants.xml b/reference/json/constants.xml index e29835ed26..80af6fc131 100644 --- a/reference/json/constants.xml +++ b/reference/json/constants.xml @@ -18,7 +18,6 @@ No error has occurred. - Available as of PHP 5.3.0. @@ -30,7 +29,6 @@ The maximum stack depth has been exceeded. - Available as of PHP 5.3.0. @@ -42,7 +40,6 @@ Occurs with underflow or with the modes mismatch. - Available as of PHP 5.3.0. @@ -54,7 +51,6 @@ Control character error, possibly incorrectly encoded. - Available as of PHP 5.3.0. @@ -66,7 +62,6 @@ Syntax error. - Available as of PHP 5.3.0. @@ -78,7 +73,6 @@ Malformed UTF-8 characters, possibly incorrectly encoded. - Available as of PHP 5.3.3. @@ -93,7 +87,6 @@ recursive references and cannot be encoded. If the JSON_PARTIAL_OUTPUT_ON_ERROR option was given, &null; will be encoded in the place of the recursive reference. - Available as of PHP 5.5.0. @@ -110,7 +103,6 @@ If the JSON_PARTIAL_OUTPUT_ON_ERROR option was given, 0 will be encoded in the place of these special numbers. - Available as of PHP 5.5.0. @@ -125,7 +117,6 @@ json_encode, such as a &resource;. If the JSON_PARTIAL_OUTPUT_ON_ERROR option was given, &null; will be encoded in the place of the unsupported value. - Available as of PHP 5.5.0. @@ -139,7 +130,6 @@ A key starting with \u0000 character was in the string passed to json_decode when decoding a JSON object into a PHP object. - Available as of PHP 7.0.0. @@ -152,7 +142,6 @@ Single unpaired UTF-16 surrogate in unicode escape contained in the JSON string passed to json_decode. - Available as of PHP 7.0.0. @@ -171,7 +160,6 @@ Decodes large integers as their original string value. - Available as of PHP 5.4.0. @@ -185,7 +173,6 @@ Decodes JSON objects as PHP array. This option can be added automatically by calling json_decode with the second parameter equal to &true;. - Available as of PHP 5.4.0. @@ -204,7 +191,6 @@ All < and > are converted to \u003C and \u003E. - Available as of PHP 5.3.0. @@ -216,7 +202,6 @@ All & are converted to \u0026. - Available as of PHP 5.3.0. @@ -228,7 +213,6 @@ All ' are converted to \u0027. - Available as of PHP 5.3.0. @@ -240,7 +224,6 @@ All " are converted to \u0022. - Available as of PHP 5.3.0. @@ -254,7 +237,6 @@ Outputs an object rather than an array when a non-associative array is used. Especially useful when the recipient of the output is expecting an object and the array is empty. - Available as of PHP 5.3.0. @@ -266,7 +248,6 @@ Encodes numeric strings as numbers. - Available as of PHP 5.3.3. @@ -278,7 +259,6 @@ Use whitespace in returned data to format it. - Available as of PHP 5.4.0. @@ -290,7 +270,6 @@ Don't escape /. - Available as of PHP 5.4.0. @@ -303,7 +282,6 @@ Encode multibyte Unicode characters literally (default is to escape as \uXXXX). - Available as of PHP 5.4.0. @@ -315,7 +293,6 @@ Substitute some unencodable values instead of failing. - Available as of PHP 5.5.0. @@ -327,7 +304,6 @@ Ensures that &float; values are always encoded as a float value. - Available as of PHP 5.6.6. diff --git a/reference/json/functions/json-last-error.xml b/reference/json/functions/json-last-error.xml index 8323ef6492..d01353b653 100644 --- a/reference/json/functions/json-last-error.xml +++ b/reference/json/functions/json-last-error.xml @@ -68,12 +68,12 @@ JSON_ERROR_UTF8 Malformed UTF-8 characters, possibly incorrectly encoded - PHP 5.3.3 + JSON_ERROR_RECURSION One or more recursive references in the value to be encoded - PHP 5.5.0 + JSON_ERROR_INF_OR_NAN @@ -83,22 +83,22 @@ or INF values in the value to be encoded - PHP 5.5.0 + JSON_ERROR_UNSUPPORTED_TYPE A value of a type that cannot be encoded was given - PHP 5.5.0 + JSON_ERROR_INVALID_PROPERTY_NAME A property name that cannot be encoded was given - PHP 7.0.0 + JSON_ERROR_UTF16 Malformed UTF-16 characters, possibly incorrectly encoded - PHP 7.0.0 + diff --git a/reference/json/jsonserializable.xml b/reference/json/jsonserializable.xml index 504a1fc4fa..a642742a7e 100644 --- a/reference/json/jsonserializable.xml +++ b/reference/json/jsonserializable.xml @@ -28,9 +28,9 @@ - - JsonSerializable - + + JsonSerializable + diff --git a/reference/ldap/constants.xml b/reference/ldap/constants.xml index 600dead073..2e5863412a 100644 --- a/reference/ldap/constants.xml +++ b/reference/ldap/constants.xml @@ -395,7 +395,7 @@ - Specifies the certificate checking checking strategy. This must be one of: LDAP_OPT_X_TLS_NEVER,LDAP_OPT_X_TLS_HARD, LDAP_OPT_X_TLS_DEMAND, + Specifies the certificate checking strategy. This must be one of: LDAP_OPT_X_TLS_NEVER,LDAP_OPT_X_TLS_HARD, LDAP_OPT_X_TLS_DEMAND, LDAP_OPT_X_TLS_ALLOW, LDAP_OPT_X_TLS_TRY. (Available as of PHP 7.0.0) diff --git a/reference/ldap/functions/ldap-add.xml b/reference/ldap/functions/ldap-add.xml index bf57591a36..9185410433 100644 --- a/reference/ldap/functions/ldap-add.xml +++ b/reference/ldap/functions/ldap-add.xml @@ -28,7 +28,7 @@ ldap - An LDAP link identifier, returned by ldap_connect. + &ldap.parameter.ldap; diff --git a/reference/ldap/functions/ldap-bind.xml b/reference/ldap/functions/ldap-bind.xml index ee42631879..18cfdc0a6c 100644 --- a/reference/ldap/functions/ldap-bind.xml +++ b/reference/ldap/functions/ldap-bind.xml @@ -27,7 +27,7 @@ ldap - An LDAP link identifier, returned by ldap_connect. + &ldap.parameter.ldap; diff --git a/reference/ldap/functions/ldap-compare.xml b/reference/ldap/functions/ldap-compare.xml index dc20cae0aa..23231d0da4 100644 --- a/reference/ldap/functions/ldap-compare.xml +++ b/reference/ldap/functions/ldap-compare.xml @@ -30,7 +30,7 @@ ldap - An LDAP link identifier, returned by ldap_connect. + &ldap.parameter.ldap; diff --git a/reference/ldap/functions/ldap-control-paged-result-response.xml b/reference/ldap/functions/ldap-control-paged-result-response.xml index 454b38c8b8..9add8e7826 100644 --- a/reference/ldap/functions/ldap-control-paged-result-response.xml +++ b/reference/ldap/functions/ldap-control-paged-result-response.xml @@ -34,7 +34,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink"> link - An LDAP link identifier, returned by ldap_connect. + &ldap.parameter.ldap; diff --git a/reference/ldap/functions/ldap-control-paged-result.xml b/reference/ldap/functions/ldap-control-paged-result.xml index 43c9cd1d74..29ef730d4b 100644 --- a/reference/ldap/functions/ldap-control-paged-result.xml +++ b/reference/ldap/functions/ldap-control-paged-result.xml @@ -34,7 +34,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink"> link - An LDAP link identifier, returned by ldap_connect. + &ldap.parameter.ldap; diff --git a/reference/ldap/functions/ldap-count-entries.xml b/reference/ldap/functions/ldap-count-entries.xml index 44c2c110ab..d23db1e38d 100644 --- a/reference/ldap/functions/ldap-count-entries.xml +++ b/reference/ldap/functions/ldap-count-entries.xml @@ -27,7 +27,7 @@ ldap - An LDAP link identifier, returned by ldap_connect. + &ldap.parameter.ldap; @@ -35,7 +35,7 @@ result - The internal LDAP result. + &ldap.parameter.result; @@ -46,7 +46,7 @@ &reftitle.returnvalues; - Returns number of entries in the result or &false; on error. + Returns number of entries in the result,&return.falseforfailure;. @@ -55,7 +55,7 @@ &reftitle.examples; - <function>ldap-count-entries</function> example + <function>ldap_count_entries</function> example Retrieve number of entries in the result. diff --git a/reference/sphinx/sphinxclient/setconnecttimeout.xml b/reference/ldap/functions/ldap-count-references.xml similarity index 50% rename from reference/sphinx/sphinxclient/setconnecttimeout.xml rename to reference/ldap/functions/ldap-count-references.xml index a7c6820e52..f35ed6ea62 100644 --- a/reference/sphinx/sphinxclient/setconnecttimeout.xml +++ b/reference/ldap/functions/ldap-count-references.xml @@ -1,57 +1,59 @@ - - - + - SphinxClient::setConnectTimeout - Set connection timeout + ldap_count_references + Counts the number of references in a search result &reftitle.description; - public boolSphinxClient::setConnectTimeout - floattimeout + intldap_count_references + resourceldap + resourceresult - Sets connection timeout (in seconds) for searchd connection. + Counts the number of references in a search result. &reftitle.parameters; - - - - timeout - - - Timeout in seconds. - - - - - + + + ldap + + + &ldap.parameter.ldap; + + + + + result + + + &ldap.parameter.result; + + + + &reftitle.returnvalues; - &return.success; + Returns the number of references in a search result. &reftitle.seealso; - - - - - + + ldap_connect + - + Lua Lua diff --git a/reference/lua/luaclosure/invoke.xml b/reference/lua/luaclosure/invoke.xml index a3965ea8c7..07d43c9561 100644 --- a/reference/lua/luaclosure/invoke.xml +++ b/reference/lua/luaclosure/invoke.xml @@ -58,7 +58,6 @@ CODE ); $lua->call($closure); -/* after PHP 5.3 */ $closure(); ?> ]]> diff --git a/reference/luasandbox/book.xml b/reference/luasandbox/book.xml index 3995098b3a..b3fd02b1d3 100644 --- a/reference/luasandbox/book.xml +++ b/reference/luasandbox/book.xml @@ -2,6 +2,7 @@ + LuaSandbox LuaSandbox diff --git a/reference/lzf/book.xml b/reference/lzf/book.xml index e7dda47102..bf248551c8 100644 --- a/reference/lzf/book.xml +++ b/reference/lzf/book.xml @@ -2,6 +2,7 @@ + LZF LZF diff --git a/reference/lzf/functions/lzf-optimized-for.xml b/reference/lzf/functions/lzf-optimized-for.xml index 0a2758e01f..ac3debe64f 100644 --- a/reference/lzf/functions/lzf-optimized-for.xml +++ b/reference/lzf/functions/lzf-optimized-for.xml @@ -18,6 +18,12 @@ Determines what was LZF extension optimized for during compilation. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; @@ -25,7 +31,6 @@
- + Mailparse diff --git a/reference/mailparse/functions/mailparse-msg-create.xml b/reference/mailparse/functions/mailparse-msg-create.xml index 4b8629049c..f20964653b 100644 --- a/reference/mailparse/functions/mailparse-msg-create.xml +++ b/reference/mailparse/functions/mailparse-msg-create.xml @@ -16,6 +16,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/math/constants.xml b/reference/math/constants.xml index 9867b3684e..68570e27e4 100644 --- a/reference/math/constants.xml +++ b/reference/math/constants.xml @@ -80,7 +80,7 @@ M_SQRTPI 1.77245385090551602729 sqrt(pi) - PHP 5.2.0 + M_2_SQRTPI @@ -98,7 +98,7 @@ M_SQRT3 1.73205080756887729352 sqrt(3) - PHP 5.2.0 + M_SQRT1_2 @@ -110,37 +110,37 @@ M_LNPI 1.14472988584940017414 log_e(pi) - PHP 5.2.0 + M_EULER 0.57721566490153286061 Euler constant - PHP 5.2.0 + PHP_ROUND_HALF_UP 1 Round halves up - PHP 5.3.0 + PHP_ROUND_HALF_DOWN 2 Round halves down - PHP 5.3.0 + PHP_ROUND_HALF_EVEN 3 Round halves to even numbers - PHP 5.3.0 + PHP_ROUND_HALF_ODD 4 Round halves to odd numbers - PHP 5.3.0 + NAN @@ -158,10 +158,6 @@ - - All constants without a labeled PHP version above are available - starting with PHP 5.0.0. - - + Mcrypt @@ -41,7 +41,6 @@ &reference.mcrypt.setup; &reference.mcrypt.constants; &reference.mcrypt.ciphers; - &reference.mcrypt.examples; &reference.mcrypt.reference; diff --git a/reference/mcrypt/examples.xml b/reference/mcrypt/examples.xml deleted file mode 100644 index 279a6d100f..0000000000 --- a/reference/mcrypt/examples.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - &reftitle.examples; - - Mcrypt can be used to encrypt and decrypt using the above - mentioned ciphers. If you linked against libmcrypt-2.2.x, the - four important mcrypt commands (mcrypt_cfb, - mcrypt_cbc, mcrypt_ecb, - and mcrypt_ofb) can operate in both modes - which are named MCRYPT_ENCRYPT and - MCRYPT_DECRYPT, respectively. - - - If you linked against libmcrypt 2.4.x or 2.5.x, these functions are still - available, but it is recommended that you use the advanced functions. - - Encrypt an input value with <literal>AES</literal> with a 256-bit key under 2.4.x and higher in <literal>CBC</literal> mode - - -]]> - - - This example will give you the encrypted data as a string in - $encrypted_data. For a full example see - mcrypt_module_open. - - - - diff --git a/reference/mcrypt/functions/mcrypt-cbc.xml b/reference/mcrypt/functions/mcrypt-cbc.xml deleted file mode 100644 index 7d06d385fc..0000000000 --- a/reference/mcrypt/functions/mcrypt-cbc.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - mcrypt_cbc - Encrypts/decrypts data in CBC mode - - - - - &warn.deprecated.function.5-5-0.removed.7-0-0.alternatives; - - mcrypt_decrypt - mcrypt_encrypt - - - - - - &reftitle.description; - - stringmcrypt_cbc - intcipher - stringkey - stringdata - intmode - stringiv - - - stringmcrypt_cbc - stringcipher - stringkey - stringdata - intmode - stringiv - - - The first prototype is when linked against libmcrypt 2.2.x, the - second when linked against libmcrypt 2.4.x or higher. The - mode should be either - MCRYPT_ENCRYPT or - MCRYPT_DECRYPT. - - - - - diff --git a/reference/mcrypt/functions/mcrypt-cfb.xml b/reference/mcrypt/functions/mcrypt-cfb.xml deleted file mode 100644 index 279972203d..0000000000 --- a/reference/mcrypt/functions/mcrypt-cfb.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - mcrypt_cfb - Encrypts/decrypts data in CFB mode - - - - - &warn.deprecated.function.5-5-0.removed.7-0-0.alternatives; - - mcrypt_decrypt - mcrypt_encrypt - - - - - - &reftitle.description; - - stringmcrypt_cfb - intcipher - stringkey - stringdata - intmode - stringiv - - - stringmcrypt_cfb - stringcipher - stringkey - stringdata - intmode - stringiv - - - The first prototype is when linked against libmcrypt 2.2.x, the - second when linked against libmcrypt 2.4.x or higher. The - mode should be either - MCRYPT_ENCRYPT or - MCRYPT_DECRYPT. - - - - - diff --git a/reference/mcrypt/functions/mcrypt-decrypt.xml b/reference/mcrypt/functions/mcrypt-decrypt.xml index 61df32a453..d7f0a7c970 100644 --- a/reference/mcrypt/functions/mcrypt-decrypt.xml +++ b/reference/mcrypt/functions/mcrypt-decrypt.xml @@ -73,33 +73,6 @@ Returns the decrypted data as a string &return.falseforfailure;. - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - Invalid key and iv sizes - are no longer accepted. mcrypt_decrypt will now throw - a warning and return &false; if the inputs are invalid. Previously keys and - IVs were padded with '\0' bytes to the next valid size. - - - - - - - &reftitle.seealso; diff --git a/reference/mcrypt/functions/mcrypt-ecb.xml b/reference/mcrypt/functions/mcrypt-ecb.xml deleted file mode 100644 index 29666a748e..0000000000 --- a/reference/mcrypt/functions/mcrypt-ecb.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - mcrypt_ecb - Deprecated: Encrypts/decrypts data in ECB mode - - - - - &warn.deprecated.function.5-5-0.removed.7-0-0.alternatives; - - mcrypt_decrypt - mcrypt_encrypt - - - - - - &reftitle.description; - - stringmcrypt_ecb - intcipher - stringkey - stringdata - intmode - - - stringmcrypt_ecb - stringcipher - stringkey - stringdata - intmode - stringiv - - - The first prototype is when linked against libmcrypt 2.2.x, the - second when linked against libmcrypt 2.4.x or higher. The - mode should be either - MCRYPT_ENCRYPT or - MCRYPT_DECRYPT. - - - - - diff --git a/reference/mcrypt/functions/mcrypt-encrypt.xml b/reference/mcrypt/functions/mcrypt-encrypt.xml index a8b3a5520d..231d7aced4 100644 --- a/reference/mcrypt/functions/mcrypt-encrypt.xml +++ b/reference/mcrypt/functions/mcrypt-encrypt.xml @@ -80,33 +80,6 @@ Returns the encrypted data as a string &return.falseforfailure;. - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - Invalid key and iv sizes - are no longer accepted. mcrypt_encrypt will now throw - a warning and return &false; if the inputs are invalid. Previously keys and - IVs were padded with '\0' bytes to the next valid size. - - - - - - - &reftitle.examples; diff --git a/reference/mcrypt/functions/mcrypt-generic-end.xml b/reference/mcrypt/functions/mcrypt-generic-end.xml deleted file mode 100644 index a9094cc988..0000000000 --- a/reference/mcrypt/functions/mcrypt-generic-end.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - mcrypt_generic_end - This function terminates encryption - - - - - &warn.deprecated.function.5-3-0.removed.7-0-0.alternatives; - - mcrypt_generic_deinit - - - - - - &reftitle.description; - - boolmcrypt_generic_end - resourcetd - - - - - mcrypt_generic_deinit should be used instead of this - function, as it can cause crashes when used with - mcrypt_module_close due to multiple buffer frees. - - - - - This function terminates encryption specified by the encryption - descriptor (td). Actually it clears all buffers, - and closes all the modules used. Returns &false; on error, or &true; on - success. - - - - - diff --git a/reference/mcrypt/functions/mcrypt-ofb.xml b/reference/mcrypt/functions/mcrypt-ofb.xml deleted file mode 100644 index 96c56b815a..0000000000 --- a/reference/mcrypt/functions/mcrypt-ofb.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - mcrypt_ofb - Encrypts/decrypts data in OFB mode - - - - - &warn.deprecated.function.5-5-0.removed.7-0-0.alternatives; - - mcrypt_decrypt - mcrypt_encrypt - - - - - - &reftitle.description; - - stringmcrypt_ofb - intcipher - stringkey - stringdata - intmode - stringiv - - - stringmcrypt_ofb - stringcipher - stringkey - stringdata - intmode - stringiv - - - The first prototype is when linked against libmcrypt 2.2.x, the - second when linked against libmcrypt 2.4.x or higher. The - mode should be either - MCRYPT_ENCRYPT or - MCRYPT_DECRYPT. - - - - - diff --git a/reference/mcrypt/functions/mdecrypt-generic.xml b/reference/mcrypt/functions/mdecrypt-generic.xml index c86878921b..ef529b8d16 100644 --- a/reference/mcrypt/functions/mdecrypt-generic.xml +++ b/reference/mcrypt/functions/mdecrypt-generic.xml @@ -47,6 +47,13 @@ + + &reftitle.returnvalues; + + Returns decrypted string. + + + &reftitle.examples; diff --git a/reference/mcrypt/versions.xml b/reference/mcrypt/versions.xml index 7212934536..2fac64ee0b 100644 --- a/reference/mcrypt/versions.xml +++ b/reference/mcrypt/versions.xml @@ -4,11 +4,8 @@ Do NOT translate this file --> - - - @@ -22,7 +19,6 @@ - @@ -39,7 +35,6 @@ - + Memcache diff --git a/reference/memcache/memcache/addserver.xml b/reference/memcache/memcache/addserver.xml index ffb721ee42..74731a8362 100644 --- a/reference/memcache/memcache/addserver.xml +++ b/reference/memcache/memcache/addserver.xml @@ -162,20 +162,6 @@ - - &reftitle.notes; - - - When the port is unspecified, this method defaults to the - value set of the PHP ini directive - memcache.default_port - If this value was changed elsewhere in your application it might lead to - unexpected results: for this reason it is wise to always specify the port - explicitly in this method call. - - - - &reftitle.returnvalues; @@ -210,6 +196,20 @@ memcache_add_server($memcache_obj, 'memcache_host2', 11211); + + &reftitle.notes; + + + When the port is unspecified, this method defaults to the + value set of the PHP ini directive + memcache.default_port + If this value was changed elsewhere in your application it might lead to + unexpected results: for this reason it is wise to always specify the port + explicitly in this method call. + + + + &reftitle.seealso; diff --git a/reference/memcache/memcache/close.xml b/reference/memcache/memcache/close.xml index 8b2c5bdc66..dc956c224c 100644 --- a/reference/memcache/memcache/close.xml +++ b/reference/memcache/memcache/close.xml @@ -22,6 +22,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/memcache/memcache/connect.xml b/reference/memcache/memcache/connect.xml index 23fe70f693..1efd78b4c9 100644 --- a/reference/memcache/memcache/connect.xml +++ b/reference/memcache/memcache/connect.xml @@ -71,20 +71,6 @@ - - &reftitle.notes; - - - When the port is unspecified, this method defaults to the - value set of the PHP ini directive - memcache.default_port - If this value was changed elsewhere in your application it might lead to - unexpected results: for this reason it is wise to always specify the port - explicitly in this method call. - - - - &reftitle.returnvalues; @@ -117,6 +103,20 @@ $memcache->connect('memcache_host', 11211); + + &reftitle.notes; + + + When the port is unspecified, this method defaults to the + value set of the PHP ini directive + memcache.default_port + If this value was changed elsewhere in your application it might lead to + unexpected results: for this reason it is wise to always specify the port + explicitly in this method call. + + + + &reftitle.seealso; diff --git a/reference/memcache/memcache/delete.xml b/reference/memcache/memcache/delete.xml index 8c862892b2..14b31db31f 100644 --- a/reference/memcache/memcache/delete.xml +++ b/reference/memcache/memcache/delete.xml @@ -45,6 +45,13 @@ + + &reftitle.returnvalues; + + &return.success; + + + &reftitle.changelog; @@ -71,13 +78,6 @@ - - &reftitle.returnvalues; - - &return.success; - - - &reftitle.examples; diff --git a/reference/memcache/memcache/flush.xml b/reference/memcache/memcache/flush.xml index a3831d8a73..ec9f684237 100644 --- a/reference/memcache/memcache/flush.xml +++ b/reference/memcache/memcache/flush.xml @@ -22,6 +22,11 @@ + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/memcache/memcache/getversion.xml b/reference/memcache/memcache/getversion.xml index b60b9a556b..5ee30fe312 100644 --- a/reference/memcache/memcache/getversion.xml +++ b/reference/memcache/memcache/getversion.xml @@ -21,6 +21,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/memcached/book.xml b/reference/memcached/book.xml index 09f7457753..d9bbe22643 100644 --- a/reference/memcached/book.xml +++ b/reference/memcached/book.xml @@ -2,6 +2,7 @@ + Memcached Memcached diff --git a/reference/memcached/constants.xml b/reference/memcached/constants.xml index 778c181969..602383f79b 100644 --- a/reference/memcached/constants.xml +++ b/reference/memcached/constants.xml @@ -51,7 +51,7 @@ Memcached::SERIALIZER_JSON - The JSON serializer. Requires PHP 5.2.10+. + The JSON serializer. diff --git a/reference/memcached/memcached/get.xml b/reference/memcached/memcached/get.xml index 97e20e753f..62f153cca9 100644 --- a/reference/memcached/memcached/get.xml +++ b/reference/memcached/memcached/get.xml @@ -72,6 +72,29 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + PECL memcached 3.0.0 + + The cas_token parameter was removed. + Instead flags was added and when it is given the value of Memcached::GET_EXTENDED it will ensure the CAS token to be fetched. + + + + + + + &reftitle.examples; @@ -119,29 +142,6 @@ if (!($ip = $m->get('ip_block'))) { - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL memcached 3.0.0 - - The cas_token parameter was removed. - Instead flags was added and when it is given the value of Memcached::GET_EXTENDED it will ensure the CAS token to be fetched. - - - - - - - &reftitle.seealso; diff --git a/reference/memcached/memcached/getmulti.xml b/reference/memcached/memcached/getmulti.xml index e1d5615b39..803d4c285d 100644 --- a/reference/memcached/memcached/getmulti.xml +++ b/reference/memcached/memcached/getmulti.xml @@ -71,6 +71,29 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + PECL memcached 3.0.0 + + The cas_tokens parameter was removed. + The Memcached::GET_EXTENDED was added and when passed as a flag it ensures the CAS tokens to be fetched. + + + + + + + &reftitle.examples; @@ -243,29 +266,6 @@ zoo - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL memcached 3.0.0 - - The cas_tokens parameter was removed. - The Memcached::GET_EXTENDED was added and when passed as a flag it ensures the CAS tokens to be fetched. - - - - - - - &reftitle.seealso; diff --git a/reference/memcached/memcached/setoption.xml b/reference/memcached/memcached/setoption.xml index 514010ef76..40f4592fc7 100644 --- a/reference/memcached/memcached/setoption.xml +++ b/reference/memcached/memcached/setoption.xml @@ -17,19 +17,41 @@ This method sets the value of a Memcached option. Some options correspond to the ones defined by libmemcached, and some are - specific to the extension. See Memcached Constants for more - information. + specific to the extension. + + + + &reftitle.parameters; - The options listed below require values specified via constants. - - - Memcached::OPT_HASH requires Memcached::HASH_* values. - - - Memcached::OPT_DISTRIBUTION requires Memcached::DISTRIBUTION_* values. - - + + + option + + + One of the Memcached::OPT_* constant. + See Memcached Constants for more information. + + + + + value + + + The value to be set. + + + + The options listed below require values specified via constants. + + Memcached::OPT_HASH requires Memcached::HASH_* values. + Memcached::OPT_DISTRIBUTION requires Memcached::DISTRIBUTION_* values. + + + + + + diff --git a/reference/memtrack/book.xml b/reference/memtrack/book.xml deleted file mode 100644 index fde85dbd67..0000000000 --- a/reference/memtrack/book.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - Memtrack - Memtrack - - - &reftitle.intro; - - The purpose of this extension is to detect the most memory hungry scripts - and functions. - - - memtrack tracks memory consumption in PHP scripts and produces reports - (warnings) when the consumption reaches certain levels set by the user. - This is achieved by replacing default executor function by a special - function which compares memory usage before and after running the - original executor - this way we can tell how much the memory usage - has changed during the execution of the current part of the code. - - - Zend Engine runs its executor for each opcode array (op_array), - which usually means function, plain script and such, so memtrack doesn't - have any noticeable effect on performance. - - - memtrack doesn't provide any functions, there are only INI directives which - allow you to configure the way it should work. - - &warn.experimental; - - - &reference.memtrack.setup; - &reference.memtrack.constants; - &reference.memtrack.examples; - - - - - diff --git a/reference/memtrack/configure.xml b/reference/memtrack/configure.xml deleted file mode 100644 index 381b63b4cf..0000000000 --- a/reference/memtrack/configure.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - -
- &reftitle.install; - - &pecl.info; - &url.pecl.package;memtrack - -
- - - diff --git a/reference/memtrack/constants.xml b/reference/memtrack/constants.xml deleted file mode 100644 index 0e3fe845dd..0000000000 --- a/reference/memtrack/constants.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - &reftitle.constants; - &no.constants; - - - - diff --git a/reference/memtrack/examples.xml b/reference/memtrack/examples.xml deleted file mode 100644 index 2fd7b40260..0000000000 --- a/reference/memtrack/examples.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - &reftitle.examples; -
- Basic usage - - Basic example on using memtrack extension: - - Creating large array in a function - - -]]> - - - - - Run the example with the following command: - - - - - &example.outputs.similar; - - - -
-
- - - diff --git a/reference/memtrack/ini.xml b/reference/memtrack/ini.xml deleted file mode 100644 index 26efe63a4f..0000000000 --- a/reference/memtrack/ini.xml +++ /dev/null @@ -1,165 +0,0 @@ - - -
- &reftitle.runtime; - &extension.runtime; - - - Memtrack Configuration Options - - - - &Name; - &Default; - &Changeable; - - - - - memtrack.enabled - "0" - PHP_INI_SYSTEM - - - memtrack.soft_limit - "0" - PHP_INI_ALL - - - memtrack.hard_limit - "0" - PHP_INI_ALL - - - memtrack.vm_limit - "0" - PHP_INI_ALL - - - memtrack.ignore_functions - "" - PHP_INI_SYSTEM - - - -
- &ini.php.constants; -
- -&ini.descriptions.title; - - - - - - - memtrack.enabled - bool - - - - Disables or enables the extension. Default value is 0, i.e. disabled. - - - - - - - memtrack.soft_limit - int - - - - Soft memory limit. - - - The extension checks memory consumption before and after executing an - op_array and produces a warning is the difference between the two values - is equal to or greater than the soft limit, but only if the function is not - ignored. - - - Setting this option to 0 also disables both soft and hard limit warnings. - Default value is 0, i.e. no warnings is produced. - - - - - - - memtrack.hard_limit - int - - - - Hard memory limit. - - - The extension checks memory consumption before and after executing an - op_array and produces a warning is the difference between the two values - is equal to or greater than the hard limit, even if the function is - ignored. - Setting this option to 0 disables hard limit warnings completely. - Default value is 0, i.e. no hard limit warnings is produced. - - - - - - - memtrack.vm_limit - int - - - - Virtual memory limit (set on a process). - - - This limit is checked only on shutdown and a warning is produced if the - value is greater than or equal to the limit. - - - This option is currently supported only on OSes where mallinfo() function - is available (i.e. Linux). - - - - - - - memtrack.ignore_functions - string - - - - A comma or whitespace-separated list of functions which are to be ignored - by soft_limit. The values are case-insensitive, for class methods use - class::method syntax. - - - - - - -
- - diff --git a/reference/memtrack/setup.xml b/reference/memtrack/setup.xml deleted file mode 100644 index 1af2b7a61d..0000000000 --- a/reference/memtrack/setup.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - &no.requirement; -
- - &reference.memtrack.configure; - - &reference.memtrack.ini; - -
- &reftitle.resources; - &no.resource; -
- -
- - - diff --git a/reference/mhash/book.xml b/reference/mhash/book.xml index b09019852b..4653416f7c 100644 --- a/reference/mhash/book.xml +++ b/reference/mhash/book.xml @@ -2,7 +2,7 @@ - + Mhash diff --git a/reference/mhash/functions/mhash-count.xml b/reference/mhash/functions/mhash-count.xml index 5e301fc109..cd9aa011df 100644 --- a/reference/mhash/functions/mhash-count.xml +++ b/reference/mhash/functions/mhash-count.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/misc/constants.xml b/reference/misc/constants.xml index 8d3867990a..ec8c4ff76d 100644 --- a/reference/misc/constants.xml +++ b/reference/misc/constants.xml @@ -44,7 +44,7 @@ - Added in PHP 5.1. + diff --git a/reference/misc/functions/connection-aborted.xml b/reference/misc/functions/connection-aborted.xml index 1f483e548c..360c5fc4ef 100644 --- a/reference/misc/functions/connection-aborted.xml +++ b/reference/misc/functions/connection-aborted.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/misc/functions/connection-status.xml b/reference/misc/functions/connection-status.xml index 1d6d61a0d0..c7033a14d3 100644 --- a/reference/misc/functions/connection-status.xml +++ b/reference/misc/functions/connection-status.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/misc/functions/define.xml b/reference/misc/functions/define.xml index f6fd30f6c4..b49417c715 100644 --- a/reference/misc/functions/define.xml +++ b/reference/misc/functions/define.xml @@ -10,7 +10,7 @@ &reftitle.description; booldefine - stringname + stringconstant_name mixedvalue boolcase_insensitive&false; @@ -24,7 +24,7 @@ - name + constant_name The name of the constant. @@ -191,7 +191,6 @@ int(5)
- - - - - Batch Classes - - &reference.mongo.mongowritebatch; - &reference.mongo.mongoinsertbatch; - &reference.mongo.mongoupdatebatch; - &reference.mongo.mongodeletebatch; - - diff --git a/reference/mongo/book.xml b/reference/mongo/book.xml deleted file mode 100644 index 9929063dfb..0000000000 --- a/reference/mongo/book.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - MongoDB driver (legacy) - Mongo - - &reference.mongo.setup; - &reference.mongo.constants; - - &reference.mongo.manual; - &reference.mongo.core; - &reference.mongo.types; - &reference.mongo.gridfs; - &reference.mongo.batch; - &reference.mongo.misc; - &reference.mongo.reference; - &reference.mongo.exceptions; - &reference.mongo.changelog; - - - - - diff --git a/reference/mongo/changelog.xml b/reference/mongo/changelog.xml deleted file mode 100644 index b44b1cb60b..0000000000 --- a/reference/mongo/changelog.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - &ChangelogListingTitle; - &ChangelogListingDescription; - - - MongoDB PHP Driver 1.5.0 - - It supports all new features for MongoDB 2.6, including: - - - Aggregate can now return a cursor - Aggregation pipelines can now be explained - Possible to set maxTimeMS for commands and queries - Transparent support for the new command-based MongoDB write API - New MongoWriteBatch classes (using the new MongoDB write API) - Support for MongoDB Enterprise features (e.g. Kerberos, LDAP, X509) - Option to tune acceptable server latency for secondary reads (secondaryAcceptableLatencyMS) - - - - With this release, some driver functionality which was previously - documented as deprecated will now formally raise deprecation notices. This - includes: - - Instantiating the Mongo class - Calling MongoCursor::slaveOkay() - "wtimeout" and "safe" options for MongoCollection write operations - Manipulating public properties on core classes (such as $collection->w) - - - - - No previously deprecated features have been removed. - - - - Changes in behaviour: - - Setting the mongo.native_long INI setting now raises an error on 32-bit - platforms, and now defaults to true for 64-bit platforms. - - - - - - MongoDB PHP Driver 1.4.0 - - The 1.4 series introduced fundemental changes in how connections are created to the MongoDB servers. - The driver now utilizes PHP native streams, so all normal PHP stream options apply. - Furthermore, an experimental Stream Context Support was added. - - - The 1.4.x series also added support for MongoDB 2.4.x. - - - The most important improvements however deal with the handling of replica sets, - especially nodes that timeout and nodes that are unreachable for various - reasons. Besides the improvements to replica set handling, this release - addresses issues with read preferences through mongos nodes. It also - adds support for SSL enabled connections as well as journal and fsync - connection string options. - - - - - MongoDB PHP Driver 1.3.0 - - The 1.3 series introduced several major changes to the extension such as - completely rewritten connection - handling (and removal of the pooling mechanism), support for - ReadPreferences and change the - default WriteConcerns to be - acknowledged by introducing a new class - MongoClient which serves as a - replacement class for the now deprecated Mongo class. - - - The driver now also supports connecting to multiple mongos instances (the - Mongo Shard router) for loadbalancing. - - - Other enhancements include improved logging for easier connection handling - debugging with MongoLog and support for the - Aggregation Framework - via the MongoCollection::aggregate method. - - - - - - Changes to existing methods - - Following is a list of all improvements to existing methods since - their inception. - - - - - - - - - diff --git a/reference/mongo/configure.xml b/reference/mongo/configure.xml deleted file mode 100644 index 8dece8038c..0000000000 --- a/reference/mongo/configure.xml +++ /dev/null @@ -1,302 +0,0 @@ - - - -
- &reftitle.install; - - - &mongo.deprecated.note; - - - - The MongoDB PHP driver should work on nearly any system: Windows, macOS, - Unix, and Linux; little- and big-endian machines; 32- and 64-bit machines; PHP - 5.3 through 5.6 (versions prior to 1.6 also support PHP 5.2). - - - &pecl.moved; - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Manual Installation - - For driver developers and people interested in the latest bugfixes, you - can compile the driver from the latest source code on - Github. - Go to Github and click the "download" button. Then run: - - -.tar.gz -$ cd mongo-php-driver-legacy- -$ phpize -$ ./configure -$ make all -$ sudo make install -]]> - - - - - Make the following changes to &php.ini;: - - - - - Make sure the extension_dir variable is pointing to - the directory containing mongo.so. The build will display where - it is installing the PHP driver with output that looks something like: - - - - - Make sure that it is the same as the PHP extension directory by running: - - - /usr/lib/php/extensions/no-debug-non-zts-20060613 => - /usr/lib/php/extensions/no-debug-non-zts-20060613 -]]> - - - If it's not, change the extension_dir in &php.ini; or - move mongo.so. - - - - - To load the extension on PHP startup, add a line: - - - - - - - - -
- -
- Installing on *NIX - - - Run: - - - - - - - Add the following line to your &php.ini; file: - - - - - - - If pecl runs out of memory while installing, make sure memory_limit in - &php.ini; is set to at least 128MB. - -
- -
- Installing on Windows - - - Precompiled binaries for each release are available from - PECL for a variety - of combinations of versions, thread safety, and VC libraries. Unzip the - archive and put php_mongo.dll in your PHP extension directory ("ext" by - default). - - - - Add the following line to your &php.ini; file: - - - - - - - Additional DLL dependencies for Windows Users - - &ext.windows.path.dll; - libsasl.dll - - -
- -
- macOS - - - In most cases installing from PECL is the easiest way: - - - - - - - If your system has multiple version of PHP installed (e.g. macOS default, - Homebrew, XAMPP), note that that each - version of PHP has its own pecl - command and &php.ini; file. - - - - Xcode dependency for compiling on macOS - - Compiling the driver on macOS will require Xcode developer tools, which may - be installed with xcode-select --install. If that command is - not available, you may first need to install the - Command Line Tools package. - - -
- -
- Gentoo - - - Gentoo has a package for the PHP PECL driver called dev-php/pecl-mongo, which can be - installed with: - - - - - - - - If you use PECL, you may get an error that libtool is the wrong version. - Compiling from source you'll need to run aclocal and autoconf. - - - - - -
- -
- Red Hat - - - This includes Fedora and CentOS. - - - - The default Apache settings on these systems do not let requests make - network connections, meaning that the driver will get "Permission denied" - errors when it tries to connect to the database. If you run into this, try - running: - - - - Then restart Apache. (This issue has also occurred with SELinux.) - -
- -
- Third-Party Installation Instructions - - - A number of people have created excellent tutorials on installing the PHP - driver. - - - - - - - (Re)installing PHP on macOS - - - - This article by Justin Hileman details the process of installing PHP and - additional extensions with Homebrew on macOS. This complements the earlier - instructions on this page for installing the driver with Homebrew. - - - - - - PHP 5.3.1 with Xdebug, MongoDB and Lithium on Ubuntu 9.10 / Apache 2.2 - - - This screencast by Jon Adams demonstrates how to quickly get up and - running with PHP 5.3.1, Xdebug, and MongoDB on Ubuntu 9.10 with Apache. - - - -
- -
- - - diff --git a/reference/mongo/connecting.xml b/reference/mongo/connecting.xml deleted file mode 100644 index 707240322c..0000000000 --- a/reference/mongo/connecting.xml +++ /dev/null @@ -1,775 +0,0 @@ - - - - - Connecting - - - Connecting to MongoDB can be as easy as new MongoClient, - but there are many additional options and configurations. The documentation - for MongoClient::__construct covers all of the API - options, but this page gives some more details and advice for practical use - cases. - - -
- Connecting over SSL - - The driver supports connecting to MongoDB over SSL - and can optionally use SSL Stream Context options to provide more details, - such as verifying certificates against specific certificate chain, or authenticate to - MongoDB using X509 certificates. - - - - Connect to MongoDB Instance with SSL Encryption - - true)); -?> -]]> - - - - - Connect to MongoDB Instance with SSL Encryption, verifying it is who we think it is - - array( - /* Certificate Authority the remote server certificate must be signed by */ - "cafile" => $SSL_DIR . "/" . $SSL_FILE, - - /* Disable self signed certificates */ - "allow_self_signed" => false, - - /* Verify the peer certificate against our provided Certificate Authority root certificate */ - "verify_peer" => true, /* Default to false pre PHP 5.6 */ - - /* Verify the peer name (e.g. hostname validation) */ - /* Will use the hostname used to connec to the node */ - "verify_peer_name" => true, - - /* Verify the server certificate has not expired */ - "verify_expiry" => true, /* Only available in the MongoDB PHP Driver */ - ), -); - -$mc = new MongoClient( - "mongodb://server1", - array("ssl" => true), - array("context" => $ctx) -); -?> -]]> - - - - The "verify_peer_name" is new in PHP 5.6.0. The - MongoDB driver as of 1.6.5 however has backported this feature into the - driver itself, so it works with PHP 5.3 and 5.4 too - - - - - - - Connect to MongoDB Instance that Requires Client Certificates - - array( - "local_cert" => $MYCERT, - /* If the certificate we are providing was passphrase encoded, we need to set it here */ - "passphrase" => "My Passphrase for the local_cert", - - /* Optionally verify the server is who he says he is */ - "cafile" => $SSL_DIR . "/" . $SSL_FILE, - "allow_self_signed" => false, - "verify_peer" => true, - "verify_peer_name" => true, - "verify_expiry" => true, - ), -)); - -$mc = new MongoClient( - "mongodb://server1/?ssl=true", - array(), - array("context" => $ctx) -); -?> -]]> - - - - - Authenticating with X.509 certificates - - The username is the certificate subject from the X509, which can be extracted like this: - - - - - - array( - "local_cert" => "/vagrant/certs/ca-signed-client.pem", - ) -) ); - -$mc = new MongoClient( - 'mongodb://username@server1/?authSource=$external&authMechanism=MONGODB-X509&ssl=true', - array(), - array("context" => $ctx) -); -?> -]]> - - - Where username is the certificate subject. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 1.5.0 - - Added support for X509 authentication. - - - - 1.4.0 - - Added support for connecting to SSL enabled MongoDB. - - - - - - - -
- -
- Authentication - - If MongoDB is started with the --auth or - --keyFile options, you must authenticate before you can do - any operations with the driver. You may authenticate a connection by - specifying the username and password in either the connection URI or the - "username" and "password" options for - MongoClient::__construct. - - - Authenticating against the "admin" database - - $username, "password" => $password)); -?> -]]> - - - - By default, the driver will authenticate against the admin - database. You may authenticate against a different database by specifying it - in either the connection URI or the "db" option for - MongoClient::__construct. - - - Authenticating against normal databases - - "myDatabase")); -?> -]]> - - - - If your connection is dropped, the driver will automatically attempt to - reconnect and reauthenticate you. - -
- -
- Replica Sets - - To connect to a replica set, specify one or more members of the set and use - the "replicaSet" option. Multiple servers may be delimited - by a comma. - - - ReplicaSet seed list - - "myReplSetName")); - -// Using multiple servers as the seed list -$m = new MongoClient("mongodb://rs1.example.com:27017,rs2.example.com:27017", array("replicaSet" => "myReplSetName")); -?> -]]> - - - - The PHP driver will query the database server(s) listed to determine the - primary. So long as it can connect to at least one host listed and find a - primary, the connection will succeed. If it cannot make a connection to any - servers listed or cannot find a primary, a - MongoConnectionException will be thrown. - - - - You should always provide a seed list with more than one member of the - ReplicaSet. For highest availability you should seed with at least one - server from each of your datacenters. - - - - - The host names that you specify in the seed list must - match the host names in the replica set configuration. This is because the - driver only uses the host names in the replica set configuration to create - the hash for its persistent connections. - - - For example, if an IP address is used in the seed list and the replica set - is configured with host names, the driver will discard any seed list - connection(s) that differ from the canonical host names reported by the - replica set. Effectively, these non-canonical seed list connections will be - recreated on each request, greatly reducing the benefit of using persistent - connections. - - - - - The driver does not support connecting to different - replica sets with the same name. This extends beyond one script so make - sure to have separate names for each of your replica sets. That also means - that you can not do this: - - - Wrong replica set name duplication - - -]]> - - - - Instead, you need to have two different names for your replica sets: - - - Correct use of two replica set names - - -]]> - - - - - If the primary becomes unavailable, an election will take place and a - secondary will be promoted to the role of primary (unless a majority vote - cannot be established). During this time - (20-60 seconds), the - connection will not be able to perform any write operations and attempts to - do so will result in an exception. Connections to secondaries will still be - able to perform reads. - - - - The default Read Preference - is to only read from the primary. During the election process there is no - primary, and all read will therefore fail. - - - It is recommended to use - MongoClient::RP_PRIMARY_PREFERRED Read Preference for - applications that require high availability for reads, as reads will only - be executed on the secondaries when there simply isn't a primary - available. - - - - Once a primary is elected, attempting to perform a read or write will allow - the driver to detect the new primary. The driver will make this its primary - database connection and continue operating normally. - - - The health and state of a secondary is checked every 5 seconds - (configurable with - mongo.ping_interval) - or when the next operation occurs after 5 seconds. It will also recheck - the configuration when the driver has a problem reaching a server. - - - Replica set failovers are checked every 60 seconds (configurable with - mongo.is_master_interval), - and whenever a write operation fails when using acknowledged writes. - - - - - Secondaries may be behind the primary in operations, so - your application must be able to handle out-of-date data when using - Read Preferences other then MongoClient::RP_PRIMARY. - - - - - For more information on replica sets, see the - core documentation. - - - - &reftitle.seealso; - - - - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 1.0.9 - - Added support for connecting to ReplicaSet and automatic failover. - - - - - - - -
- -
- Sharding - - To connect to a shard cluster, specify the address of one or more - mongos instances in the connection string. Multiple - servers may be delimited by a comma. - - - - -]]> - - - - Regardless of whether each shard is a stand-alone mongod - server or a full replica set, the driver's connection process is the same. - All database communication will be routed through mongos. - - - For more information on sharding with MongoDB, see the - sharding documentation. - -
- -
- Domain Socket Support - - - MongoDB has built-in support for connecting via Unix Domain Sockets and will - open the socket on startup. By default, the socket is located in - /tmp/mongodb-<port>.sock. - - - - To connect to the socket file, specify the path in your MongoDB connection - string: - - - - - -]]> - - - - - If you would like to authenticate against a database (as described above) - with a socket file, you must specify a port of 0 so that - the connection string parser can detect the end of the socket path. - Alternatively, you can use the constructor options. - - - - - -]]> - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 1.0.9 - - Added support for Unix Domain Sockets. - - - - - - - -
- -
- Persistent Connections (version 1.3.0+) - - - All versions of the driver since 1.3.0 utilize persistent connections to - minimize the number of connections made to each database server. These - connections are saved by the PHP worker process and may be reused between - multiple requests. - - - - Before connecting to a database server, the driver will create a hash for the - connection based on its host, port, replica set name (if any), any - authentication credentials (e.g. username, password, database), and the - process ID. If a connection already exists for that hash, it will be used in - lieu of creating a new connection associated with that hash. - MongoClient::getConnections may be used to retrieve info - about each persistent connection. Consider the following program: - - - - - -]]> - - &example.outputs.similar; - - - - - - - In this example $m1 and $m2 have the - same hash and share a persistent connection. Connections for each other - MongoClient instance hash to unique values and use their own sockets. Note - that "localhost" and "127.0.0.1" do not share the same hash; DNS resolution - is not taken into account. - -
- -
- Connection Pooling (version 1.2.0-1.2.12 *only*) - - - This section is no longer relevant as of the 1.3.0 release of the driver - and only serves as a historical information on how the pooling used to - work. - - - The latest versions of the driver have no concept of pooling anymore and - will maintain only one connection per process, for each connection type - (ReplicaSet/standalone/mongos), for each credentials combination. - - - - Creating connections is one of the most heavyweight things that the driver - does. It can take hundreds of milliseconds to set up a connection correctly, - even on a fast network. Thus, the driver tries to minimize the number of new - connections created by reusing connections from a pool. - - - When a user creates a new instance of MongoClient, all - necessary connections will be taken from their pools (replica sets may - require multiple connections, one for each member of the set). When the - MongoClient instance goes out of scope, the - connections will be returned to the pool. When the PHP process exits, all - connections in the pools will be closed. - -
- "Why do I have so many open connections?" - - Connection pools can generate a large number of connections. This is - expected and, using a little arithmetic, you can figure out how many - connections will be created. There are three factors in determining the - total number of connections: - - - - - - connections_per_pool - - - - Each connection pool will create, by default, an unlimited number of - connections. One might assume that this is a problem: if it can create an - unlimited number of connections, couldn't it create thousands and the - server would run out of file descriptors? In practice, this is unlikely, - as unused connections are returned to the pool to be used later, so future - connections will use the same connection instead of creating a new one. - Unless you create thousands of connections at once without letting any go - out of scope, the number of connections open should stay at a reasonable - number. - - - You can see how many connections you have in a pool using the - MongoPool::info function. Add up the "in use" and - "in pool" fields for a given server. That is the total number of - connections for that pool. - - - - - - pools_per_process - - - - Each MongoDB server address you're connecting to gets its own connection - pool. For example, if your local hostname is "example.net", connecting - to "example.net:27017", "localhost:27017", and "/tmp/mongodb-27017.sock" - will create three connection pools. You can see how many connection pools - you have open using MongoPool::info. - - - - - - processes - - - - Each PHP process has a separate set of pools. PHP-FPM and Apache - generally create between 6 and a couple of dozen PHP worker children. - Check your settings to see what the max number of PHP processes is that - can be spawned. - - - If you are using PHP-FPM, estimating the number of connections can be - tricky because it will spawn more PHP-FPM workers under heavy load. To be - on the safe side, look at the max_children parameter or - add up spare_servers + start_servers - (choose whichever number is higher). That will indicate how many PHP - processes (i.e. sets of pools) you should plan for. - - - - - The three variables above can be multiplied together to give the max - number of connections expected: - connections_per_pool * - pools_per_process * - processes. Note that - connections_per_pool can be different for different - pools, so connections_per_pool should be the max. - - - For example, suppose we're getting 30 connections per pool, 10 pools per PHP - process, and 128 PHP processes. Then we can expect 38400 connections from - this machine. Thus, we should set this machine's file descriptor limit to - be high enough to handle all of these connections or it may run out of file - descriptors. - - - See MongoPool for more information on connection - pooling. - -
-
- -
- Manually Persistent Connections (version up to 1.1.4 *only*) - - - This section is not relevant for 1.2.0+. In 1.2.0+, connections are always - persistent and managed automatically by the driver. If you are using a - 1.2.x release (but not 1.3.x or later), see - MongoPool for more information on pooling. - - - - - Creating new connection to the database is very slow. To minimize the number - of connections that you need to make, you can use persistent connections. A - persistent connection is saved by PHP, so you can use the same connection for - multiple requests. - - - - For example, this simple program connects to the database 1000 times: - - - - - -]]> - - - - - It takes approximately 18 seconds to execute. If we change it to use a - persistent connection: - - - - - "x")); -} - -?> -]]> - - - - - ...it takes less than .02 seconds to execute, as it only makes one database - connection. - - - - Persistent connections need an identifier string (which is "x" in the above - example) to uniquely identify them. For a persistent connection to be used, - the hostname, port, persist string, and authentication credentials (username, - password and database, if given) must match an existing persistent - connection. Otherwise, a new connection will be created with this identifying - information. - - - Persistent connections are highly recommended and should - always be used in production unless there is a compelling reason not to. - Most of the reasons that they are not recommended for relational databases - are irrelevant to MongoDB. - -
- -
- - diff --git a/reference/mongo/constants.xml b/reference/mongo/constants.xml deleted file mode 100644 index 2e881f878a..0000000000 --- a/reference/mongo/constants.xml +++ /dev/null @@ -1,299 +0,0 @@ - - - - - &reftitle.constants; - &extension.constants; - - - - - MONGO_STREAMS - (int) - - - - Alias of MONGO_SUPPORTS_STREAMS - - - - - - MONGO_SUPPORTS_STREAMS - (int) - - - - 1 when compiled against PHP Streams (default since 1.4.0). - - - - - - MONGO_SUPPORTS_SSL - (int) - - - - 1 when is enabled and available. - - - - - - MONGO_SUPPORTS_AUTH_MECHANISM_MONGODB_CR - (int) - - - - 1 when MongoDB-Challenge/Reponse authentication is compiled in. - - - - - - MONGO_SUPPORTS_AUTH_MECHANISM_MONGODB_X509 - (int) - - - - 1 when x.509 authentication is compiled in. - - - - - - MONGO_SUPPORTS_AUTH_MECHANISM_GSSAPI - (int) - - - - 1 when GSSAPI authentication is compiled in. - - - - - - MONGO_SUPPORTS_AUTH_MECHANISM_PLAIN - (int) - - - - 1 when PLAIN authentication is compiled in. - - - - - - MONGO_STREAM_NOTIFY_TYPE_IO_INIT - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_TYPE_LOG - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_IO_READ - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_IO_WRITE - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_IO_PROGRESS - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_IO_COMPLETED - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_INSERT - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_QUERY - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_UPDATE - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_DELETE - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_GETMORE - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_KILLCURSOR - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_BATCHINSERT - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_RESPONSE_HEADER - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_WRITE_REPLY - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_CMD_INSERT - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_CMD_UPDATE - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_CMD_DELETE - (int) - - - - - - - - - MONGO_STREAM_NOTIFY_LOG_WRITE_BATCH - (int) - - - - - - - - - - - diff --git a/reference/mongo/context.xml b/reference/mongo/context.xml deleted file mode 100644 index 94f7d6ee7d..0000000000 --- a/reference/mongo/context.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - Stream Context Options - - - - The PHP MongoDB extension provides Stream Context Support - using the mongodb context. - - - - A stream context must be created with stream_context_create and passed to the MongoClient::__construct before the actual connection to MongoDB is made. - It is not possible to apply a stream context to already created streams. - - - - Additional context options and parameters, such as ssl - and notification parameters, are also supported. - - - - The MongoDB context options provide a rich interface to log network traffic between the driver and the MongoDB servers. - This interface can be used to provide query logging, profiler, debuggers, or anything that would need to inspect the underlaying - commands and protocol options. - - - - &reftitle.seealso; - - - - - - - - - - &reference.mongo.entities.context; - - - - - diff --git a/reference/mongo/context/log-cmd-delete.xml b/reference/mongo/context/log-cmd-delete.xml deleted file mode 100644 index b41abbfdcb..0000000000 --- a/reference/mongo/context/log-cmd-delete.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - log_cmd_delete - Callback When Deleting Documents - - - - &reftitle.description; - - log_cmd_delete - arrayserver - arraywriteOptions - arraydeleteOptions - arrayprotocolOptions - - - A callable function, used by the - log_cmd_delete context option, - when deleteing a document - - - - This is not a real function, only a prototype of how the function should - be. - - - - - - &reftitle.parameters; - - &mongo.context.server; - &mongo.context.writeoptions; - - - deleteOptions - - - - - - - - key - value - - - - - limit - integer, 1 or 0. If 0, delete all matching documents. - - - q - Array, the search criteria - - - - - - - - &mongo.context.protocoloptions; - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - Only available when connected to MongoDB 2.6.0+ - - - - - - - - - - - diff --git a/reference/mongo/context/log-cmd-insert.xml b/reference/mongo/context/log-cmd-insert.xml deleted file mode 100644 index 710289f3ff..0000000000 --- a/reference/mongo/context/log-cmd-insert.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - log_cmd_insert - Callback When Inserting Documents - - - - &reftitle.description; - - log_cmd_insert - arrayserver - arraydocument - arraywriteOptions - arrayprotocolOptions - - - A callable function, used by the - log_cmd_insert context option, - when inserting a document - - - - This is not a real function, only a prototype of how the function should - be. - - - - - - &reftitle.parameters; - - &mongo.context.server; - - - document - - - - The document that has been prepared to be inserted - - - - &mongo.context.writeoptions; - &mongo.context.protocoloptions; - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - Only available when connected to MongoDB 2.6.0+ - - - - - - - - - - - diff --git a/reference/mongo/context/log-cmd-update.xml b/reference/mongo/context/log-cmd-update.xml deleted file mode 100644 index 8949429ed7..0000000000 --- a/reference/mongo/context/log-cmd-update.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - log_cmd_update - Callback When Updating Documents - - - - &reftitle.description; - - log_cmd_update - arrayserver - arraywriteOptions - arrayupdateOptions - arrayprotocolOptions - - - A callable function, used by the - log_cmd_update context option, - when updateing a document - - - - This is not a real function, only a prototype of how the function should - be. - - - - - - &reftitle.parameters; - - &mongo.context.server; - &mongo.context.writeoptions; - - - updateOptions - - - - - - - - key - value - - - - - multi - Boolean, true if this update is allowed to update all matched criteria - - - upsert - Boolean, true if the document should be created if criteria does not match - - - q - Array, the search criteria - - - u - Array, the new object/modifications - - - - - - - - &mongo.context.protocoloptions; - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - Only available when connected to MongoDB 2.6.0+ - - - - - - - - - - - diff --git a/reference/mongo/context/log-getmore.xml b/reference/mongo/context/log-getmore.xml deleted file mode 100644 index 537e0327ad..0000000000 --- a/reference/mongo/context/log-getmore.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - log_getmore - Callback When Retrieving Next Cursor Batch - - - - &reftitle.description; - - log_getmore - arrayserver - arrayinfo - - - A callable function, used by the - log_getmore context option, - when executing a GET_MORE operation. - - - - This is not a real function, only a prototype of how the function should - be. - - - - - - &reftitle.parameters; - - &mongo.context.server; - - - info - - - - - - - - key - value - - - - - request_id - integer, the driver request identifier - - - cursor_id - integer, the cursor identifier being used to fetch more data - - - batch_size - integer, maximum number of documents being requested - - - - - - - - - - - - - diff --git a/reference/mongo/context/log-killcursor.xml b/reference/mongo/context/log-killcursor.xml deleted file mode 100644 index 1d0e649b99..0000000000 --- a/reference/mongo/context/log-killcursor.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - log_killcursor - Callback When Executing KILLCURSOR operations - - - - &reftitle.description; - - log_killcursor - arrayserver - arrayinfo - - - A callable function, used by the - log_killcursor context option, - when reading a killcursor from MongoDB. - - - - This is not a real function, only a prototype of how the function should - be. - - - - - - &reftitle.parameters; - - &mongo.context.server; - - - info - - - - - - - - key - value - - - - - cursor_id - integer, the cursor identifier to kill - - - - - - - - - - - - - diff --git a/reference/mongo/context/log-reply.xml b/reference/mongo/context/log-reply.xml deleted file mode 100644 index cd775e5e36..0000000000 --- a/reference/mongo/context/log-reply.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - log_reply - Callback When Reading the MongoDB reply - - - - &reftitle.description; - - log_reply - arrayserver - arraymessageHeaders - arrayoperationHeaders - - - A callable function, used by the - log_reply context option, - when reading a reply from MongoDB. - - - - This is not a real function, only a prototype of how the function should - be. - - - - - - &reftitle.parameters; - - &mongo.context.server; - - - messageHeaders - - - - - - - - key - value - - - - - length - integer, bytes, message reply length - - - request_id - integer, the server request identifier - - - response_id - integer, the driver request identifier this message is a response of - - - opcode - integer, the opcode id - - - - - - - - - - operationHeaders - - - - - - - - key - value - - - - - flags - integer, bitmask of protocol flags - - - cursor_id - integer, ID of the cursor created on the server (0 if none created, or its been exhausted) - - - start - The starting offset of this cursor - - - returned - integer, how many documents are returned in this trip - - - - - - - - - - - - &reftitle.seealso; - - The OP_REPLY definition in the Wire Protocol - - - - - - - diff --git a/reference/mongo/context/log-write-batch.xml b/reference/mongo/context/log-write-batch.xml deleted file mode 100644 index d227e7ec21..0000000000 --- a/reference/mongo/context/log-write-batch.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - log_write_batch - Callback When Writing Batches - - - - &reftitle.description; - - log_write_batch - arrayserver - arraywriteOptions - arraybatch - arrayprotocolOptions - - - A callable function, used by the - log_write_batch context option, - when executing a batch operation. - - - - This is not a real function, only a prototype of how the function should - be. - - - - - - &reftitle.parameters; - - &mongo.context.server; - &mongo.context.writeoptions; - - - batch - - - - Array, the actual batch operation. - - - - &mongo.context.protocoloptions; - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - Only available when connected to MongoDB 2.6.0+ - - - - - - - - - - - diff --git a/reference/mongo/core.xml b/reference/mongo/core.xml deleted file mode 100644 index 75b2b584e7..0000000000 --- a/reference/mongo/core.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - Core Classes - - - &mongo.deprecated.note; - - - The core classes are the most important part of the driver. - - - - &reference.mongo.mongoclient; - &reference.mongo.mongodb; - &reference.mongo.mongocollection; - &reference.mongo.mongocursor; - &reference.mongo.mongocursorinterface; - &reference.mongo.mongocommandcursor; - - diff --git a/reference/mongo/exceptions.xml b/reference/mongo/exceptions.xml deleted file mode 100644 index a33b604ed6..0000000000 --- a/reference/mongo/exceptions.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - Exceptions - - -
- VMWare Oddities - - If you are running VMWare on Windows and are using CIFS, pausing the VM will - cause CIFS to go out of sync and cause weird errors on un-pausing it ("The - Mongo object has not been correctly initialized by its constructor"). - Permanently mounting the Windows shares will fix this and you'll be able to - pause and unpause at will. - - - To permanently mount the Windows shares, run: - - - - - - See the Ubuntu docs for the most - up-to-date instructions. - -
-
- - &reference.mongo.mongoexception; - &reference.mongo.mongoresultexception; - &reference.mongo.mongocursorexception; - &reference.mongo.mongocursortimeoutexception; - &reference.mongo.mongoconnectionexception; - &reference.mongo.mongogridfsexception; - &reference.mongo.mongoduplicatekeyexception; - &reference.mongo.mongoprotocolexception; - &reference.mongo.mongoexecutiontimeoutexception; - &reference.mongo.mongowriteconcernexception; - -
diff --git a/reference/mongo/functions/bson-decode.xml b/reference/mongo/functions/bson-decode.xml deleted file mode 100644 index 1d0d32af4c..0000000000 --- a/reference/mongo/functions/bson-decode.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - bson_decode - Deserializes a BSON object into a PHP array - - - - &reftitle.description; - - arraybson_decode - stringbson - - - This function is very beta and entirely useless for 99% of users. It is only - useful if you're doing something weird, such as writing your own driver on - top of the PHP driver. - - - - - &reftitle.parameters; - - - - bson - - - The BSON to be deserialized. - - - - - - - - - &reftitle.returnvalues; - - Returns the deserialized BSON object. - - - - - - diff --git a/reference/mongo/functions/bson-encode.xml b/reference/mongo/functions/bson-encode.xml deleted file mode 100644 index 75bac9f80f..0000000000 --- a/reference/mongo/functions/bson-encode.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - bson_encode - Serializes a PHP variable into a BSON string - - - - &reftitle.description; - - stringbson_encode - mixedanything - - - This function is very beta and entirely useless for 99% of users. It is only - useful if you're doing something weird, such as writing your own driver on - top of the PHP driver. - - - - - &reftitle.parameters; - - - - anything - - - The variable to be serialized. - - - - - - - - - &reftitle.returnvalues; - - Returns the serialized string. - - - - - - diff --git a/reference/mongo/gridfs.xml b/reference/mongo/gridfs.xml deleted file mode 100644 index 9397d5114b..0000000000 --- a/reference/mongo/gridfs.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - GridFS Classes - - &reference.mongo.mongogridfs; - &reference.mongo.mongogridfsfile; - &reference.mongo.mongogridfscursor; - - diff --git a/reference/mongo/ini.xml b/reference/mongo/ini.xml deleted file mode 100644 index dd88a8ac78..0000000000 --- a/reference/mongo/ini.xml +++ /dev/null @@ -1,340 +0,0 @@ - - -
- &reftitle.runtime; - &extension.runtime; - - - Mongo &ConfigureOptions; - - - - &Name; - &Default; - &Changeable; - &Changelog; - - - - - mongo.allow_empty_keys - 0 - PHP_INI_ALL - - - - mongo.allow_persistent - 1 - PHP_INI_ALL - Removed in 1.2.0 - - - mongo.chunk_size - 262144 - PHP_INI_ALL - - - - mongo.cmd - "$" - PHP_INI_ALL - - - - mongo.default_host - "localhost" - PHP_INI_ALL - - - - mongo.default_port - 27017 - PHP_INI_ALL - - - - mongo.is_master_interval - 15 - PHP_INI_ALL - Added in 1.2.10, before 1.3.0 the default value was 60. - - - mongo.long_as_object - 0 - PHP_INI_ALL - - - - mongo.native_long - 1 - PHP_INI_ALL - Before 1.5.0, the default value was 0. - - - mongo.ping_interval - 5 - PHP_INI_ALL - Added in 1.2.10 - - - mongo.utf8 - 1 - PHP_INI_ALL - - - - -
- &ini.php.constants; -
- - &ini.descriptions.title; - - - - - - mongo.allow_empty_keys - int - - - - Added in version 1.0.11. - - - If empty strings ("") should be allowed as key names. By default, the - driver will throw an exception if you attempt to pass the empty string as - a key to the database. It is extremely easy to do this inavertently by - using double quotes with $-operators, so it is recommended that you leave - this setting as default. However, if you need to save keys that are empty - strings, you can set this option to true and the driver will allow you to - pass empty strings to the database. - - - - - - - mongo.allow_persistent - int - - - - If persistent connections are allowed. (Removed in 1.2.0 - all - connections are now persistent). - - - - - - - mongo.chunk_size - int - - - - The number of bytes-per-chunk. Used in divvying up GridFS files. This - number must be at least 100 less than 4 megabytes (max: 4194204) and it is - recommended that it be less than that. - - - - - - - mongo.cmd - string - - - - A character to be used in place of $ in modifiers and comparisons. - - - As it is easy to forget to escape the "$", you can also choose your own - special character to use instead of '$'. Choose a character that will not - occur in your key names, e.g. ":": - - - - - - Then, to do a comparison, for example: - - - array( ":gt" => 20, ":lte" => 30 ) ); - -?> -]]> - - - You can also change it in your code using - ini_set("mongo.cmd", ":"). Of course, you can also - just use single quotes or backslash-escape the $. - - - - - - - mongo.default_host - string - - - - Default hostname when nothing is passed to the constructor. - - - - - - - mongo.default_port - string - - - - The default TCP port number to use when connecting to the database server - if no other port is specified. The database's default is - 27017. - - - - - - - mongo.is_master_interval - int - - - - Added in version 1.2.10. - - - For replicaset connections: The minimum interval with which the driver - will send "isMaster" requests to the MongoDB server. If the value is lower, - there will be more requests, but the driver finds faster whether the - topology of the replicaset has been changed. - - - - - - - mongo.long_as_object - int - - - - Return a BSON_LONG as an instance of MongoInt64 - (instead of a primitive type). - - - - - - - mongo.native_long - int - - - - - The default behavior for this has been changed to &true; in 1.5.0, so make - sure to set this variable to the value you want (probably &true;) so that - the driver's behavior doesn't suddenly change when you upgrade. - - - - On 64-bit platforms, the mongo.native_long setting - allows for 64-bit integers to be stored in MongoDB. If it is not set, only - 32-bits of the integer will be saved. The MongoDB data type that is used - in this case is the BSON LONG, instead of the BSON INT that is used if - this setting is turned off. - - - The setting also changes the way how BSON LONGs behave when they are read - back from MongoDB. Without mongo.native_long enabled, - the driver would convert every BSON LONG to a PHP double which can result - in a loss of precision. - - - On 32-bit platforms, the mongo.native_long setting - changes nothing for storing integers in MongoDB: the integer is stored - as a BSON INT as before. However, when the setting is enabled and a - BSON LONG is read from MongoDB a - MongoCursorException is thrown alerting you that - the data could not be read back without losing precision. - - - On 32-bit systems especially, it is recommended that you combine this with - enabling mongo.long_as_object. - - - - - - - mongo.ping_interval - int - - - - Added in version 1.2.10. - - - For replicaset connections: The minimum interval with which the driver - will send "ping" requests to the MongoDB server. If the value is lower, - there will be more pings, but the driver finds faster whether a node is - no longer reachable from the replicaset. - - - - - - - mongo.utf8 - int - - - - If an exception should be thrown for non-UTF8 strings. Until version - 1.0.4, the PHP driver would ignore non-UTF8 strings, even though you're - not supposed to insert them. As of 1.0.4, the driver throws a - MongoException. To ease the transition for - applications that insert non-UTF8 strings, you can turn this option off to - emulate the old, non-exception-throwning behavior. This option will be - eliminated and exceptions always thrown for non-UTF8 strings starting with - version 1.1.0. - - - - - - -
- - diff --git a/reference/mongo/manual.xml b/reference/mongo/manual.xml deleted file mode 100644 index ef95459f01..0000000000 --- a/reference/mongo/manual.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - Manual - - - &mongo.deprecated.note; - - - This manual goes into some detail about how to use MongoDB, but it mostly - covers using the PHP driver. For information about how to design a - schema, what terms means, and setting up the database server, check out the - MongoDB documentation. - - - - &reference.mongo.tutorial; - &reference.mongo.readpreferences; - &reference.mongo.writeconcerns; - &reference.mongo.sqltomongo; - &reference.mongo.connecting; - &reference.mongo.context; - &reference.mongo.writes; - &reference.mongo.queries; - &reference.mongo.updates; - &reference.mongo.security; - &reference.mongo.trouble; - &reference.mongo.testing; - - - - - diff --git a/reference/mongo/misc.xml b/reference/mongo/misc.xml deleted file mode 100644 index af2976e99d..0000000000 --- a/reference/mongo/misc.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - Miscellaneous - - &reference.mongo.mongolog; - &reference.mongo.mongopool; - &reference.mongo.mongo; - - diff --git a/reference/mongo/mongo.xml b/reference/mongo/mongo.xml deleted file mode 100644 index 897309a3a5..0000000000 --- a/reference/mongo/mongo.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - The Mongo class [deprecated] - Mongo - - - -
- &reftitle.intro; - - A connection between PHP and MongoDB. - - - This class extends MongoClient and provides access to - several deprecated methods. - - - For backwards compatibility, it also defaults the "w" - option of its constructor argument to 0, which does not - require write operations to be acknowledged by the server. See - MongoClient::__construct for more information. - - - - - This class has been DEPRECATED as of version - 1.3.0. Relying on this feature is highly discouraged. Please use - MongoClient instead. - - -
- - -
- &reftitle.classsynopsis; - - - - Mongo - - - - - Mongo - - - - extends - MongoClient - - - - - &Methods; - - - &InheritedMethods; - - - - -
- - -
- - &reference.mongo.entities.mongo; - -
- - diff --git a/reference/mongo/mongo/connectutil.xml b/reference/mongo/mongo/connectutil.xml deleted file mode 100644 index 58e0dbb2dc..0000000000 --- a/reference/mongo/mongo/connectutil.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Mongo::connectUtil - Connects with a database server - - - - &reftitle.description; - - protected boolMongo::connectUtil - - - - - This is an internal function that you should never - call yourself. - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - If the connection was successful. - - - - - &reftitle.errors; - - Throws MongoConnectionException if it fails to connect - to the databases. - - - - - diff --git a/reference/mongo/mongo/construct.xml b/reference/mongo/mongo/construct.xml deleted file mode 100644 index fa0941044c..0000000000 --- a/reference/mongo/mongo/construct.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - Mongo::__construct - The __construct purpose - - - - &reftitle.description; - - public Mongo::__construct - stringserver - arrayoptions - - - This method overwrites the MongoClient constructor - and turns off acknowledged writes. - - - Please see MongoClient::__construct for - description of the parameters. - - - - - &reftitle.returnvalues; - - - Instanciating this class will emit E_DEPRECATED - warning, and turn off acknowledged writes. - - - - Please use the MongoClient instead. - - - - - - - diff --git a/reference/mongo/mongo/getpoolsize.xml b/reference/mongo/mongo/getpoolsize.xml deleted file mode 100644 index 929086c4e3..0000000000 --- a/reference/mongo/mongo/getpoolsize.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - Mongo::getPoolSize - Get pool size for connection pools - - - - &reftitle.description; - - public static intMongo::getPoolSize - - - - - This feature has been DEPRECATED as of version - 1.2.3. Relying on this feature is highly discouraged. Please use - MongoPool::getSize instead. - - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the current pool size. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.examples; - - Changing pool size - - This returns the default pool size, sets a new pool size, then prints the - new pool size and the pool debugging information. Note that changing the - pool size only affects new connection pools, it does not change old ones. - - - -]]> - - - - - - &reftitle.seealso; - - - Mongo::setPoolSize - Mongo::poolDebug - The connection documentation. - - - - - - diff --git a/reference/mongo/mongo/getslave.xml b/reference/mongo/mongo/getslave.xml deleted file mode 100644 index b16d0d3259..0000000000 --- a/reference/mongo/mongo/getslave.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Mongo::getSlave - Returns the address being used by this for slaveOkay reads - - - - &reftitle.description; - - public stringMongo::getSlave - - - - - This finds the address of the secondary currently being used for reads. It is - a read-only method: it does not change anything about the internal state of - the object. - - - - When you create a connection to the database, the driver will not immediately - decide on a secondary to use. Thus, after you connect, this function will - return &null; even if there are secondaries available. When you first do a - query with slaveOkay set, at that point the driver will choose a secondary - for this connection. At that point, this function will return the chosen - secondary. - - - - See the query section of this manual for - information on distributing reads to secondaries. - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The address of the secondary this connection is using for reads. - - - This returns &null; if this is not connected to a replica set or not yet - initialized. - - - - - &reftitle.errors; - &mongo.errors.deprecated; - - The returned results aren't really useful as the secondary selection - process is done on each query and database command execution. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.seealso; - - MongoCursor::info - - - - - diff --git a/reference/mongo/mongo/getslaveokay.xml b/reference/mongo/mongo/getslaveokay.xml deleted file mode 100644 index 33c7f3d18f..0000000000 --- a/reference/mongo/mongo/getslaveokay.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - Mongo::getSlaveOkay - Get slaveOkay setting for this connection - - - - &reftitle.description; - - public boolMongo::getSlaveOkay - - - - - See the query section of this manual for - information on distributing reads to secondaries. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the value of slaveOkay for this instance. - - - - - &reftitle.errors; - &mongo.errors.deprecated; - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.seealso; - - - MongoClient::getReadPreference - - - - - diff --git a/reference/mongo/mongo/pooldebug.xml b/reference/mongo/mongo/pooldebug.xml deleted file mode 100644 index 360907cb84..0000000000 --- a/reference/mongo/mongo/pooldebug.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - Mongo::poolDebug - Returns information about all connection pools - - - - &reftitle.description; - - public arrayMongo::poolDebug - - - - - This feature has been DEPRECATED as of version - 1.2.3. Relying on this feature is highly discouraged. Please use - MongoPool::info instead. - - - - - Returns an array of information about all connection pools. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Each connection pool has an identifier, which starts with the host. For each - pool, this function shows the following fields: - - - - in use - - - - The number of connections currently being used by - MongoClient instances. - - - - - - in pool - - - - The number of connections currently in the pool (not being used). - - - - - - remaining - - - - The number of connections that could be created by this pool. For - example, suppose a pool had 5 connections remaining and 3 connections in - the pool. We could create 8 new instances of - MongoClient before we exhausted this pool - (assuming no instances of MongoClient went out of - scope, returning their connections to the pool). - - - A negative number means that this pool will spawn unlimited connections. - - - Before a pool is created, you can change the max number of connections by - calling Mongo::setPoolSize. Once a pool is showing - up in the output of this function, its size cannot be changed. - - - - - - timeout - - - - The socket timeout for connections in this pool. This is how long - connections in this pool will attempt to connect to a server before - giving up. - - - - - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - diff --git a/reference/mongo/mongo/setpoolsize.xml b/reference/mongo/mongo/setpoolsize.xml deleted file mode 100644 index 5cafb52e60..0000000000 --- a/reference/mongo/mongo/setpoolsize.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - Mongo::setPoolSize - Set the size for future connection pools - - - - &reftitle.description; - - public static boolMongo::setPoolSize - intsize - - - - This method has been DEPRECATED as of version - 1.2.3. Relying on this feature is highly discouraged. Please use - MongoPool::setSize instead. - - - - - Sets the max number of connections new pools will be able to create. - - - - - &reftitle.parameters; - - - - - size - - - - The max number of connections future pools will be able to create. - Negative numbers mean that the pool will spawn an infinite number of - connections. - - - - - - - - - &reftitle.returnvalues; - - Returns the former value of pool size. - - - - - - &reftitle.examples; - - - <function>Mongo::setPoolSize</function> example - - If you set the pool size to n and then create - n connections, attempting to create an - n+1st connection will throw a - MongoConnectionException. - - - -]]> - - &example.outputs.similar; - -__construct() -#1 {main} - thrown in /path/to/php/script.php on line 10 -]]> - - - - - - - - &reftitle.seealso; - - - Mongo::getPoolSize - Mongo::poolDebug - The connection documentation. - - - - - diff --git a/reference/mongo/mongo/setslaveokay.xml b/reference/mongo/mongo/setslaveokay.xml deleted file mode 100644 index 3e87d7797f..0000000000 --- a/reference/mongo/mongo/setslaveokay.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - Mongo::setSlaveOkay - Change slaveOkay setting for this connection - - - - &reftitle.description; - - public boolMongo::setSlaveOkay - boolok&true; - - - - See the query section of this manual for - information on distributing reads to secondaries. - - - - - &reftitle.parameters; - - - - - ok - - - - If reads should be sent to secondary members of a replica set for all - possible queries using this MongoClient instance. - - - - - - - - - &reftitle.returnvalues; - - Returns the former value of slaveOkay for this instance. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.seealso; - - - MongoClient::setReadPreference - - - - - diff --git a/reference/mongo/mongo/switchslave.xml b/reference/mongo/mongo/switchslave.xml deleted file mode 100644 index ff800d00d8..0000000000 --- a/reference/mongo/mongo/switchslave.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Mongo::switchSlave - Choose a new secondary for slaveOkay reads - - - - &reftitle.description; - - public stringMongo::switchSlave - - - - - This choses a random secondary for a connection to read from. It is called - automatically by the driver and should not need to be used. It calls - MongoClient::getHosts (to refresh the status of hosts) - and Mongo::getSlave (to get the return value). - - - - See the query section of this manual for - information on distributing reads to secondaries. - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The address of the secondary this connection is using for reads. This may be - the same as the previous address as addresses are randomly chosen. It may - return only one address if only one secondary (or only the primary) is - available. - - - For example, if we had a three member replica set with a primary, secondary, - and arbiter this method would always return the address of the secondary. - If the secondary became unavailable, this method would always return the - address of the primary. If the primary also became unavailable, this method - would throw an exception, as an arbiter cannot handle reads. - - - - - &reftitle.errors; - - Throws a MongoException (error code 15) if it is - called on a non-replica-set connection. It will also throw - MongoExceptions if it cannot find anyone (primary or - secondary) to read from (error code 16). - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.seealso; - - - - - - - - diff --git a/reference/mongo/mongobindata.xml b/reference/mongo/mongobindata.xml deleted file mode 100644 index 450f1991a8..0000000000 --- a/reference/mongo/mongobindata.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - The MongoBinData class - MongoBinData - - - - - &mongo.alternative.class.note; - - MongoDB\BSON\Binary - - - - -
- &reftitle.intro; - - An object that can be used to store or retrieve binary data from the database. - - - The maximum size of a single object that can be inserted into the database - is 16MB. For data that is larger than this (movies, music, Henry Kissinger's - autobiography), use MongoGridFS. For data that is - smaller than 16MB, you may find it easier to embed it within the document - using MongoBinData. - - - For example, to embed an image in a document, one could write: - - - - "foobity", - "pic" => new MongoBinData(file_get_contents("gravatar.jpg"), MongoBinData::GENERIC), -); - -$users->save($profile); - -?> -]]> - - - - This class contains a type field, which currently gives - no additional functionality in the PHP driver or the database. There are - seven predefined types, which are defined as class constants below. For - backwards compatibility, the PHP driver uses - MongoBinData::BYTE_ARRAY as the default; however, this - may change to MongoBinData::GENERIC in the future. - Users are encouraged to specify a type in - MongoBinData::__construct. - -
- - -
- &reftitle.classsynopsis; - - - - MongoBinData - - - - - MongoBinData - - - - - &Constants; - - const - int - MongoBinData::GENERIC - 0 - - - const - int - MongoBinData::FUNC - 1 - - - const - int - MongoBinData::BYTE_ARRAY - 2 - - - const - int - MongoBinData::UUID - 3 - - - const - int - MongoBinData::UUID_RFC4122 - 4 - - - const - int - MongoBinData::MD5 - 5 - - - const - int - MongoBinData::CUSTOM - 128 - - - Fields - - public - string - bin - - - public - int - type - 2 - - - &Methods; - - - - -
- - -
- &reftitle.constants; -
- Binary Data Types - - - MongoBinData::GENERIC - - - Generic binary data. - - - - - MongoBinData::FUNC - - - Function. - - - - - MongoBinData::BYTE_ARRAY - - - Generic binary data (deprecated in favor of - MongoBinData::GENERIC). - - - - - MongoBinData::UUID - - - Universally unique identifier (deprecated in favor of - MongoBinData::UUID_RFC4122). - - - - - MongoBinData::UUID_RFC4122 - - - Universally unique identifier (according to - RFC 4122). - - - - - MongoBinData::MD5 - - - MD5. - - - - - MongoBinData::CUSTOM - - - User-defined type. - - - - -
-
- - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 1.5.0 - - Added MongoBinData::GENERIC and - MongoBinData::UUID_RFC4122 constants. - - - - - - - -
- - &reference.mongo.entities.mongobindata; - -
- - diff --git a/reference/mongo/mongobindata/construct.xml b/reference/mongo/mongobindata/construct.xml deleted file mode 100644 index 8425e6f4f0..0000000000 --- a/reference/mongo/mongobindata/construct.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - MongoBinData::__construct - Creates a new binary data object - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\Binary::__construct - - - - - - &reftitle.description; - - public MongoBinData::__construct - stringdata - inttype0 - - - Creates a new binary data object. - - - There are seven types of binary data currently recognized by the BSON spec, - which are defined as - class constants. For - backwards compatibility, the PHP driver uses - MongoBinData::BYTE_ARRAY as the default; however, this - may change to MongoBinData::GENERIC in the future. - Users are encouraged to specify a type instead of relying on the default. - - - - - &reftitle.parameters; - - - - - data - - - - Binary data. - - - - - - type - - - - Data type. - - - - - - - - - &reftitle.returnvalues; - - Returns a new binary data object. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - The default changed from 2 - (MongoBinData::BYTE_ARRAY) to - 0 (MongoBinData::GENERIC). - - - - PECL mongo 1.2.11 - - Emits E_DEPRECATED when the second argument is not - used. The default value for type may change in - the near future. - - - - - - - - - - - diff --git a/reference/mongo/mongobindata/tostring.xml b/reference/mongo/mongobindata/tostring.xml deleted file mode 100644 index 112baac118..0000000000 --- a/reference/mongo/mongobindata/tostring.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - MongoBinData::__toString - The string representation of this binary data object - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\Binary::getData - - - - - - &reftitle.description; - - public stringMongoBinData::__toString - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the string "<Mongo Binary Data>". To access the contents of a - MongoBinData, use the bin field. - - - - - diff --git a/reference/mongo/mongoclient.xml b/reference/mongo/mongoclient.xml deleted file mode 100644 index 9e7565f646..0000000000 --- a/reference/mongo/mongoclient.xml +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - The MongoClient class - MongoClient - - - - - - &mongo.alternative.class.note; - - MongoDB\Driver\Manager - - - -
- &reftitle.intro; - - A connection manager for PHP and MongoDB. - - - This class is used to create and manage connections. A typical use is: - - <classname>MongoClient</classname> basic usage - -foo; // get the database named "foo" - -?> -]]> - - - - - See MongoClient::__construct and the section on - connecting for more information - about creating connections. - -
- - -
- &reftitle.classsynopsis; - - - - MongoClient - - - - - MongoClient - - - - - &Constants; - - const - string - MongoClient::VERSION - - - const - string - MongoClient::DEFAULT_HOST - "localhost" - - - const - int - MongoClient::DEFAULT_PORT - 27017 - - - const - string - MongoClient::RP_PRIMARY - "primary" - - - const - string - MongoClient::RP_PRIMARY_PREFERRED - "primaryPreferred" - - - const - string - MongoClient::RP_SECONDARY - "secondary" - - - const - string - MongoClient::RP_SECONDARY_PREFERRED - "secondaryPreferred" - - - const - string - MongoClient::RP_NEAREST - "nearest" - - - &Properties; - - public - bool - connected - &false; - - - public - string - status - &null; - - - protected - string - server - &null; - - - protected - bool - persistent - &null; - - - &Methods; - - - - - -
- - -
- &reftitle.constants; -
- MongoClient Constants - - - MongoClient::VERSION - - - PHP driver version. May be suffixed with "dev", "+" or "-" if it is - in-between versions. - - - - - MongoClient::DEFAULT_HOST - - - Host to connect to if no host is given. - - - - - MongoClient::DEFAULT_PORT - - - Port to connect to if no port is given. - - - - - MongoClient::RP_PRIMARY - - - Read preference for the - primary replica set member. - - - - - MongoClient::RP_PRIMARY_PREFERRED - - - Read preference for - preferring the primary replica set member. - - - - - MongoClient::RP_SECONDARY - - - Read preference for a - secondary replica set member. - - - - - MongoClient::RP_SECONDARY_PREFERRED - - - Read preference for - preferring a secondary replica set member. - - - - - MongoClient::RP_NEAREST - - - Read preference for the - nearest replica set member. - - - - -
-
- -
- Fields - - - connected - - - This property will be set to &true; if we have a open connection to - the database, &false; otherwise. If the connection is to a replica set, - this property will only be &true; if the driver has a connection to a - node matching the current read preference. This property does not take - authentication into account. - - - This property is deprecated since version 1.5.0. - - - - - status - - - This property is no longer used and will be set to &null; In driver - versions 1.1.x and earlier, this may be set to a string value (e.g. - "recycled", "new") when persistent - connections are used. - - - This property is deprecated since version 1.5.0. - - - - -
- -
- &reftitle.seealso; - - - - - MongoDB core docs on connecting - -
- - -
- - &reference.mongo.entities.mongoclient; - -
- - diff --git a/reference/mongo/mongoclient/close.xml b/reference/mongo/mongoclient/close.xml deleted file mode 100644 index f9bdf4a95b..0000000000 --- a/reference/mongo/mongoclient/close.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - MongoClient::close - Closes this connection - - - - - &mongo.noalternative.method.note; - - - - - &reftitle.description; - - public boolMongoClient::close - boolstringconnection - - - The MongoClient::close method forcefully closes a - connection to the database, even if persistent connections are being used. - You should never have to do this under normal - circumstances. - - - - - - - &reftitle.parameters; - - - - - connection - - - - If connection is not given, or &false; then connection that would be - selected for writes would be closed. In a single-node configuration, - that is then the whole connection, but if you are connected to a - replica set, close() will only close the - connection to the primary server. - - - If connection is &true; then all connections as known by the connection - manager will be closed. This can include connections that are not - referenced in the connection string used to create the object that - you are calling close on. - - - If connection is a string argument, then it will only close the - connection identified by this hash. Hashes are identifiers for a - connection and can be obtained by calling - MongoClient::getConnections. - - - - - - - - - &reftitle.returnvalues; - - Returns if the connection was successfully closed. - - - - - &reftitle.examples; - - <function>MongoClient::close</function> example - This example demonstrates how to selectively close all connections - for secondaries only. - -getConnections(); - -foreach ( $connections as $con ) -{ - // Loop over all the connections, and when the type is "SECONDARY" - // we close the connection - if ( $con['connection']['connection_type_desc'] == "SECONDARY" ) - { - echo "Closing '{$con['hash']}': "; - $closed = $a->close( $con['hash'] ); - echo $closed ? "ok" : "failed", "\n"; - } -} -?> -]]> - - &example.outputs; - - - - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.3.0 - - - The connection parameter to this function was - added in 1.3.0. Before that, only the write connection would be - closed by this method. - - - - - PECL mongo 1.2.0 - - - Before version 1.2.0 the driver would not use persistent connections - by default, and all connections would be closed as soon as a MongoDB - connection went out if scope. Since version 1.2.0 this is no longer - the case and it is a bad idea to call close as you might end up - overloading the server with connections under high load. - - - - - - - - - - - &reftitle.seealso; - - MongoClient::getConnections - - - - diff --git a/reference/mongo/mongoclient/construct.xml b/reference/mongo/mongoclient/construct.xml deleted file mode 100644 index ef2e75ac84..0000000000 --- a/reference/mongo/mongoclient/construct.xml +++ /dev/null @@ -1,855 +0,0 @@ - - - - - - MongoClient::__construct - Creates a new database connection object - - - - - &mongo.alternative.method.note; - - MongoDB\Driver\Manager::__construct - - - - - - &reftitle.description; - - public MongoClient::__construct - stringserver"mongodb://localhost:27017" - arrayoptionsarray("connect" => &true;) - arraydriver_options - - - If no parameters are passed, this connects to "localhost:27017" (or whatever - was specified in php.ini for - mongo.default_host and - mongo.default_port). - - - server should have the form: - - - - - - The connection string always starts with mongodb://, to - indicate it is a connection string in this form. - - If username and password - are specified, the constructor will attempt to authenticate the connection - with the database before returning. Username and password are optional - and must be followed by an @, if specified. - - - At least one host must be given (port optional, always defaulting to 27017) - and as many hosts as desired may be connected to. Host names are - comma-separated and the constructor will return successfully if it connected - to at least one host. If it could not connect to any of the hosts, it will - throw a MongoConnectionException. Please see the - Replica Sets section for - information on how to connect to Replica Sets. - - - If you specified a username and password, you may specify a database to - authenticate with. If db is not specified, "admin" will - be used. - - - An optional query string may be used to specify extra options. The same - options are supported through the options array as - well, and are therefore redescribed there. See the examples below on - how to set those options. - - - One part of the options governs how the driver reads from secondary nodes - in a replica set environment. Extra information on how these read - preferences work is available as well through the read preferences documentation page. - - - - - &reftitle.parameters; - - - - - server - - - - The server name. - - - - - - options - - - - An array of options for the connection. Currently available options - include: - - - - "authMechanism" - - - Available mechanisms are: - - - - - authMechanism - Description - Availability - - - - - MONGODB-CR - Authenticate using Challenge Response mechanism. This is the default value. - All MongoDB versions - - - MONGODB-X509 - Authenticates using X509 certificates - MongoDB 2.6. Only available when is enabled - - - PLAIN - Authenticates using unencrypted plain username+password. Must be used over SSL connections. Generally used by MongoDB to login via 3rd party LDAP server - MongoDB Enterprise 2.4. The Driver must be compiled against CyrusSASL2 - - - GSSAPI - Authenticates via kerberos systems - MongoDB Enterprise 2.4. The Driver must be compiled against CyrusSASL2 - - - SCRAM-SHA-1 - Authenticates using SCRAM-SHA-1 - MongoDB 3.0. - - - - - - - - - "authSource" - - - Should be set to the database name where the user is defined it. - - - - - "connect" - - - If the constructor should connect before returning. Default is - &true;. When set to &false; the driver will - automatically connect to the server whenever - it is necessary to do a query. Alternatively, you can run - MongoClient::connect manually. - - - - This option is not supported through the connection string. - - - - - - "connectTimeoutMS" - - - How long a connection can take to be opened before timing out in - milliseconds. Defaults to 60000 (60 seconds). - - - If -1 is specified, no connection timeout will be - applied and PHP will use - default_socket_timeout. - - - - - "db" - - - The database to authenticate against can be specified here, instead of - including it in the host list. This overrides a database given in the - host list. - - - - - "fsync" - - - When "fsync" is set, all write operations will - block until the database has flushed the changes to disk. This makes - the write operations slower, but it guarantees that writes have - succeeded and that the operations can be recovered in case of total - system failure. - - - If the MongoDB server has journaling enabled, this option is identical - to "journal". If journaling is not enabled, this - option ensures that write operations will be synced to database files - on disk. - - - - If journaling is enabled, users are strongly encouraged to use the - "journal" option instead of - "fsync". Do not use "fsync" and - "journal" simultaneously, as that will result in - an error. - - - - - - "journal" - - - When "journal" is set, all write operations will - block until the database has flushed the changes to the journal on - disk. This makes the write operations slower, but it guarantees that - writes have succeeded and that the operations can be recovered in case - of total system failure. - - - - If this option is used and journaling is disabled, MongoDB 2.6+ will - raise an error and the write will fail; older server versions will - simply ignore the option. - - - - - - "gssapiServiceName" - - - Sets the Kerberos service principal. Only applicable when authMechanism=GSSAPI. Defaults to "mongodb". - - - - - "password" - - - The password can be specified here, instead of including it in the - host list. This is especially useful if a password has a "@" in it. - This overrides a password set in the host list. - - - - - "readPreference" - - - Specifies the read preference type. Read preferences provide you - with control from which secondaries data can be read from. - - - Allowed values are: MongoClient::RP_PRIMARY, - MongoClient::RP_PRIMARY_PREFERRED, - MongoClient::RP_SECONDARY, - MongoClient::RP_SECONDARY_PREFERRED and - MongoClient::RP_NEAREST. - - - See the documentation on read - preferences for more information. - - - - - "readPreferenceTags" - - - Specifies the read preference tags as an array of strings. Tags can be - used in combination with the readPreference option - to further control which secondaries data might be read from. - - - See the documentation on read - preferences for more information. - - - - - "replicaSet" - - - The name of the replica set to connect to. If this is given, the - primary will be automatically be determined. This means that the - driver may end up connecting to a server that was not even listed. - See the replica set example below for details. - - - - - "secondaryAcceptableLatencyMS" - - - When reading from a secondary (using ReadPreferences), do not read from secondaries known to be more then - secondaryAcceptableLatencyMS away from us. Defaults to 15 - - - - - "socketTimeoutMS" - - - How long a socket operation (read or write) can take before timing out - in milliseconds. Defaults to 30000 (30 seconds). - - - If -1 is specified, socket operations may block - indefinitely. This option may also be set on a per-operation basis - using MongoCursor::timeout for queries or the - "socketTimeoutMS" option for write methods. - - - - This is a client-side timeout. If a write operation times out, there - is no way to know if the server actually handled the write or not, as - a MongoCursorTimeoutException will be thrown - in lieu of returning a write result. - - - - - - "ssl" - - - A boolean to specify whether you want to enable SSL for the - connections to MongoDB. Extra options such as certificates - can be set with . - - - - - "username" - - - The username can be specified here, instead of including it in the - host list. This is especially useful if a username has a ":" in it. - This overrides a username set in the host list. - - - - - "w" - - - The w option specifies the - Write Concern for the driver, - which determines how long the driver blocks when writing. The - default value is 1. - - - This option is applicable when connecting to both single servers and - replica sets. A positive value controls how many - nodes must acknowledge the write instruction before the driver - continues. A value of 1 would require the single - server or primary (in a replica set) to acknowledge the write - operation. A value of 3 would cause the driver to - block until the write has been applied to the primary as well as two - secondary servers (in a replica set). - - - A string value is used to control which tag sets are taken into - account for write concerns. "majority" is special - and ensures that the write operation has been applied to the majority - (more than 50%) of the participating nodes. - - - - - "wTimeoutMS" - - - This option specifies the time limit, in milliseconds, for - write concern - acknowledgement. It is only applicable for write operations where - "w" is greater than 1, as the - timeout pertains to replication. If the write concern is not satisfied - within the time limit, a MongoCursorException - will be thrown. A value of 0 may be specified to - block indefinitely. The default value is 10000 - (ten seconds). - - - - - - The following options are deprecated and should no longer be used: - - - - "slaveOkay" - - - Deprecated. Please use the read - preference options. - - - - - "timeout" - - - Deprecated alias for "connectTimeoutMS". - - - - - "wTimeout" - - - Deprecated alias for "wTimeoutMS". - - - - - - - - - - driver_options - - - - An array of options for the MongoDB driver. Options include setting - connection context options for SSL - or logging callbacks. - - - - "context" - - - The Stream Context to attach to all new connections. This allows you - for example to configure SSL certificates and are described at - SSL context options. See the - Connecting over SSL tutorial. - - - - - - - - - - - - &reftitle.returnvalues; - - Returns a new database connection object. - - - - - &reftitle.errors; - - Throws MongoConnectionException if it tries and fails - to connect to the database for all hostnames given. It will also throw a - MongoConnnectionException if an invalid username or - password is given. See MongoConnectionException - documentation for common exceptions and their causes. - - - - - &reftitle.examples; - - <function>MongoClient::__construct</function> replica set example - - This example shows how to connect the driver to a replica set. It assumes - that there is a set of three servers: sf1.example.com, sf2.example.com, and - ny1.example.com. The primary could be any one of these servers. - - - "myReplSet")); - -?> -]]> - - - If the current primary fails, the driver will figure out which secondary - server became the new primary and automatically start using that connection. - Automatic failover will not work correctly if replicaSet - is not specified. - - - At least one seed in the seed list must be up for the driver to connect to - the replica set. - - - If you include seeds from two separate replica sets, behavior is undefined. - - See the - core documentation on - replica sets for more information. - - - - Connecting to a domain socket - - In version 1.0.9+, you can use a UNIX domain socket to connect to an - instance of MongoDB running locally. This should be slightly faster than - using a network connection. - - - In version 1.5.0, the MongoDB server automatically opens a socket at - /tmp/mongodb-<port>.sock. You can connect to this by specifying the - path in your connection string: - - - -]]> - - - You can combine this with any other connections you'd like: - - - -]]> - - - - <function>MongoClient::__construct</function> authentication example - - A user must exist in the admin database before attempting to use - authentication. You can create one with the Mongo shell by running: - - - use admin -switched to db admin -> db.addUser("testUser", "testPass"); -{ - "_id" : ObjectId("4b21272fd9ab21611d19095c"), - "user" : "testUser", - "pwd" : "03b9b27e0abf1865e2f6fcbd9845dd59" -} -> -]]> - - - After creating a user with, in this case, username "testUser" and password - "testPass", you can create an authenticated connection: - - - -]]> - - - - <function>MongoClient::__construct</function> read preference example - - 'rs')); -?> -]]> - - - See the read preferences - section of this manual for further information. - - - - - <function>MongoClient::__construct</function> options example - - Options can be passed both through the query string in the connection - string, or as an array passed as second argument to the constructor. - - - Here we set the journal option to true and readPreference to secondary - preferred as default for all write operations: - - - -]]> - - - And now we do the same, but as an options array: - - - true, - 'readPreference' => 'secondary', -); -$m = new MongoClient("mongodb://localhost/", $options); -?> -]]> - - - - - <function>MongoClient::__construct</function> read preference example - - 'rs')); -?> -]]> - - - See the read preferences - section of this manual for further information. - - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.6.0 - - - Added support for "SCRAM-SHA-1" in - "authMechanism" option. - - - - - PECL mongo 1.5.0 - - - Added "authMechanism", "gssapiServiceName", and "secondaryAcceptableLatencyMS". - - - - - PECL mongo 1.4.0 - - - Added "ssl" option and support for - connecting over SSL. - - - Added "wTimeoutMS" option, which replaces - "wTimeout". - - - Emits E_DEPRECATED when - "slaveOkay" or "timeout" is used. - - - - - PECL mongo 1.5.0 - - - Added "authSource". - - - - - PECL mongo 1.3.4 - - - Added "connectTimeoutMS" and - "socketTimeoutMS" options. - - - - - PECL mongo 1.3.0 - - - Added "readPreference", - "readPreferenceTags", "w", and - "wTimeout" options. - - - - - PECL mongo 1.2.0 - - - Added "username" and "password" - options. - - - Removed "persist" option, as all connections are - now persistent. It can still be used, but it doesn't affect anything. - - - - - "persist" - - - - If the connection should be persistent. If set, the connection will - be persistent. The string representation of the value is used as an - ID for the connection, so two instances of - MongoClient that are initialized with - array("persist" => "foobar") will share the same - database connection, whereas an instance initialized with - array("persist" => "barbaz") will use a different - database connection. - - - - - - The "replicaSet" option now takes a string, not a - boolean. - - - - - PECL mongo 1.0.9 - Added "replicaSet" option. - - - PECL mongo 1.0.2 - - - Changed constructor to take an array of options. Pre-1.0.2, the - constructor took the following parameters: - - - - - server - - - - The server name. - - - - - - connect - - - - Optional boolean parameter specifying if the constructor should - connect to the database before returning. Defaults to &true;. - - - - - - persistent - - - - If the connection should be persistent. - - - - - - paired - - - - If the connection should be paired. - - - - - - - - - - - - - - diff --git a/reference/mongo/mongoclient/dropdb.xml b/reference/mongo/mongoclient/dropdb.xml deleted file mode 100644 index a97672b828..0000000000 --- a/reference/mongo/mongoclient/dropdb.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - MongoClient::dropDB - Drops a database [deprecated] - - - - &mongo.alternative.phplib.note; - - MongoDB\Client::dropDatabase() - - - - - &reftitle.description; - - public arrayMongoClient::dropDB - mixeddb - - - - Deprecated - - Use MongoDB::drop instead. - - - - - - - &reftitle.parameters; - - - - - db - - - - The database to drop. Can be a MongoDB object or the name of the database. - - - - - - - - - &reftitle.returnvalues; - - Returns the database response. - - - - diff --git a/reference/mongo/mongoclient/get.xml b/reference/mongo/mongoclient/get.xml deleted file mode 100644 index 36b700fda9..0000000000 --- a/reference/mongo/mongoclient/get.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - MongoClient::__get - Gets a database - - - - &mongo.alternative.phplib.note; - - MongoDB\Client::__get() - - - - - &reftitle.description; - - public MongoDBMongoClient::__get - stringdbname - - - This is the cleanest way of getting a database. If the database name has any - special characters, MongoClient::selectDB will need to - be used; however, this should be sufficient for most cases. - -selectDB("foo"); -$db = $mongo->foo; - -?> -]]> - - - - - - &reftitle.parameters; - - - - - dbname - - - - The database name. - - - - - - - - - &reftitle.returnvalues; - - Returns a new db object. - - - - - &reftitle.errors; - - Throws a generic exception if the database name is invalid. - - - - - diff --git a/reference/mongo/mongoclient/getconnections.xml b/reference/mongo/mongoclient/getconnections.xml deleted file mode 100644 index 098481770f..0000000000 --- a/reference/mongo/mongoclient/getconnections.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - MongoClient::getConnections - Return info about all open connections - - - - &mongo.noalternative.method.note; - - - - &reftitle.description; - - public static arrayMongoClient::getConnections - - - - Returns an array of all open connections, and information about each of the - servers - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - An array of open connections. - - - - - &reftitle.examples; - - <methodname>MongoClient::getConnections</methodname> example - -getConnections()); -?> -]]> - - &example.outputs.similar; - - - array(3) { - ["hash"]=> - string(26) "localhost:27017;-;X;56052" - ["server"]=> - array(3) { - ["host"]=> - string(10) "localhost" - ["port"]=> - int(27017) - ["pid"]=> - int(56052) - } - ["connection"]=> - array(8) { - ["last_ping"]=> - int(1354076401) - ["last_ismaster"]=> - int(0) - ["ping_ms"]=> - int(0) - ["connection_type"]=> - int(1) - ["connection_type_desc"]=> - string(10) "STANDALONE" - ["max_bson_size"]=> - int(16777216) - ["tag_count"]=> - int(0) - ["tags"]=> - array(0) { - } - } - } -} -]]> - - - - - - - - diff --git a/reference/mongo/mongoclient/gethosts.xml b/reference/mongo/mongoclient/gethosts.xml deleted file mode 100644 index 0513324722..0000000000 --- a/reference/mongo/mongoclient/gethosts.xml +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - MongoClient::getHosts - Updates status for all associated hosts - - - - &mongo.alternative.method.note; - - MongoDB\Driver\Manager::getServers - - - - - &reftitle.description; - - public arrayMongoClient::getHosts - - - - - This method is only useful with a connection to a replica set. It returns - the status of all of the hosts in the set. Without a replica set, it will - just return an array with one element containing the host that you are - connected to. - - - - See the query section of this manual for - information on distributing reads to secondaries. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns an array of information about the hosts in the set. Includes each - host's hostname, its health (1 is healthy), its state (1 is primary, 2 is - secondary, 0 is anything else), the amount of time it took to ping the - server, and when the last ping occurred. For example, on a three-member - replica set, it might look something like: - - - - array(4) { - ["host"]=> - "A" - ["port"]=> - 27017 - ["health"]=> - int(1) - ["state"]=> - int(2) - ["ping"]=> - int(369) - ["lastPing"]=> - int(1309470644) - } - ["B:27017"]=> - array(4) { - ["host"]=> - "B" - ["port"]=> - 27017 - ["health"]=> - int(1) - ["state"]=> - int(1) - ["ping"]=> - int(139) - ["lastPing"]=> - int(1309470644) - } - ["C:27017"]=> - array(4) { - ["host"]=> - "C" - ["port"]=> - 27017 - ["health"]=> - int(1) - ["state"]=> - int(2) - ["ping"]=> - int(1012) - ["lastPing"]=> - int(1309470644) - } -} -]]> - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.10 - - - Support for non-replicasets was added. - - - The returned array elements now also include the - hostname and port. - - - - - - - - - - - &reftitle.seealso; - - MongoClient::getConnections - - - - diff --git a/reference/mongo/mongoclient/getreadpreference.xml b/reference/mongo/mongoclient/getreadpreference.xml deleted file mode 100644 index 96473e75bc..0000000000 --- a/reference/mongo/mongoclient/getreadpreference.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - MongoClient::getReadPreference - Get the read preference for this connection - - - - &mongo.noalternative.method.note; - - - - &reftitle.description; - - public arrayMongoClient::getReadPreference - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - &mongo.getreadpreference.returnvalues; - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.3.3 - - The return value has changed to be consistent with - MongoClient::setReadPreference. The - type value was changed from a number to a string, - type_string was removed, and - tagsets now expresses tags as key/value pairs instead - of colon-delimited strings. - - - - - - - - - - &reftitle.examples; - - <methodname>MongoClient::getReadPreference</methodname> return value example - -setReadPreference(MongoClient::RP_SECONDARY, array( - array('dc' => 'east', 'use' => 'reporting'), - array('dc' => 'west'), - array(), -)); -var_dump($m->getReadPreference()); -?> -]]> - - &example.outputs; - - - string(9) "secondary" - ["tagsets"]=> - array(3) { - [0]=> - array(2) { - ["dc"]=> - string(4) "east" - ["use"]=> - string(9) "reporting" - } - [1]=> - array(1) { - ["dc"]=> - string(7) "west" - } - [2]=> - array(0) { - } - } -} -]]> - - - - - - &reftitle.seealso; - - The read preferences documentation. - MongoClient::setReadPreference - - - - - - diff --git a/reference/mongo/mongoclient/getwriteconcern.xml b/reference/mongo/mongoclient/getwriteconcern.xml deleted file mode 100644 index 42e6064aff..0000000000 --- a/reference/mongo/mongoclient/getwriteconcern.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - MongoClient::getWriteConcern - Get the write concern for this connection - - - - &mongo.noalternative.method.note; - - - - &reftitle.description; - - public arrayMongoClient::getWriteConcern - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - &mongo.getwriteconcern.returnvalues; - - - - &reftitle.examples; - - <methodname>MongoClient::getWriteConcern</methodname> return value example - - 500)); -var_dump($mc->getWriteConcern()); - -$mc->setWriteConcern(1, 1000); -var_dump($mc->getWriteConcern()); -?> -]]> - - &example.outputs; - - - int(1) - ["wtimeout"]=> - int(500) -} -array(2) { - ["w"]=> - int(1) - ["wtimeout"]=> - int(1000) -} -]]> - - - - - - &reftitle.seealso; - - The write concern documentation. - MongoClient::setWriteConcern - - - - - - diff --git a/reference/mongo/mongoclient/killcursor.xml b/reference/mongo/mongoclient/killcursor.xml deleted file mode 100644 index 35cda05208..0000000000 --- a/reference/mongo/mongoclient/killcursor.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - MongoClient::killCursor - Kills a specific cursor on the server - - - - &mongo.noalternative.method.note; - - - - &reftitle.description; - - public boolMongoClient::killCursor - stringserver_hash - intMongoInt64id - - - In certain situations it might be needed to kill a cursor on the server. - Usually cursors time out after 10 minutes of inactivity, but it is possible - to create an immortal cursor with - MongoCursor::immortal that never times out. In - order to be able to kill such an immortal cursor, you can call this - method with the information supplied by - MongoCursor::info. - - - - - &reftitle.parameters; - - - - - server_hash - - - - The server hash that has the cursor. This can be obtained through - MongoCursor::info. - - - - - - id - - - - The ID of the cursor to kill. You can either supply an int - containing the 64 bit cursor ID, or an object of the - MongoInt64 class. The latter is necessary on 32 - bit platforms (and Windows). - - - - - - - - - &reftitle.returnvalues; - - Returns &true; if the method attempted to kill a cursor, and &false; if - there was something wrong with the arguments (such as a wrong - server_hash). The return status does not - reflect where the cursor was actually killed as the server does - not provide that information. - - - - - &reftitle.errors; - - This method displays a warning if the supplied - server_hash does not match up with an existing - connection. No attempt to kill a cursor is attempted in that case either. - - - - - &reftitle.examples; - - <function>MongoClient::killCursor</function> example - - This example shows how to connect, do a query, obtain the cursor - information and then kill the cursor. - - -testdb->collection; -$cursor = $c->find(); -$result = $cursor->next(); - -// Now the cursor is valid, so we can get the hash and ID out: -$info = $cursor->info(); - -// Kill the cursor -MongoClient::killCursor( $info['server'], $info['id'] ); -?> -]]> - - - - - diff --git a/reference/mongo/mongoclient/listdbs.xml b/reference/mongo/mongoclient/listdbs.xml deleted file mode 100644 index 929611fc7a..0000000000 --- a/reference/mongo/mongoclient/listdbs.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - MongoClient::listDBs - Lists all of the databases available - - - - &mongo.alternative.phplib.note; - - MongoDB\Client::listDatabases() - - - - - &reftitle.description; - - public arrayMongoClient::listDBs - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns an associative array containing three fields. The first field is - databases, which in turn contains an array. Each element - of the array is an associative array corresponding to a database, giving th - database's name, size, and if it's empty. The other two fields are - totalSize (in bytes) and ok, which is 1 - if this method ran successfully. - - - - - &reftitle.examples; - - <methodname>MongoClient::listDBs</methodname> example - - Example demonstrating how to use listDBs and the returned data structure. - - -listDBs(); -print_r($dbs); - -?> -]]> - - &example.outputs.similar; - - Array - ( - [0] => Array - ( - [name] => doctrine - [sizeOnDisk] => 218103808 - [empty] => - ) - ) - - [totalSize] => 218103808 - [ok] => 1 -) - -]]> - - - - - diff --git a/reference/mongo/mongoclient/selectcollection.xml b/reference/mongo/mongoclient/selectcollection.xml deleted file mode 100644 index 98f7e76f25..0000000000 --- a/reference/mongo/mongoclient/selectcollection.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - MongoClient::selectCollection - Gets a database collection - - - - &mongo.alternative.phplib.note; - - MongoDB\Client::selectCollection() - - - - - &reftitle.description; - - public MongoCollectionMongoClient::selectCollection - stringdb - stringcollection - - - - - &reftitle.parameters; - - - - - db - - - - The database name. - - - - - - collection - - - - The collection name. - - - - - - - - - &reftitle.returnvalues; - - Returns a new collection object. - - - - - &reftitle.errors; - - Throws Exception if the database or collection name is invalid. - - - - - &reftitle.examples; - - <function>MongoClient::selectCollection</function> example - -selectCollection("foo", "bar.baz"); -// which is equivalent to -$c2 = $m->selectDB("foo")->selectCollection("bar.baz"); - -// $c1 and $c2 now represent the same collection -?> -]]> - - - - - diff --git a/reference/mongo/mongoclient/selectdb.xml b/reference/mongo/mongoclient/selectdb.xml deleted file mode 100644 index 35bb151a55..0000000000 --- a/reference/mongo/mongoclient/selectdb.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - MongoClient::selectDB - Gets a database - - - - &mongo.alternative.phplib.note; - - MongoDB\Client::selectDatabase() - - - - - &reftitle.description; - - public MongoDBMongoClient::selectDB - stringname - - - - - &reftitle.parameters; - - - - - name - - - - The database name. - - - - - - - - - &reftitle.returnvalues; - - Returns a new database object. - - - - - &reftitle.errors; - - Throws Exception if the database name is invalid. - - - - - diff --git a/reference/mongo/mongoclient/setreadpreference.xml b/reference/mongo/mongoclient/setreadpreference.xml deleted file mode 100644 index 4ded1e24a2..0000000000 --- a/reference/mongo/mongoclient/setreadpreference.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - MongoClient::setReadPreference - Set the read preference for this connection - - - - &mongo.noalternative.method.note; - - - - &reftitle.description; - - public boolMongoClient::setReadPreference - stringread_preference - arraytags - - - - - &reftitle.parameters; - &mongo.setreadpreference.parameters; - - - - &reftitle.returnvalues; - &mongo.setreadpreference.returnvalues; - - - - &reftitle.errors; - &mongo.setreadpreference.errors; - - - - &reftitle.examples; - - <methodname>MongoClient::setReadPreference</methodname> tag set array syntax example - -setReadPreference(MongoClient::RP_NEAREST, array( - array('dc' => 'east', 'use' => 'reporting'), - array('dc' => 'west'), -)); -?> -]]> - - - - - - &reftitle.seealso; - - The read preferences documentation. - MongoClient::getReadPreference - - - - - - diff --git a/reference/mongo/mongoclient/setwriteconcern.xml b/reference/mongo/mongoclient/setwriteconcern.xml deleted file mode 100644 index b8b2e9b3bf..0000000000 --- a/reference/mongo/mongoclient/setwriteconcern.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - MongoClient::setWriteConcern - Set the write concern for this connection - - - - &mongo.noalternative.method.note; - - - - &reftitle.description; - - public boolMongoClient::setWriteConcern - mixedw - intwtimeout - - - - - &reftitle.parameters; - &mongo.setwriteconcern.parameters; - - - - &reftitle.returnvalues; - &mongo.setwriteconcern.returnvalues; - - - - &reftitle.errors; - &mongo.setwriteconcern.errors; - - - - &reftitle.examples; - - <methodname>MongoClient::setWriteConcern</methodname> example - -setWriteConcern('majority', 3000); -?> -]]> - - - - - - &reftitle.seealso; - - The write concern documentation. - MongoClient::getWriteConcern - - - - - - diff --git a/reference/mongo/mongoclient/tostring.xml b/reference/mongo/mongoclient/tostring.xml deleted file mode 100644 index 20c3d84afa..0000000000 --- a/reference/mongo/mongoclient/tostring.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - MongoClient::__toString - String representation of this connection - - - - &mongo.noalternative.method.note; - - - - &reftitle.description; - - public stringMongoClient::__toString - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns hostname and port for this connection. - - - - diff --git a/reference/mongo/mongocode.xml b/reference/mongo/mongocode.xml deleted file mode 100644 index 33e4b5f0c7..0000000000 --- a/reference/mongo/mongocode.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - The MongoCode class - MongoCode - - - - - &mongo.alternative.class.note; - - MongoDB\BSON\JavaScript - - - - -
- &reftitle.intro; - - Represents JavaScript code for the database. - - - MongoCode objects are composed of two parts: a string of code and an optional scope. The string of code must be valid JavaScript. The scope is a associative array of variable name/value pairs. - -
- - -
- &reftitle.classsynopsis; - - - - MongoCode - - - - - MongoCode - - - - - &Methods; - - - - -
- -
- - &reference.mongo.entities.mongocode; - -
- - diff --git a/reference/mongo/mongocode/construct.xml b/reference/mongo/mongocode/construct.xml deleted file mode 100644 index d218290d7a..0000000000 --- a/reference/mongo/mongocode/construct.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - MongoCode::__construct - Creates a new code object - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\JavaScript::__construct - - - - - - &reftitle.description; - - public MongoCode::__construct - stringcode - arrayscopearray() - - - - - &reftitle.parameters; - - - - - code - - - - A string of code. - - - - - - scope - - - - The scope to use for the code. - - - - - - - - - &reftitle.returnvalues; - - Returns a new code object. - - - - - &reftitle.examples; - - <methodname>MongoCode::__construct</methodname> example - - 4)); -var_dump($code); - -?> -]]> - - &example.outputs.similar; - - - array(1) { - ["x"]=> - int(4) - } - ["code"]=> - string(80) "function() { for(i=0;i<10;i++) { db.foo.update({z : i}, {z : x}); } return x-1; }" -} -]]> - - - - - - Using <classname>MongoCode</classname> with $where - - This example queries a collection for elements where the 'x' fields is less than $y. Notice that - PHP objects can be passed into the JavaScript scope and that the JavaScript function returns a boolean. - - -find(array('$where' => new MongoCode('function() { return this.x < y; }', array('y'=>$y)))); - -?> -]]> - - - - - - diff --git a/reference/mongo/mongocode/tostring.xml b/reference/mongo/mongocode/tostring.xml deleted file mode 100644 index b99e781bdf..0000000000 --- a/reference/mongo/mongocode/tostring.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - MongoCode::__toString - Returns this code as a string - - - - - &mongo.noalternative.method.note; - - - - - &reftitle.description; - - public stringMongoCode::__toString - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This code, the scope is not returned. - - - - - &reftitle.examples; - - <function>MongoCode::__toString</function> example - -"hi")); -echo "$code\n"; - -$code = new MongoCode('function() { for(i=0;i<10;i++) { db.foo.update({x:i}, {x:i+1}); } }'); -echo "$code\n"; - -?> -]]> - - &example.outputs.similar; - - - - - - - - diff --git a/reference/mongo/mongocollection.xml b/reference/mongo/mongocollection.xml deleted file mode 100644 index 5326fedc9c..0000000000 --- a/reference/mongo/mongocollection.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - The MongoCollection class - MongoCollection - - - - -
- &reftitle.intro; - - Represents a MongoDB collection. - - - Collection names can use any character in the ASCII set. Some valid - collection names are "", "...", - "my collection", and "*&#@". - - - User-defined collection names cannot contain the $ symbol. There are - certain system collections which use a $ in their names (e.g., - local.oplog.$main), but it is a reserved character. If you attempt to - create and use a collection with a $ in the name, MongoDB will assert. - -
- - -
- &reftitle.classsynopsis; - - - - MongoCollection - - - - - MongoCollection - - - - - &Constants; - - const - int - MongoCollection::ASCENDING - 1 - - - const - int - MongoCollection::DESCENDING - -1 - - - Fields - - public - MongoDB - db - &null; - - - public - int - w - - - public - int - wtimeout - - - &Methods; - - - - -
- -
- &reftitle.constants; - - - MongoCollection::ASCENDING - - - Ascending direction for sorts and index creation. - - - - - MongoCollection::DESCENDING - - - Descending direction for sorts and index creation. - - - - -
- -
- Fields - - - db - - - The "parent" database for this collection. - - - - - w - - - The number of servers to replicate a change to before returning success. - Value is inherited from the parent database. The - MongoDB class has a more detailed description of - how w works. - - - - - wtimeout - - - The number of milliseconds to wait for $this->w - replications to take place. Value is inherited from the parent database. - The MongoDB class has a more detailed description - of how wtimeout works. - - - - -
- -
- &reftitle.seealso; - - MongoDB core docs on collections. - -
- -
- - &reference.mongo.entities.mongocollection; - -
- - diff --git a/reference/mongo/mongocollection/aggregate.xml b/reference/mongo/mongocollection/aggregate.xml deleted file mode 100644 index fec8d36104..0000000000 --- a/reference/mongo/mongocollection/aggregate.xml +++ /dev/null @@ -1,570 +0,0 @@ - - - - - - MongoCollection::aggregate - Perform an aggregation using the aggregation framework - - - - &reftitle.description; - - public arrayMongoCollection::aggregate - arraypipeline - arrayoptions - - - public arrayMongoCollection::aggregate - arrayop - arrayops - - - The MongoDB - aggregation framework - provides a means to calculate aggregated values without having to use - MapReduce. While MapReduce is powerful, it is often more difficult than - necessary for many simple aggregation tasks, such as totaling or averaging - field values. - - - This method accepts either a variable amount of pipeline operators, or a - single array of operators constituting the pipeline. - - - - - &reftitle.parameters; - - - pipeline - - - An array of pipeline operators. - - - - - options - - Options for the aggregation command. Valid options include: - - - "allowDiskUse" - Allow aggregation stages to write to temporary files - - - "cursor" - - Options controlling the creation of the cursor object. This option - causes the command to return a result document suitable for constructing - a MongoCommandCursor. If you need to use this - option, you should consider using - MongoCollection::aggregateCursor. - - - - "explain" - Return information on the processing of the pipeline. - - &mongo.command.parameters.maxtimems; - - - - - Or - - - op - - - First pipeline operator. - - - - - ops - - - Additional pipeline operators. - - - - - - - - &reftitle.returnvalues; - - The result of the aggregation as an array. The ok will - be set to 1 on success, 0 on failure. - - - - - &reftitle.errors; - - When an error occurs an array with the following keys will be returned: - - - - errmsg - containing the reason for the failure - - - - - code - the errorcode of the failure - - - - - ok - will be set to 0. - - - - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - Added optional options argument - - - - - - - - - &reftitle.examples; - - <methodname>MongoCollection::aggregate</methodname> example - - The following example aggregation operation pivots data to create a set of - author names grouped by tags applied to an article. Call the aggregation - framework by issuing the following command: - - -selectDB("examples")->selectCollection("article"); -$data = array ( - 'title' => 'this is my title', - 'author' => 'bob', - 'posted' => new MongoDate, - 'pageViews' => 5, - 'tags' => array ( 'fun', 'good', 'fun' ), - 'comments' => array ( - array ( - 'author' => 'joe', - 'text' => 'this is cool', - ), - array ( - 'author' => 'sam', - 'text' => 'this is bad', - ), - ), - 'other' =>array ( - 'foo' => 5, - ), -); -$d = $c->insert($data, array("w" => 1)); - -$ops = array( - array( - '$project' => array( - "author" => 1, - "tags" => 1, - ) - ), - array('$unwind' => '$tags'), - array( - '$group' => array( - "_id" => array("tags" => '$tags'), - "authors" => array('$addToSet' => '$author'), - ), - ), -); -$results = $c->aggregate($ops); -var_dump($results); -?> -]]> - - &example.outputs; - - - array(2) { - [0]=> - array(2) { - ["_id"]=> - array(1) { - ["tags"]=> - string(4) "good" - } - ["authors"]=> - array(1) { - [0]=> - string(3) "bob" - } - } - [1]=> - array(2) { - ["_id"]=> - array(1) { - ["tags"]=> - string(3) "fun" - } - ["authors"]=> - array(1) { - [0]=> - string(3) "bob" - } - } - } - ["ok"]=> - float(1) -} -]]> - - - - - The following examples use the zipcode data set. - Use mongoimport to load this data set into your mongod instance. - - - - <methodname>MongoCollection::aggregate</methodname> example - - To return all states with a population greater than 10 million, use the following aggregation operation: - - -selectDB("test")->selectCollection("zips"); - -$pipeline = array( - array( - '$group' => array( - '_id' => array('state' => '$state'), - 'totalPop' => array('$sum' => '$pop') - ) - ), - array( - '$match' => array( - 'totalPop' => array('$gte' => 10 * 1000 * 1000) - ) - ), -); -$out = $c->aggregate($pipeline); -var_dump($out); -?> -]]> - - &example.outputs.similar; - - - array(7) { - [0]=> - array(2) { - ["_id"]=> - string(2) "TX" - ["totalPop"]=> - int(16986510) - } - [1]=> - array(2) { - ["_id"]=> - string(2) "PA" - ["totalPop"]=> - int(11881643) - } - [2]=> - array(2) { - ["_id"]=> - string(2) "NY" - ["totalPop"]=> - int(17990455) - } - [3]=> - array(2) { - ["_id"]=> - string(2) "IL" - ["totalPop"]=> - int(11430602) - } - [4]=> - array(2) { - ["_id"]=> - string(2) "CA" - ["totalPop"]=> - int(29760021) - } - [5]=> - array(2) { - ["_id"]=> - string(2) "OH" - ["totalPop"]=> - int(10847115) - } - [6]=> - array(2) { - ["_id"]=> - string(2) "FL" - ["totalPop"]=> - int(12937926) - } - } - ["ok"]=> - float(1) -} -]]> - - - - - <methodname>MongoCollection::aggregate</methodname> example - - To return the average populations for cities in each state, use the following aggregation operation: - - -selectDB("test")->selectCollection("zips"); - -$out = $c->aggregate( - array( - '$group' => array( - '_id' => array('state' => '$state', 'city' => '$city' ), - 'pop' => array('$sum' => '$pop' ) - ) - ), - array( - '$group' => array( - '_id' => '$_id.state', - 'avgCityPop' => array('$avg' => '$pop') - ) - ) -); - -var_dump($out); -?> -]]> - - &example.outputs.similar; - - - array(51) { - [0]=> - array(2) { - ["_id"]=> - string(2) "DC" - ["avgCityPop"]=> - float(303450) - } - [1]=> - array(2) { - ["_id"]=> - string(2) "DE" - ["avgCityPop"]=> - float(14481.913043478) - } -... - [49]=> - array(2) { - ["_id"]=> - string(2) "WI" - ["avgCityPop"]=> - float(7323.0074850299) - } - [50]=> - array(2) { - ["_id"]=> - string(2) "WV" - ["avgCityPop"]=> - float(2759.1953846154) - } - } - ["ok"]=> - float(1) -} -]]> - - - - - <methodname>MongoCollection::aggregate</methodname> with command options - - To return information on how the pipeline will be processed we use the - explain command option: - - -selectDB("test")->selectCollection("zips"); - -$pipeline = array( - array( - '$group' => array( - '_id' => '$state', - 'totalPop' => array('$sum' => '$pop'), - ), - ), - array( - '$match' => array( - 'totalPop' => array('$gte' => 10 * 1000 * 1000) - ) - ), - array( - '$sort' => array("totalPop" => -1), - ), -); - -$options = array("explain" => true); -$out = $c->aggregate($pipeline, $options); -var_dump($out); -?> -]]> - - &example.outputs.similar; - - - array(4) { - [0]=> - array(1) { - ["$cursor"]=> - array(3) { - ["query"]=> - array(0) { - } - ["fields"]=> - array(3) { - ["pop"]=> - int(1) - ["state"]=> - int(1) - ["_id"]=> - int(0) - } - ["plan"]=> - array(4) { - ["cursor"]=> - string(11) "BasicCursor" - ["isMultiKey"]=> - bool(false) - ["scanAndOrder"]=> - bool(false) - ["allPlans"]=> - array(1) { - [0]=> - array(3) { - ["cursor"]=> - string(11) "BasicCursor" - ["isMultiKey"]=> - bool(false) - ["scanAndOrder"]=> - bool(false) - } - } - } - } - } - [1]=> - array(1) { - ["$group"]=> - array(2) { - ["_id"]=> - string(6) "$state" - ["totalPop"]=> - array(1) { - ["$sum"]=> - string(4) "$pop" - } - } - } - [2]=> - array(1) { - ["$match"]=> - array(1) { - ["totalPop"]=> - array(1) { - ["$gte"]=> - int(10000000) - } - } - } - [3]=> - array(1) { - ["$sort"]=> - array(1) { - ["sortKey"]=> - array(1) { - ["totalPop"]=> - int(-1) - } - } - } - } - ["ok"]=> - float(1) -} -]]> - - - - - - - &reftitle.seealso; - - MongoCollection::aggregateCursor - The MongoDB aggregation framework - - - - - - diff --git a/reference/mongo/mongocollection/aggregatecursor.xml b/reference/mongo/mongocollection/aggregatecursor.xml deleted file mode 100644 index 2ee38d5364..0000000000 --- a/reference/mongo/mongocollection/aggregatecursor.xml +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - MongoCollection::aggregateCursor - Execute an aggregation pipeline command and retrieve results through a cursor - - - &reftitle.description; - - public MongoCommandCursorMongoCollection::aggregateCursor - arraycommand - arrayoptions - - - With this method you can execute Aggregation Framework pipelines and - retrieve the results through a cursor, instead of getting just one document - back as you would with MongoCollection::aggregate. - This method returns a MongoCommandCursor object. - This cursor object implements the Iterator interface - just like the MongoCursor objects that are returned - by the MongoCollection::find method. - - - - The resulting MongoCommandCursor will inherit this - collection's read preference. - MongoCommandCursor::setReadPreference may be used - to change the read preference before iterating on the cursor. - - - - - - &reftitle.parameters; - - - - - pipeline - - - - The Aggregation Framework pipeline to execute. - - - - - options - - Options for the aggregation command. Valid options include: - - - "allowDiskUse" - Allow aggregation stages to write to temporary files - - - "cursor" - - It is possible to configure how many initial documents the server - should return with the first result set. The default initial batch size - is 101. You can change it by adding the - batchSize option: - - -aggregateCursor( - $pipeline, - [ "cursor" => [ "batchSize" => 4 ] ] -); -]]> - - - This option only configures the size of the first batch. To configure - the size of future batches, please use the - MongoCommandCursor::batchSize method on the - returned MongoCommandCursor object. - - - - "explain" - - Return information on the processing of the pipeline. This option may - cause the command to return a result document that is unsuitable for - constructing a MongoCommandCursor. If you need - to use this option, you should consider using - MongoCollection::aggregate. - - - &mongo.command.parameters.maxtimems; - - - - - - - - - &reftitle.returnvalues; - - Returns a MongoCommandCursor object. Because this - implements the Iterator interface you can - iterate over each of the results as returned by the command query. The - MongoCommandCursor also implements the - MongoCursorInterface interface which adds the - MongoCommandCursor::batchSize, - MongoCommandCursor::dead, - MongoCommandCursor::info methods. - - - - - &reftitle.examples; - - <function>MongoCollection::aggregateCursor</function> example - - Finding all of the distinct values for a key. - - -test; -$people = $db->people; -$people->drop(); - -$people->insert(array("name" => "Joe", "points" => 4)); -$people->insert(array("name" => "Molly", "points" => 43)); -$people->insert(array("name" => "Sally", "points" => 22)); -$people->insert(array("name" => "Joe", "points" => 22)); -$people->insert(array("name" => "Molly", "points" => 87)); - -$ages = $people->aggregateCursor( [ - [ '$group' => [ '_id' => '$name', 'points' => [ '$sum' => '$points' ] ] ], - [ '$sort' => [ 'points' => -1 ] ], -] ); - -foreach ($ages as $person) { - echo "{$person['_id']}: {$person['points']}\n"; -} - -?> -]]> - - &example.outputs.similar; - -Molly: 130 -Joe: 26 -Sally: 22 - - - - - <function>MongoCollection::aggregateCursor</function> - example with different initial batch size - - Finding all of the distinct values for a key. - - -test; -$people = $db->people; -$people->drop(); - -/* Insert some sample data */ -$people->insert(array("name" => "Joe", "points" => 4)); -$people->insert(array("name" => "Molly", "points" => 43)); -$people->insert(array("name" => "Sally", "points" => 22)); -$people->insert(array("name" => "Joe", "points" => 22)); -$people->insert(array("name" => "Molly", "points" => 87)); - -/* Run the command cursor */ -$ages = $people->aggregateCursor( - [ - [ '$group' => [ '_id' => '$name', 'points' => [ '$sum' => '$points' ] ] ], - [ '$sort' => [ 'points' => -1 ] ], - ], - [ "cursor" => [ "batchSize" => 4 ] ] -); - -foreach ($ages as $person) { - echo "{$person['_id']}: {$person['points']}\n"; -} - -?> -]]> - - &example.outputs.similar; - -Molly: 130 -Joe: 26 -Sally: 22 - - - - - - &reftitle.seealso; - - - MongoDB::command - MongoCommandCursor - MongoCommandCursor::batchSize - MongoCollection::aggregate - The MongoDB aggregation framework - - - - - diff --git a/reference/mongo/mongocollection/batchinsert.xml b/reference/mongo/mongocollection/batchinsert.xml deleted file mode 100644 index 7ed8e984c0..0000000000 --- a/reference/mongo/mongocollection/batchinsert.xml +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - MongoCollection::batchInsert - Inserts multiple documents into this collection - - - - &reftitle.description; - - public mixedMongoCollection::batchInsert - arraya - arrayoptionsarray() - - - - - &reftitle.parameters; - - - - - a - - - - An array of arrays or objects. If any objects are used, they may not have - protected or private properties. - - - - If the documents to insert do not have an _id key or - property, a new MongoId instance will be created - and assigned to it. See MongoCollection::insert for - additional information on this behavior. - - - - - - - options - - - - An array of options for the batch of insert operations. Currently - available options include: - - - - "continueOnError" - - - Boolean, defaults to &false;. If set, the database will not stop - processing a bulk insert if one fails (eg due to duplicate IDs). - This makes bulk insert behave similarly to a series of single - inserts, except that calling MongoDB::lastError - will have an error set if any insert fails, not just the last one. - If multiple errors occur, only the most recent will be reported by - MongoDB::lastError. - - - - Please note that continueOnError affects errors - on the database side only. If you try to insert a document that has - errors (for example it contains a key with an empty name), then the - document is not even transferred to the database as the driver - detects this error and bails out. - continueOnError has no effect on errors detected - in the documents by the driver. - - - - &mongo.writes.parameters.fsync; - &mongo.writes.parameters.journal; - &mongo.writes.parameters.sockettimeoutms; - &mongo.writes.parameters.writeconcern; - &mongo.writes.parameters.writeconcerntimeoutms; - - - - The following options are deprecated and should no longer be used: - - &mongo.writes.parameters.safe; - &mongo.writes.parameters.timeout; - &mongo.writes.parameters.writeconcerntimeout; - - - - - - - - - - &reftitle.returnvalues; - - If the w parameter is set to acknowledge the write, - returns an associative array with the status of the inserts ("ok") and any - error that may have occurred ("err"). Otherwise, returns &true; if the - batch insert was successfully sent, &false; otherwise. - - - - - &reftitle.errors; - - Throws MongoException if any inserted documents are - empty or if they contains zero-length keys. Attempting to insert an object - with protected and private properties will cause a zero-length key error. - - &mongo.errors.exceptions.writeconcern; - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - - Added the "wTimeoutMS" option, which replaces - "wtimeout". Emits E_DEPRECATED - when "wtimeout" is used. - - - Added the "socketTimeoutMS" option, which replaces - "timeout". Emits E_DEPRECATED - when "timeout" is used. - - - Emits E_DEPRECATED when "safe" - is used. - - - - - PECL mongo 1.3.4 - Added "wtimeout" option. - - - PECL mongo 1.3.0 - Added "w" option. - - - PECL mongo 1.2.7 - Added "continueOnError" option. - - - PECL mongo 1.0.9 - - - Added ability to pass integers to the "safe" option, - which previously only accepted booleans. - - - Added "fsync" option. - - - - - PECL mongo 1.0.5 - Added options parameter. - - - - - - - - - &reftitle.examples; - - <function>MongoCollection::batchInsert</function> example - - Batch insertion is a quick way to add many elements to the database at once - - - 'user'.$i, 'i' => $i); -} - -$mongo = new MongoClient(); -$collection = $mongo->my_db->users; -$collection->drop(); - -$collection->batchInsert($users); - -foreach ($users as $user) { - echo $user['_id']."\n"; // populated with instanceof MongoId -} - -$users = $collection->find()->sort(array('i' => 1)); -foreach ($users as $user) { - var_dump($user['username']); -} - -?> -]]> - - &example.outputs.similar; - - - - - - - <function>MongoCollection::batchInsert</function> example with - ignoring errors - -demo; - -$doc1 = array( - '_id' => new MongoId('4cb4ab6d7addf98506010001'), - 'id' => 1, - 'desc' => "ONE", -); -$doc2 = array( - '_id' => new MongoId('4cb4ab6d7addf98506010002'), - 'id' => 2, - 'desc' => "TWO", -); -$doc3 = array( - '_id' => new MongoId('4cb4ab6d7addf98506010002'), // same _id as above - 'id' => 3, - 'desc' => "THREE", -); -$doc4 = array( - '_id' => new MongoId('4cb4ab6d7addf98506010004'), - 'id' => 4, - 'desc' => "FOUR", -); - -$c = $db->selectCollection('c'); -$c->batchInsert( - array($doc1, $doc2, $doc3, $doc4), - array('continueOnError' => true) -); - -$docs = $c->find(); -foreach ($docs as $doc) { - var_dump($doc['desc']); -} -?> -]]> - - &example.outputs.similar; - - - - - - - - &reftitle.seealso; - - MongoCollection::insert - MongoCollection::update - MongoCollection::find - MongoCollection::remove - MongoDB core docs on insert. - - - - - diff --git a/reference/mongo/mongocollection/construct.xml b/reference/mongo/mongocollection/construct.xml deleted file mode 100644 index fcc9df9d25..0000000000 --- a/reference/mongo/mongocollection/construct.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - MongoCollection::__construct - Creates a new collection - - - - - &reftitle.description; - - public MongoCollection::__construct - MongoDBdb - stringname - - - - - &reftitle.parameters; - - - - - MongoDB - db - - - - Parent database. - - - - - - - - name - - - - Name for this collection. - - - - - - - - - &reftitle.returnvalues; - - Returns a new collection object. - - - - - &reftitle.errors; - - Throws default exception if the collection name is invalid. - - - - diff --git a/reference/mongo/mongocollection/count.xml b/reference/mongo/mongocollection/count.xml deleted file mode 100644 index 6932118b61..0000000000 --- a/reference/mongo/mongocollection/count.xml +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - MongoCollection::count - Counts the number of documents in this collection - - - - &reftitle.description; - - public intMongoCollection::count - arrayqueryarray() - arrayoptionsarray() - - - - - &reftitle.parameters; - - - - - query - - - - Associative array or object with fields to match. - - - - - - options - - - - An array of options for the index creation. Currently available options - include: - - - - - &Name; - &Type; - &Description; - - - - - hint - mixed - - - Index to use for the query. If a string is passed, it should - correspond to an index name. If an array or object is passed, it - should correspond to the specification used to create the index - (i.e. the first argument to - MongoCollection::createIndex). - - This option is only supported in MongoDB 2.6+. - - - - limit - int - The maximum number of matching documents to return. - - - maxTimeMS - int - - - Specifies a cumulative time limit in milliseconds for processing - the operation (does not include idle time). If the operation is not - completed within the timeout period, a - MongoExecutionTimeoutException will be - thrown. - - This option is only supported in MongoDB 2.6+. - - - - skip - int - The number of matching documents to skip before returning results. - - - - - - - - - - - - - &reftitle.returnvalues; - - Returns the number of documents matching the query. - - - - - &reftitle.errors; - - Throws MongoResultException if the server could not - execute the command due to an error. - - - Throws MongoExecutionTimeoutException if command - execution was terminated due to maxTimeMS. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.6.0 - - The second parameter is now an options array. - Passing limit and skip as - the second and third parameters, respectively, is deprecated. - - - - PECL mongo 1.0.7 - - Added limit and skip as - second and third parameters, respectively. - - - - - - - - - - &reftitle.examples; - - <function>MongoCollection::count</function> example - -insert(array('x'=>1)); -$collection->insert(array('x'=>2)); -$collection->insert(array('x'=>3)); - -var_dump($collection->count()); -var_dump($collection->count(array('x'=>1))); - -?> -]]> - - &example.outputs.similar; - - - - - - - diff --git a/reference/mongo/mongocollection/createdbref.xml b/reference/mongo/mongocollection/createdbref.xml deleted file mode 100644 index 9bbdfe16e2..0000000000 --- a/reference/mongo/mongocollection/createdbref.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - MongoCollection::createDBRef - Creates a database reference - - - - &reftitle.description; - - public arrayMongoCollection::createDBRef - mixeddocument_or_id - - - - - &reftitle.parameters; - - - - - document_or_id - - - - If an array or object is given, its _id field will be - used as the reference ID. If a MongoId or scalar - is given, it will be used as the reference ID. - - - - - - - - - &reftitle.returnvalues; - - Returns a database reference array. - - - If an array without an _id field was provided as the - document_or_id parameter, &null; will be returned. - - - - - &reftitle.examples; - - <methodname>MongoCollection::createDBRef</methodname> example - -songs; -$playlists = $db->playlists; - -// create a reference to a song -$manamana = $songs->findOne(array('title' => 'Ma na ma na')); -$refToSong = $songs->createDBRef($manamana); - -// add the reference to my playlist -$playlists->update(array('username' => 'me'), array('$push' => array('songlist' => $refToSong))); - -?> -]]> - - - - - - &reftitle.seealso; - - - MongoCollection::getDBRef - - - - - - diff --git a/reference/mongo/mongocollection/createindex.xml b/reference/mongo/mongocollection/createindex.xml deleted file mode 100644 index 9af054beca..0000000000 --- a/reference/mongo/mongocollection/createindex.xml +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - MongoCollection::createIndex - - Creates an index on the specified field(s) if it does not already exist - - - - - &reftitle.description; - - public boolMongoCollection::createIndex - arraykeys - arrayoptionsarray() - - - Creates an index on the specified field(s) if it does not already exist. - Fields may be indexed with a direction (e.g. ascending or descending) or a - special type (e.g. text, geospatial, hashed). - - - - This method will use the - createIndexes - database command when communicating with MongoDB 2.6+. For previous database - versions, the method will perform an insert operation on the - special system.indexes collection. - - - - - - &reftitle.parameters; - - - - - keys - - - - An array specifying the index's fields as its keys. For each field, the - value is either the index direction or - index type. - If specifying direction, specify 1 for ascending or - -1 for descending. - - - - - - options - - - - An array of options for the index creation. We pass all given options - straight to the server, but a non-exhaustive list of currently - available options include: - - &mongo.index.parameters.unique; - &mongo.index.parameters.sparse; - &mongo.index.parameters.expireafterseconds; - &mongo.index.parameters.name; - &mongo.index.parameters.background; - &mongo.writes.parameters.sockettimeoutms; - - - - The following option may be used with MongoDB 2.6+: - - &mongo.command.parameters.maxtimems; - - - - The following options may be used with MongoDB versions before 2.8: - - &mongo.index.parameters.dropdups; - - - - The following options may be used with MongoDB versions before 2.6: - - &mongo.writes.parameters.writeconcern; - &mongo.writes.parameters.writeconcerntimeoutms; - - - - The following options are deprecated and should no longer be used: - - &mongo.writes.parameters.safe; - &mongo.writes.parameters.timeout; - &mongo.writes.parameters.writeconcerntimeout; - - - - - - - - - - &reftitle.returnvalues; - - Returns an array containing the status of the index creation. The array - contains whether the operation succeeded ("ok"), the - number of indexes before and after the operation - ("numIndexesBefore" and - "numIndexesAfter"), and whether the collection that the - index belongs to has been created - ("createdCollectionAutomatically"). If the index already - existed and did not need to be created, a "note" field may - be present in lieu of "numIndexesAfter". - - - With MongoDB 2.4 and earlier, a status document is only returned if the - write concern is at least - 1. Otherwise, &true; is returned. The fields in the status - document are different, except for the "ok" field, which - signals whether the index creation was successful. Additional fields are - described in the documentation for - MongoCollection::insert. - - - - - &reftitle.errors; - - Throws MongoException if the index name is longer - than 128 bytes, or if the index specification is not an array. - - - Throws MongoDuplicateKeyException if the server could not - create the unique index due to conflicting documents. - - - Throws MongoResultException if the server could not - create the index due to an error. - - &mongo.errors.exceptions.writeconcern; - - - - &reftitle.examples; - - <function>MongoCollection::createIndex</function> example - -createIndex(array('x' => 1)); - -// create a unique index on 'y' -$c->createIndex(array('y' => 1), array('unique' => true)); - -// create a compound index on 'za' ascending and 'zb' descending -$c->createIndex(array('za' => 1, 'zb' => -1)); - -?> -]]> - - - - Geospatial Indexing - - Mongo supports geospatial indexes, which allow you to search for documents - near a given location or within a shape. The following example creates a - geospatial index on the "loc" field: - - -createIndex(array('loc' => '2dsphere')); - -?> -]]> - - - - Drop duplicates example - -insert(array('username' => 'joeschmoe')); -$collection->insert(array('username' => 'joeschmoe')); - -/* Index creation fails, since you cannot create a unique index on a field when - * duplicates exist. - */ -$collection->createIndex(array('username' => 1), array('unique' => 1)); - -/* MongoDB will one of the conflicting documents and allow the unique index to - * be created. - */ -$collection->createIndex(array('username' => 1), array('unique' => 1, 'dropDups' => 1)); - -/* We now have a unique index and subsequent inserts with the same username will - * fail. - */ -$collection->insert(array('username' => 'joeschmoe')); - -?> -]]> - - - - - - &reftitle.seealso; - - MongoCollection::deleteIndex - MongoCollection::deleteIndexes - - The MongoDB - index and - index type - documentation. - - - - - - diff --git a/reference/mongo/mongocollection/deleteindex.xml b/reference/mongo/mongocollection/deleteindex.xml deleted file mode 100644 index 3495edd188..0000000000 --- a/reference/mongo/mongocollection/deleteindex.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - MongoCollection::deleteIndex - Deletes an index from this collection - - - - &reftitle.description; - - public arrayMongoCollection::deleteIndex - stringarraykeys - - - This method is identical to: - - -toIndexString($keys); - - return $this->db->command(array( - "deleteIndexes" => $this->getName(), - "index" => $indexName, - )); -} - -?> -]]> - - - Each index is given a unique name when it is created. This is often generated - by the driver based on the index key(s) and order/type, but custom names may - also be specified with MongoCollection::createIndex's - "name" option). - - - Unfortunately, MongoCollection::deleteIndex cannot - delete custom-named indexes due to a backwards compatibility issue. When a - string argument is provided, it is assumed to be the single field name in an - ascending index (e.g. the name "x_1" would be used for the - argument "x"). If an array or object is provided, an index - name is generated just as if that argument was passed to - MongoCollection::createIndex. - - - In order to delete a custom-named index with the PHP driver, the - deleteIndexes database command must be used. For instance, - an index named "myIndex" could be deleted with the PHP driver by running: - - -command(array( - "deleteIndexes" => $collection->getName(), - "index" => "myIndex", -)); - -?> -]]> - - - To determine the name of an index with the PHP driver, you can query the - system.indexes collection of a database and look for the - "name" field of each result. The "ns" - field will indicate the collection to which each index belongs. - - - - - &reftitle.parameters; - - - - - keys - - - - An array specifying the index's fields as its keys. For each field, the - value is either the index direction or - index type. - If specifying direction, specify 1 for ascending or - -1 for descending. - - - If a string is provided, it is assumed to be the single field name in an - ascending index. - - - - - - - - - &reftitle.returnvalues; - - Returns the database response. - - - - - &reftitle.examples; - - <function>MongoCollection::deleteIndex</function> example - - This example passes the function string and array parameters. - - -example->indices; - -// create and remove a simple index -$c->createIndex(array("i"=>1)); -$c->deleteIndex("i"); - -// create and remove a multi-key index -$c->ensureIndex(array("j" => 1, "k" => 1)); -$c->deleteIndex(array("j" => 1, "k" => 1)); - -?> -]]> - - - - - - &reftitle.seealso; - - MongoCollection::createIndex - MongoCollection::deleteIndexes - MongoCollection::toIndexString - - The MongoDB - index and - index type - documentation. - - - - - - diff --git a/reference/mongo/mongocollection/deleteindexes.xml b/reference/mongo/mongocollection/deleteindexes.xml deleted file mode 100644 index 37c4c7b14e..0000000000 --- a/reference/mongo/mongocollection/deleteindexes.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - MongoCollection::deleteIndexes - Delete all indices for this collection - - - - &reftitle.description; - - public arrayMongoCollection::deleteIndexes - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the database response. - - - - - &reftitle.examples; - - <function>MongoCollection::deleteIndexes</function> example - This example demonstrates how to delete all indexes from a collection and the response to expect. - -my_db->articles; -$response = $collection->deleteIndexes(); -print_r($response); - -?> -]]> - - &example.outputs.similar; - - 1 - [msg] => all indexes deleted for collection - [ok] => 1 -) -]]> - - - - - - &reftitle.seealso; - - MongoCollection::createIndex - MongoCollection::deleteIndex - - - - - diff --git a/reference/mongo/mongocollection/distinct.xml b/reference/mongo/mongocollection/distinct.xml deleted file mode 100644 index 4a1b70c140..0000000000 --- a/reference/mongo/mongocollection/distinct.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - MongoCollection::distinct - Retrieve a list of distinct values for the given key across a collection - - - - &reftitle.description; - - public arrayfalseMongoCollection::distinct - stringkey - arrayquery - - - The distinct command returns a list of distinct values for the given key - across a collection. - - - - - &reftitle.parameters; - - - key - - - The key to use. - - - - - query - - - An optional query parameters - - - - - - - - &reftitle.returnvalues; - - Returns an array of distinct values, &return.falseforfailure; - - - - - &reftitle.examples; - - <methodname>MongoCollection::distinct</methodname> example - -selectDB("test"); -$db->dropCollection("distinct"); -$c = $db->distinct; - -$c->insert(array("stuff" => "bar", "zip-code" => 10010)); -$c->insert(array("stuff" => "foo", "zip-code" => 10010)); -$c->insert(array("stuff" => "bar", "zip-code" => 99701), array("w" => 1)); - -$retval = $c->distinct("zip-code"); -var_dump($retval); - -$retval = $c->distinct("zip-code", array("stuff" => "foo")); -var_dump($retval); - -$retval = $c->distinct("zip-code", array("stuff" => "bar")); -var_dump($retval); - -?> -]]> - - &example.outputs; - - - int(10010) - [1]=> - int(99701) -} -array(1) { - [0]=> - int(10010) -} -array(2) { - [0]=> - int(10010) - [1]=> - int(99701) -} -]]> - - - - <methodname>MongoCollection::distinct</methodname> example on a embedded document - -insert(array("user" => array("points" => 25))); -$c->insert(array("user" => array("points" => 31))); -$c->insert(array("user" => array("points" => 25))); - -$retval = $c->distinct("user.points"); -var_dump($retval); - -$retval = $c->distinct("user.nonexisting"); -var_dump($retval); -?> -]]> - - &example.outputs; - - - int(25) - [1]=> - int(31) -} -array(0) { -} -]]> - - - - - - - diff --git a/reference/mongo/mongocollection/drop.xml b/reference/mongo/mongocollection/drop.xml deleted file mode 100644 index c7a20890f0..0000000000 --- a/reference/mongo/mongocollection/drop.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - MongoCollection::drop - Drops this collection - - - - &reftitle.description; - - public arrayMongoCollection::drop - - - - Drops this collection and deletes its indices. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the database response. - - - - - &reftitle.examples; - - <function>MongoCollection::drop</function> example - This example demonstrates how to drop a collection and the response to expect. - -my_db->articles; -$response = $collection->drop(); -print_r($response); - -?> -]]> - - &example.outputs.similar; - - 1 - [msg] => all indexes deleted for collection - [ns] => my_db.articles - [ok] => 1 -) -]]> - - - - - diff --git a/reference/mongo/mongocollection/ensureindex.xml b/reference/mongo/mongocollection/ensureindex.xml deleted file mode 100644 index 700df2d907..0000000000 --- a/reference/mongo/mongocollection/ensureindex.xml +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - MongoCollection::ensureIndex - - Creates an index on the specified field(s) if it does not already exist - - - - - &reftitle.description; - - public boolMongoCollection::ensureIndex - stringarraykey|keys - arrayoptionsarray() - - - - This method is deprecated since version 1.5.0. Please use - MongoCollection::createIndex instead. - - - - Creates an index on the specified field(s) if it does not already exist. - Fields may be indexed with a direction (e.g. ascending or descending) or a - special type (e.g. text, geospatial, hashed). - - - - This method will use the - createIndexes - database command when communicating with MongoDB 2.6+. For previous database - versions, the method will perform an insert operation on the - special system.indexes collection. - - - - - - &reftitle.parameters; - - - - - keys - - - - An array specifying the index's fields as its keys. For each field, the - value is either the index direction or - index type. - If specifying direction, specify 1 for ascending or - -1 for descending. - - - - - - options - - - - An array of options for the index creation. Currently available options - include: - - &mongo.index.parameters.unique; - &mongo.index.parameters.sparse; - &mongo.index.parameters.expireafterseconds; - &mongo.index.parameters.name; - &mongo.index.parameters.background; - &mongo.writes.parameters.sockettimeoutms; - - - - The following option may be used with MongoDB 2.6+: - - &mongo.command.parameters.maxtimems; - - - - The following options may be used with MongoDB versions before 2.8: - - &mongo.index.parameters.dropdups; - - - - The following options may be used with MongoDB versions before 2.6: - - &mongo.writes.parameters.writeconcern; - &mongo.writes.parameters.writeconcerntimeoutms; - - - - The following options are deprecated and should no longer be used: - - &mongo.writes.parameters.safe; - &mongo.writes.parameters.timeout; - &mongo.writes.parameters.writeconcerntimeout; - - - - - - - - - - &reftitle.returnvalues; - - Returns an array containing the status of the index creation. The array - contains whether the operation succeeded ("ok"), the - number of indexes before and after the operation - ("numIndexesBefore" and - "numIndexesAfter"), and whether the collection that the - index belongs to has been created - ("createdCollectionAutomatically"). If the index already - existed and did not need to be created, a "note" field may - be present in lieu of "numIndexesAfter". - - - With MongoDB 2.4 and earlier, a status document is only returned if the - write concern is at least - 1. Otherwise, &true; is returned. The fields in the status - document are different, except for the "ok" field, which - signals whether the index creation was successful. Additional fields are - described in the documentation for - MongoCollection::insert. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - - Renamed the "wtimeout" option to - "wTimeoutMS". Emits - E_DEPRECATED when "wtimeout" is - used. - - - Renamed the "timeout" option to - "socketTimeoutMS". Emits - E_DEPRECATED when "timeout" is - used. - - - Emits E_DEPRECATED when "safe" - is used. - - - - - PECL mongo 1.3.4 - Added "wtimeout" option. - - - PECL mongo 1.3.0 - - Added "w" option. - - The options parameter no longer accepts a - boolean to signify a unique index. Instead, this now has to be done - with array('unique' => true). - - - - - PECL mongo 1.2.11 - - Emits E_DEPRECATED when - options is scalar. - - - - PECL mongo 1.2.0 - Added "timeout" option. - - - PECL mongo 1.0.11 - - - The "safe" option will trigger a primary failover, - if necessary. - - - MongoException will be thrown if the index name - (either generated or set) is longer than 128 bytes. - - - - - PECL mongo 1.0.5 - - Added the "name" option to override index name - creation. - - - - PECL mongo 1.0.2 - - Changed options parameter from boolean to array. - Pre-1.0.2, the second parameter was an optional boolean value specifying - a unique index. - - - - - - - - - - &reftitle.errors; - - Throws MongoException if the index name is longer - than 128 bytes, or if the index specification is not an array. - - - Throws MongoDuplicateKeyException if the server could not - create the unique index due to conflicting documents. - - - Throws MongoResultException if the server could not - create the index due to an error. - - &mongo.errors.exceptions.writeconcern; - - - - &reftitle.examples; - - <function>MongoCollection::ensureIndex</function> example - -ensureIndex(array('x' => 1)); - -// create a unique index on 'y' -$c->ensureIndex(array('y' => 1), array('unique' => true)); - -// create a compound index on 'za' ascending and 'zb' descending -$c->ensureIndex(array('za' => 1, 'zb' => -1)); - -?> -]]> - - - - Geospatial Indexing - - Mongo supports geospatial indexes, which allow you to search for documents - near a given location or within a shape. The following example creates a - geospatial index on the "loc" field: - - -ensureIndex(array('loc' => '2dsphere')); - -?> -]]> - - - - Drop duplicates example - -insert(array('username' => 'joeschmoe')); -$collection->insert(array('username' => 'joeschmoe')); - -/* Index creation fails, since you cannot create a unique index on a field when - * duplicates exist. - */ -$collection->ensureIndex(array('username' => 1), array('unique' => 1)); - -/* MongoDB will one of the conflicting documents and allow the unique index to - * be created. - */ -$collection->ensureIndex(array('username' => 1), array('unique' => 1, 'dropDups' => 1)); - -/* We now have a unique index and subsequent inserts with the same username will - * fail. - */ -$collection->insert(array('username' => 'joeschmoe')); - -?> -]]> - - - - - - &reftitle.seealso; - - MongoCollection::createIndex - MongoCollection::deleteIndex - MongoCollection::deleteIndexes - - The MongoDB - index and - index type - documentation. - - - - - - diff --git a/reference/mongo/mongocollection/find.xml b/reference/mongo/mongocollection/find.xml deleted file mode 100644 index 0c8f142707..0000000000 --- a/reference/mongo/mongocollection/find.xml +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - MongoCollection::find - Queries this collection, returning a MongoCursor - for the result set - - - - &reftitle.description; - - public MongoCursorMongoCollection::find - arrayqueryarray() - arrayfieldsarray() - - - - - &reftitle.parameters; - - - - - query - - - - The fields for which to search. MongoDB's query language is quite - extensive. The PHP driver will in almost all cases pass the query - straight through to the server, so reading the MongoDB core docs on - find is a good idea. - - - - Please make sure that for all special query operators (starting with - $) you use single quotes so that PHP doesn't try to - replace "$exists" with the value of the variable - $exists. - - - - - - - fields - - - - Fields of the results to return. The array is in the format - array('fieldname' => true, 'fieldname2' => true). - The _id field is always returned. - - - - - - - - - &reftitle.returnvalues; - - Returns a cursor for the search results. - - - - - &reftitle.examples; - - <function>MongoCollection::find</function> example - This example demonstrates basic search options. - -selectDB('test'); -$collection = new MongoCollection($db, 'produce'); - -// search for fruits -$fruitQuery = array('Type' => 'Fruit'); - -$cursor = $collection->find($fruitQuery); -foreach ($cursor as $doc) { - var_dump($doc); -} - -// search for produce that is sweet. Taste is a child of Details. -$sweetQuery = array('Details.Taste' => 'Sweet'); -echo "Sweet\n"; -$cursor = $collection->find($sweetQuery); -foreach ($cursor as $doc) { - var_dump($doc); -} - -?> -]]> - - &example.outputs; - - - object(MongoId)#7 (1) { - ["$id"]=> - string(24) "50a87dd084f045a19b220dd6" - } - ["Name"]=> - string(5) "Apple" - ["Type"]=> - string(5) "Fruit" - ["Details"]=> - array(2) { - ["Taste"]=> - string(5) "Sweet" - ["Colour"]=> - string(3) "Red" - } -} -array(4) { - ["_id"]=> - object(MongoId)#8 (1) { - ["$id"]=> - string(24) "50a87de084f045a19b220dd7" - } - ["Name"]=> - string(5) "Lemon" - ["Type"]=> - string(5) "Fruit" - ["Details"]=> - array(2) { - ["Taste"]=> - string(4) "Sour" - ["Colour"]=> - string(5) "Green" - } -} - -Sweet: -array(4) { - ["_id"]=> - object(MongoId)#7 (1) { - ["$id"]=> - string(24) "50a87dd084f045a19b220dd6" - } - ["Name"]=> - string(5) "Apple" - ["Type"]=> - string(5) "Fruit" - ["Details"]=> - array(2) { - ["Taste"]=> - string(5) "Sweet" - ["Colour"]=> - string(3) "Red" - } -} -]]> - - - See MongoCursor for more information how to work with cursors. - - - - <function>MongoCollection::find</function> example - This example demonstrates how to search for a range. - -selectDB('test'); -$collection = new MongoCollection($db, 'phpmanual'); - -// search for documents where 5 < x < 20 -$rangeQuery = array('x' => array( '$gt' => 5, '$lt' => 20 )); - -$cursor = $collection->find($rangeQuery); -foreach ($cursor as $doc) { - var_dump($doc); -} - -?> -]]> - - &example.outputs; - - - object(MongoId)#10 (1) { - ["$id"]=> - string(24) "4ebc3e3710b89f2349000000" - } - ["x"]=> - int(12) -} -array(2) { - ["_id"]=> - object(MongoId)#11 (1) { - ["$id"]=> - string(24) "4ebc3e3710b89f2349000001" - } - ["x"]=> - int(12) -} -]]> - - - See MongoCursor for more information how to work with cursors. - - - - <function>MongoCollection::find</function> example using $where - This example demonstrates how to search a collection using javascript code to reduce the resultset. - -selectDB('test'); -$collection = new MongoCollection($db, 'phpmanual'); - -$js = "function() { - return this.name == 'Joe' || this.age == 50; -}"; -$cursor = $collection->find(array('$where' => $js)); -foreach ($cursor as $doc) { - var_dump($doc); -} - -?> -]]> - - &example.outputs; - - - object(MongoId)#7 (1) { - ["$id"]=> - string(24) "4ebc3e3710b89f2349000002" - } - ["name"]=> - string(3) "Joe" - ["age"]=> - int(20) -} -]]> - - - - <function>MongoCollection::find</function> example using $in - This example demonstrates how to search a collection using the $in operator. - -selectDB('test'); -$collection = new MongoCollection($db, 'phpmanual'); - -$cursor = $collection->find(array( - 'name' => array('$in' => array('Joe', 'Wendy')) -)); - -?> -]]> - - &example.outputs; - - - object(MongoId)#7 (1) { - ["$id"]=> - string(24) "4ebc3e3710b89f2349000002" - } - ["name"]=> - string(3) "Joe" - ["age"]=> - int(20) -} -]]> - - - - - Getting results as an array - - This returns a MongoCursor. Often, when people are - starting out, they are more comfortable using an array. To turn a cursor - into an array, use the iterator_to_array function. - - -selectDB('test'); -$collection = new MongoCollection($db, 'phpmanual'); - -$cursor = $collection->find(); -$array = iterator_to_array($cursor); - -?> -]]> - - &example.outputs; - - - array(2) { - ["_id"]=> - object(MongoId)#6 (1) { - ["$id"]=> - string(24) "4ebc40af10b89f5149000000" - } - ["x"]=> - int(12) - } - ["4ebc40af10b89f5149000001"]=> - array(2) { - ["_id"]=> - object(MongoId)#11 (1) { - ["$id"]=> - string(24) "4ebc40af10b89f5149000001" - } - ["x"]=> - int(12) - } - ["4ebc40af10b89f5149000002"]=> - array(3) { - ["_id"]=> - object(MongoId)#12 (1) { - ["$id"]=> - string(24) "4ebc40af10b89f5149000002" - } - ["name"]=> - string(3) "Joe" - ["age"]=> - int(20) - } -} -]]> - - - Using iterator_to_array forces the driver to load all of - the results into memory, so do not do this for result sets that are larger - than memory! - - - Also, certain system collections do not have an _id - field. If you are dealing with a collection that might have documents - without _ids, pass &false; as the second argument to - iterator_to_array (so that it will not try to use the - non-existent _id values as keys). - - - - - - &reftitle.seealso; - - MongoCollection::findOne - MongoCollection::insert - MongoDB core docs on find. - - - - - diff --git a/reference/mongo/mongocollection/findandmodify.xml b/reference/mongo/mongocollection/findandmodify.xml deleted file mode 100644 index f622d6fc28..0000000000 --- a/reference/mongo/mongocollection/findandmodify.xml +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - MongoCollection::findAndModify - Update a document and return it - - - - &reftitle.description; - - public arrayMongoCollection::findAndModify - arrayquery - arrayupdate - arrayfields - arrayoptions - - - The findAndModify command atomically modifies and returns a single document. - By default, the returned document does not include the modifications made on - the update. To return the document with the modifications made on the - update, use the new option. - - - - - - &reftitle.parameters; - - - query - - - The query criteria to search for. - - - - - update - - - The update criteria. - - - - - fields - - - Optionally only return these fields. - - - - - options - - - An array of options to apply, such as remove the match document from the - DB and return it. - - - - - Option - &Description; - - - - - sort array - - Determines which document the operation will modify if the - query selects multiple documents. findAndModify will modify the - first document in the sort order specified by this argument. - - - - remove bool - - Optional if update field exists. When &true;, removes the selected - document. The default is &false;. - - - - update array - - Optional if remove field exists. - Performs an update of the selected document. - - - - new bool - - Optional. When &true;, returns the modified document rather than the - original. The findAndModify method ignores the new option for - remove operations. The default is &false;. - - - - upsert bool - - Optional. Used in conjunction with the update field. When &true;, the - findAndModify command creates a new document if the query returns - no documents. The default is false. In MongoDB 2.2, the - findAndModify command returns &null; when upsert is &true;. - - - - - - - - - - - - - - - - - - &reftitle.returnvalues; - - Returns the original document, or the modified document when - new is set. - - - - - &reftitle.errors; - - Throws MongoResultException on failure. - - - - - &reftitle.examples; - - <methodname>MongoCollection::findAndModify</methodname> example - -selectDB("test")->jobs; - -$col->insert(array( - "name" => "Next promo", - "inprogress" => false, - "priority" => 0, - "tasks" => array( "select product", "add inventory", "do placement"), -) ); - -$col->insert(array( - "name" => "Biz report", - "inprogress" => false, - "priority" => 1, - "tasks" => array( "run sales report", "email report" ) -) ); - -$col->insert(array( - "name" => "Biz report", - "inprogress" => false, - "priority" => 2, - "tasks" => array( "run marketing report", "email report" ) - ), - array("w" => 1) -); - - - -$retval = $col->findAndModify( - array("inprogress" => false, "name" => "Biz report"), - array('$set' => array('inprogress' => true, "started" => new MongoDate())), - null, - array( - "sort" => array("priority" => -1), - "new" => true, - ) -); - -var_dump($retval); -?> -]]> - - &example.outputs.similar; - - - object(MongoId)#7 (1) { - ["$id"]=> - string(24) "5091b5b244415e8cc3000002" - } - ["inprogress"]=> - bool(true) - ["name"]=> - string(10) "Biz report" - ["priority"]=> - int(2) - ["started"]=> - object(MongoDate)#8 (2) { - ["sec"]=> - int(1351726514) - ["usec"]=> - int(925000) - } - ["tasks"]=> - array(2) { - [0]=> - string(20) "run marketing report" - [1]=> - string(12) "email report" - } -} -]]> - - - - <methodname>MongoCollection::findAndModify</methodname> error handling - -selectDB("test")->jobs; -try { - $retval = $col->findAndModify( - array("inprogress" => false, "name" => "Next promo"), - array('$pop' => array("tasks" => -1)), - array("tasks" => array('$pop' => array("stuff"))), - array("new" => true) - ); -} catch(MongoResultException $e) { - echo $e->getCode(), " : ", $e->getMessage(), "\n"; - var_dump($e->getDocument()); -} - -?> -]]> - - &example.outputs.similar; - - - string(46) "exception: Unsupported projection option: $pop" - ["code"]=> - int(13097) - ["ok"]=> - float(0) -} -]]> - - - - - - &reftitle.seealso; - - The MongoDB findAndModify command docs - - - - - - - diff --git a/reference/mongo/mongocollection/findone.xml b/reference/mongo/mongocollection/findone.xml deleted file mode 100644 index a920b40932..0000000000 --- a/reference/mongo/mongocollection/findone.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - MongoCollection::findOne - Queries this collection, returning a single element - - - - &reftitle.description; - - public arrayMongoCollection::findOne - arrayqueryarray() - arrayfieldsarray() - arrayoptionsarray() - - - As opposed to MongoCollection::find, this method - will return only the first result from the result set, - and not a MongoCursor that can be iterated over. - - - - - &reftitle.parameters; - - - - - query - - - - The fields for which to search. MongoDB's query language is quite - extensive. The PHP driver will in almost all cases pass the query - straight through to the server, so reading the MongoDB core docs on - find is a good idea. - - - - Please make sure that for all special query operaters (starting with - $) you use single quotes so that PHP doesn't try to - replace "$exists" with the value of the variable - $exists. - - - - - - - fields - - - - Fields of the results to return. The array is in the format - array('fieldname' => true, 'fieldname2' => true). - The _id field is always returned. - - - - - - options - - - - This parameter is an associative array of the form - array("name" => <value>, ...). Currently - supported options are: - - - &mongo.command.parameters.maxtimems; - - - - - - - - - &reftitle.returnvalues; - - Returns record matching the search or &null;. - - - - - &reftitle.errors; - - Throws MongoConnectionException if it cannot reach the - database. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - Added optional options argument. - - - - - - - - - &reftitle.examples; - - <methodname>MongoCollection::findOne</methodname> document by its id. - This example demonstrates how to find a single document in a collection by its id. - -my_db->articles; - -$article = $articles->findOne(array('_id' => new MongoId('47cc67093475061e3d9536d2'))); - -?> -]]> - - - - <methodname>MongoCollection::findOne</methodname> document by some condition. - This example demonstrates how to find a single document in a collection by some condition and limiting the returned fields. - -my_db->users; -$user = $users->findOne(array('username' => 'jwage'), array('password')); -print_r($user); - -?> -]]> - - &example.outputs.similar; - - MongoId Object - ( - ) - - [password] => test -) -]]> - - - Notice how even though the document does have a username field, we limited the results - to only contain the password field. - - - - - - &reftitle.seealso; - - MongoCollection::find - MongoCollection::insert - MongoDB core docs on find. - - - - diff --git a/reference/mongo/mongocollection/get.xml b/reference/mongo/mongocollection/get.xml deleted file mode 100644 index 6c09efd26c..0000000000 --- a/reference/mongo/mongocollection/get.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - MongoCollection::__get - Gets a collection - - - &reftitle.description; - - public MongoCollectionMongoCollection::__get - stringname - - - A concise syntax for getting a collection with a dot-separated name. If a - collection name contains strange characters, you may have to use - MongoDB::selectCollection instead. - -selectDB("foo")->selectCollection("bar.baz"); -$collection = $mongo->foo->bar->baz; - -?> -]]> - - - - - &reftitle.parameters; - - - - - name - - - - The next string in the collection name. - - - - - - - - &reftitle.returnvalues; - - Returns the collection. - - - - diff --git a/reference/mongo/mongocollection/getdbref.xml b/reference/mongo/mongocollection/getdbref.xml deleted file mode 100644 index 759d79f9ea..0000000000 --- a/reference/mongo/mongocollection/getdbref.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - MongoCollection::getDBRef - Fetches the document pointed to by a database reference - - - - &reftitle.description; - - public arrayMongoCollection::getDBRef - arrayref - - - - - &reftitle.parameters; - - - - - ref - - - - A database reference. - - - - - - - - - &reftitle.returnvalues; - - Returns the database document pointed to by the reference. - - - - - &reftitle.examples; - - <methodname>MongoCollection::getDBRef</methodname> example - -playlists; - -$myList = $playlists->findOne(array('username' => 'me')); - -// fetch each song in the playlist -foreach ($myList['songlist'] as $songRef) { - $song = $playlists->getDBRef($songRef); - echo $song['title'] . "\n"; -} - -?> -]]> - - &example.outputs.similar; - - - - - In the above example each $songRef looks something like the following: - songs - [$id] => 49902cde5162504500b45c2c - ) - ]]> - - - - - - &reftitle.seealso; - - - MongoCollection::createDBRef - - - - - - diff --git a/reference/mongo/mongocollection/getindexinfo.xml b/reference/mongo/mongocollection/getindexinfo.xml deleted file mode 100644 index c7b4efeabb..0000000000 --- a/reference/mongo/mongocollection/getindexinfo.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - MongoCollection::getIndexInfo - Returns information about indexes on this collection - - - - &reftitle.description; - - public arrayMongoCollection::getIndexInfo - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This function returns an array in which each element describes an index. - Elements will contain the values name for the name of - the index, ns for the namespace (a combination of the - database and collection name), and key for a list of all - fields in the index and their ordering. Additional values may be present for - special indexes, such as unique or - sparse. - - - - - &reftitle.examples; - - <function>MongoCollection::getIndexInfo</function> example - -selectCollection('test', 'venues'); -var_dump($c->getIndexInfo()); - -?> -]]> - - &example.outputs.similar; - - - array(4) { - ["v"]=> - int(1) - ["key"]=> - array(1) { - ["_id"]=> - int(1) - } - ["name"]=> - string(4) "_id_" - ["ns"]=> - string(11) "test.venues" - } - [1]=> - array(4) { - ["v"]=> - int(1) - ["key"]=> - array(1) { - ["name"]=> - float(1) - } - ["name"]=> - string(6) "name_1" - ["ns"]=> - string(11) "test.venues" - } - [2]=> - array(4) { - ["v"]=> - int(1) - ["key"]=> - array(2) { - ["type"]=> - float(1) - ["createdAt"]=> - float(-1) - } - ["name"]=> - string(19) "type_1_createdAt_-1" - ["ns"]=> - string(11) "test.venues" - } - [3]=> - array(5) { - ["v"]=> - int(1) - ["key"]=> - array(1) { - ["location"]=> - string(8) "2dsphere" - } - ["name"]=> - string(17) "location_2dsphere" - ["ns"]=> - string(11) "test.venues" - ["2dsphereIndexVersion"]=> - int(2) - } -} -]]> - - - - - - &reftitle.seealso; - - MongoDB core docs on - vanilla indexes and - geospatial indexes. - - - - - diff --git a/reference/mongo/mongocollection/getname.xml b/reference/mongo/mongocollection/getname.xml deleted file mode 100644 index cce2c50aaa..0000000000 --- a/reference/mongo/mongocollection/getname.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - MongoCollection::getName - Returns this collection's name - - - &reftitle.description; - - public stringMongoCollection::getName - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the name of this collection. - - - - &reftitle.examples; - - - <function>MongoCollection::getName</function> example - -foo->bar->baz; - -echo "Working with collection " . $c->getName() . ".\n"; - -// the full namespace is given by the MongoCollection::__toString() method -echo "Working in namespace $c.\n"; - -?> -]]> - - &example.outputs.similar; - - - - - - - - diff --git a/reference/mongo/mongocollection/getreadpreference.xml b/reference/mongo/mongocollection/getreadpreference.xml deleted file mode 100644 index 9e7a5ebd56..0000000000 --- a/reference/mongo/mongocollection/getreadpreference.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - MongoCollection::getReadPreference - Get the read preference for this collection - - - - &reftitle.description; - - public arrayMongoCollection::getReadPreference - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - &mongo.getreadpreference.returnvalues; - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.3.3 - - The return value has changed to be consistent with - MongoCollection::setReadPreference. The - type value was changed from a number to a string, - type_string was removed, and - tagsets now expresses tags as key/value pairs instead - of colon-delimited strings. - - - - - - - - - - &reftitle.examples; - - <methodname>MongoCollection::getReadPreference</methodname> return value example - -test->users; -$c->setReadPreference(MongoClient::RP_SECONDARY, array( - array('dc' => 'east', 'use' => 'reporting'), - array('dc' => 'west'), - array(), -)); -var_dump($c->getReadPreference()); -?> -]]> - - &example.outputs; - - - string(9) "secondary" - ["tagsets"]=> - array(3) { - [0]=> - array(2) { - ["dc"]=> - string(4) "east" - ["use"]=> - string(9) "reporting" - } - [1]=> - array(1) { - ["dc"]=> - string(7) "west" - } - [2]=> - array(0) { - } - } -} -]]> - - - - - - &reftitle.seealso; - - The read preferences documentation. - MongoCollection::setReadPreference - - - - - - diff --git a/reference/mongo/mongocollection/getslaveokay.xml b/reference/mongo/mongocollection/getslaveokay.xml deleted file mode 100644 index 8144cc4511..0000000000 --- a/reference/mongo/mongocollection/getslaveokay.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - MongoCollection::getSlaveOkay - Get slaveOkay setting for this collection - - - - &reftitle.description; - - public boolMongoCollection::getSlaveOkay - - - - - See the query section of this manual for - information on distributing reads to secondaries. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the value of slaveOkay for this instance. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.seealso; - - - MongoCollection::getReadPreference - - - - - diff --git a/reference/mongo/mongocollection/getwriteconcern.xml b/reference/mongo/mongocollection/getwriteconcern.xml deleted file mode 100644 index 12b6b5b16a..0000000000 --- a/reference/mongo/mongocollection/getwriteconcern.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - MongoCollection::getWriteConcern - Get the write concern for this collection - - - - &reftitle.description; - - public arrayMongoCollection::getWriteConcern - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - &mongo.getwriteconcern.returnvalues; - - - - &reftitle.examples; - - <methodname>MongoCollection::getWriteConcern</methodname> return value example - - 500)); -$coll = $mc->selectCollection('test', 'foo'); -var_dump($coll->getWriteConcern()); - -$coll->setWriteConcern(1, 1000); -var_dump($coll->getWriteConcern()); -?> -]]> - - &example.outputs; - - - int(1) - ["wtimeout"]=> - int(500) -} -array(2) { - ["w"]=> - int(1) - ["wtimeout"]=> - int(1000) -} -]]> - - - - - - &reftitle.seealso; - - The write concern documentation. - MongoCollection::setWriteConcern - - - - - - diff --git a/reference/mongo/mongocollection/group.xml b/reference/mongo/mongocollection/group.xml deleted file mode 100644 index 99dd1238bf..0000000000 --- a/reference/mongo/mongocollection/group.xml +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - MongoCollection::group - Performs an operation similar to SQL's GROUP BY command - - - - &reftitle.description; - - public arrayMongoCollection::group - mixedkeys - arrayinitial - MongoCodereduce - arrayoptionsarray() - - - - - &reftitle.parameters; - - - - - keys - - - - Fields to group by. If an array or non-code object is passed, it will be - the key used to group results. - - 1.0.4+: If keys is an instance of - MongoCode, keys will be treated as - a function that returns the key to group by (see the "Passing a - keys function" example below). - - - - - - initial - - - - Initial value of the aggregation counter object. - - - - - - reduce - - - - A function that takes two arguments (the current document and the - aggregation to this point) and does the aggregation. - - - - - - options - - - - Optional parameters to the group command. Valid options include: - - - - - "condition" - - - Criteria for including a document in the aggregation. - - - - - "finalize" - - - Function called once per unique key that takes the final output of the - reduce function. - - - &mongo.command.parameters.maxtimems; - - - - - - - - - &reftitle.returnvalues; - - Returns an array containing the result. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - Added "maxTimeMS" option. - - - PECL mongo 1.2.11 - - Emits E_DEPRECATED when - options is scalar. - - - - - - - - - - &reftitle.examples; - - <function>MongoCollection::group</function> example - - This groups documents by category and creates a list of names within that - category. - - -insert(array("category" => "fruit", "name" => "apple")); -$collection->insert(array("category" => "fruit", "name" => "peach")); -$collection->insert(array("category" => "fruit", "name" => "banana")); -$collection->insert(array("category" => "veggie", "name" => "corn")); -$collection->insert(array("category" => "veggie", "name" => "broccoli")); - -$keys = array("category" => 1); - -$initial = array("items" => array()); - -$reduce = "function (obj, prev) { prev.items.push(obj.name); }"; - -$g = $collection->group($keys, $initial, $reduce); - -echo json_encode($g['retval']); - -?> -]]> - - &example.outputs.similar; - - - - - - - <function>MongoCollection::group</function> example - - This example doesn't use any key, so every document will be its own group. - It also uses a condition: only documents that match this condition will be - processed by the grouping function. - - -save(array("a" => 2)); -$collection->save(array("b" => 5)); -$collection->save(array("a" => 1)); - -// use all fields -$keys = array(); - -// set intial values -$initial = array("count" => 0); - -// JavaScript function to perform -$reduce = "function (obj, prev) { prev.count++; }"; - -// only use documents where the "a" field is greater than 1 -$condition = array('condition' => array("a" => array( '$gt' => 1))); - -$g = $collection->group($keys, $initial, $reduce, $condition); - -var_dump($g); - -?> -]]> - - &example.outputs.similar; - - - array(1) { - [0]=> - array(1) { - ["count"]=> - float(1) - } - } - ["count"]=> - float(1) - ["keys"]=> - int(1) - ["ok"]=> - float(1) -} -]]> - - - - - Passing a <parameter>keys</parameter> function - - If you want to group by something other than a field name, you can pass - a function as the first parameter of - MongoCollection::group and it will be run against each - document. The return value of the function will be used as its grouping - value. - - - This example demonstrates grouping by the num field modulo 4. - - - -group(new MongoCode('function(doc) { return {mod : doc.num % 4}; }'), - array("count" => 0), - new MongoCode('function(current, total) { total.count++; }')); - -?> -]]> - - - - - - diff --git a/reference/mongo/mongocollection/insert.xml b/reference/mongo/mongocollection/insert.xml deleted file mode 100644 index 48ca6495a1..0000000000 --- a/reference/mongo/mongocollection/insert.xml +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - MongoCollection::insert - Inserts a document into the collection - - - - &reftitle.description; - - public boolarrayMongoCollection::insert - arrayobjectdocument - arrayoptionsarray() - - - All strings sent to the database must be UTF-8. If a string is not UTF-8, a - MongoException will be thrown. To insert - (or query for) a non-UTF-8 string, use MongoBinData. - - - - - &reftitle.parameters; - - - - - document - - - - An array or object. If an object is used, it may not have protected or - private properties. - - - - If the parameter does not have an _id key or - property, a new MongoId instance will be created - and assigned to it. This special behavior does not mean that the - parameter is passed by reference. - - - - - - - options - - - - An array of options for the insert operation. Currently available options - include: - - &mongo.writes.parameters.fsync; - &mongo.writes.parameters.journal; - &mongo.writes.parameters.sockettimeoutms; - &mongo.writes.parameters.writeconcern; - &mongo.writes.parameters.writeconcerntimeoutms; - - - - The following options are deprecated and should no longer be used: - - &mongo.writes.parameters.safe; - &mongo.writes.parameters.timeout; - &mongo.writes.parameters.writeconcerntimeout; - - - - - - - - - - &reftitle.returnvalues; - - Returns an array containing the status of the insertion if the - "w" option is set. Otherwise, returns &true; if the - inserted array is not empty (a MongoException will be - thrown if the inserted array is empty). - - - If an array is returned, the following keys may be present: - - - - ok - - - - This should almost always be 1 (unless last_error itself failed). - - - - - - err - - - - If this field is non-null, an error occurred on the previous operation. - If this field is set, it will be a string describing the error that - occurred. - - - - - - code - - - - If a database error occurred, the relevant error code will be passed - back to the client. - - - - - - errmsg - - - - This field is set if something goes wrong with a database command. It - is coupled with ok being 0. For example, if - w is set and times out, errmsg will be set to "timed - out waiting for slaves" and ok will be 0. If this - field is set, it will be a string describing the error that occurred. - - - - - - n - - - - If the last operation was an update, upsert, or a remove, the number - of documents affected will be returned. For insert operations, this value - is always 0. - - - - - - wtimeout - - - - If the previous option timed out waiting for replication. - - - - - - waited - - - - How long the operation waited before timing out. - - - - - - wtime - - - - If w was set and the operation succeeded, how long it took to - replicate to w servers. - - - - - - upserted - - - - If an upsert occurred, this field will contain the new record's - _id field. For upserts, either this field or - updatedExisting will be present (unless an error - occurred). - - - - - - updatedExisting - - - - If an upsert updated an existing element, this field will be true. For - upserts, either this field or upserted will be present (unless an error - occurred). - - - - - - - - - &reftitle.errors; - - Throws MongoException if the inserted document is - empty or if it contains zero-length keys. Attempting to insert an object with - protected and private properties will cause a zero-length key error. - - &mongo.errors.exceptions.writeconcern; - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - - Added the "wTimeoutMS" option, which replaces - "wtimeout". Emits E_DEPRECATED - when "wtimeout" is used. - - - Added the "socketTimeoutMS" option, which replaces - "timeout". Emits E_DEPRECATED - when "timeout" is used. - - - Emits E_DEPRECATED when "safe" - is used. - - - - - PECL mongo 1.3.4 - Added "wtimeout" option. - - - PECL mongo 1.3.0 - - Added "w" option. - - The options parameter no longer accepts a - boolean to signify an acknowledged write. Instead, this now has to be - done with array('w' => 1) (the default behaviour of - MongoClient). - - - - - PECL mongo 1.2.0 - Added "timeout" option. - - - PECL mongo 1.0.11 - - Disconnects on "not master" errors if "safe" is set. - - - - PECL mongo 1.0.9 - - - Added ability to pass integers to the "safe" option, - which previously only accepted booleans. - - - Added "fsync" option. - - - The return type was changed to be an array containing error information - if the "safe" option is used. Otherwise, a boolean - is returned as before. - - - - - PECL mongo 1.0.2 - - Changed second parameter to be an array of options. Pre-1.0.2, the - second parameter was a boolean indicating the "safe" - option. - - - - PECL mongo 1.0.1 - - Throw a MongoCursorException if the - "safe" option is set and the insert fails. - - - - - - - - - - &reftitle.examples; - - <function>MongoCollection::insert</function> <literal>_id</literal> example - - An _id field will be added to the inserted document if - not already present. Depending on how the parameter is passed, a generated - _id may or may not be available to calling code. - - -selectCollection('test', 'phpmanual'); - -// If an array literal is used, there is no way to access the generated _id -$collection->insert(array('x' => 1)); - -// The _id is available on an array passed by value -$a = array('x' => 2); -$collection->insert($a); -var_dump($a); - -// The _id is not available on an array passed by reference -$b = array('x' => 3); -$ref = &$b; -$collection->insert($ref); -var_dump($ref); - -// The _id is available if a wrapping function does not trigger copy-on-write -function insert_no_cow($collection, $document) -{ - $collection->insert($document); -} - -$c = array('x' => 4); -insert_no_cow($collection, $c); -var_dump($c); - -// The _id is not available if a wrapping function triggers copy-on-write -function insert_cow($collection, $document) -{ - $document['y'] = 1; - $collection->insert($document); -} - -$d = array('x' => 5); -insert_cow($collection, $d); -var_dump($d); - -?> -]]> - - &example.outputs.similar; - - - int(2) - ["_id"]=> - object(MongoId)#4 (0) { - } -} -array(1) { - ["x"]=> - int(3) -} -array(2) { - ["x"]=> - int(4) - ["_id"]=> - object(MongoId)#5 (0) { - } -} -array(1) { - ["x"]=> - int(5) -} -]]> - - - - - <function>MongoCollection::insert</function> acknowledged write example - - This example shows inserting two elements with the same _id, which causes - a MongoCursorException to be thrown, as - w was set. - - - "Joe", "age" => 20); -$collection->insert($person); - -// now $person has an _id field, so if we save it -// again, we will get an exception -try { - $collection->insert($person, array("w" => 1)); -} catch(MongoCursorException $e) { - echo "Can't save the same person twice!\n"; -} - -?> -]]> - - - - - - &reftitle.seealso; - - MongoCollection::batchInsert - MongoCollection::update - MongoCollection::find - MongoCollection::remove - MongoDB core docs on insert. - - - - - diff --git a/reference/mongo/mongocollection/parallelcollectionscan.xml b/reference/mongo/mongocollection/parallelcollectionscan.xml deleted file mode 100644 index 05ae02236a..0000000000 --- a/reference/mongo/mongocollection/parallelcollectionscan.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - MongoCollection::parallelCollectionScan - Returns an array of cursors to iterator over a full collection in parallel - - - &reftitle.description; - - public array[MongoCommandCursor]MongoCollection::parallelCollectionScan - intnum_cursors - - - This method returns an array of a maximum of num_cursors - cursors. An iteration over one of the returned cursors results in a partial - set of documents for a collection. Iteration over all the returned cursors - results in getting every document back from the collection. - - - This method is a wrapper for the parallelCollectionScan - MongoDB command. - - - - - &reftitle.parameters; - - - - - num_cursors - - - - The number of cursors to request from the server. Please note, that the - server can return less cursors than you requested. - - - - - - - - - &reftitle.returnvalues; - - Returns an array of MongoCommandCursor objects. - - - - - &reftitle.examples; - - <function>MongoCollection::parallelCollectionScan</function> example - - Returning all documents in a collection by using multiple cursors. - - -demo->cities; - -/* Request three cursors */ -$cursors = $c->parallelCollectionScan( 3 ); - -/* Add all the cursors to the MultipleIterator */ -$mi = new MultipleIterator( MultipleIterator::MIT_NEED_ANY ); -foreach ( $cursors as $cursor ) -{ - $mi->attachIterator( $cursor ); -} - -/* Iterate over all the associated cursors */ -foreach ( $mi as $items ) -{ - foreach ( $items as $item ) - { - if ( $item !== NULL ) - { - echo $item['name'], "\n"; - } - } -} -?> -]]> - - - - - - &reftitle.seealso; - - - MultipleIterator - MongoCommandCursor - MongoDB::command - - - - - diff --git a/reference/mongo/mongocollection/remove.xml b/reference/mongo/mongocollection/remove.xml deleted file mode 100644 index f264d54dd1..0000000000 --- a/reference/mongo/mongocollection/remove.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - MongoCollection::remove - Remove records from this collection - - - - &reftitle.description; - - public boolarrayMongoCollection::remove - arraycriteriaarray() - arrayoptionsarray() - - - - - &reftitle.parameters; - - - - - criteria - - - - Query criteria for the documents to delete. - - - - - - options - - - - An array of options for the remove operation. Currently available options - include: - - &mongo.writes.parameters.writeconcern; - - - "justOne" - - - Specify &true; to limit deletion to just one document. If &false; or - omitted, all documents matching the criteria will be deleted. - - - &mongo.writes.parameters.fsync; - &mongo.writes.parameters.journal; - &mongo.writes.parameters.sockettimeoutms; - &mongo.writes.parameters.writeconcern; - &mongo.writes.parameters.writeconcerntimeoutms; - - - - The following options are deprecated and should no longer be used: - - &mongo.writes.parameters.safe; - &mongo.writes.parameters.timeout; - &mongo.writes.parameters.writeconcerntimeout; - - - - - - - - - - &reftitle.returnvalues; - - Returns an array containing the status of the removal if the - "w" option is set. Otherwise, returns &true;. - - - Fields in the status array are described in the documentation for - MongoCollection::insert. - - - - - &reftitle.errors; - &mongo.errors.exceptions.writeconcern; - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - - Added "wTimeoutMS" option, which replaces - "wtimeout". Emits E_DEPRECATED - when "wtimeout" is used. - - - Added "socketTimeoutMS" option, which replaces - "timeout". Emits E_DEPRECATED - when "timeout" is used. - - - Emits E_DEPRECATED when "safe" - is used. - - - - - PECL mongo 1.3.4 - Added "wtimeout" option. - - - PECL mongo 1.3.0 - - Added "w" option. - - The options parameter no longer accepts a - boolean to signify "justOne". Instead, this now has - to be done with array('justOne' => true). - - - - - PECL mongo 1.2.11 - - Emits E_DEPRECATED when - options is scalar. - - - - PECL mongo 1.2.0 - Added "timeout" option. - - - PECL mongo 1.0.11 - - Disconnects on "not master" errors if "safe" is set. - - - - PECL mongo 1.0.9 - - - Added ability to pass integers to the "safe" option, - which previously only accepted booleans. - - - Added "fsync" option. - - - The return type was changed to be an array containing error information - if the "safe" option is used. Otherwise, a boolean - is returned as before. - - - - - PECL mongo 1.0.5 - - Changed second parameter to be an array of options. Pre-1.0.5, the - second parameter was a boolean indicating the "safe" - option. - - - - - - - - - - &reftitle.examples; - - <function>MongoCollection::remove</function> with justOne example - -radioactive; - -// count how much more plutonium there is -$remaining = $radioactive->count(array('type' => 94)); - -$halflife = $remaining/2; - -// remove half of it -while ($halflife > 0) { - $radioactive->remove(array('type' => 94), array("justOne" => true)); - $halflife--; -} - -?> -]]> - - - - - - &reftitle.seealso; - - MongoCollection::insert - MongoCollection::update - MongoDB core docs on remove. - - - - - diff --git a/reference/mongo/mongocollection/save.xml b/reference/mongo/mongocollection/save.xml deleted file mode 100644 index ff90de74b5..0000000000 --- a/reference/mongo/mongocollection/save.xml +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - MongoCollection::save - Saves a document to this collection - - - - &reftitle.description; - - public mixedMongoCollection::save - arrayobjectdocument - arrayoptionsarray() - - - If the object is from the database, update the existing database object, otherwise - insert this object. - - - - - &reftitle.parameters; - - - - - document - - - - Array or object to save. If an object is used, it may not have protected - or private properties. - - - - If the parameter does not have an _id key or - property, a new MongoId instance will be created - and assigned to it. See MongoCollection::insert for - additional information on this behavior. - - - - - - - options - - - - Options for the save. - - &mongo.writes.parameters.fsync; - &mongo.writes.parameters.journal; - &mongo.writes.parameters.sockettimeoutms; - &mongo.writes.parameters.writeconcern; - &mongo.writes.parameters.writeconcerntimeout; - &mongo.writes.parameters.writeconcerntimeoutms; - &mongo.writes.parameters.safe; - &mongo.writes.parameters.timeout; - - - - - - - - - - &reftitle.returnvalues; - - If w was set, returns an array containing the status of the save. - Otherwise, returns a boolean representing if the array was not empty (an empty array will not - be inserted). - - - - - &reftitle.errors; - - Throws MongoException if the inserted document is - empty or if it contains zero-length keys. Attempting to insert an object with - protected and private properties will cause a zero-length key error. - - &mongo.errors.exceptions.writeconcern; - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - - Added "wTimeoutMS" option, which replaces - "wtimeout". Emits E_DEPRECATED - when "wtimeout" is used. - - - Added "socketTimeoutMS" option, which replaces - "timeout". Emits E_DEPRECATED - when "timeout" is used. - - - Emits E_DEPRECATED when "safe" - is used. - - - - - PECL mongo 1.2.0 - Added "timeout" option. - - - PECL mongo 1.0.11 - - Disconnects on "not master" errors if "safe" is set. - - - - PECL mongo 1.0.9 - - - Added "fsync" option. - - - - - PECL mongo 1.0.5 - Added options parameter. - - - - - - - - - &reftitle.examples; - - <function>MongoCollection::save</function> example - - 1); - -// insert $obj into the db -$collection->save($obj); -var_dump($obj); - -// add another field -$obj['foo'] = 'bar'; - -// $obj cannot be inserted again, causes duplicate _id error -$collection->insert($obj); - -// save updates $obj with the new field -$collection->save($obj); - -?> -]]> - - &example.outputs.similar; - - - int(1) - ["_id"]=> - object(MongoId)#4 (1) { - ["$id"]=> - string(24) "50b6afe544415ed606000000" - } -} -]]> - - - - - - diff --git a/reference/mongo/mongocollection/setreadpreference.xml b/reference/mongo/mongocollection/setreadpreference.xml deleted file mode 100644 index 3c8786865a..0000000000 --- a/reference/mongo/mongocollection/setreadpreference.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - MongoCollection::setReadPreference - Set the read preference for this collection - - - - &reftitle.description; - - public boolMongoCollection::setReadPreference - stringread_preference - arraytags - - - - - &reftitle.parameters; - &mongo.setreadpreference.parameters; - - - - &reftitle.returnvalues; - &mongo.setreadpreference.returnvalues; - - - - &reftitle.errors; - &mongo.setreadpreference.errors; - - - - &reftitle.examples; - - <methodname>MongoCollection::setReadPreference</methodname> tag set array syntax example - -test->users; - -// Prefer the nearest server in the "east" data center also used for reporting, -// but fall back to a server in the "west" data center -$c->setReadPreference(MongoClient::RP_NEAREST, array( - array('dc' => 'east', 'use' => 'reporting'), - array('dc' => 'west'), -)); -?> -]]> - - - - - - &reftitle.seealso; - - The read preferences documentation. - MongoCollection::getReadPreference - - - - - - diff --git a/reference/mongo/mongocollection/setslaveokay.xml b/reference/mongo/mongocollection/setslaveokay.xml deleted file mode 100644 index 0ff9b3e0f4..0000000000 --- a/reference/mongo/mongocollection/setslaveokay.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - MongoCollection::setSlaveOkay - Change slaveOkay setting for this collection - - - - &reftitle.description; - - public boolMongoCollection::setSlaveOkay - boolok&true; - - - - See the query section of this manual for - information on distributing reads to secondaries. - - - - - &reftitle.parameters; - - - - - ok - - - - If reads should be sent to secondary members of a replica set for all - possible queries using this MongoCollection - instance. - - - - - - - - - &reftitle.returnvalues; - - Returns the former value of slaveOkay for this instance. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.seealso; - - - MongoCollection::setReadPreference - - - - - diff --git a/reference/mongo/mongocollection/setwriteconcern.xml b/reference/mongo/mongocollection/setwriteconcern.xml deleted file mode 100644 index b34470aff3..0000000000 --- a/reference/mongo/mongocollection/setwriteconcern.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - MongoCollection::setWriteConcern - Set the write concern for this database - - - - &reftitle.description; - - public boolMongoCollection::setWriteConcern - mixedw - intwtimeout - - - - - &reftitle.parameters; - &mongo.setwriteconcern.parameters; - - - - &reftitle.returnvalues; - &mongo.setwriteconcern.returnvalues; - - - - &reftitle.errors; - &mongo.setwriteconcern.errors; - - - - &reftitle.examples; - - <methodname>MongoDB::setWriteConcern</methodname> example - -selectCollection('test', 'foo'); - -// Require that the majority of servers in the replica set acknowledge writes -// within three seconds. -$coll->setWriteConcern('majority', 3000); -?> -]]> - - - - - - &reftitle.seealso; - - The write concern documentation. - MongoCollection::getWriteConcern - - - - - - diff --git a/reference/mongo/mongocollection/toindexstring.xml b/reference/mongo/mongocollection/toindexstring.xml deleted file mode 100644 index 0c6ec1eea8..0000000000 --- a/reference/mongo/mongocollection/toindexstring.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - MongoCollection::toIndexString - Converts keys specifying an index to its identifying string - - - - &reftitle.description; - - static protected stringMongoCollection::toIndexString - mixedkeys - - - - This method is deprecated since version 1.5.0. - - - - - - &reftitle.parameters; - - - - - keys - - - - Field or fields to convert to the identifying string - - - - - - - - - &reftitle.returnvalues; - - Returns a string that describes the index. - - - - - &reftitle.examples; - - <function>MongoCollection::toIndexString</function> example - This example shows how you can create an index name out of keys. - Because this is a protected (static) method, you need to overload it in a - child class first. - - 1, 'age' => -1)), "\n"; -// Outputs: name_1_age_-1 -?> -]]> - - - - - - &reftitle.seealso; - - MongoDB core docs on indexes. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - This method has been deprecated. - - - - - - - - - - diff --git a/reference/mongo/mongocollection/tostring.xml b/reference/mongo/mongocollection/tostring.xml deleted file mode 100644 index 56872128e5..0000000000 --- a/reference/mongo/mongocollection/tostring.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - MongoCollection::__toString - String representation of this collection - - - &reftitle.description; - - public stringMongoCollection::__toString - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the full name of this collection. - - - - &reftitle.examples; - - - <function>MongoCollection::__toString</function> example - -foo->bar->baz; -echo "Working with collection $c1."; - -$c2 = $m->selectCollection('[]', '&'); -echo "Working with collection $c2."; - -?> -]]> - - &example.outputs.similar; - - - - - - - - diff --git a/reference/mongo/mongocollection/update.xml b/reference/mongo/mongocollection/update.xml deleted file mode 100644 index 19c468acd8..0000000000 --- a/reference/mongo/mongocollection/update.xml +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - MongoCollection::update - Update records based on a given criteria - - - - &reftitle.description; - - public boolarrayMongoCollection::update - arraycriteria - arraynew_object - arrayoptionsarray() - - - - - &reftitle.parameters; - - - - - criteria - - - - Query criteria for the documents to update. - - - - - - new_object - - - - The object used to update the matched documents. This may either contain - update operators (for modifying specific fields) or be a replacement - document. - - - - - - options - - - - An array of options for the update operation. Currently available options - include: - - - - "upsert" - - - If no document matches $criteria, a new - document will be inserted. - - - If a new document would be inserted and - $new_object contains atomic modifiers - (i.e. $ operators), those operations will be - applied to the $criteria parameter to create - the new document. If $new_object does not - contain atomic modifiers, it will be used as-is for the inserted - document. See the upsert examples below for more information. - - - - - "multiple" - - - All documents matching $criteria will be updated. - MongoCollection::update has exactly the opposite - behavior of MongoCollection::remove: it updates - one document by default, not all matching documents. It is - recommended that you always specify whether you want to update - multiple documents or a single document, as the database - may change its default behavior at some point in the future. - - - &mongo.writes.parameters.fsync; - &mongo.writes.parameters.journal; - &mongo.writes.parameters.sockettimeoutms; - &mongo.writes.parameters.writeconcern; - &mongo.writes.parameters.writeconcerntimeoutms; - - - - The following options are deprecated and should no longer be used: - - &mongo.writes.parameters.safe; - &mongo.writes.parameters.timeout; - &mongo.writes.parameters.writeconcerntimeout; - - - - - - - - - - &reftitle.returnvalues; - - Returns an array containing the status of the update if the - "w" option is set. Otherwise, returns &true;. - - - Fields in the status array are described in the documentation for - MongoCollection::insert. - - - - - &reftitle.errors; - &mongo.errors.exceptions.writeconcern; - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - - Added the "wTimeoutMS" option, which replaces - "wtimeout". Emits E_DEPRECATED - when "wtimeout" is used. - - - Added the "socketTimeoutMS" option, which replaces - "timeout". Emits E_DEPRECATED - when "timeout" is used. - - - Emits E_DEPRECATED when "safe" - is used. - - - - - PECL mongo 1.3.4 - Added "wtimeout" option. - - - PECL mongo 1.3.0 - - Added "w" option. - - The options parameter no longer accepts a boolean - to signify an upsert. Instead, this now has to be done with - array('upsert' => true). - - - - - PECL mongo 1.2.11 - - Emits E_DEPRECATED when - options is scalar. - - - - PECL mongo 1.2.0 - Added "timeout" option. - - - PECL mongo 1.0.11 - - Disconnects on "not master" errors if "safe" is set. - - - - PECL mongo 1.0.9 - - - Added ability to pass integers to the "safe" option, - which previously only accepted booleans. - - - Added "fsync" option. - - - The return type was changed to be an array containing error information - if the "safe" option is used. Otherwise, a boolean - is returned as before. - - - - - PECL mongo 1.0.5 - Added "safe" option. - - - PECL mongo 1.0.1 - - Changed options parameter from boolean to array. - Pre-1.0.1, the second parameter was an optional boolean value specifying - an upsert. - - - - - - - - - - &reftitle.examples; - - <function>MongoCollection::update</function> - - Adding an address field to a document. - - -insert(array("firstname" => "Bob", "lastname" => "Jones" )); -$newdata = array('$set' => array("address" => "1 Smith Lane")); -$c->update(array("firstname" => "Bob"), $newdata); - -var_dump($c->findOne(array("firstname" => "Bob"))); - -?> -]]> - - &example.outputs.similar; - - - object(MongoId)#6 (0) { - } - ["firstname"]=> - string(3) "Bob" - ["lastname"]=> - string(5) "Jones" - ["address"]=> - string(12) "1 Smith Lane" -} -]]> - - - - <function>MongoCollection::update</function> upsert examples - - Upserts can simplify code, as a single line can create the document if it - does not exist (based on $criteria), or update an - existing document if it matches. - - - In the following example, $new_object contains an - atomic modifier. Since the collection is empty and upsert must insert a new - document, it will apply those operations to the - $criteria parameter in order to create the document. - - -drop(); -$c->update( - array("uri" => "/summer_pics"), - array('$inc' => array("page hits" => 1)), - array("upsert" => true) -); -var_dump($c->findOne()); - -?> -]]> - - &example.outputs.similar; - - - object(MongoId)#9 (0) { - } - ["uri"]=> - string(12) "/summer_pics" - ["page hits"]=> - int(1) -} -]]> - - - If $new_object does not contain atomic modifiers - (i.e. $ operators), upsert will use - $new_object as-is for the new document. This matches - the behavior of a normal update, where not using atomic modifiers causes the - document to be overwritten. - - -drop(); -$c->update( - array("name" => "joe"), - array("username" => "joe312", "createdAt" => new MongoDate()), - array("upsert" => true) -); -var_dump($c->findOne()); - -?> -]]> - - &example.outputs.similar; - - - object(MongoId)#10 (0) { - } - ["username"]=> - string(6) "joe312" - ["createdAt"]=> - object(MongoDate)#4 (0) { - } -} -]]> - - - - <function>MongoCollection::update</function> multiple example - - By default, MongoCollection::update will only update - the first document matching $criteria that it - finds. Using the "multiple" option can override this behavior, if needed. - - - This example adds a "gift" field to every person whose birthday is in the - next day. - - - new MongoDate(), '$lt' => new MongoDate(strtotime("+1 day"))); -$people->update( - array("birthday" => $today), - array('$set' => array('gift' => $surprise)), - array("multiple" => true) -); - -?> -]]> - - - - - - &reftitle.seealso; - - The PHP documentation on updates and the - MongoDB core docs. - - - - - diff --git a/reference/mongo/mongocollection/validate.xml b/reference/mongo/mongocollection/validate.xml deleted file mode 100644 index 36c88ce5b7..0000000000 --- a/reference/mongo/mongocollection/validate.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - MongoCollection::validate - Validates this collection - - - - &reftitle.description; - - public arrayMongoCollection::validate - boolscan_data&false; - - - - - &reftitle.parameters; - - - - - scan_data - - - - Only validate indices, not the base collection. - - - - - - - - - &reftitle.returnvalues; - - Returns the database's evaluation of this object. - - - - diff --git a/reference/mongo/mongocommandcursor.xml b/reference/mongo/mongocommandcursor.xml deleted file mode 100644 index 000209c873..0000000000 --- a/reference/mongo/mongocommandcursor.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - The MongoCommandCursor class - MongoCommandCursor - - - - -
- &reftitle.intro; - - A command cursor is similar to a MongoCursor except - that you use it for iterating through the results of a database command - instead of a normal query. Command cursors are useful for iterating over - large result sets that might exceed the document size limit (currently 16MB) - of a single MongoDB::command response. - - - While you can create command cursors using - MongoCommandCursor::__construct or the - MongoCommandCursor::createFromDocument factory method, - you will generally want to use command-specific helpers such as - MongoCollection::aggregateCursor. - - - Note that the cursor does not "contain" the database command's results; it - just manages iteration through them. Thus, if you print a cursor (f.e. with - var_dump or print_r), you will see - the cursor object but not the result documents. - -
- -
- Cursor Stages - - A MongoCommandCursor has two "life stages": pre- - and post- command. When a cursor is created, it has not yet contacted the - database, so it is in its pre-command state. When the client first attempts - to get a result (by calling MongoCommandCursor::rewind, - directly or indirectly), the cursor moves into the post-command state. - - - The command cursor's batch size and socket timeout may be configured in both - the pre- and post- command states. - - - - Adding options to <classname>MongoCommandCursor</classname> - -batchSize( 4 ); - -foreach ($cursor as $result) { - var_dump($result); -} -?> -]]> - - - -
- - -
- &reftitle.classsynopsis; - - - - MongoCommandCursor - - - - - MongoCommandCursor - - - MongoCursorInterface - - - Iterator - - - - - &Methods; - - - - -
- -
- &reftitle.seealso; - - MongoDB::command - MongoCollection::aggregateCursor - -
- -
- - &reference.mongo.entities.mongocommandcursor; - -
- - diff --git a/reference/mongo/mongocommandcursor/batchsize.xml b/reference/mongo/mongocommandcursor/batchsize.xml deleted file mode 100644 index ef8f6b7dfd..0000000000 --- a/reference/mongo/mongocommandcursor/batchsize.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - MongoCommandCursor::batchSize - Limits the number of elements returned in one batch - - - - &reftitle.description; - - public MongoCommandCursorMongoCommandCursor::batchSize - intbatchSize - - - A cursor typically fetches a batch of result objects and store them - locally. This method sets the batchSize value to configure the amount of - documents retrieved from the server in one round trip. - - - - - &reftitle.parameters; - - - - - batchSize - - - - The number of results to return per batch. Each batch requires a - round-trip to the server. - - - This cannot override MongoDB's limit on the amount of data it will return to - the client (i.e., if you set batch size to 1,000,000,000, MongoDB will still - only return 4-16MB of results per batch). - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.examples; - - <function>MongoCommandCursor::batchSize</function> - -batchSize(20); -?> -]]> - - - - - - &reftitle.seealso; - - MongoCursorInterface::batchSize - - - - diff --git a/reference/mongo/mongocommandcursor/construct.xml b/reference/mongo/mongocommandcursor/construct.xml deleted file mode 100644 index 77ffca28ce..0000000000 --- a/reference/mongo/mongocommandcursor/construct.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - MongoCommandCursor::__construct - Create a new command cursor - - - - &reftitle.description; - - public MongoCommandCursor::__construct - MongoClientconnection - stringns - arraycommandarray() - - - Generally, you should not have to construct a - MongoCommandCursor manually, as there are helper - functions such as MongoCollection::aggregateCursor - and MongoCollection::parallelCollectionScan; - however, if the server introduces new commands that can return cursors, this - constructor will be useful in the absence of specific helper methods. You may - also consider using - MongoCommandCursor::createFromDocument. - - - - - &reftitle.parameters; - - - - - connection - - - - Database connection. - - - - - - ns - - - - Full name of the database and collection (e.g. - "test.foo") - - - - - - command - - - - Database command. - - - - - - - - - &reftitle.returnvalues; - - Returns the new cursor. - - - - - &reftitle.examples; - - <classname>MongoCommandCursor</classname> example - - [ - '_id' => '$country_code', - 'timezones' => [ '$addToSet' => '$timezone' ] - ] ], - [ '$sort' => [ '_id' => 1 ] ], -]; - -// Construct a MongoCommandCursor object -$cursor = new MongoCommandCursor( - $m, // MongoClient object - 'demo.cities', // namespace - [ - 'aggregate' => 'cities', - 'pipeline' => $pipeline, - 'cursor' => [ 'batchSize' => 0 ], - ] -); - -foreach($cursor as $result) { - … -} -?> -]]> - - - - - - &reftitle.seealso; - - MongoCommandCursor::createFromDocument - MongoCollection::aggregateCursor - MongoCollection::parallelCollectionScan - - - - - diff --git a/reference/mongo/mongocommandcursor/createfromdocument.xml b/reference/mongo/mongocommandcursor/createfromdocument.xml deleted file mode 100644 index bbcf2fdb33..0000000000 --- a/reference/mongo/mongocommandcursor/createfromdocument.xml +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - MongoCommandCursor::createFromDocument - Create a new command cursor from an existing command response document - - - - &reftitle.description; - - public static MongoCommandCursorMongoCommandCursor::createFromDocument - MongoClientconnection - stringhash - arraydocument - - - Use this method if you have a raw command result with cursor information in - it. Note that cursors created with this method cannot be iterated multiple - times, as they will lack the original command necessary for re-execution. - - - - - &reftitle.parameters; - - - - - connection - - - - Database connection. - - - - - - hash - - - - The connection hash, as obtained through the third by-reference argument - to MongoDB::command. - - - - - - document - - - - Document with cursor information in it. This document needs to contain - the id, ns and - firstBatch fields. Such a document is obtained by - calling the MongoDB::command with appropriate - arguments to return a cursor, and not just an inline result. See the - example below. - - - - - - - - - &reftitle.returnvalues; - - Returns the new cursor. - - - - - &reftitle.examples; - - <function>MongoCommandCursor::createFromDocument</function> - -demo; - -// Define the aggregation pipeline -$pipeline = [ - [ '$group' => [ - '_id' => '$country_code', - 'timezones' => [ '$addToSet' => '$timezone' ] - ] ], - [ '$sort' => [ '_id' => 1 ] ], -]; - -// Execute the command. The "cursor" option instructs the server to return -// cursor information in the response instead of inline results. -$r = $d->command( - [ - 'aggregate' => 'cities', - 'pipeline' => $pipeline, - 'cursor' => [ 'batchSize' => 1 ], - ], - null, - $hash -); - -// Show result and hash -var_dump( $r, $hash ); - -// Construct the command cursor -$cursor = MongoCommandCursor::createFromDocument( $m, $hash, $r ); -?> -]]> - - &example.outputs.similar; - - - array(3) { - ["id"]=> - object(MongoInt64)#5 (1) { - ["value"]=> - string(12) "392143983421" - } - ["ns"]=> - string(11) "demo.cities" - ["firstBatch"]=> - array(1) { - [0]=> - array(2) { - ["_id"]=> - string(2) "AD" - ["timezones"]=> - array(1) { - [0]=> - string(14) "Europe/Andorra" - } - } - } - } - ["ok"]=> - float(1) -} -string(25) "localhost:27017;-;.;17617" -]]> - - - As you can see, the returned cursor information has the - id, ns and - firstBatch fields. - - - - - - &reftitle.seealso; - - MongoCommandCursor::__construct - - - - - diff --git a/reference/mongo/mongocommandcursor/current.xml b/reference/mongo/mongocommandcursor/current.xml deleted file mode 100644 index 47a6d66e9c..0000000000 --- a/reference/mongo/mongocommandcursor/current.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - MongoCommandCursor::current - Returns the current element - - - - &reftitle.description; - - public arrayMongoCommandCursor::current - - - - This returns &null; until MongoCommandCursor::rewind is called. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The current result document as an associative array. &null; will be returned - if there is no result. - - - - - &reftitle.seealso; - - Iterator::current - - - - diff --git a/reference/mongo/mongocommandcursor/dead.xml b/reference/mongo/mongocommandcursor/dead.xml deleted file mode 100644 index 59dbe73cd0..0000000000 --- a/reference/mongo/mongocommandcursor/dead.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - MongoCommandCursor::dead - Checks if there are results that have not yet been sent from the database - - - - &reftitle.description; - - public boolMongoCommandCursor::dead - - - - This method checks whether the MongoCommandCursor - cursor has been exhausted and the database has no more results to send to the - client. A cursor being "dead" does not necessarily mean that there are no - more results available for iteration. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &true; if there are more results that have not yet been sent to the - client, and &false; otherwise. - - - - - &reftitle.seealso; - - MongoCursorInterface::dead - - - - diff --git a/reference/mongo/mongocommandcursor/getreadpreference.xml b/reference/mongo/mongocommandcursor/getreadpreference.xml deleted file mode 100644 index 478a3eb3c1..0000000000 --- a/reference/mongo/mongocommandcursor/getreadpreference.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - MongoCommandCursor::getReadPreference - Get the read preference for this command - - - - &reftitle.description; - - public arrayMongoCommandCursor::getReadPreference - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - &mongo.getreadpreference.returnvalues; - - - - &reftitle.examples; - - <methodname>MongoCommandCursor::getReadPreference</methodname> return value example - - 'myReplSetName')); -$collection = $m->selectCollection('test', 'people'); - -// If a MongoCommandCursor is constructed directly, it will inherit the read -// preference of the MongoClient instance passed to its constructor; however, -// MongoCollection::aggregateCursor() will have the MongoCommandCursor inherit -// the collection's read preference. -$collection->setReadPreference(MongoClient::RP_SECONDARY); - -$cursor = $collection->aggregateCursor( [ - [ '$group' => [ '_id' => '$name', 'points' => [ '$sum' => '$points' ] ] ], - [ '$sort' => [ 'points' => -1 ] ], -] ); - -var_dump($cursor->getReadPreference()); - -?> -]]> - - &example.outputs; - - - string(9) "secondary" -} -]]> - - - - - - &reftitle.seealso; - - The read preferences documentation. - MongoCommandCursor::setReadPreference - MongoCursorInterface::getReadPreference - - - - - diff --git a/reference/mongo/mongocommandcursor/info.xml b/reference/mongo/mongocommandcursor/info.xml deleted file mode 100644 index 7d562d7b36..0000000000 --- a/reference/mongo/mongocommandcursor/info.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - MongoCommandCursor::info - Gets information about the cursor's creation and iteration - - - - &reftitle.description; - - public arrayMongoCommandCursor::info - - - - This can be called before or after the cursor has started iterating. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the namespace, batch size, limit, skip, flags, query, and projected - fields for this cursor. If the cursor has started iterating, additional - information about iteration and the connection will be included. - - - - - &reftitle.examples; - - <function>MongoCommandCursor::info</function> example - - 'cities', - 'pipeline' => [ [ '$match' => [ '_id' => [ '$exists' => true ] ] ] ], - 'cursor' => [ 'batchSize' => 1 ], - ] -); - -echo "Before iteration started:\n"; -var_dump($cursor->info()); - -echo "\nAfter iteration started:\n"; -$cursor->rewind(); -var_dump($cursor->info()); - -?> -]]> - - &example.outputs.similar; - - - string(11) "demo.cities" - ["limit"]=> - int(0) - ["batchSize"]=> - int(0) - ["skip"]=> - int(0) - ["flags"]=> - int(0) - ["query"]=> - array(3) { - ["aggregate"]=> - string(6) "cities" - ["pipeline"]=> - array(1) { - [0]=> - array(1) { - ["$match"]=> - array(1) { - ["_id"]=> - array(1) { - ["$exists"]=> - bool(true) - } - } - } - } - ["cursor"]=> - array(1) { - ["batchSize"]=> - int(1) - } - } - ["fields"]=> - NULL - ["started_iterating"]=> - bool(false) -} - -After iteration started: -array(17) { - ["ns"]=> - string(11) "demo.cities" - ["limit"]=> - int(0) - ["batchSize"]=> - int(0) - ["skip"]=> - int(0) - ["flags"]=> - int(0) - ["query"]=> - array(3) { - ["aggregate"]=> - string(6) "cities" - ["pipeline"]=> - array(1) { - [0]=> - array(1) { - ["$match"]=> - array(1) { - ["_id"]=> - array(1) { - ["$exists"]=> - bool(true) - } - } - } - } - ["cursor"]=> - array(1) { - ["batchSize"]=> - int(1) - } - } - ["fields"]=> - NULL - ["started_iterating"]=> - bool(true) - ["id"]=> - int(185840310129) - ["at"]=> - int(0) - ["numReturned"]=> - int(0) - ["server"]=> - string(25) "localhost:27017;-;.;23991" - ["host"]=> - string(9) "localhost" - ["port"]=> - int(27017) - ["connection_type_desc"]=> - string(10) "STANDALONE" - ["firstBatchAt"]=> - int(0) - ["firstBatchNumReturned"]=> - int(1) -} -]]> - - - - - - &reftitle.seealso; - - MongoCursorInterface::info - - - - diff --git a/reference/mongo/mongocommandcursor/key.xml b/reference/mongo/mongocommandcursor/key.xml deleted file mode 100644 index 79df013cce..0000000000 --- a/reference/mongo/mongocommandcursor/key.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - MongoCommandCursor::key - Returns the current result's index within the result set - - - - &reftitle.description; - - public intMongoCommandCursor::key - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The current result's index within the result set. - - - - - &reftitle.seealso; - - Iterator::key - - - - diff --git a/reference/mongo/mongocommandcursor/rewind.xml b/reference/mongo/mongocommandcursor/rewind.xml deleted file mode 100644 index b50aab8fd4..0000000000 --- a/reference/mongo/mongocommandcursor/rewind.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - MongoCommandCursor::rewind - Executes the command and resets the cursor to the start of the result set - - - - &reftitle.description; - - public arrayMongoCommandCursor::rewind - - - - If the cursor has already started iteration, the command will be re-executed. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The raw server result document. - - - - - &reftitle.errors; - - Throws MongoConnectionException if it cannot reach the - database and MongoCursorTimeoutException if the - timeout is exceeded. - - - Throws MongoCursorException if the cursor was created - with MongoCommandCursor::createFromDocument and has - already started iteration. Such cursors cannot be iterated multiple times, as - they lack the original command necessary for re-execution. - - - - - &reftitle.examples; - - <function>MongoCommandCursor::rewind</function> - -rewind(); - -// Command cursor is now reset to the start of the result set - -var_dump($rawResult); -?> -]]> - - &example.outputs.similar; - - - array(3) { - ["id"]=> - object(MongoInt64)#5 (1) { - ["value"]=> - string(12) "310050110216" - } - ["ns"]=> - string(9) "demo.test" - ["firstBatch"]=> - array(1) { - [0]=> - array(2) { - ["_id"]=> - object(MongoId)#6 (1) { - ["$id"]=> - string(24) "52f5691544670a8077b0dc51" - } - ["value"]=> - string(2) "42" - } - } - } - ["ok"]=> - float(1) -} -]]> - - - - - - &reftitle.seealso; - - Iterator::rewind - - - - diff --git a/reference/mongo/mongocommandcursor/setreadpreference.xml b/reference/mongo/mongocommandcursor/setreadpreference.xml deleted file mode 100644 index e22b77c999..0000000000 --- a/reference/mongo/mongocommandcursor/setreadpreference.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - MongoCommandCursor::setReadPreference - Set the read preference for this command - - - - &reftitle.description; - - public MongoCommandCursorMongoCommandCursor::setReadPreference - stringread_preference - arraytags - - - - - &reftitle.parameters; - &mongo.setreadpreference.parameters; - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - &mongo.setreadpreference.errors; - - - - &reftitle.examples; - - <methodname>MongoCommandCursor::setReadPreference</methodname> tag set array syntax example - - - 'myReplSetName')); -$collection = $m->selectCollection('test', 'people'); - -$cursor = $collection->aggregateCursor( [ - [ '$group' => [ '_id' => '$name', 'points' => [ '$sum' => '$points' ] ] ], - [ '$sort' => [ 'points' => -1 ] ], -] ); - -// Prefer the nearest server in the "east" data center also used for reporting, -// but fall back to a server in the "west" data center -$cursor->setReadPreference(MongoClient::RP_NEAREST, [ - [ 'dc' => 'east', 'use' => 'reporting' ], - [ 'dc' => 'west' ], -] ); - -foreach ($cursor as $person) { - // ... -} - -// If the read preference is changed, it will be used the next time the cursor -// is rewound and the command is re-executed. -$cursor->setReadPreference(MongoClient::RP_PRIMARY); - -foreach ($cursor as $person) { - // ... -} - -?> -]]> - - - - - - &reftitle.seealso; - - The read preferences documentation. - MongoCommandCursor::getReadPreference - MongoCursorInterface::setReadPreference - - - - - diff --git a/reference/mongo/mongocommandcursor/timeout.xml b/reference/mongo/mongocommandcursor/timeout.xml deleted file mode 100644 index 02568dab57..0000000000 --- a/reference/mongo/mongocommandcursor/timeout.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - MongoCommandCursor::timeout - Sets a client-side timeout for this command - - - - &reftitle.description; - - public MongoCommandCursorMongoCommandCursor::timeout - intms - - - A timeout can be set at any time and will affect subsequent data retrieval - associated with this cursor, including fetching more results from the - database. - - - - - &reftitle.parameters; - - - - ms - - - - The number of milliseconds for the cursor to wait for a response. Use - -1 to wait forever. By default, the cursor will wait - 30000 milliseconds (30 seconds). - - - - - - - - &reftitle.returnvalues; - - This cursor. - - - - - &reftitle.errors; - - Causes methods that fetch results to throw a - MongoCursorTimeoutException if the data fetch takes - longer than the specified number of milliseconds. - - - - - &reftitle.examples; - - <function>MongoCommandCursor::timeout</function> example - - In the following example, the driver will wait for 60 seconds for the - first response from the aggregate command. It will also wait for 60 - seconds each time the server needs to be polled for more information. - - -database->collection; - -$pipeline = [ … ]; - -$cursor = $col->aggregateCursor( $pipeline ); -$cursor->timeout( 60000 ); // for 60 seconds - -foreach ( $cursor as $result ) { - … -} - -?> -]]> - - - - - - &reftitle.notes; - - - This does not cause the MongoDB server to cancel long-running operations; - it only instructs the driver to stop waiting for a response and throw a - MongoCursorTimeoutException after a set time. - If you need to specify a server-side timeout for a command, considering - passing the maxTimeMS option to - MongoCollection::aggregateCursor. - - - - - - &reftitle.seealso; - - MongoCollection::aggregateCursor - MongoCursorInterface::timeout - The socketTimeoutMS option for MongoClient::__construct - - - - - diff --git a/reference/mongo/mongocommandcursor/valid.xml b/reference/mongo/mongocommandcursor/valid.xml deleted file mode 100644 index 53b4ed8e81..0000000000 --- a/reference/mongo/mongocommandcursor/valid.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - MongoCommandCursor::valid - Checks if the cursor is reading a valid result - - - - &reftitle.description; - - public boolMongoCommandCursor::valid - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - &true; if the current result is not null, and &false; otherwise. - - - - - &reftitle.seealso; - - Iterator::valid - - - - diff --git a/reference/mongo/mongoconnectionexception.xml b/reference/mongo/mongoconnectionexception.xml deleted file mode 100644 index 5129d82aae..0000000000 --- a/reference/mongo/mongoconnectionexception.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - The MongoConnectionException class - MongoConnectionException - - - - -
- &reftitle.intro; - - Thrown when the driver fails to connect to the database. - - - - There are a number of possible error messages to help you diagnose the - connection problem. These are: - - - - - - No candidate servers found - - - Thrown when the driver cannot establish a connection to MongoDB - (fulfilling the ReadPreferences, if specified). - - - - - - No server name given. - - - This error occurs if you pass in "" as the server name, - probably because of an typo with string interpolation, - e.g., "$servr" instead of "$server". - - - - - - failed to get host [hostname] or port [portnum] - from [server]. - - - - This indicated that the server string was malformed. - "[hostname]" and "[portnum]" will be as much as the - driver could dicipher of it. - - - - - Operation in progress - - - Connecting to the database timed out. - - - - - Transport endpoint is not connected - - - Generally means that the connection string isn't correct, the driver - couldn't even find the database server. - - - - - couldn't determine master - - - No server in a replica set connection was identified as the primary. - - - - - couldn't get host info for [server] - - - This indicated that DNS could not resolve the server address - you gave. This could easily be caused by a typo, for example, - "server" instead of "$server". - - - - - Invalid Argument - - - This can be caused by attempting to connect to a machine that is up but - that the database isn't actually running on. Make sure that you've - started the database server before connecting. - - - - - Permission denied - - - This means that the socket could not be opened due to permissions issues. - On Red Hat variants, this can be caused by a default setting that does not - allow Apache to create network connections. You can override this setting - by running: - - - - then restarting Apache. - - - - - - If the error message is not listed above, it is probably an error - from the C socket, and you can search the web for its usual cause. - -
- - -
- &reftitle.classsynopsis; - - - - MongoConnectionException - - - - - MongoConnectionException - - - extends - MongoException - - - - - - - -
- -
- -
- - diff --git a/reference/mongo/mongocursor.xml b/reference/mongo/mongocursor.xml deleted file mode 100644 index 84dff81ef4..0000000000 --- a/reference/mongo/mongocursor.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - The MongoCursor class - MongoCursor - - - - -
- &reftitle.intro; - - A cursor is used to iterate through the results of a database query. For - example, to query the database and see all results, you could do: - - <classname>MongoCursor</classname> basic usage - -find(); -var_dump(iterator_to_array($cursor)); - -?> -]]> - - - - - You don't generally create cursors using the - MongoCursor constructor, you get a new cursor by - calling MongoCollection::find (as shown above). - - - Suppose that, in the example above, $collection was a - 50GB collection. We certainly wouldn't want to load that into memory all - at once, which is what a cursor is for: allowing the client to access the - collection in dribs and drabs. - - - If we have a large result set, we can iterate through it, loading a few - megabytes of results into memory at a time. For example, we could do: - - Iterating over <classname>MongoCursor</classname> - -find(); - -foreach ($cursor as $doc) { - // do something to each document -} - -?> -]]> - - - This will go through each document in the collection, loading and garbage - collecting documents as needed. - - - Note that this means that a cursor does not "contain" the database results, - it just manages them. Thus, if you print a cursor (with, say, - var_dump or print_r), you'll just - get the cursor object, not your documents. To get the documents themselves, - you can use one of the methods shown above. - -
- -
- Cursor Stages - - A MongoCursor has two "life stages": pre- and post- - query. When a cursor is created, it has not yet contacted the database, so - it is in its pre-query state. In this state, the client can further specify - what they want the query to do, including adding limits, skips, sorts, and - more advanced options. - - - When the client attempts to get a result (by calling - MongoCursor::next, directly or indirectly), the cursor - moves into the post-query stage. At this point, the query has been executed - by the database and cannot be modified anymore. - - - - Adding options to <classname>MongoCursor</classname> - -find()->limit(10); - -// database has not yet been queried, so more search options can be added -$cursor = $cursor->sort(array("a" => 1)); - -var_dump($cursor->getNext()); -// now database has been queried and more options cannot be added - -// so this will throw an exception: -$cursor->skip(4); -?> -]]> - - - -
- - -
- &reftitle.classsynopsis; - - - - MongoCursor - - - - - MongoCursor - - - MongoCursorInterface - - - Iterator - - - - - Static Fields - - static - bool - slaveOkay - &false; - - - static - int - timeout - 30000 - - - &Methods; - - - - -
- -
- Static Variables - - - - slaveOkay - - - If the query should have the "slaveOkay" flag set, which allows reads on - the secondary (secondaries are, by default, just for backup and not - queried). Can be overridden with MongoCursor::slaveOkay. - - - This functionality is deprecated. Please use - instead. - - - - - timeout - - - Set timeout in milliseconds for all database responses. Use - -1 to wait forever. Can be overridden with - MongoCursor::timeout. This does not cause the - MongoDB server to cancel the operation; it only instructs the driver to - stop waiting for a response and throw a - MongoCursorTimeoutException after a set time. - - - - -
- -
- &reftitle.seealso; - - MongoDB core docs on cursors. - -
- -
- - &reference.mongo.entities.mongocursor; - -
- - diff --git a/reference/mongo/mongocursor/addoption.xml b/reference/mongo/mongocursor/addoption.xml deleted file mode 100644 index 8ddd3a32a0..0000000000 --- a/reference/mongo/mongocursor/addoption.xml +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - MongoCursor::addOption - Adds a top-level key/value pair to a query - - - - &reftitle.description; - - public MongoCursorMongoCursor::addOption - stringkey - mixedvalue - - - This is an advanced function and should not be used unless you know what - you're doing. - - - A query can optionally be nested in a "query" field if other options, such as - a sort or hint, are given. For instance, adding a sort causes the query - to become a subfield of a bigger query object, like: - - $query, "orderby" => $sort); - -?> -]]> - - - - This method is for adding a top-level field to a query. It makes the query a - subobject (if it isn't already) and adds the key/value pair of your chosing - to the top level. - - - - It cannot be used to add extra criteria to a query on the fly. For instance, - this will not work: - -find()->addOption("name", "joe")->addOption("age", 20); - -?> -]]> - - This does not query for a user named "joe" with an age of 20. - - - - - - &reftitle.parameters; - - - - - key - - - - Fieldname to add. - - - - - - value - - - - Value to add. - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - - &reftitle.examples; - - Adding a comment with <function>MongoCursor::addOption</function> example - - MongoDB supports special options to be send to the server. The shell uses - the _addSpecial option to send a - $comment to the server. This comment will show up in - the profiling log (for slow queries f.e.). In the PHP driver, you use the - MongoCursor::addOption method. - - -demo->demo; -$cursor = $c->find(); -$cursor->addOption('$comment', "This comment will show up in the profiling log"); - -foreach ($cursor as $document) { /* empty */ } -?> -]]> - - &example.outputs.similar; - - - - - - - <function>MongoCursor::addOption</function> example - - Using MongoCursor::skip to skip over millions of - results can become slow. One way around this is to use - $min or $max options for the query. - These can be handy, but they require an index on exactly the fields being - searched for. This is an example of how to use $min as - an alternative to MongoCursor::skip. - - -ensureIndex(array("ts" => 1)); - -// you may have to modify this to run in a reasonable amount of time on slow -// machines (should take about 30 seconds on a good machine) -for ($i = 0; $i < 30000000; $i++) { - $c->insert(array("ts" => new MongoDate(), "i" => $i)); -} - -$now = strtotime("now"); - -// find documents inserted in the last 2 seconds -$cursor = $c->find()->addOption('$min', array("ts" => $now-2)); - -?> -]]> - - - - - diff --git a/reference/mongo/mongocursor/awaitdata.xml b/reference/mongo/mongocursor/awaitdata.xml deleted file mode 100644 index 4da87f908c..0000000000 --- a/reference/mongo/mongocursor/awaitdata.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - MongoCursor::awaitData - Sets whether this cursor will wait for a while for a tailable cursor to return more data - - - - &reftitle.description; - - public MongoCursorMongoCursor::awaitData - boolwait&true; - - - This method is to be used with tailable cursors. If we are at the end of - the data, block for a while rather than returning no data. After a timeout - period, we do return as normal. - - - - - &reftitle.parameters; - - - - - wait - - - - If the cursor should wait for more data to become available. - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - - &reftitle.examples; - - <function>MongoCursor::awaitData</function> example - - In this example we tail the "oplog" and instead of sleeping during every - iteration, we set the MongoCursor::awaitData option. - MongoCursor::hasNext will now block until there is - more data available. - - - 'seta' ) ); -$c = $m->local->selectCollection( 'oplog.rs' ); -$cursor = $c->find( array( 'ns' => 'demo.article', 'op' => 'i' ) ); -$cursor->tailable( true ); -$cursor->awaitData( true ); - -while (true) { - if (!$cursor->hasNext()) { - // we've read all the results, exit - if ($cursor->dead()) { - break; - } - } else { - var_dump( $cursor->getNext() ); - } -} -?> -]]> - - - - - - &reftitle.seealso; - - MongoDB core docs on tailable cursors. - - - - MongoCursor::tailable - - - - - diff --git a/reference/mongo/mongocursor/batchsize.xml b/reference/mongo/mongocursor/batchsize.xml deleted file mode 100644 index b76f72275b..0000000000 --- a/reference/mongo/mongocursor/batchsize.xml +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - MongoCursor::batchSize - Limits the number of elements returned in one batch - - - - &reftitle.description; - - public MongoCursorMongoCursor::batchSize - intbatchSize - - - A cursor typically fetches a batch of result objects and store them - locally. This method sets the batchSize value to configure the amount of - documents retrieved from the server in one round trip. However, it will - never return more documents than fit in the max batch size limit (usually - 4MB). - - - - - &reftitle.parameters; - - - - - batchSize - - - - The number of results to return per batch. Each batch requires a - round-trip to the server. - - - If batchSize is 2 or - more, it represents the size of each batch of objects retrieved. - It can be adjusted to optimize performance and limit data transfer. - - - If batchSize is 1 or negative, it - will limit of number returned documents to the absolute value of batchSize, - and the cursor will be closed. For example if - batchSize is -10, then the server will return a maximum - of 10 documents and as many as can fit in 4MB, then close the cursor. - - - - A batchSize of 1 is special, and - means the same as -1, i.e. a value of - 1 makes the cursor only capable of returning - one document. - - - - Note that this feature is different from - MongoCursor::limit in that documents must fit within a - maximum size, and it removes the need to send a request to close the cursor - server-side. The batch size can be changed even after a cursor is iterated, - in which case the setting will apply on the next batch retrieval. - - - This cannot override MongoDB's limit on the amount of data it will return to - the client (i.e., if you set batch size to 1,000,000,000, MongoDB will still - only return 4-16MB of results per batch). - - - To ensure consistent behavior, the rules of - MongoCursor::batchSize and - MongoCursor::limit behave a - little complex but work "as expected". The rules are: hard limits override - soft limits with preference given to MongoCursor::limit - over MongoCursor::batchSize. After that, whichever is - set and lower than the other will take precedence. See below. - section for some examples. - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.examples; - - <function>MongoCursor::batchSize</function> and combinations with - <function>MongoCursor::limit</function> - -limit(20)->batchSize(-10); - -// first batch: at most 10 items -$cursor->limit(10); - -// first batch: at most 10 items -$cursor->limit(10)->batchSize(20); - -// results are fetched in batches of 10 each, with a maximum of 20 items -// returned (that means two batches of 10). -$cursor->limit(20)->batchSize(10); - -// results are fetched in batches of 7 each, with a maximum of 30 items -// returned (that means that the driver requests 4 batches of 7, and one batch -// of 2). -$cursor->limit(30)->batchSize(7) -?> -]]> - - - - - - &reftitle.seealso; - - MongoDB core docs on batchSize. - - - - MongoCursor::limit - MongoCursorInterface::batchSize - - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.4.5 - - - Before 1.4.5, this method would throw an - MongoCursorException if the cursor had already - started iterating. - - - - - - - - - - - diff --git a/reference/mongo/mongocursor/construct.xml b/reference/mongo/mongocursor/construct.xml deleted file mode 100644 index 824b78dd83..0000000000 --- a/reference/mongo/mongocursor/construct.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - MongoCursor::__construct - Create a new cursor - - - - &reftitle.description; - - public MongoCursor::__construct - MongoClientconnection - stringns - arrayqueryarray() - arrayfieldsarray() - - - - - &reftitle.parameters; - - - - - connection - - - - Database connection. - - - - - - ns - - - - Full name of database and collection. - - - - - - query - - - - Database query. - - - - - - fields - - - - Fields to return. - - - - - - - - - &reftitle.returnvalues; - - Returns the new cursor. - - - - - diff --git a/reference/mongo/mongocursor/count.xml b/reference/mongo/mongocursor/count.xml deleted file mode 100644 index ba7ab30d89..0000000000 --- a/reference/mongo/mongocursor/count.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - MongoCursor::count - Counts the number of results for this query - - - - &reftitle.description; - - public intMongoCursor::count - boolfoundOnly&false; - - - This method does not affect the state of the cursor: if you haven't queried - yet, you can still apply limits, skips, etc. If you have started iterating - through results, it will not move the current position of the cursor. If you - have exhausted the cursor, it will not reset it. - - - - - &reftitle.parameters; - - - - foundOnly - - - - Send cursor limit and skip information to the count function, if applicable. - - - - - - - - &reftitle.returnvalues; - - The number of documents returned by this cursor's query. - - - - - &reftitle.examples; - - <function>MongoCursor::count</function> example - -insert(array('x'=>1)); -$collection->insert(array('x'=>2)); -$collection->insert(array('x'=>3)); - -$cursor = $collection->find(); - -var_dump($cursor->count()); -var_dump($cursor->count(true)); - -$cursor->limit(2); - -var_dump($cursor->count()); -var_dump($cursor->count(true)); - -?> -]]> - - &example.outputs.similar; - - - - - - - - &reftitle.errors; - - Throws MongoConnectionException if it cannot reach the - database. - - - - diff --git a/reference/mongo/mongocursor/current.xml b/reference/mongo/mongocursor/current.xml deleted file mode 100644 index 940f29d574..0000000000 --- a/reference/mongo/mongocursor/current.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - MongoCursor::current - Returns the current element - - - - &reftitle.description; - - public arrayMongoCursor::current - - - - This returns &null; until MongoCursor::next is called. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The current result document as an associative array. &null; will be returned - if there is no result. - - - - - &reftitle.seealso; - - Iterator::current - - - - diff --git a/reference/mongo/mongocursor/dead.xml b/reference/mongo/mongocursor/dead.xml deleted file mode 100644 index 3889fabd13..0000000000 --- a/reference/mongo/mongocursor/dead.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - MongoCursor::dead - Checks if there are results that have not yet been sent from the database - - - - &reftitle.description; - - public boolMongoCursor::dead - - - - The database sends responses in batches of documents, up to 4MB of documents - per response. This method checks if the database has more batches or if the - result set has been exhausted. - - - A cursor being "dead" does not mean that - MongoCursor::hasNext will return &false;, it only means - that the database is done sending results to the client. The client should - continue iterating through results until - MongoCursor::hasNext is &false;. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &true; if there are more results that have not yet been sent to the - client, and &false; otherwise. - - - - - &reftitle.seealso; - - MongoCursorInterface::dead - - - - diff --git a/reference/mongo/mongocursor/doquery.xml b/reference/mongo/mongocursor/doquery.xml deleted file mode 100644 index c00789adb2..0000000000 --- a/reference/mongo/mongocursor/doquery.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - MongoCursor::doQuery - Execute the query - - - - &reftitle.description; - - protected voidMongoCursor::doQuery - - - - - Please do not use me. - - - - This function actually queries the database. All queries and commands go - through this function. Thus, this function can be overridden to provide - custom query handling. - - - This handles serializing your query, sending it to the database, receiving a - response, and deserializing it. Thus, if you are planning to override this, - your code should probably call out to the original to use the existing - functionality (see the example below). - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - &null;. - - - - - &reftitle.errors; - - Throws MongoConnectionException if it cannot reach the - database. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.examples; - - - <function>MongoCursor::doQuery</function> example - - You could override this function to attempt a query on a secondary and, if - that fails, try it again on the primary. - - -slaveOkay(); - - try { - MongoCursor::doQuery(); - } - catch(MongoCursorException $e) { - $this->slaveOkay(false); - MongoCursor::doQuery(); - } - } -} - -?> -]]> - - - - - - diff --git a/reference/mongo/mongocursor/explain.xml b/reference/mongo/mongocursor/explain.xml deleted file mode 100644 index 253bf10f17..0000000000 --- a/reference/mongo/mongocursor/explain.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - MongoCursor::explain - Return an explanation of the query, often useful for optimization and debugging - - - - &reftitle.description; - - public arrayMongoCursor::explain - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns an explanation of the query. - - - - &reftitle.examples; - - <function>MongoCursor::explain</function> example - -find(array("x"=>1), array("y")); -$cursor->sort(array("z" => 1))->limit(4)->skip(5); - -var_dump($cursor->explain()); - -?> -]]> - - &example.outputs.similar; - - - string(15) "BtreeCursor x_1" - ["startKey"]=> - array(1) { - ["x"]=> - int(1) - } - ["endKey"]=> - array(1) { - ["x"]=> - int(1) - } - ["nscanned"]=> - float(4) - ["n"]=> - int(4) - ["scanAndOrder"]=> - int(1) - ["millis"]=> - int(3) - ["allPlans"]=> - array(2) { - [0]=> - array(3) { - ["cursor"]=> - string(15) "BtreeCursor x_1" - ["startKey"]=> - array(1) { - ["x"]=> - int(1) - } - ["endKey"]=> - array(1) { - ["x"]=> - int(1) - } - } - [1]=> - array(3) { - ["cursor"]=> - string(11) "BasicCursor" - ["startKey"]=> - array(0) { - } - ["endKey"]=> - array(0) { - } - } - } -} -]]> - - - - - &reftitle.errors; - - Throws MongoConnectionException if it cannot reach the - database. - - - - - &reftitle.seealso; - - MongoDB core docs on explain. - - - - - diff --git a/reference/mongo/mongocursor/fields.xml b/reference/mongo/mongocursor/fields.xml deleted file mode 100644 index 77e0034c6b..0000000000 --- a/reference/mongo/mongocursor/fields.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - MongoCursor::fields - Sets the fields for a query - - - - &reftitle.description; - - public MongoCursorMongoCursor::fields - arrayf - - - Fields are specified by "fieldname" : bool. &true; - indicates that a field should be returned, &false; indicates that it should - not be returned. You can also use 1 and 0 instead of &true; and &false;. - - - Thus, to return only the "summary" field, one could say: - - -fields(array("summary" => true)); - -?> -]]> - - - To return all fields except the "hidden" field: - - -fields(array("hidden" => false)); - -?> -]]> - - - - - &reftitle.parameters; - - - - - f - - - - Fields to return (or not return). - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started - iterating or a scalar argument is given. - - - - diff --git a/reference/mongo/mongocursor/getnext.xml b/reference/mongo/mongocursor/getnext.xml deleted file mode 100644 index ba470bd0ec..0000000000 --- a/reference/mongo/mongocursor/getnext.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - MongoCursor::getNext - Advances the cursor to the next result, and returns that result - - - - &reftitle.description; - - public arrayMongoCursor::getNext - - - - - - MongoCursor::getNext is an alias of MongoCursor::next. - - - - - diff --git a/reference/mongo/mongocursor/getreadpreference.xml b/reference/mongo/mongocursor/getreadpreference.xml deleted file mode 100644 index 2373dca64d..0000000000 --- a/reference/mongo/mongocursor/getreadpreference.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - MongoCursor::getReadPreference - Get the read preference for this query - - - - &reftitle.description; - - public arrayMongoCursor::getReadPreference - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - &mongo.getreadpreference.returnvalues; - - - - &reftitle.examples; - - <methodname>MongoCursor::getReadPreference</methodname> return value example - -test->users->find(); -$cursor->setReadPreference(MongoClient::RP_SECONDARY, array( - array('dc' => 'east', 'use' => 'reporting'), - array('dc' => 'west'), - array(), -)); -var_dump($cursor->getReadPreference()); -?> -]]> - - &example.outputs; - - - string(9) "secondary" - ["tagsets"]=> - array(3) { - [0]=> - array(2) { - ["dc"]=> - string(4) "east" - ["use"]=> - string(9) "reporting" - } - [1]=> - array(1) { - ["dc"]=> - string(7) "west" - } - [2]=> - array(0) { - } - } -} -]]> - - - - - - &reftitle.seealso; - - The read preferences documentation. - MongoCursor::setReadPreference - MongoCursorInterface::getReadPreference - - - - - - diff --git a/reference/mongo/mongocursor/hasnext.xml b/reference/mongo/mongocursor/hasnext.xml deleted file mode 100644 index 7194f454b9..0000000000 --- a/reference/mongo/mongocursor/hasnext.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - MongoCursor::hasNext - Checks if there are any more elements in this cursor - - - - &reftitle.description; - - public boolMongoCursor::hasNext - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns if there is another element. - - - - - &reftitle.errors; - - Throws MongoConnectionException if it cannot reach - the database and MongoCursorTimeoutException if the - timeout is exceeded. - - - - diff --git a/reference/mongo/mongocursor/hint.xml b/reference/mongo/mongocursor/hint.xml deleted file mode 100644 index 6081f6322b..0000000000 --- a/reference/mongo/mongocursor/hint.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - MongoCursor::hint - Gives the database a hint about the query - - - - &reftitle.description; - - public MongoCursorMongoCursor::hint - mixedindex - - - - - &reftitle.parameters; - - - - - index - - - - Index to use for the query. If a string is passed, it should correspond - to an index name. If an array or object is passed, it should correspond - to the specification used to create the index (i.e. the first argument - to MongoCollection::ensureIndex). - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.4.0 - - - The index argument now supports index names as - string values. In versions before 1.4.0, only array or object values - were accepted. - - - - - - - - - - diff --git a/reference/mongo/mongocursor/immortal.xml b/reference/mongo/mongocursor/immortal.xml deleted file mode 100644 index c3773fc1f1..0000000000 --- a/reference/mongo/mongocursor/immortal.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - MongoCursor::immortal - Sets whether this cursor will timeout - - - - &reftitle.description; - - public MongoCursorMongoCursor::immortal - boolliveForever&true; - - - After remaining idle on the server for some amount of time, cursors, by - default, "die." This is generally the behavior one wants. The database - cleans up a cursor once all of its results have been sent to the client, - but if the client doesn't request all of the results, the cursor will - languish there, taking up resources. Thus, after a few minutes, the cursor - "times out" and the database assumes the client has gotten everything it - needs and cleans up its the cursor's resources. - - - If, for some reason, you need a cursor to hang around for a long time, you - can prevent the database from cleaning it up by using this method. - However, if you make a cursor immortal, you need to iterate through all of - its results (or at least until MongoCursor::dead - returns &true;) or the cursor will hang around the database - forever, taking up resources. - - - - - &reftitle.parameters; - - - - - liveForever - - - - If the cursor should be immortal. - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - diff --git a/reference/mongo/mongocursor/info.xml b/reference/mongo/mongocursor/info.xml deleted file mode 100644 index d9b427ed58..0000000000 --- a/reference/mongo/mongocursor/info.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - MongoCursor::info - Gets information about the cursor's creation and iteration - - - - &reftitle.description; - - public arrayMongoCursor::info - - - - This can be called before or after the cursor has started iterating. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the namespace, batch size, limit, skip, flags, query, and projected - fields for this cursor. If the cursor has started iterating, additional - information about iteration and the connection will be included. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.1.0 - - Added a number of other fields, including id (the - cursor id), at (the driver's counter of which - document is current), numReturned (the number - returned by the server in the current batch), and - server (which server the query was sent - to—useful in conjunction with - . - - - - PECL mongo 1.0.10 - - Added started_iterating field, a boolean indicating - if cursor is pre- or post-query. - - - - - - - - - - &reftitle.examples; - - <function>MongoCursor::info</function> example - -test->foo->find(array("x" => 4), array("y" => 0)); - -echo "Before iteration started:\n"; -var_dump($cursor->info()); - -echo "\nAfter iteration started:\n"; -$cursor->rewind(); -var_dump($cursor->info()); - -?> -]]> - - &example.outputs.similar; - - - string(8) "test.foo" - ["limit"]=> - int(0) - ["batchSize"]=> - int(0) - ["skip"]=> - int(0) - ["flags"]=> - int(0) - ["query"]=> - array(1) { - ["x"]=> - int(4) - } - ["fields"]=> - array(1) { - ["y"]=> - int(0) - } - ["started_iterating"]=> - bool(false) -} - -After iteration started: -array(15) { - ["ns"]=> - string(8) "test.foo" - ["limit"]=> - int(0) - ["batchSize"]=> - int(0) - ["skip"]=> - int(0) - ["flags"]=> - int(0) - ["query"]=> - array(1) { - ["x"]=> - int(4) - } - ["fields"]=> - array(1) { - ["y"]=> - int(0) - } - ["started_iterating"]=> - bool(true) - ["id"]=> - int(0) - ["at"]=> - int(0) - ["numReturned"]=> - int(1) - ["server"]=> - string(25) "localhost:27017;-;.;26450" - ["host"]=> - string(9) "localhost" - ["port"]=> - int(27017) - ["connection_type_desc"]=> - string(10) "STANDALONE" -} -]]> - - - - - - &reftitle.seealso; - - MongoCursorInterface::info - - - - diff --git a/reference/mongo/mongocursor/key.xml b/reference/mongo/mongocursor/key.xml deleted file mode 100644 index 952af7c4c0..0000000000 --- a/reference/mongo/mongocursor/key.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - MongoCursor::key - Returns the current result's _id, or its index within the result set - - - - &reftitle.description; - - public stringintMongoCursor::key - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The current result's _id as a string. If the result - has no _id, its numeric index within the result set will - be returned as an integer. - - - - - &reftitle.seealso; - - Iterator::key - - - - diff --git a/reference/mongo/mongocursor/limit.xml b/reference/mongo/mongocursor/limit.xml deleted file mode 100644 index ac52c8a97b..0000000000 --- a/reference/mongo/mongocursor/limit.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - MongoCursor::limit - Limits the number of results returned - - - - &reftitle.description; - - public MongoCursorMongoCursor::limit - intnum - - - - - &reftitle.parameters; - - - - - num - - - - The number of results to return. - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - - &reftitle.seealso; - - - MongoDB core docs on limit. - MongoCursor::batchSize - MongoCursor::skip - - - - - diff --git a/reference/mongo/mongocursor/maxtimems.xml b/reference/mongo/mongocursor/maxtimems.xml deleted file mode 100644 index 91b9b99dca..0000000000 --- a/reference/mongo/mongocursor/maxtimems.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - MongoCursor::maxTimeMS - Sets a server-side timeout for this query - - - - &reftitle.description; - - public MongoCursorMongoCursor::maxTimeMS - intms - - - Specifies a cumulative time limit in milliseconds to be allowed by the server - for processing operations on the cursor. - - - - - &reftitle.parameters; - - - - ms - - - - Specifies a cumulative time limit in milliseconds to be allowed by the - server for processing operations on the cursor. - - - - - - - - &reftitle.returnvalues; - - This cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started - iterating. - - - Causes methods that fetch results to throw a - MongoExecutionTimeoutException if the query takes - longer than the specified number of milliseconds in processing time. - - - - - &reftitle.examples; - - <methodname>MongoCursor::maxTimeMS</methodname> example - - In the following example, the server will abort the query if the cursor - requires more than two seconds in processing time to return its results. - - -find(); -$cursor->maxTimeMS(2000); - -try { - $results = iterator_to_array($cursor); -} catch (MongoExecutionTimeoutException $e) { - echo "query took too long!"; -} - -?> -]]> - - - - - - &reftitle.notes; - - - Unlike MongoCursor::timeout, which specifies a - client-side timeout, MongoCursor::maxTimeMS can be - used to cause the MongoDB server to abort long-running queries. This - timeout is cumulative for the lifetime of the cursor (i.e. each batch will - contribute to this time limit). The timeout only considers processing time; - idle time is not considered. - - - - - - diff --git a/reference/mongo/mongocursor/next.xml b/reference/mongo/mongocursor/next.xml deleted file mode 100644 index 8b9fb049e1..0000000000 --- a/reference/mongo/mongocursor/next.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - MongoCursor::next - Advances the cursor to the next result, and returns that result - - - - &reftitle.description; - - public arrayMongoCursor::next - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the next document. - - - - - &reftitle.errors; - - Throws MongoConnectionException if it cannot reach the - database and MongoCursorTimeoutException if the - timeout is exceeded. - - - - - &reftitle.seealso; - - Iterator::next - - - - diff --git a/reference/mongo/mongocursor/partial.xml b/reference/mongo/mongocursor/partial.xml deleted file mode 100644 index 7d78e7496d..0000000000 --- a/reference/mongo/mongocursor/partial.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - MongoCursor::partial - If this query should fetch partial results from mongos if a shard is down - - - - &reftitle.description; - - public MongoCursorMongoCursor::partial - boolokay&true; - - - This option allows mongos to send partial query results - if a shard is unreachable. This is only applicable when running a sharded - MongoDB cluster and connecting to a mongos. - - - If a shard goes down and a query needs to be sent to that shard, - mongos will return the results (if any) from shards it - already contacted, then an error message that it could not reach the shard - (a MongoCursorException in PHP). If you would like to - get whatever results mongos can provide and no - exception, you can use this method. Note that this means that you won't have - an indication that a shard is down in your query response. - - - This has no effect on the query if all shards are reachable. This flag was - implemented in MongoDB version 1.7.5, so will only work with that version and - higher. - - - - - &reftitle.parameters; - - - - - okay - - - - If receiving partial results is okay. - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - diff --git a/reference/mongo/mongocursor/reset.xml b/reference/mongo/mongocursor/reset.xml deleted file mode 100644 index 21bb9d1fd9..0000000000 --- a/reference/mongo/mongocursor/reset.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - MongoCursor::reset - Clears the cursor - - - - &reftitle.description; - - public voidMongoCursor::reset - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - &null;. - - - - diff --git a/reference/mongo/mongocursor/rewind.xml b/reference/mongo/mongocursor/rewind.xml deleted file mode 100644 index 3cc6e56aea..0000000000 --- a/reference/mongo/mongocursor/rewind.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - MongoCursor::rewind - Returns the cursor to the beginning of the result set - - - - &reftitle.description; - - public voidMongoCursor::rewind - - - - This is identical to the function: - - -reset(); - $this->next(); -} - -?> -]]> - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - &null;. - - - - - &reftitle.errors; - - Throws MongoConnectionException if it cannot reach the - database and MongoCursorTimeoutException if the - timeout is exceeded. - - - - - &reftitle.seealso; - - Iterator::rewind - - - - diff --git a/reference/mongo/mongocursor/setflag.xml b/reference/mongo/mongocursor/setflag.xml deleted file mode 100644 index 7592e1b461..0000000000 --- a/reference/mongo/mongocursor/setflag.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - MongoCursor::setFlag - Sets arbitrary flags in case there is no method available the specific flag - - - - &reftitle.description; - - public MongoCursorMongoCursor::setFlag - intflag - boolset&true; - - - The MongoCursor class has several methods for - setting flags on the query object. This method is available in case the - MongoDB wire protocol has acquired a new flag, and the driver has not been - updated with a method for this new flag. In all other cases, the method - should be used. See the "See also" section for available methods. - - - - - &reftitle.parameters; - - - - - flag - - - - Which flag to set. You can not set flag 6 (EXHAUST) as the driver does - not know how to handle them. You will get a warning if you try to use - this flag. For available flags, please refer to the wire protocol - documentation. - - - - - - set - - - - Whether the flag should be set (&true;) or unset (&false;). - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Shows a warning when an unsupport flag is attempted to be set. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.4.0 - - Support for flag 3 (OPLOG_REPLAY) is added. Versions before 1.4.0 - would throw a warning saying that the flag is unsupported. - - - - - - - - - - &reftitle.examples; - - <function>MongoCursor::setFlag</function> example - - 'seta' ) ); -$c = $m->local->selectCollection( 'oplog.rs' ); -$cursor = $c->find( array( 'ns' => 'demo.article', 'op' => 'i' ) ); -$cursor->setFlag( 1, true ); // sets the tailable flag -$cursor->setFlag( 5, true ); // sets the await data flag -?> -]]> - - - - - - &reftitle.seealso; - - - MongoCursor::tailable - MongoCursor::immortal - MongoCursor::awaitData - MongoCursor::partial - MongoDB core docs onwire protocol query flags - - - - - diff --git a/reference/mongo/mongocursor/setreadpreference.xml b/reference/mongo/mongocursor/setreadpreference.xml deleted file mode 100644 index ca5928b2e9..0000000000 --- a/reference/mongo/mongocursor/setreadpreference.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - MongoCursor::setReadPreference - Set the read preference for this query - - - - &reftitle.description; - - public MongoCursorMongoCursor::setReadPreference - stringread_preference - arraytags - - - - - &reftitle.parameters; - &mongo.setreadpreference.parameters; - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - &mongo.setreadpreference.errors; - - - - &reftitle.examples; - - <methodname>MongoCursor::setReadPreference</methodname> tag set array syntax example - - -test->users->find(); - -// Prefer the nearest server in the "east" data center also used for reporting, -// but fall back to a server in the "west" data center -$cursor->setReadPreference(MongoClient::RP_NEAREST, array( - array('dc' => 'east', 'use' => 'reporting'), - array('dc' => 'west'), -)); -?> -]]> - - - - - - &reftitle.seealso; - - The read preferences documentation. - MongoCursor::getReadPreference - MongoCursorInterface::setReadPreference - - - - - - diff --git a/reference/mongo/mongocursor/skip.xml b/reference/mongo/mongocursor/skip.xml deleted file mode 100644 index c5d007f6d7..0000000000 --- a/reference/mongo/mongocursor/skip.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - MongoCursor::skip - Skips a number of results - - - - &reftitle.description; - - public MongoCursorMongoCursor::skip - intnum - - - - - &reftitle.parameters; - - - - - num - - - - The number of results to skip. - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - - &reftitle.seealso; - - - MongoCursor::limit - - - - - - diff --git a/reference/mongo/mongocursor/slaveokay.xml b/reference/mongo/mongocursor/slaveokay.xml deleted file mode 100644 index fc83f237a1..0000000000 --- a/reference/mongo/mongocursor/slaveokay.xml +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - MongoCursor::slaveOkay - Sets whether this query can be done on a secondary [deprecated] - - - - &reftitle.description; - - public MongoCursorMongoCursor::slaveOkay - boolokay&true; - - - - This method is deprecated since version 1.5.0. Instead, please use - MongoCursor::setReadPreference and . - - - - Calling this will make the driver route reads to secondaries if: - - - - You are using a replica set, and - - - - - You created a MongoClient instance using the option - "replicaSet" => "setName", and - - - - - There is a healthy secondary that can be reached by the driver. - - - - You can check which server was used for this query by calling - MongoCursor::info after running the query. It's - server field will show which server the query was sent to. - - - Note that you should use this function even if you do not use the automatic - routing to secondaries. If you connect directly to a secondary in a replica - set, you still need to call this function, which basically tells the database - that you are aware that you might be getting older data and you're okay with - that. If you do not call this, you'll get "not master" errors when you try to - query. - - - This method will override the static class variable - MongoCursor::$slaveOkay. It will also override - Mongo::setSlaveOkay, - MongoDB::setSlaveOkay and - MongoCollection::setSlaveOkay. - - - - - &reftitle.parameters; - - - - - okay - - - - If it is okay to query the secondary. - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - - &reftitle.examples; - - <function>MongoCursor::slaveOkay</function> example - -find(); - -// can query secondary -$cursor = $collection->find()->slaveOkay(); - -MongoCursor::$slaveOkay = true; - -// can query secondary -$cursor = $collection->find(); - -// cannot query secondary -$cursor = $collection->find()->slaveOkay(false); - -?> -]]> - - - - - - &reftitle.seealso; - - - MongoCursor::setReadPreference - MongoCursor::getReadPreference - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - This method has been deprecated in favour of - MongoCursor::setReadPreference and . - - - - - - - - - - diff --git a/reference/mongo/mongocursor/snapshot.xml b/reference/mongo/mongocursor/snapshot.xml deleted file mode 100644 index bb9854307e..0000000000 --- a/reference/mongo/mongocursor/snapshot.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - MongoCursor::snapshot - Use snapshot mode for the query - - - - &reftitle.description; - - public MongoCursorMongoCursor::snapshot - - - - Use snapshot mode for the query. Snapshot mode ensures that a document will - not be returned more than once because an intervening write operation results - in a move of the document. Documents inserted or deleted during the lifetime - of the cursor may or may not be returned, irrespective of snapshot mode. - - - Queries with short responses (less than 1MB) are always effectively - snapshotted. - - - Snapshot mode may not be used with sorting, explicit hints, or queries on - sharded collections. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - - &reftitle.seealso; - - MongoDB core docs on $snapshot operator. - - - - diff --git a/reference/mongo/mongocursor/sort.xml b/reference/mongo/mongocursor/sort.xml deleted file mode 100644 index fda21fb335..0000000000 --- a/reference/mongo/mongocursor/sort.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - MongoCursor::sort - Sorts the results by given fields - - - - &reftitle.description; - - public MongoCursorMongoCursor::sort - arrayfields - - - - - &reftitle.parameters; - - - - - fields - - - - An array of fields by which to sort. Each element in the array has as - key the field name, and as value either 1 for - ascending sort, or -1 for descending sort. - - - Each result is first sorted on the first field in the array, then (if - it exists) on the second field in the array, etc. This means that the - order of the fields in the fields array is - important. See also the examples section. - - - - - - - - - &reftitle.returnvalues; - - Returns the same cursor that this method was called on. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - - &reftitle.examples; - - <function>MongoCursor::sort</function> example - -sort(array('x' => 1)); - -// The order in the associative array is important. For instance, these two -// examples will yield different results: - -// Sort on date ascending and age descending -$cursor->sort(array('date' => 1, 'age' => -1)); - -// Sort on age descending and date ascending -$cursor->sort(array('age' => -1, 'date' => 1)); -?> -]]> - - - - - - diff --git a/reference/mongo/mongocursor/tailable.xml b/reference/mongo/mongocursor/tailable.xml deleted file mode 100644 index 5ece23827d..0000000000 --- a/reference/mongo/mongocursor/tailable.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - MongoCursor::tailable - Sets whether this cursor will be left open after fetching the last results - - - - &reftitle.description; - - public MongoCursorMongoCursor::tailable - booltail&true; - - - Mongo has a feature known as tailable cursors which are similar to the Unix - "tail -f" command. - - - Tailable means cursor is not closed when the last data is retrieved. Rather, - the cursor marks the final object's position. you can resume using the - cursor later, from where it was located, if more data were received. - - - Like any "latent cursor", the cursor may become invalid at some point -- for - example if that final object it references were deleted. Thus, you should be - prepared to requery if the cursor is MongoCursor::dead. - - - - - &reftitle.parameters; - - - - - tail - - - - If the cursor should be tailable. - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Throws MongoCursorException if this cursor has started iterating. - - - - - &reftitle.examples; - - <function>MongoCursor::tailable</function> example - -find()->tailable(); - -$results = array(); - -while (1) { - if (!$cursor->hasNext()) { - // we've read all the results, exit - if ($cursor->dead()) { - break; - } - // read all results so far, wait for more - sleep(10); - } - else { - $results[] = $cursor->getNext(); - } -} - -?> -]]> - - - - - - &reftitle.seealso; - - MongoDB core docs on tailable cursors. - - - - MongoCursor::awaitData - - - - - diff --git a/reference/mongo/mongocursor/timeout.xml b/reference/mongo/mongocursor/timeout.xml deleted file mode 100644 index 4e8128f807..0000000000 --- a/reference/mongo/mongocursor/timeout.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - MongoCursor::timeout - Sets a client-side timeout for this query - - - - &reftitle.description; - - public MongoCursorMongoCursor::timeout - intms - - - A timeout can be set at any time and will affect subsequent queries on the - cursor, including fetching more results from the database. - - - - - &reftitle.parameters; - - - - ms - - - - The number of milliseconds for the cursor to wait for a response. Use - -1 to wait forever. By default, the cursor will wait - 30000 milliseconds (30 seconds). - - - - - - - - &reftitle.returnvalues; - - This cursor. - - - - - &reftitle.errors; - - Causes methods that fetch results to throw a - MongoCursorTimeoutException if the query takes longer - than the specified number of milliseconds. - - - - - &reftitle.examples; - - <function>MongoCursor::timeout</function> example - - In the following example, the driver will wait forever for the initial - database response, and then wait 100ms for subsequent responses. - - -find(); -$cursor->timeout(-1); - -/* $cursor->hasNext() executes the query. An infinite timeout has been set, so - * the driver will wait as long as necessary for a response. - */ -while ($cursor->hasNext()) { - $cursor->timeout(100); - - /* A timeout has now been set, so if the cursor needs to get more results - * from the database, it will only wait 100ms for a response. - */ - try { - print_r($cursor->getNext()); - } catch (MongoCursorTimeoutException $e) { - echo "query took too long!"; - } -} - -?> -]]> - - - - - - &reftitle.notes; - - - This does not cause the MongoDB server to cancel long-running operations; - it only instructs the driver to stop waiting for a response and throw a - MongoCursorTimeoutException after a set time. - If you need to specify a server-side timeout for a query, consider using - MongoCursor::maxTimeMS. - - - - - - &reftitle.seealso; - - MongoCursorInterface::timeout - The socketTimeoutMS option for MongoClient::__construct - - - - - diff --git a/reference/mongo/mongocursor/valid.xml b/reference/mongo/mongocursor/valid.xml deleted file mode 100644 index 0c492172e7..0000000000 --- a/reference/mongo/mongocursor/valid.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - MongoCursor::valid - Checks if the cursor is reading a valid result - - - - &reftitle.description; - - public boolMongoCursor::valid - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - &true; if the current result is not null, and &false; otherwise. - - - - - &reftitle.seealso; - - Iterator::valid - - - - diff --git a/reference/mongo/mongocursorexception.xml b/reference/mongo/mongocursorexception.xml deleted file mode 100644 index 51b14acc80..0000000000 --- a/reference/mongo/mongocursorexception.xml +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - The MongoCursorException class - MongoCursorException - - - - -
- &reftitle.intro; - - Caused by accessing a cursor incorrectly or a error receiving a reply. Note - that this can be thrown by any database request that receives a reply, not - just queries. Writes, commands, and any other operation that sends - information to the database and waits for a response can throw a - MongoCursorException. The only exception is - new MongoClient() (creating a new connection), which will - only throw MongoConnectionExceptions. - - - - This returns a specific error message to help diagnose the problem and a - numeric error code associated with the cause of the exception. - - - - For example, suppose you tried to insert two documents with the same _id: - -insert(array("_id" => 1), array("w" => 1)); - $collection->insert(array("_id" => 1), array("w" => 1)); -} -catch (MongoCursorException $e) { - echo "error message: ".$e->getMessage()."\n"; - echo "error code: ".$e->getCode()."\n"; -} - -?> -]]> - - This would produce output like: - - - - Note that the MongoDB error code (11000) is used for the PHP error code. The - PHP driver uses the "native" error code wherever possible. - - - - The following is a list of common errors, codes, and causes. Exact errors - are in italics, errors where the message can vary are described in obliques. - - - - - - cannot modify cursor after beginning iteration - - - Code: 0 - - - You are calling a method that sets up the query after executing the query. - Reset the cursor and try again. - - - An example: - -find(); - var_dump($cursor->getNext()); - - // getNext() queried the database, it's too late to set a limit - $cursor->limit(1); -} -catch (MongoCursorException $e) { - echo "error message: ".$e->getMessage()."\n"; - echo "error code: ".$e->getCode()."\n"; -} - -// this will work, though: -$cursor->getNext(); -$cursor->reset(); -$cursor->limit(1); - -?> -]]> - - - - - - - Get next batch send errors - - - Code: 1 - - - Could not send the query to the database. Make sure the database is - still up and the network is okay. - - - - - - cursor not found - - - Code: 2 - - - The driver was trying to fetch more results from the database, but the - database did not have a record of the query. This usually means that the - cursor timed out on the server side: after a few minutes of inactivity, - the database will kill a cursor (see - MongoCursor::immortal for information on preventing - this). - - - An example: - -find(); - $cursor->getNext(); - - // sleep for 15 minutes - sleep(60*15); - - while ($cursor->hasNext()) { - $cursor->getNext(); - } -} -catch (MongoCursorException $e) { - echo "error message: ".$e->getMessage()."\n"; - echo "error code: ".$e->getCode()."\n"; -} - -?> -]]> - - - - - - - cursor->buf.pos is null - - - Code: 3 - - - This may indicate you are out of RAM or some other extraordinary - circumstance. - - - - - - couldn't get response header - - - Code: 4 - - - A common error if the database or network goes down. This means that the - driver couldn't get a response from the connection. - - - - - - no db response - - - Code: 5 - - - This may not even be an error, for example, the database command - "shutdown" returns no response. However, if you were expecting a - response, this means the database didn't give one. - - - - - - bad response length: %d, did the db assert? - - - Code: 6 - - - This means that the database said that its response was less than 0. This - error probably indicates a network error or database corruption. - - - - - - incomplete header - - - Code: 7 - - - Highly unusual. Occurs if the database response started out correctly, - but broke off in the middle. Probably indicates a network problem. - - - - - - incomplete response - - - Code: 8 - - - Highly unusual. Occurs if the database response started out correctly, - but broke off in the middle. Probably indicates a network problem. - - - - - - couldn't find a response - - - Code: 9 - - - If the response was cached and now cannot be located. - - - - - - error getting socket - - - Code: 10 - - - The socket was closed or encountered an error. The driver should - automatically reconnect (if possible) on the next operation. - - - - - - couldn't find reply, please try again - - - Code: 11 - - - The driver saves any database responses it cannot immediately match with a - request. This exception occurs if the driver has already passed your - request's response and cannot find your response in its cache. - - - - - - error getting database response: errstr - - - WSA error getting database response: errstr - - - "errstr" is an io error reported directly from the C socket - subsystem. On Windows, the error message is prefixed with "WSA". - - - - - - Timeout error - - - Code: 13 - - - If there was an error while waiting for a query to complete. - - - - - - couldn't send query: <various> - - - Code: 14 - - - C socket error on send. - - - - - - max number of retries exhausted, couldn't send query - - - Code: 19 - - - The driver will automatically retry "plain" queries (not commands) a - couple of times if the first attempt failed for certain reasons. This is - to cause fewer exceptions during replica set failover (although you will - probably still have to deal with some) and gloss over transient network - issues. - - - This can also be caused by the driver not being able to reconnect at all - to the database (if, for example, the database is unreachable). - - - Version 1.2.2+. - - - -
- - -
- Errors passed through by the database - - Database errors should always trigger - MongoCursorExceptions on queries. - Error messages and codes are sent directly from the database and you should - be able to see matching errors in the database log. - - - - A few common database errors are listed below: - - - - - - E11000 duplicate key error index: foo.bar.$X dup key: { /* ... */ } - - - Code: 11000 - - - Database error for duplicate keys. - - - - - - not master - - - Codes: 10107, 13435, and 10058 - - - Not master errors, piped through by the database. ach of these will - cause the driver to disconnect and attempt to find a new primary. The - actual error you get on failover may not be a "not master" error, - depending on when the change in primary occurs. - - - - -
- - -
- &reftitle.classsynopsis; - - - - MongoCursorException - - - - - MongoCursorException - - - extends - MongoException - - - - - - - -
- -
- - &reference.mongo.entities.mongocursorexception; - -
- - diff --git a/reference/mongo/mongocursorexception/gethost.xml b/reference/mongo/mongocursorexception/gethost.xml deleted file mode 100644 index 5acc2288e8..0000000000 --- a/reference/mongo/mongocursorexception/gethost.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - MongoCursorException::getHost - The hostname of the server that encountered the error - - - - &reftitle.description; - - public stringMongoCursorException::getHost - - - - Returns the hostname of the server the query was sent too. - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the hostname, or NULL if the hostname is unknown. - - - - - - - diff --git a/reference/mongo/mongocursorinterface.xml b/reference/mongo/mongocursorinterface.xml deleted file mode 100644 index 0079075980..0000000000 --- a/reference/mongo/mongocursorinterface.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - The MongoCursorInterface interface - MongoCursorInterface - - - - -
- &reftitle.intro; - - Interface for cursors, which can be used to iterate through results of a - database query or command. This interface is implemented by the - MongoCursor and - MongoCommandCursor classes. - - - - Similar to Traversable, this interface cannot be - implemented in PHP scripts. - - -
- - -
- &reftitle.classsynopsis; - - - - MongoCursorInterface - - - - - MongoCursorInterface - - - - extends - Iterator - - - - - &Methods; - - - &InheritedMethods; - - - -
- -
- - &reference.mongo.entities.mongocursorinterface; - -
- - diff --git a/reference/mongo/mongocursorinterface/batchsize.xml b/reference/mongo/mongocursorinterface/batchsize.xml deleted file mode 100644 index 7a83c78400..0000000000 --- a/reference/mongo/mongocursorinterface/batchsize.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - MongoCursorInterface::batchSize - Limits the number of elements returned in one batch - - - - &reftitle.description; - - abstract public MongoCursorInterfaceMongoCursorInterface::batchSize - intbatchSize - - - A cursor typically fetches a batch of result objects and stores them - locally. This method sets the batch size value to configure the amount of - documents retrieved from the server in one round trip. - - - - - &reftitle.parameters; - - - - - batchSize - - - - The number of results to return per batch. - - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - diff --git a/reference/mongo/mongocursorinterface/dead.xml b/reference/mongo/mongocursorinterface/dead.xml deleted file mode 100644 index 4aef6503db..0000000000 --- a/reference/mongo/mongocursorinterface/dead.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - MongoCursorInterface::dead - Checks if there are results that have not yet been sent from the database - - - - &reftitle.description; - - abstract public boolMongoCursorInterface::dead - - - - This method checks whether the cursor has been exhausted and the database has - no more results to send to the client. A cursor being "dead" does not - necessarily mean that there are no more results available for iteration. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &true; if there are more results that have not yet been sent to the - client, and &false; otherwise. - - - - - diff --git a/reference/mongo/mongocursorinterface/info.xml b/reference/mongo/mongocursorinterface/info.xml deleted file mode 100644 index fdb0376142..0000000000 --- a/reference/mongo/mongocursorinterface/info.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - MongoCursorInterface::info - Gets information about the cursor's creation and iteration - - - - &reftitle.description; - - abstract public arrayMongoCursorInterface::info - - - - Returns information about the cursor's creation and iteration. This can be - called before or after the cursor has started iterating. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the namespace, batch size, limit, skip, flags, query, and projected - fields for this cursor. If the cursor has started iterating, additional - information about iteration and the connection will be included. - - - - - diff --git a/reference/mongo/mongocursorinterface/setreadpreference.xml b/reference/mongo/mongocursorinterface/setreadpreference.xml deleted file mode 100644 index ba6e253a3e..0000000000 --- a/reference/mongo/mongocursorinterface/setreadpreference.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - MongoCursorInterface::setReadPreference - Set the read preference for this query - - - - &reftitle.description; - - abstract public MongoCursorInterfaceMongoCursorInterface::setReadPreference - stringread_preference - arraytags - - - - - &reftitle.parameters; - &mongo.setreadpreference.parameters; - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - &mongo.setreadpreference.errors; - - - - &reftitle.seealso; - - The read preferences documentation. - MongoCursorInterface::getReadPreference - - - - - diff --git a/reference/mongo/mongocursorinterface/timeout.xml b/reference/mongo/mongocursorinterface/timeout.xml deleted file mode 100644 index 7c0272bf0f..0000000000 --- a/reference/mongo/mongocursorinterface/timeout.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - MongoCursorInterface::timeout - Sets a client-side timeout for this query - - - - &reftitle.description; - - abstract public MongoCursorInterfaceMongoCursorInterface::timeout - intms - - - A timeout can be set at any time and will affect subsequent data retrieval - associated with this cursor, including fetching more results from the - database. - - - - - &reftitle.parameters; - - - - ms - - - - The number of milliseconds for the cursor to wait for a response. Use - -1 to wait forever. By default, the cursor will wait - 30000 milliseconds (30 seconds). - - - - - - - - &reftitle.returnvalues; - - Returns this cursor. - - - - - &reftitle.errors; - - Causes methods that fetch results to throw a - MongoCursorTimeoutException if the data fetch takes - longer than the specified number of milliseconds. - - - - - &reftitle.seealso; - - The socketTimeoutMS option for MongoClient::__construct - - - - - diff --git a/reference/mongo/mongocursortimeoutexception.xml b/reference/mongo/mongocursortimeoutexception.xml deleted file mode 100644 index 0bd2ff42ef..0000000000 --- a/reference/mongo/mongocursortimeoutexception.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - The MongoCursorTimeoutException class - MongoCursorTimeoutException - - - - -
- &reftitle.intro; - - Caused by a query timing out. You can set the length of time to wait before - this exception is thrown by calling - MongoCursor::timeout on the cursor or setting - MongoCursor::$timeout. The static variable is useful for - queries such as database commands and - MongoCollection::findOne, both of which implicitly use - cursors. - -
- - -
- &reftitle.classsynopsis; - - - - MongoCursorTimeoutException - - - - - MongoCursorTimeoutException - - - extends - MongoCursorException - - - - - - - -
- -
- -
- - diff --git a/reference/mongo/mongodate.xml b/reference/mongo/mongodate.xml deleted file mode 100644 index 2a37c78a25..0000000000 --- a/reference/mongo/mongodate.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - The MongoDate class - MongoDate - - - - - &mongo.alternative.class.note; - - MongoDB\BSON\UTCDateTime - - - - -
- &reftitle.intro; - - Represent date objects for the database. This class should be used to save - dates to the database and to query for dates. For example: - - - Storing dates with <classname>MongoDate</classname> - -save(array("ts" => new MongoDate())); - -$start = new MongoDate(strtotime("2010-01-15 00:00:00")); -$end = new MongoDate(strtotime("2010-01-30 00:00:00")); - -// find dates between 1/15/2010 and 1/30/2010 -$collection->find(array("ts" => array('$gt' => $start, '$lte' => $end))); - -?> -]]> - - - - MongoDB stores dates as milliseconds past the epoch. This means that dates - do not contain timezone information. Timezones must be - stored in a separate field if needed. Second, this means that any precision - beyond milliseconds will be lost when the document is sent to/from the - database. - -
- - -
- &reftitle.classsynopsis; - - - - MongoDate - - - - - MongoDate - - - - - Fields - - public - int - sec - - - public - int - usec - - - - &Methods; - - - - -
- -
- - &reference.mongo.entities.mongodate; - -
- - diff --git a/reference/mongo/mongodate/construct.xml b/reference/mongo/mongodate/construct.xml deleted file mode 100644 index 6f2a6f2aa0..0000000000 --- a/reference/mongo/mongodate/construct.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - MongoDate::__construct - Creates a new date - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\UTCDateTime::__construct - - - - - - &reftitle.description; - - public MongoDate::__construct - intsectime() - intusec0 - - - Creates a new date. If no parameters are given, the current time is used. - - - - - &reftitle.parameters; - - - - - sec - - - - Number of seconds since the epoch (i.e. 1 Jan 1970 00:00:00.000 UTC). - - - - - - usec - - - - Microseconds. Please be aware though that MongoDB's resolution is - milliseconds and not microseconds, which means this - value will be truncated to millisecond resolution. - - - - - - - - - &reftitle.returnvalues; - - Returns this new date. - - - - - &reftitle.examples; - - <function>MongoDate::__construct</function> example - This example demonstrates creating a new date with the current time and a new date with a given time. - - -]]> - - &example.outputs.similar; - - - - - - - - &reftitle.seealso; - - - MongoDate::__toString - - - - - - - diff --git a/reference/mongo/mongodate/todatetime.xml b/reference/mongo/mongodate/todatetime.xml deleted file mode 100644 index 1f08f86f4f..0000000000 --- a/reference/mongo/mongodate/todatetime.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - MongoDate::toDateTime - Returns a DateTime object representing this date - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\UTCDateTime::toDateTime - - - - - - &reftitle.description; - - public DateTimeMongoDate::toDateTime - - - - Returns the DateTime representation of this date. The - returned DateTime will use the UTC time zone. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This date as a DateTime object. - - - - - &reftitle.examples; - - <function>MongoDate::toDateTime</function> example - This example demonstrates creating a DateTime object from a MongoDate - object. - -toDateTime() ); -?> -]]> - - &example.outputs.similar; - - - string(26) "2014-11-18 11:01:25.000000" - public $timezone_type => - int(1) - public $timezone => - string(6) "+00:00" -} -]]> - - - - - - diff --git a/reference/mongo/mongodate/tostring.xml b/reference/mongo/mongodate/tostring.xml deleted file mode 100644 index 8ff8aa0c39..0000000000 --- a/reference/mongo/mongodate/tostring.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - MongoDate::__toString - Returns a string representation of this date - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\UTCDateTime::__toString - - - - - - &reftitle.description; - - public stringMongoDate::__toString - - - - Returns a string representation of this date, similar to the representation returned by microtime. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This date. - - - - - diff --git a/reference/mongo/mongodb.xml b/reference/mongo/mongodb.xml deleted file mode 100644 index 3da17a070b..0000000000 --- a/reference/mongo/mongodb.xml +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - The MongoDB class - MongoDB - - - - -
- &reftitle.intro; - - Instances of this class are used to interact with a database. To get a - database: - - Selecting a database - -selectDB("example"); - -?> -]]> - - - Database names can use almost any character in the ASCII range. However, - they cannot contain " ", "." or be the empty string. - The name "system" is also reserved. - - - A few unusual, but valid, database names: "null", "[x,y]", "3", "\"", "/". - - - Unlike collection names, database names may contain "$". - -
- - -
- &reftitle.classsynopsis; - - - - MongoDB - - - - - MongoDB - - - - - &Constants; - - const - int - MongoDB::PROFILING_OFF - 0 - - - const - int - MongoDB::PROFILING_SLOW - 1 - - - const - int - MongoDB::PROFILING_ON - 2 - - - Fields - - public - int - w - 1 - - - public - int - wtimeout - 10000 - - - &Methods; - - - - -
- -
- &reftitle.constants; -
- MongoDB Log Levels - - - - MongoDB::PROFILING_OFF - - - Profiling is off. - - - - - MongoDB::PROFILING_SLOW - - - Profiling is on for slow operations (>100 ms). - - - - - MongoDB::PROFILING_ON - - - Profiling is on for all operations. - - - - -
-
- -
- Fields - - - w - 1 - - - The number of servers to replicate a change to before returning success. - Inherited by instances of MongoCollection derived - from this. w functionality is only available in - version 1.5.1+ of the MongoDB server and 1.0.8+ of the driver. - - - w is used whenever you need to adjust the - acknowledgement level - (MongoCollection::insert, - MongoCollection::update, - MongoCollection::remove, - MongoCollection::save, and - MongoCollection::ensureIndex all support this - option). With the default value (1), an acknowledged operation will return once - the database server has the operation. If the server goes down before - the operation has been replicated to a secondary, it is possible to lose - the operation forever. Thus, you can specify w to be - higher than one and guarantee that at least one secondary has the - operation before it is considered successful. - - - For example, if w is 2, the primary and one secondary - must have a record of the operation or the driver will throw a - MongoCursorException. It is tempting to set - w to the total number of secondaries + primary, but - then if one secondary is down the operation will fail and an exception - will be thrown, so usually w=2 is safest (primary and - one secondary). - - - - - wtimeout - 10000 - - - The number of milliseconds to wait for MongoDB::$w - replications to take place. Inherited by instances of - MongoCollection derived from this. - w functionality is only available in version 1.5.1+ of - the MongoDB server and 1.0.8+ of the driver. - - - Unless wtimeout is set, the server waits forever for - replicating to w servers to finish. The driver - defaults to waiting for 10 seconds, you can change this value to alter - its behavior. - - - - -
- -
- &reftitle.seealso; - - MongoDB core docs on databases. - -
-
- - &reference.mongo.entities.mongodb; - -
- - diff --git a/reference/mongo/mongodb/authenticate.xml b/reference/mongo/mongodb/authenticate.xml deleted file mode 100644 index 4ce587dc01..0000000000 --- a/reference/mongo/mongodb/authenticate.xml +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - MongoDB::authenticate - Log in to this database - - - - - &mongo.noalternative.method.note; - Instead, you need to provide credentials through the connection - string. - - - - - &reftitle.description; - - public arrayMongoDB::authenticate - stringusername - stringpassword - - - This method causes its connection to be authenticated. If authentication is - enabled for the database server (it's not, by default), you need to log in - before the database will allow you to do anything. - - - In general, you should use the authenticate built into - MongoClient::__construct in preference to this method. - If you authenticate on connection and the connection drops and reconnects - during your session, you'll be reauthenticated. If you manually - authenticated using this method and the connection drops, you'll have to call - this method again once you're reconnected. - - - This method is identical to running: - -command(array("getnonce" => 1)); - -$saltedHash = md5($nonce["nonce"]."${username}${hash}"); - -$result = $db->command(array("authenticate" => 1, - "user" => $username, - "nonce" => $nonce["nonce"], - "key" => $saltedHash -)); - -?> -]]> - - - - Once a connection has been authenticated, it can only be un-authenticated by - using the "logout" database command: - -command(array("logout" => 1)); - -?> -]]> - - - - - &reftitle.parameters; - - - - - username - - - - The username. - - - - - - password - - - - The password (in plaintext). - - - - - - - - &reftitle.returnvalues; - - Returns database response. If the login was successful, it will return - - 1); -?> -]]> - - If something went wrong, it will return - - 0, "errmsg" => "auth fails"); -?> -]]> - - ("auth fails" could be another message, depending on database version and what - when wrong). - - - - - &reftitle.seealso; - - MongoDB core docs on authenticate. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - - Emits E_DEPRECATED when used. Please pass in the - authentication details to the constructor. - - - - - - - - - - diff --git a/reference/mongo/mongodb/command.xml b/reference/mongo/mongodb/command.xml deleted file mode 100644 index f0d57b61f2..0000000000 --- a/reference/mongo/mongodb/command.xml +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - MongoDB::command - Execute a database command - - - &reftitle.description; - - public arrayMongoDB::command - arraycommand - arrayoptionsarray() - stringhash - - - Almost everything that is not a CRUD operation can be done with a database - command. Need to know the database version? There's a command for that. - Need to do aggregation? There's a command for that. Need to turn up - logging? You get the idea. - - - This method is identical to: - -selectCollection('$cmd')->findOne($data); -} - -?> -]]> - - - - - &reftitle.parameters; - - - - - command - - - - The query to send. - - - - - - options - - - - An array of options for the index creation. Currently available options - include: - - &mongo.writes.parameters.sockettimeoutms; - - - - The following options are deprecated and should no longer be used: - - &mongo.writes.parameters.timeout; - - - - - - - hash - - - - Set to the connection hash of the server that executed the command. When - the command result is suitable for creating a - MongoCommandCursor, the hash is intended to be - passed to MongoCommandCursor::createFromDocument. - - - The hash will also correspond to a connection returned from - MongoClient::getConnections. - - - - - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.5.0 - - - Renamed the "timeout" option to - "socketTimeoutMS". Emits - E_DEPRECATED when "timeout" is - used. - - - Added hash by-reference parameter. - - - - - PECL mongo 1.2.0 - - Added options parameter with a single option: - "timeout". - - - - - - - - - - &reftitle.returnvalues; - - Returns database response. Every database response is always maximum one - document, which means that the result of a database command can never - exceed 16MB. The resulting document's structure depends on the command, but - most results will have the ok field to indicate success - or failure and results containing an array of each of - the resulting documents. - - - - - &reftitle.examples; - - <function>MongoDB::command</function> "distinct" example - - Finding all of the distinct values for a key. - - -people; - -$people->insert(array("name" => "Joe", "age" => 4)); -$people->insert(array("name" => "Sally", "age" => 22)); -$people->insert(array("name" => "Dave", "age" => 22)); -$people->insert(array("name" => "Molly", "age" => 87)); - -$ages = $db->command(array("distinct" => "people", "key" => "age")); - -foreach ($ages['values'] as $age) { - echo "$age\n"; -} - -?> -]]> - - &example.outputs.similar; - -4 -22 -87 - - - - - <function>MongoDB::command</function> "distinct" example - - Finding all of the distinct values for a key, where the value is larger - than or equal to 18. - - -people; - -$people->insert(array("name" => "Joe", "age" => 4)); -$people->insert(array("name" => "Sally", "age" => 22)); -$people->insert(array("name" => "Dave", "age" => 22)); -$people->insert(array("name" => "Molly", "age" => 87)); - -$ages = $db->command( - array( - "distinct" => "people", - "key" => "age", - "query" => array("age" => array('$gte' => 18)) - ) -); - -foreach ($ages['values'] as $age) { - echo "$age\n"; -} - -?> -]]> - - &example.outputs.similar; - -22 -87 - - - - - <function>MongoDB::command</function> MapReduce example - - Get all users with at least on "sale" event, and how many times each - of these users has had a sale. - - -insert(array("user_id" => $id, - "type" => $type, - "time" => new MongoDate(), - "desc" => $description)); - -// construct map and reduce functions -$map = new MongoCode("function() { emit(this.user_id,1); }"); -$reduce = new MongoCode("function(k, vals) { ". - "var sum = 0;". - "for (var i in vals) {". - "sum += vals[i];". - "}". - "return sum; }"); - -$sales = $db->command(array( - "mapreduce" => "events", - "map" => $map, - "reduce" => $reduce, - "query" => array("type" => "sale"), - "out" => array("merge" => "eventCounts"))); - -$users = $db->selectCollection($sales['result'])->find(); - -foreach ($users as $user) { - echo "{$user['_id']} had {$user['value']} sale(s).\n"; -} - -?> -]]> - - &example.outputs.similar; - -User 47cc67093475061e3d9536d2 had 3 sale(s). -User 49902cde5162504500b45c2c had 14 sale(s). -User 4af467e4fd543cce7b0ea8e2 had 1 sale(s). - - - Using <classname>MongoCode</classname> - - This example uses MongoCode, which can also take a - scope argument. However, at the moment, MongoDB does not support using - scopes in MapReduce. If you would like to use client-side variables in the - MapReduce functions, you can add them to the global scope by using the - optional scope field with the database command. See the - MapReduce documentation - for more information. - - - - The <literal>out</literal> argument - - Before 1.8.0, the out argument was optional. If you did - not use it, MapReduce results would be written to a temporary collection, - which would be deleted when your connection was closed. In 1.8.0+, the - out argument is required. See the - MapReduce documentation - for more information. - - - - - - <function>MongoDB::command</function> "geoNear" example - - This example shows how to use the geoNear command. - - -demo; -$c = $d->poiConcat; - -$r = $d->command(array( - 'geoNear' => "poiConcat", // Search in the poiConcat collection - 'near' => array(-0.08, 51.48), // Search near 51.48°N, 0.08°E - 'spherical' => true, // Enable spherical search - 'num' => 5, // Maximum 5 returned documents -)); -print_r($r); -?> -]]> - - - - - - &reftitle.seealso; - - - MongoCollection::aggregate - MongoCollection::findAndModify - MongoCollection::group - - - - MongoDB core docs on - database commands. - - - - diff --git a/reference/mongo/mongodb/construct.xml b/reference/mongo/mongodb/construct.xml deleted file mode 100644 index 532dcceef8..0000000000 --- a/reference/mongo/mongodb/construct.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - MongoDB::__construct - Creates a new database - - - - &reftitle.description; - - public MongoDB::__construct - MongoClientconn - stringname - - - This method is not meant to be called directly. The preferred way to create - an instance of MongoDB is through MongoClient::__get or - MongoClient::selectDB. - - - If you're ignoring the previous paragraph and want to call it directly you - can do so: - - - -]]> - - - But don't. Isn't this much nicer: - - -mydbname; - -// or, if the name contains weird characters: - -$db = $m->selectDB('my,db:name'); - -?> -]]> - - - - - &reftitle.parameters; - - - - - MongoClient - conn - - - - Database connection. - - - - - - name - - - - Database name. - - - - - - - - - &reftitle.returnvalues; - - Returns the database. - - - - - &reftitle.errors; - - Throws default exception if the database name is invalid. - - - - - diff --git a/reference/mongo/mongodb/createcollection.xml b/reference/mongo/mongodb/createcollection.xml deleted file mode 100644 index 8fa67097a8..0000000000 --- a/reference/mongo/mongodb/createcollection.xml +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - MongoDB::createCollection - Creates a collection - - - &reftitle.description; - - public MongoCollectionMongoDB::createCollection - stringname - arrayoptions - - - - This method is used to create capped collections and other collections - requiring special options. It is identical to running: - -command(array( - "create" => $name, - "capped" => $options["capped"], - "size" => $options["size"], - "max" => $options["max"], - "autoIndexId" => $options["autoIndexId"], -)); - -?> -]]> - - See MongoDB::command for more information about database commands. - - - - - &reftitle.parameters; - - - - - - name - - - - The name of the collection. - - - - - - - options - - - - An array containing options for the collections. Each option is its own - element in the options array, with the option name listed below being - the key of the element. The supported options depend on the MongoDB - server version and storage engine, and the driver passes any option - that you give it straight to the server. A few of the supported options - are, but you can find a full list in the MongoDB core docs on createCollection: - - - - - - capped - - - - If the collection should be a fixed size. - - - - - - size - - - - If the collection is fixed size, its size in bytes. - - - - - - max - - - - If the collection is fixed size, the maximum number of elements to - store in the collection. - - - - - - autoIndexId - - - - If capped is &true; you can specify &false; to disable the - automatic index created on the _id field. - Before MongoDB 2.2, the default value for - autoIndexId was &false;. - - - - - - - - - - - - - &reftitle.returnvalues; - - Returns a collection object representing the new collection. - - - - &reftitle.examples; - - <function>MongoDB::createCollection</function> capped collection example - - A capped collection is a special type of collection that has either a fixed - or a fixed number of elements. Once the collection is "full," the oldest - elements will be removed when new elements are added. Capped collections - can be very useful for applications like logging, where you may want to - reserve a certain amount of space for logs and not worry about them - getting too big. - - - This example creates a very tiny log collection that will keep a maximum of - 10 documents. - - -createCollection( - "logger", - array( - 'capped' => true, - 'size' => 10*1024, - 'max' => 10 - ) -); - -for ($i = 0; $i < 100; $i++) { - $log->insert(array("level" => WARN, "msg" => "sample log message #$i", "ts" => new MongoDate())); -} - -$msgs = $log->find(); - -foreach ($msgs as $msg) { - echo $msg['msg']."\n"; -} - -?> -]]> - - &example.outputs.similar; - -sample log message #90 -sample log message #91 -sample log message #92 -sample log message #93 -sample log message #94 -sample log message #95 -sample log message #96 -sample log message #97 -sample log message #98 -sample log message #99 - - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.4.0 - - - In versions before 1.4.0, the options were all arguments to the method. The - function synopsis in those older versions is: - - - - public MongoCollectionMongoDB::createCollection - stringname - boolcapped&false; - intsize0 - intmax0 - - - - The meaning of the options is the same as described under the - options argument above. - - - - - - - - - - diff --git a/reference/mongo/mongodb/createdbref.xml b/reference/mongo/mongodb/createdbref.xml deleted file mode 100644 index 57a9704594..0000000000 --- a/reference/mongo/mongodb/createdbref.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - MongoDB::createDBRef - Creates a database reference - - - - &reftitle.description; - - public arrayMongoDB::createDBRef - stringcollection - mixeddocument_or_id - - - This method is a flexible interface for creating database refrences (see - MongoDBRef). - - - - - &reftitle.parameters; - - - - - collection - - - - The collection to which the database reference will point. - - - - - - document_or_id - - - - If an array or object is given, its _id field will be - used as the reference ID. If a MongoId or scalar - is given, it will be used as the reference ID. - - - - - - - - - &reftitle.returnvalues; - - Returns a database reference array. - - - If an array without an _id field was provided as the - document_or_id parameter, &null; will be returned. - - - - &reftitle.examples; - - <function>MongoDB::createDBRef</function> example - - Example demonstrating how to programatically create a DB reference array from - a document. - - -articles; - -$article = array( - 'title' => 'Test article', - 'description' => 'Test article description' -); - -$articles->insert($article); -$ref = $db->createDBRef('articles', $article); - -print_r($article); -print_r($ref); -?> -]]> - - &example.outputs.similar; - - Test article - [description] => Test article description - [_id] => MongoId Object - ( - ) - - ) - Array - ( - [$ref] => articles - [$id] => MongoId Object - ( - ) - - ) - ]]> - - - Now the $ref can be stored on another document and retrieved later with - MongoDB::getDBRef or MongoCollection::getDBRef. - - - - <function>MongoDB::createDBRef</function> example - - Example demonstrating how to programatically create a DB reference from just an id. - - -createDBRef('articles', $id); -?> -]]> - - - - - diff --git a/reference/mongo/mongodb/drop.xml b/reference/mongo/mongodb/drop.xml deleted file mode 100644 index 89a96f1c5b..0000000000 --- a/reference/mongo/mongodb/drop.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - MongoDB::drop - Drops this database - - - - &reftitle.description; - - public arrayMongoDB::drop - - - - This drops the database currently being used. - - - This is identical to running: - -command(array("dropDatabase" => 1)); -} - -?> -]]> - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the database response. - - - - - &reftitle.examples; - - <function>MongoDB::drop</function> example - This example demonstrates how to drop a mongo database and the response to expect. - -foo; -$response = $db->drop(); -print_r($response); - -?> -]]> - - &example.outputs.similar; - - foo.$cmd - [ok] => 1 -) -]]> - - - - - - diff --git a/reference/mongo/mongodb/dropcollection.xml b/reference/mongo/mongodb/dropcollection.xml deleted file mode 100644 index 5895fcabff..0000000000 --- a/reference/mongo/mongodb/dropcollection.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - MongoDB::dropCollection - Drops a collection [deprecated] - - - &reftitle.description; - - public arrayMongoDB::dropCollection - mixedcoll - - - - Deprecated - - Use MongoCollection::drop instead. - - - - This function leaks memory in version 1.0.7 and earlier! - - - - - - - &reftitle.parameters; - - - - - coll - - - - MongoCollection or name of collection to drop. - - - - - - - - &reftitle.returnvalues; - - Returns the database response. - - - - diff --git a/reference/mongo/mongodb/execute.xml b/reference/mongo/mongodb/execute.xml deleted file mode 100644 index 15c3553e56..0000000000 --- a/reference/mongo/mongodb/execute.xml +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - MongoDB::execute - Runs JavaScript code on the database server [deprecated] - - - - &reftitle.description; - - public arrayMongoDB::execute - mixedcode - arrayargsarray() - - - - The eval command, - which this method invokes, is deprecated in MongoDB 3.0+. - - - - The Mongo database server runs a JavaScript engine. This method allows you - to run arbitary JavaScript on the database. This can be useful if you want - touch a number of collections lightly, or process some results on the - database side to reduce the amount that has to be sent to the client. - - - Running JavaScript in the database takes a write lock, meaning it blocks - other operations. Make sure you consider this before running a long script. - - - This is a wrapper for the - eval database - command. This method is basically: - -command(array('eval' => $code, 'args' => $args)); -} - -?> -]]> - - - - MongoDB implies a return statement if you have a single statement on a single - line. This can cause some unintuitive behavior. For example, this returns - "foo": - - -execute('"foo";'); - -?> -]]> - - - However, these return &null;: - - -execute('"bar"; "foo";'); // more than one statement - -$db->execute('db.foo.count( -);'); // more than one line - -?> -]]> - - - To avoid surprising behavior, it is best not to depend on MongoDB to decide - what to return, but to explicitly state a return value. In the examples - above, we can change them to: - - -execute('"bar"; return "foo";'); - -$db->execute('return db.foo.count( -);'); - -?> -]]> - - - Now the first statement will return "foo" and the second statement will - return a count of the "foo" collection. - - - - - &reftitle.parameters; - - - - - code - - - - MongoCode or string to execute. - - - - - - args - - - - Arguments to be passed to code. - - - - - - - - - &reftitle.returnvalues; - - Returns the result of the evaluation. - - - - - &reftitle.examples; - - Simple <function>MongoDB::execute</function> example - -execute("function() { return 'Hello, world!'; }"); -echo $response['retval']; - -?> -]]> - - &example.outputs.similar; - -Hello, world! - - - - Parameter <function>MongoDB::execute</function> example - - The optional array of parameters will be passed to the JavaScript function. - - -execute("function(greeting, name) { return greeting+', '+name+'!'; }", array("Good bye", "Joe")); -echo $response['retval']; - -?> -]]> - - &example.outputs.similar; - -Good bye, Joe! - - - - Scope example - - If a MongoCode object is used instead of a string for - the first parameter, a scope can be passed in which the JavaScript will be - executed. - - - "Fred"); - -$code = new MongoCode($func, $scope); - -$response = $db->execute($code, array("Goodbye", "Joe")); -echo $response['retval']; - -?> -]]> - - &example.outputs.similar; - -Goodbye, Joe, says Fred - - - - - - &reftitle.seealso; - - The MongoDB eval command docs - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.7.0 - - This method has been deprecated as a result of the underlaying - eval command - being deprecated in MongoDB 3.0+. - - - - - - - - - diff --git a/reference/mongo/mongodb/forceerror.xml b/reference/mongo/mongodb/forceerror.xml deleted file mode 100644 index c35bbc5037..0000000000 --- a/reference/mongo/mongodb/forceerror.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - MongoDB::forceError - Creates a database error - - - - &reftitle.description; - - public boolMongoDB::forceError - - - - This method is not very useful for normal MongoDB use. It forces a database - error to occur. This means that MongoDB::lastError will - return a generic database error after running this command. - - - This command is identical to running: - -command(array('forceerror' => 1)); -} - -?> -]]> - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the database response. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - diff --git a/reference/mongo/mongodb/get.xml b/reference/mongo/mongodb/get.xml deleted file mode 100644 index d0cf059899..0000000000 --- a/reference/mongo/mongodb/get.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - MongoDB::__get - Gets a collection - - - &reftitle.description; - - public MongoCollectionMongoDB::__get - stringname - - - This is the easiest way of getting a collection from a database object. If a - collection name contains strange characters, you may have to use - MongoDB::selectCollection instead. - -selectDB("foo")->selectCollection("bar"); -$collection = $mongo->foo->bar; - -?> -]]> - - - - - &reftitle.parameters; - - - - - name - - - - The name of the collection. - - - - - - - - &reftitle.returnvalues; - - Returns the collection. - - - - diff --git a/reference/mongo/mongodb/getcollectioninfo.xml b/reference/mongo/mongodb/getcollectioninfo.xml deleted file mode 100644 index 3ea9eba50d..0000000000 --- a/reference/mongo/mongodb/getcollectioninfo.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - MongoDB::getCollectionInfo - Returns information about collections in this database - - - - &reftitle.description; - - public arrayMongoDB::getCollectionInfo - arrayoptionsarray() - - - Gets a list of all collections in the database and returns them as an array - of documents, which contain their names and options. - - &mongo.listcollections.note; - - - - &reftitle.parameters; - - - - options - - - - An array of options for listing the collections. Currently available - options include: - - &mongo.listcollections.parameters.filter; - &mongo.listcollections.parameters.includesystemcollections; - - - - The following option may be used with MongoDB 2.8+: - - &mongo.command.parameters.maxtimems; - - - - - - - - - &reftitle.returnvalues; - - This function returns an array where each element is an array describing a - collection. Elements will contain a name key denoting the - name of the collection, and optionally contain an options - key denoting an array of objects used to create the collection. For example, - capped collections will include capped and - size options. - - - - - &reftitle.errors; - - For MongoDB 2.6 and earlier, MongoException will be - thrown if a non-string value was specified for the - "filter" option's "name" criteria. - - - - - &reftitle.examples; - - <function>MongoDB::getCollectionInfo</function> example - -selectDB("demo"); -var_dump($db->getCollectionInfo()); -?> -]]> - - &example.outputs.similar; - - - array(2) { - ["name"]=> - string(4) "logs" - ["options"]=> - array(2) { - ["capped"]=> - bool(true) - ["size"]=> - int(10240) - } - } - [1]=> - array(2) { - ["name"]=> - string(5) "users" - ["options"]=> - array(1) { - ["flags"]=> - int(1) - } - } -} -]]> - - - - - - &reftitle.seealso; - - - MongoDB::getCollectionNames - MongoDB::listCollections - - - - - - diff --git a/reference/mongo/mongodb/getcollectionnames.xml b/reference/mongo/mongodb/getcollectionnames.xml deleted file mode 100644 index 1f4fb67b6b..0000000000 --- a/reference/mongo/mongodb/getcollectionnames.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - MongoDB::getCollectionNames - Gets an array of names for all collections in this database - - - - &reftitle.description; - - public arrayMongoDB::getCollectionNames - arrayoptionsarray() - - - Gets a list of all collections in the database and returns their names as an - array of strings. - - &mongo.listcollections.note; - - - - &reftitle.parameters; - - - - options - - - - An array of options for listing the collections. Currently available - options include: - - &mongo.listcollections.parameters.filter; - &mongo.listcollections.parameters.includesystemcollections; - - - - The following option may be used with MongoDB 2.8+: - - &mongo.command.parameters.maxtimems; - - - - - - - - - &reftitle.returnvalues; - - Returns the collection names as an array of strings. - - - - - &reftitle.errors; - - For MongoDB 2.6 and earlier, MongoException will be - thrown if a non-string value was specified for the - "filter" option's "name" criteria. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL mongo 1.6.0 - - Changed first parameter to be an array of options. Pre-1.6.0, the - first parameter was a boolean indicating the - "includeSystemCollections" option. - - - - - - - - - &reftitle.examples; - - <function>MongoDB::getCollectionNames</function> example - -selectDB("demo"); -$collections = $db->getCollectionNames(); - -foreach ($collections as $collectionName) { - echo "Found collection: ", $collectionName, "\n"; -} -?> -]]> - - &example.outputs.similar; - - - - - - - - &reftitle.seealso; - - - MongoDB::listCollections - MongoDB::getCollectionInfo - - - - - - - diff --git a/reference/mongo/mongodb/getdbref.xml b/reference/mongo/mongodb/getdbref.xml deleted file mode 100644 index ab7e7c6ceb..0000000000 --- a/reference/mongo/mongodb/getdbref.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - MongoDB::getDBRef - Fetches the document pointed to by a database reference - - - - &reftitle.description; - - public arrayMongoDB::getDBRef - arrayref - - - - - &reftitle.parameters; - - - - - ref - - - - A database reference. - - - - - - - - - &reftitle.returnvalues; - - Returns the document pointed to by the reference. - - - - &reftitle.examples; - - <function>MongoDB::getDBRef</function> example - - Example demonstrating how to get a database reference and what the expected - input is. - - - 'profiles', - '$id' => new MongoId('47cc67093475061e3d9536d2') - ); - - $profile = $db->getDBRef($ref); - ?> - ]]> - - - See MongoDB::createDBRef for more information about how to programatically create DB references. - - - - - diff --git a/reference/mongo/mongodb/getgridfs.xml b/reference/mongo/mongodb/getgridfs.xml deleted file mode 100644 index 1060a7eb98..0000000000 --- a/reference/mongo/mongodb/getgridfs.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - MongoDB::getGridFS - Fetches toolkit for dealing with files stored in this database - - - - &reftitle.description; - - public MongoGridFSMongoDB::getGridFS - stringprefix"fs" - - - - - &reftitle.parameters; - - - - - prefix - - - - The prefix for the files and chunks collections. - - - - - - - - - &reftitle.returnvalues; - - Returns a new gridfs object for this database. - - - - - &reftitle.examples; - - <function>MongoDB::getGridFS</function> example - This example demonstrates how get a MongoGridFS instance. - -my_db; - -$prefix = 'files'; -$collection = $db->getGridFS($prefix); - -?> -]]> - - - Read more about the MongoGridFS to learn how to store files with MongoDB. - - - - - - diff --git a/reference/mongo/mongodb/getprofilinglevel.xml b/reference/mongo/mongodb/getprofilinglevel.xml deleted file mode 100644 index e156f876d8..0000000000 --- a/reference/mongo/mongodb/getprofilinglevel.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - MongoDB::getProfilingLevel - Gets this database's profiling level - - - - &reftitle.description; - - public intMongoDB::getProfilingLevel - - - - This returns the current database profiling level. - - - The database profiler tracks query execution times. If you turn it on (say, - using MongoDB::setProfilingLevel or the shell), you can - see how many queries took longer than a given number of milliseconds or the - timing for all queries. - - - Note that profiling slows down queries, so it is better to use in development - or testing than in a time-sensitive application. - - - This function is equivalent to running: - -command(array('profile' => -1)); -} - -?> -]]> - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the profiling level. - - - - - &reftitle.seealso; - - MongoDB core docs on profiling - MongoDB::setProfilingLevel - - - - diff --git a/reference/mongo/mongodb/getreadpreference.xml b/reference/mongo/mongodb/getreadpreference.xml deleted file mode 100644 index 633f0cdc48..0000000000 --- a/reference/mongo/mongodb/getreadpreference.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - MongoDB::getReadPreference - Get the read preference for this database - - - - &reftitle.description; - - public arrayMongoDB::getReadPreference - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - &mongo.getreadpreference.returnvalues; - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.3.3 - - The return value has changed to be consistent with - MongoDB::setReadPreference. The - type value was changed from a number to a string, - type_string was removed, and - tagsets now expresses tags as key/value pairs instead - of colon-delimited strings. - - - - - - - - - - &reftitle.examples; - - <methodname>MongoDB::getReadPreference</methodname> return value example - -test; -$db->setReadPreference(MongoClient::RP_SECONDARY, array( - array('dc' => 'east', 'use' => 'reporting'), - array('dc' => 'west'), - array(), -)); -var_dump($db->getReadPreference()); -?> -]]> - - &example.outputs; - - - string(9) "secondary" - ["tagsets"]=> - array(3) { - [0]=> - array(2) { - ["dc"]=> - string(4) "east" - ["use"]=> - string(9) "reporting" - } - [1]=> - array(1) { - ["dc"]=> - string(7) "west" - } - [2]=> - array(0) { - } - } -} -]]> - - - - - - &reftitle.seealso; - - The read preferences documentation. - MongoDB::setReadPreference - - - - - - diff --git a/reference/mongo/mongodb/getslaveokay.xml b/reference/mongo/mongodb/getslaveokay.xml deleted file mode 100644 index 89290f9ee4..0000000000 --- a/reference/mongo/mongodb/getslaveokay.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - MongoDB::getSlaveOkay - Get slaveOkay setting for this database - - - - &reftitle.description; - - public boolMongoDB::getSlaveOkay - - - - - See the query section of this manual for - information on distributing reads to secondaries. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the value of slaveOkay for this instance. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.seealso; - - - MongoDB::getReadPreference - MongoDB::setReadPreference - - - - - - diff --git a/reference/mongo/mongodb/getwriteconcern.xml b/reference/mongo/mongodb/getwriteconcern.xml deleted file mode 100644 index 2032a85e6a..0000000000 --- a/reference/mongo/mongodb/getwriteconcern.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - MongoDB::getWriteConcern - Get the write concern for this database - - - - &reftitle.description; - - public arrayMongoDB::getWriteConcern - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - &mongo.getwriteconcern.returnvalues; - - - - &reftitle.examples; - - <methodname>MongoDB::getWriteConcern</methodname> return value example - - 500)); -$db = $mc->selectDB('test'); -var_dump($db->getWriteConcern()); - -$db->setWriteConcern(1, 1000); -var_dump($db->getWriteConcern()); -?> -]]> - - &example.outputs; - - - int(1) - ["wtimeout"]=> - int(500) -} -array(2) { - ["w"]=> - int(1) - ["wtimeout"]=> - int(1000) -} -]]> - - - - - - &reftitle.seealso; - - The write concern documentation. - MongoDB::setWriteConcern - - - - - - diff --git a/reference/mongo/mongodb/lasterror.xml b/reference/mongo/mongodb/lasterror.xml deleted file mode 100644 index 7a0599cb84..0000000000 --- a/reference/mongo/mongodb/lasterror.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - MongoDB::lastError - Check if there was an error on the most recent db operation performed - - - - &reftitle.description; - - public arrayMongoDB::lastError - - - - This method is equivalent to: - -command(array('getlasterror' => 1)); -} - -?> -]]> - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the error, if there was one. - - - - - &reftitle.examples; - - <function>MongoDB::lastError</function> &null; error example - -resetError(); -var_dump($db->lastError()); -?> -]]> - - &example.outputs.similar; - - - NULL - ["n"]=> - int(0) - ["ok"]=> - float(1) -} -]]> - - - - <function>MongoDB::lastError</function> duplicate key example - -selectCollection("foo"); - -// insert two documents with the same _id -$c->insert(array("_id" => 1)); -$c->insert(array("_id" => 1)); - -var_dump($db->lastError()); -?> -]]> - - &example.outputs.similar; - - - string(64) "E11000 duplicate key errorindex: foo.foo.$_id_ dup key: { : 1 }" - ["n"]=> - int(0) - ["ok"]=> - float(1) -} -]]> - - - - - diff --git a/reference/mongo/mongodb/listcollections.xml b/reference/mongo/mongodb/listcollections.xml deleted file mode 100644 index c8bf548cdb..0000000000 --- a/reference/mongo/mongodb/listcollections.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - MongoDB::listCollections - Gets an array of MongoCollection objects for all collections in this database - - - - &reftitle.description; - - public arrayMongoDB::listCollections - arrayoptionsarray() - - - Gets a list of all collections in the database and returns them as an array - of MongoCollection objects. - - &mongo.listcollections.note; - - - - &reftitle.parameters; - - - - options - - - - An array of options for listing the collections. Currently available - options include: - - &mongo.listcollections.parameters.filter; - &mongo.listcollections.parameters.includesystemcollections; - - - - The following option may be used with MongoDB 2.8+: - - &mongo.command.parameters.maxtimems; - - - - - - - - - &reftitle.returnvalues; - - Returns an array of MongoCollection objects. - - - - - &reftitle.errors; - - For MongoDB 2.6 and earlier, MongoException will be - thrown if a non-string value was specified for the - "filter" option's "name" criteria. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL mongo 1.6.0 - - Changed first parameter to be an array of options. Pre-1.6.0, the - first parameter was a boolean indicating the - "includeSystemCollections" option. - - - - PECL mongo 1.3.0 - - Added the includeSystemCollections parameter. - - - - - - - - - &reftitle.examples; - - <function>MongoDB::listCollections</function> example - - The following example demonstrates running count on each collection in a database. - - -selectDB("demo"); -$collections = $db->listCollections(); - -foreach ($collections as $collection) { - echo "amount of documents in $collection: "; - echo $collection->count(), "\n"; -} - -?> -]]> - - &example.outputs.similar; - - - - - - - - &reftitle.seealso; - - - MongoDB::getCollectionNames - MongoDB::getCollectionInfo - - - - - diff --git a/reference/mongo/mongodb/preverror.xml b/reference/mongo/mongodb/preverror.xml deleted file mode 100644 index 8cf09e0800..0000000000 --- a/reference/mongo/mongodb/preverror.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - MongoDB::prevError - Checks for the last error thrown during a database operation - - - - &reftitle.description; - - public arrayMongoDB::prevError - - - - MongoDB::lastError is usually preferred to this. This - method returns the last database error that occurred and how many operations - ago it occurred. It is mostly deprecated. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the error and the number of operations ago it occurred. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - - diff --git a/reference/mongo/mongodb/repair.xml b/reference/mongo/mongodb/repair.xml deleted file mode 100644 index b67a825f88..0000000000 --- a/reference/mongo/mongodb/repair.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - MongoDB::repair - Repairs and compacts this database - - - - &reftitle.description; - - public arrayMongoDB::repair - boolpreserve_cloned_files&false; - boolbackup_original_files&false; - - - This creates a fresh copy of all database data. It will remove any corrupt - data and compact and large stretches of free space it finds. This is a very - slow operation on a large database. - - - This is usually run from the shell or the command line, not the driver. - - - It is equivalent to the function: - -command(array('repairDatabase' => 1)); -} - -?> -]]> - - - - - - &reftitle.parameters; - - - - - preserve_cloned_files - - - - If cloned files should be kept if the repair fails. - - - - - - backup_original_files - - - - If original files should be backed up. - - - - - - - - - &reftitle.returnvalues; - - Returns db response. - - - - - &reftitle.seealso; - - MongoDB core docs on repairDatabase. - - - - - &reftitle.examples; - - <function>MongoDB::repair</function> example - This example demonstrates how to repare and compact a database. - -foo; - -$response = $db->repair(); -print_r($response); - -?> -]]> - - &example.outputs.similar; - - 1 -) -]]> - - - - - - diff --git a/reference/mongo/mongodb/reseterror.xml b/reference/mongo/mongodb/reseterror.xml deleted file mode 100644 index d13f564997..0000000000 --- a/reference/mongo/mongodb/reseterror.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - MongoDB::resetError - Clears any flagged errors on the database - - - - &reftitle.description; - - public arrayMongoDB::resetError - - - - This method is not used in normal operations. It resets the database error - tracker (which can be incremented with - MongoDB::forceError, also not normally used). - - - It is equivalent to running: - -command(array('reseterror' => 1)); -} - -?> -]]> - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the database response. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - diff --git a/reference/mongo/mongodb/selectcollection.xml b/reference/mongo/mongodb/selectcollection.xml deleted file mode 100644 index 656e9af710..0000000000 --- a/reference/mongo/mongodb/selectcollection.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - MongoDB::selectCollection - Gets a collection - - - &reftitle.description; - - public MongoCollectionMongoDB::selectCollection - stringname - - - - - &reftitle.parameters; - - - - - name - - - - The collection name. - - - - - - - - - &reftitle.returnvalues; - - Returns a new collection object. - - - - - &reftitle.errors; - - Throws Exception if the collection name is invalid. - - - - - diff --git a/reference/mongo/mongodb/setprofilinglevel.xml b/reference/mongo/mongodb/setprofilinglevel.xml deleted file mode 100644 index b6234c020a..0000000000 --- a/reference/mongo/mongodb/setprofilinglevel.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - MongoDB::setProfilingLevel - Sets this database's profiling level - - - - &reftitle.description; - - public intMongoDB::setProfilingLevel - intlevel - - - This changes the current database profiling level. - - - This function is equivalent to running: - -command(array('profile' => $level)); -} - -?> -]]> - - - - The options for level are 0 (off), 1 (queries > 100ms), and 2 (all queries). - If you would like to profile queries that take longer than another time - period, use the database command and pass it a second option, the number of - milliseconds. For example, to profile all queries that take longer than one - second, run: - -command(array('profile' => 1, 'slowms' => 1000)); - -?> -]]> - - - - Profiled queries will appear in the system.profile - collection of this database. - - - - - &reftitle.parameters; - - - - - level - - - - Profiling level. - - - - - - - - - &reftitle.returnvalues; - - Returns the previous profiling level. - - - - - &reftitle.seealso; - - MongoDB core docs on profiling - MongoDB::getProfilingLevel - - - - diff --git a/reference/mongo/mongodb/setreadpreference.xml b/reference/mongo/mongodb/setreadpreference.xml deleted file mode 100644 index a99cbc3627..0000000000 --- a/reference/mongo/mongodb/setreadpreference.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - MongoDB::setReadPreference - Set the read preference for this database - - - - &reftitle.description; - - public boolMongoDB::setReadPreference - stringread_preference - arraytags - - - - - &reftitle.parameters; - &mongo.setreadpreference.parameters; - - - - &reftitle.returnvalues; - &mongo.setreadpreference.returnvalues; - - - - &reftitle.errors; - &mongo.setreadpreference.errors; - - - - &reftitle.examples; - - <methodname>MongoDB::setReadPreference</methodname> tag set array syntax example - -test; - -// Prefer the nearest server in the "east" data center also used for reporting, -// but fall back to a server in the "west" data center -$db->setReadPreference(MongoClient::RP_NEAREST, array( - array('dc' => 'east', 'use' => 'reporting'), - array('dc' => 'west'), -)); -?> -]]> - - - - - - &reftitle.seealso; - - The read preferences documentation. - MongoDB::getReadPreference - - - - - - diff --git a/reference/mongo/mongodb/setslaveokay.xml b/reference/mongo/mongodb/setslaveokay.xml deleted file mode 100644 index af3a6c9b4d..0000000000 --- a/reference/mongo/mongodb/setslaveokay.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - MongoDB::setSlaveOkay - Change slaveOkay setting for this database - - - - &reftitle.description; - - public boolMongoDB::setSlaveOkay - boolok&true; - - - - See the query section of this manual for - information on distributing reads to secondaries. - - - - - &reftitle.parameters; - - - - - ok - - - - If reads should be sent to secondary members of a replica set for all - possible queries using this MongoDB instance. - - - - - - - - - &reftitle.returnvalues; - - Returns the former value of slaveOkay for this instance. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.seealso; - - - MongoDB::setReadPreference - MongoDB::getReadPreference - - - - - - diff --git a/reference/mongo/mongodb/setwriteconcern.xml b/reference/mongo/mongodb/setwriteconcern.xml deleted file mode 100644 index 895e0d2b73..0000000000 --- a/reference/mongo/mongodb/setwriteconcern.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - MongoDB::setWriteConcern - Set the write concern for this database - - - - &reftitle.description; - - public boolMongoDB::setWriteConcern - mixedw - intwtimeout - - - - - &reftitle.parameters; - &mongo.setwriteconcern.parameters; - - - - &reftitle.returnvalues; - &mongo.setwriteconcern.returnvalues; - - - - &reftitle.errors; - &mongo.setwriteconcern.errors; - - - - &reftitle.examples; - - <methodname>MongoDB::setWriteConcern</methodname> example - -selectDB('test'); - -// Require that the majority of servers in the replica set acknowledge writes -// within three seconds. -$db->setWriteConcern('majority', 3000); -?> -]]> - - - - - - &reftitle.seealso; - - The write concern documentation. - MongoDB::getWriteConcern - - - - - - diff --git a/reference/mongo/mongodb/tostring.xml b/reference/mongo/mongodb/tostring.xml deleted file mode 100644 index ae103de469..0000000000 --- a/reference/mongo/mongodb/tostring.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - MongoDB::__toString - The name of this database - - - - &reftitle.description; - - public stringMongoDB::__toString - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns this database's name. - - - - diff --git a/reference/mongo/mongodbref.xml b/reference/mongo/mongodbref.xml deleted file mode 100644 index 8fc3d9627f..0000000000 --- a/reference/mongo/mongodbref.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - The MongoDBRef class - MongoDBRef - - - - - &mongo.noalternative.class.note; - - The concept of database references, and hence this class, has been - deprecated in the database. - - - - -
- &reftitle.intro; - - This class can be used to create lightweight links between objects in - different collections. - - - Motivation: Suppose we need to refer to a document in - another collection. The easiest way is to create a field in the current - document. For example, if we had a "people" collection and an "addresses" - collection, we might want to create a link between each person document and - an address document: - - Linking documents - -people; -$addresses = $db->addresses; - -$myAddress = array("line 1" => "123 Main Street", - "line 2" => null, - "city" => "Springfield", - "state" => "Vermont", - "country" => "USA"); - -// save the address -$addresses->insert($myAddress); - -// save a person with a reference to the address -$me = array("name" => "Fred", "address" => $myAddress['_id']); -$people->insert($me); - -?> -]]> - - - - - Then, later on, we can find the person's address by querying the "addresses" - collection with the MongoId we saved in the "people" - collection. - - - Suppose now that we have a more general case, where we don't know which - collection (or even which database) contains the referenced document. - MongoDBRef is a good choice for this case, as it is a - common format that all of the drivers and the database understand. - - - If each person had a list of things they liked which could come from - multiple collections, such as "hobbies", "sports", "books", etc., we could - use MongoDBRefs to keep track of what "like" went - with what collection: - - Creating MongoDBRef links - -selectCollection("people"); - -// model trains are in the "hobbies" collection -$trainRef = MongoDBRef::create("hobbies", $modelTrains['_id']); -// soccer is in the "sports" collection -$soccerRef = MongoDBRef::create("sports", $soccer['_id']); - -// now we'll know what collections the items in the "likes" array came from when -// we retrieve this document -$people->insert(array("name" => "Fred", "likes" => array($trainRef, $soccerRef))); - -?> -]]> - - - - - Database references can be thought of as hyperlinks: they give the unique - address of another document, but they do not load it or automatically follow - the link/reference. - - - A database reference is just a normal associative array, not an instance of - MongoDBRef, so this class is a little different than - the other data type classes. This class contains exclusively static methods - for manipulating database references. - -
- - -
- &reftitle.classsynopsis; - - - - MongoDBRef - - - - - MongoDBRef - - - - - &Methods; - - - - -
- -
- &reftitle.seealso; - - MongoDB core docs on databases references. - -
-
- - &reference.mongo.entities.mongodbref; - -
- - diff --git a/reference/mongo/mongodbref/create.xml b/reference/mongo/mongodbref/create.xml deleted file mode 100644 index 70675d0c42..0000000000 --- a/reference/mongo/mongodbref/create.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - MongoDBRef::create - Creates a new database reference - - - - - &mongo.noalternative.class.note; - - The concept of database references, and hence this class, has been - deprecated. - - - - - - &reftitle.description; - - public static arrayMongoDBRef::create - stringcollection - mixedid - stringdatabase - - - If no database is given, the current database is used. - - - - - &reftitle.parameters; - - - - - collection - - - - Collection name (without the database name). - - - - - - id - - - - The _id field of the object to which to link. - - - - - - database - - - - Database name. - - - - - - - - - &reftitle.returnvalues; - - Returns the reference. - - - - - &reftitle.examples; - - <function>MongoDBRef::create</function> example - - This creates a database reference to a document in the - addresses collection. The - MongoCollection::getName function returns the name of - the collection (not including the database name). - - -addresses; -$people = $db->people; - -// save $address so it has an _id -$addresses->insert($address); - -// create a reference -$ref = MongoDBRef::create($addresses->getName(), $address['_id']); - -// set the field in $person -$person['address'] = $ref; -$people->save($person); -?> -]]> - - - - - - &reftitle.seealso; - - - MongoDB::createDBRef - MongoCollection::createDBRef - - - - - - diff --git a/reference/mongo/mongodbref/get.xml b/reference/mongo/mongodbref/get.xml deleted file mode 100644 index 8e5b084c69..0000000000 --- a/reference/mongo/mongodbref/get.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - MongoDBRef::get - Fetches the object pointed to by a reference - - - - - &mongo.noalternative.class.note; - - The concept of database references, and hence this class, has been - deprecated. - - - - - - &reftitle.description; - - public static arrayMongoDBRef::get - MongoDBdb - arrayref - - - - - &reftitle.parameters; - - - - - db - - - - Database to use. - - - - - - ref - - - - Reference to fetch. - - - - - - - - - &reftitle.returnvalues; - - Returns the document to which the reference refers or &null; if the document - does not exist (the reference is broken). - - - - - &reftitle.examples; - - <function>MongoCollection::createDBRef</function> example - -findOne(); - -// dereference the address -$address = MongoDBRef::get($people->db, $person['address']); - -?> -]]> - - - - - - &reftitle.seealso; - - - MongoDB::getDBRef - MongoCollection::getDBRef - - - - - - diff --git a/reference/mongo/mongodbref/isref.xml b/reference/mongo/mongodbref/isref.xml deleted file mode 100644 index de82a82bb7..0000000000 --- a/reference/mongo/mongodbref/isref.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - MongoDBRef::isRef - Checks if an array is a database reference - - - - - &mongo.noalternative.class.note; - - The concept of database references, and hence this class, has been - deprecated. - - - - - - &reftitle.description; - - public static boolMongoDBRef::isRef - mixedref - - - This method does not actually follow the reference, so it does not determine if it is - broken or not. It merely checks that ref is in valid - database reference format (in that it is an object or array with $ref and $id - fields). - - - - - &reftitle.parameters; - - - - - ref - - - - Array or object to check. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - diff --git a/reference/mongo/mongodeletebatch.xml b/reference/mongo/mongodeletebatch.xml deleted file mode 100644 index 0603d348f3..0000000000 --- a/reference/mongo/mongodeletebatch.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - The MongoDeleteBatch class - MongoDeleteBatch - - - - -
- &reftitle.intro; - - Constructs a batch of DELETE operations. See MongoWriteBatch. - -
- - -
- &reftitle.classsynopsis; - - - - MongoDeleteBatch - - - - - MongoDeleteBatch - - - - extends - MongoWriteBatch - - - - - &Methods; - - - &InheritedMethods; - - - - - -
- -
- - &reference.mongo.entities.mongodeletebatch; - -
- - diff --git a/reference/mongo/mongodeletebatch/construct.xml b/reference/mongo/mongodeletebatch/construct.xml deleted file mode 100644 index fabddf4e5b..0000000000 --- a/reference/mongo/mongodeletebatch/construct.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - MongoDeleteBatch::__construct - Description - - - - &reftitle.description; - - public MongoDeleteBatch::__construct - MongoCollectioncollection - arraywrite_options - - - Constructs a batch of DELETE operations. See MongoWriteBatch. - - - - - - &reftitle.parameters; - - - collection - &mongo.mongowritebatch.collection.description; - - - write_options - &mongo.mongowritebatch.writeoptions.description; - - - - - - &reftitle.returnvalues; - - A new MongoDeleteBatch. - - - - - - - diff --git a/reference/mongo/mongoduplicatekeyexception.xml b/reference/mongo/mongoduplicatekeyexception.xml deleted file mode 100644 index 5d742f2e84..0000000000 --- a/reference/mongo/mongoduplicatekeyexception.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - The MongoDuplicateKeyException class - MongoDuplicateKeyException - - - - -
- &reftitle.intro; - - Thrown when attempting to insert a document into a collection which already contains the same values for the unique keys. - -
- - -
- &reftitle.classsynopsis; - - - - MongoDuplicateKeyException - - - - - MongoDuplicateKeyException - - - - extends - MongoWriteConcernException - - - - &InheritedProperties; - - - - &InheritedMethods; - - - - - -
- -
- &reftitle.examples; - - Catching MongoDuplicateKeyException - -selectCollection("test", "test"); - -$c->insert(array('_id' => 1)); -try { - $c->insert(array('_id' => 1)); -} catch (MongoWriteConcernException $e) { - echo $e->getMessage(), "\n"; -} -?> -]]> - - &examples.outputs.similar; - - - - -
- -
- -
- - diff --git a/reference/mongo/mongoexception.xml b/reference/mongo/mongoexception.xml deleted file mode 100644 index 1ae1c1920c..0000000000 --- a/reference/mongo/mongoexception.xml +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - The MongoException class - MongoException - - - - -
- &reftitle.intro; - - Default Mongo exception. - - - - This covers a bunch of different error conditions that may eventually be - moved to more specific exceptions, but will always extend - MongoException. - - - - - - - The MongoSomething object has not been correctly initialized by its constructor - - - Code: 0 - - - Probably your Mongo object is not connected to a database server. - - - - - - zero-length keys are not allowed, did you use $ with double quotes? - - - Code: 1 - - - You tried to save "" as a key. You generally should not do this. "" can - mess up subobject access and is used by MongoDB internally. However, if - you really want, you can set - mongo.allow_empty_keys - to true in your php.ini file to override this sanity check. If you - override this, it is highly recommended that you set error checking to - strict to avoid string interpolation errors. - - - - - - '.' not allowed in key: <key> - - - Code: 2 - - - You attempted to write a key with '.' in it, which is prohibited. - - - - - - insert too large: <size>, max: <max> - - - Code: 3 - - - You're attempting to send too much data to the database at once: the - database will only accept inserts up to a certain size (currently 16 MB). - - - - - - no elements in doc - - - Code: 4 - - - You're attempting to save a document with no fields. - - - - - - size of BSON doc is <size> bytes, max <max>MB - - - Code: 5 - - - You're attempting to save a document that is larger than MongoDB can save. - - - - - - no documents given - - - Code: 6 - - - You're attempting to batch insert an empty array of documents. - - - - - - MongoCollection::group takes an array, object, or MongoCode key - - - Code: 7 - - - Wrong type parameter send to MongoCollection::group. - - - - - - field names must be strings - - - Code: 8 - - - You should format field selectors as - array("field1" => 1, "field2" => 1, ..., "fieldN" => 1). - - - - - - invalid regex - - - Code: 9 - - - The regex passed to MongoRegex is not of the - correct form. - - - - - - MongoDBRef::get: $ref field must be a string - - - Code: 10 - - - - - - MongoDBRef::get: $db field must be a string - - - Code: 11 - - - - - - non-utf8 string: <str> - - - Code: 12 - - - This error occurs if you attempt to send a non-utf8 string to the - database. All strings going into the database should be UTF8. See php.ini - options for the transition option of quieting this exception. - - - - - - mutex error: <err> - - - Code: 13 - - - The driver uses mutexes for synchronizing requests and responses in - multithreaded environments. This is a fairly serious error and may not - have a stack trace. It's unusual and should be reported to maintainers - with any system information and steps to reproduce that you can provide. - - - - - - index name too long: <len>, max <max> characters - - - Code: 14 - - - Indexes with names longer than 128 characters cannot be created. If you - get this error, you should use - MongoCollection::ensureIndex's "name" option to - create a shorter name for your index. - - - - -
- - -
- &reftitle.classsynopsis; - - - - MongoException - - - - - MongoException - - - extends - Exception - - - - - - - -
- -
- -
- - diff --git a/reference/mongo/mongoexecutiontimeoutexception.xml b/reference/mongo/mongoexecutiontimeoutexception.xml deleted file mode 100644 index 0f73c9c7ed..0000000000 --- a/reference/mongo/mongoexecutiontimeoutexception.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - The MongoExecutionTimeoutException class - MongoExecutionTimeoutException - - - - -
- &reftitle.intro; - - Thrown when a operation times out server side (i.e. in MongoDB). - - - To configure the operation timeout threshold, use - MongoCursor::maxTimeMS or the - "maxTimeMS" command option. - -
- - -
- &reftitle.classsynopsis; - - - - MongoExecutionTimeoutException - - - - - MongoExecutionTimeoutException - - - - extends - MongoException - - - - &InheritedProperties; - - - - - -
- -
- -
- - diff --git a/reference/mongo/mongogridfs.xml b/reference/mongo/mongogridfs.xml deleted file mode 100644 index 1ad46ac9d7..0000000000 --- a/reference/mongo/mongogridfs.xml +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - The MongoGridFS class - MongoGridFS - - - - -
- &reftitle.intro; - - Utilities for storing and retrieving files from the database. - - - - GridFS is a storage specification all supported drivers implement. - Basically, it defines two collections: files, for file - metadata, and chunks, for file content. If the file is - large, it will automatically be split into smaller chunks and each chunk - will be saved as a document in the chunks collection. - - - - Each document in the files collection contains the filename, upload date, - and md5 hash. It also contains a unique _id field, which - can be used to query the chunks collection for the file's content. Each - document in the chunks collection contains a chunk of binary data, a - files_id field that matches its file's - _id, and the position of this chunk in the overall file. - - - - For example, the files document is something like: - - 123456789, "filename" => "foo.txt", "chunkSize" => 3, "length" => 12); -?> -]]> - - and the chunks documents look like: - - 123456789, "n" => 0, "data" => new MongoBinData("abc")); -array("files_id" => 123456789, "n" => 1, "data" => new MongoBinData("def")); -array("files_id" => 123456789, "n" => 2, "data" => new MongoBinData("ghi")); -array("files_id" => 123456789, "n" => 3, "data" => new MongoBinData("jkl")); -?> -]]> - - Of course, the default chunk size is thousands of bytes, but that makes an unwieldy example. - -
- -
- Inter-Language Compatibility - - You should be able to use any files created by MongoGridFS with any other - drivers, and vice versa. However, some drivers expect that all metadata - associated with a file be in a "metadata" field. If you're going to be - using other languages, it's a good idea to wrap info you might want them to - see in a "metadata" field. For example, instead of: - - -storeFile("somefile.txt", array("date" => new MongoDate())); - -?> -]]> - - - use something like: - - -storeFile("somefile.txt", array("metadata" => array("date" => new MongoDate()))); - -?> -]]> - -
- -
- The <classname>MongoGridFS</classname> Family - - - MongoGridFS represents the files and chunks - collections. MongoGridFS extends MongoCollection, - and an instance of MongoGridFS has access to all of - MongoCollection methods, which act on the files - collection: - - -getGridFS(); -$grid->update(array("filename" => "foo"), $newObj); // update on the files collection - -?> -]]> - - - - - - Another example of manipulating metadata: - - -storeFile("game.tgz"); -$game = $grid->findOne(); - -// add a downloads counter -$game->file['downloads'] = 0; -$grid->save($game->file); - -// increment the counter -$grid->update(array("_id" => $id), array('$inc' => array("downloads" => 1))); - -?> -]]> - - - - - - You can also access the chunks collection from an instance of - MongoGridFS: - - -chunks; // $chunks is a normal MongoCollection -$chunks->insert(array("x" => 4)); - -?> -]]> - - - - - There are some methods for MongoGridFS with the same - name as MongoCollection methods, that behave - slightly differently. For example, MongoGridFS::remove - will remove any objects that match the criteria from the files collection - and their content from the chunks collection. - - - - To store something new in GridFS, there are a couple options. If you have - a filename, you can say: - - -storeFile($filename, array("whatever" => "metadata", "you" => "want")); - -?> -]]> - - - - - - If you have a string of bytes that isn't a file, you can also store that - using MongoGridFS::storeBytes: - - -storeBytes($bytes, array("whatever" => "metadata", "you" => "want")); - -?> -]]> - - - - - - Querying a MongoGridFS collection returns a - MongoGridFSCursor, which behaves like a normal - MongoCursor except that it returns - MongoGridFSFiles instead of associative arrays. - - - - MongoGridFSFiles can be written back to disc using - MongoGridFSFile::write or retrieved in memory using - MongoGridFSFile::getBytes. There is currently no - method that automatically streams chunks, but it would be fairly easy to - write by querying the $grid->chunks collection. - - - - MongoGridFSFile objects contain a field file which - contains any file metadata. - -
- - -
- &reftitle.classsynopsis; - - - - MongoGridFS - - - - - extends - MongoCollection - - - - - Fields - - public - MongoCollection - chunks - &null; - - - protected - string - filesName - &null; - - - protected - string - chunksName - &null; - - - &Methods; - - - - -
- -
- &reftitle.seealso; - - MongoDB core docs on GridFS - LightCube Solutions blog post on saving user uploads - LightCube Solutions blog post on adding metadata to files - -
-
- - &reference.mongo.entities.mongogridfs; - -
- - diff --git a/reference/mongo/mongogridfs/construct.xml b/reference/mongo/mongogridfs/construct.xml deleted file mode 100644 index aae73b99c2..0000000000 --- a/reference/mongo/mongogridfs/construct.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - MongoGridFS::__construct - Creates new file collections - - - &reftitle.description; - - public MongoGridFS::__construct - MongoDBdb - stringprefix"fs" - mixedchunks"fs" - - - - Files as stored across two collections, the first containing file meta information, the - second containing chunks of the actual file. By default, fs.files and fs.chunks are the - collection names used. - - - Use one argument to specify a prefix other than "fs": - - uses myfiles.files and myfiles.chunks collections. - - - - - &reftitle.parameters; - - - - - db - - - - Database. - - - - - - files - - - - Optional collection name prefix. - - - - - - - - diff --git a/reference/mongo/mongogridfs/delete.xml b/reference/mongo/mongogridfs/delete.xml deleted file mode 100644 index 823f951169..0000000000 --- a/reference/mongo/mongogridfs/delete.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - MongoGridFS::delete - Remove a file and its chunks from the database - - - - &reftitle.description; - - public boolarrayMongoGridFS::delete - mixedid - - - - - MongoGridFS::delete is a convenience method for - calling MongoGridFS::remove with specific - criteria and default options - parameters. - - - - - - &reftitle.parameters; - - - - - id - - - - _id of the file to remove. - - - - - - - - - &reftitle.returnvalues; - - Returns an array containing the status of the removal (with respect to the - files collection) if a - write concern is applied. - Otherwise, returns &true;. - - - Fields in the status array are described in the documentation for - MongoCollection::insert. - - - - - &reftitle.errors; - &mongo.errors.exceptions.writeconcern; - - - - diff --git a/reference/mongo/mongogridfs/drop.xml b/reference/mongo/mongogridfs/drop.xml deleted file mode 100644 index 1efc6a25d8..0000000000 --- a/reference/mongo/mongogridfs/drop.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - MongoGridFS::drop - Drops the files and chunks collections - - - - &reftitle.description; - - public arrayMongoGridFS::drop - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The database response. - - - - - diff --git a/reference/mongo/mongogridfs/find.xml b/reference/mongo/mongogridfs/find.xml deleted file mode 100644 index bf02a15518..0000000000 --- a/reference/mongo/mongogridfs/find.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - MongoGridFS::find - Queries for files - - - - &reftitle.description; - - public MongoGridFSCursorMongoGridFS::find - arrayqueryarray() - arrayfieldsarray() - - - - - &reftitle.parameters; - - - - - query - - - - The query. - - - - - - fields - - - - Fields to return. - - - - - - - - - &reftitle.returnvalues; - - A MongoGridFSCursor. - - - - - diff --git a/reference/mongo/mongogridfs/findone.xml b/reference/mongo/mongogridfs/findone.xml deleted file mode 100644 index be42ab5bc5..0000000000 --- a/reference/mongo/mongogridfs/findone.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - MongoGridFS::findOne - Returns a single file matching the criteria - - - - &reftitle.description; - - public MongoGridFSFileMongoGridFS::findOne - mixedqueryarray() - mixedfieldsarray() - - - - - &reftitle.parameters; - - - - - query - - - - The filename or criteria for which to search. - - - - - - - - - &reftitle.returnvalues; - - Returns a MongoGridFSFile or &null;. - - - - - &reftitle.examples; - - <methodname>MongoGridFS::findOne</methodname> example - - Example demonstrating how to find a single file from the MongoGridFS. - - -my_db->getGridFS('downloads'); - -$downloads->storeFile('filename.tgz'); - -$download = $downloads->findOne('filename.tgz'); // instance of MongoGridFSFile - -print_r($download); -?> -]]> - - - See MongoGridFSFile for more information about how to work with files. - - &example.outputs.similar; - - Array - ( - [_id] => MongoId Object - ( - ) - - [filename] => filename.tgz - [uploadDate] => MongoDate Object - ( - [sec] => 1274288014 - [usec] => 467000 - ) - - [chunkSize] => 262144 - [md5] => d41d8cd98f00b204e9800998ecf8427e - ) - - [gridfs:protected] => MongoGridFS Object - ( - [chunks] => MongoCollection Object - ( - ) - - [filesName:protected] => downloads.files - [chunksName:protected] => downloads.chunks - ) - -) -]]> - - - - - - diff --git a/reference/mongo/mongogridfs/get.xml b/reference/mongo/mongogridfs/get.xml deleted file mode 100644 index 0fd5ed3708..0000000000 --- a/reference/mongo/mongogridfs/get.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - MongoGridFS::get - Retrieve a file from the database - - - - &reftitle.description; - - public MongoGridFSFileMongoGridFS::get - mixedid - - - - - &reftitle.parameters; - - - - - id - - - - _id of the file to find. - - - - - - - - - &reftitle.returnvalues; - - Returns the file, if found, or &null;. - - - - - diff --git a/reference/mongo/mongogridfs/put.xml b/reference/mongo/mongogridfs/put.xml deleted file mode 100644 index bf44306fb0..0000000000 --- a/reference/mongo/mongogridfs/put.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - MongoGridFS::put - Stores a file in the database - - - - &reftitle.description; - - public mixedMongoGridFS::put - stringfilename - arraymetadataarray() - arrayoptionsarray() - - - - - MongoGridFS::put is an alias of MongoGridFS::storeFile. - - - - - - &reftitle.parameters; - - - - - filename - - - - Name of the file to store. - - - - - - metadata - - - - Other metadata fields to include in the file document. - - &mongo.gridfs.store.metadata.note; - - - - - options - - - - An array of options for the insert operations executed against the - chunks and files collections. See - MongoCollection::insert for documentation on these - these options. - - - - - - - - - &reftitle.returnvalues; - &mongo.gridfs.store.return; - - - - &reftitle.errors; - - Throws MongoGridFSException if there is an error - reading filename or inserting into the - chunks or files collections. - - - - - &reftitle.seealso; - - MongoGridFS::storeBytes - MongoGridFS::storeFile - MongoGridFS::storeUpload - MongoDB core docs on GridFS - - - - - diff --git a/reference/mongo/mongogridfs/remove.xml b/reference/mongo/mongogridfs/remove.xml deleted file mode 100644 index f3ab83edae..0000000000 --- a/reference/mongo/mongogridfs/remove.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - MongoGridFS::remove - Remove files and their chunks from the database - - - - &reftitle.description; - - public boolarrayMongoGridFS::remove - arraycriteriaarray() - arrayoptionsarray() - - - - - &reftitle.parameters; - - - - - criteria - - - - The filename or criteria for which to search. - - - - - - options - - - - An array of options for the remove operations executed against the - chunks and files collections. See - MongoCollection::remove for documentation on these - options. - - - - - - - - - &reftitle.returnvalues; - - Returns an array containing the status of the removal (with respect to the - files collection) if the "w" option is - set. Otherwise, returns &true;. - - - Fields in the status array are described in the documentation for - MongoCollection::insert. - - - - - &reftitle.errors; - &mongo.errors.exceptions.writeconcern; - - - - diff --git a/reference/mongo/mongogridfs/storebytes.xml b/reference/mongo/mongogridfs/storebytes.xml deleted file mode 100644 index 08d87dc9b1..0000000000 --- a/reference/mongo/mongogridfs/storebytes.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - MongoGridFS::storeBytes - Stores a string of bytes in the database - - - - &reftitle.description; - - public mixedMongoGridFS::storeBytes - stringbytes - arraymetadataarray() - arrayoptionsarray() - - - - - &reftitle.parameters; - - - - - bytes - - - - String of bytes to store. - - - - - - metadata - - - - Other metadata fields to include in the file document. - - &mongo.gridfs.store.metadata.note; - - - - - options - - - - An array of options for the insert operations executed against the - chunks and files collections. See - MongoCollection::insert for documentation on these - these options. - - - - - - - - - &reftitle.returnvalues; - &mongo.gridfs.store.return; - - - - &reftitle.errors; - - Throws MongoGridFSException if there is an error - inserting into the chunks or files - collections. - - - - - &reftitle.examples; - - <function>MongoGridFS::storeBytes</function> with additional metadata - -selectDB('test')->getGridFS(); - -$bytes = 'abcdefghijklmnopqrstuvwxyz'; -$id = $gridfs->storeBytes($bytes, array('_id' => 'alphabet')); -$gridfsFile = $gridfs->get($id); - -var_dump($gridfsFile->file); -?> -]]> - - &example.outputs.similar; - - - string(8) "alphabet" - ["uploadDate"]=> - object(MongoDate)#7 (0) { - } - ["length"]=> - int(26) - ["chunkSize"]=> - int(262144) - ["md5"]=> - string(32) "c3fcd3d76192e4007dfb496cca67e13b" -} -]]> - - - - - - &reftitle.seealso; - - MongoGridFS::put - MongoGridFS::storeFile - MongoGridFS::storeUpload - MongoDB core docs on GridFS - - - - - diff --git a/reference/mongo/mongogridfs/storefile.xml b/reference/mongo/mongogridfs/storefile.xml deleted file mode 100644 index f8c2b99e21..0000000000 --- a/reference/mongo/mongogridfs/storefile.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - MongoGridFS::storeFile - Stores a file in the database - - - - &reftitle.description; - - public mixedMongoGridFS::storeFile - stringresourcefilename - arraymetadataarray() - arrayoptionsarray() - - - - - &reftitle.parameters; - - - - - filename - - - - Name of the file or a readable stream to store. - - - - - - metadata - - - - Other metadata fields to include in the file document. - - &mongo.gridfs.store.metadata.note; - - - - - options - - - - An array of options for the insert operations executed against the - chunks and files collections. See - MongoCollection::insert for documentation on these - these options. - - - - - - - - - &reftitle.returnvalues; - &mongo.gridfs.store.return; - - - - &reftitle.errors; - - Throws MongoGridFSException if there is an error - reading filename or inserting into the - chunks or files collections. - - - - - &reftitle.examples; - - <function>MongoGridFS::storeFile</function> with additional metadata - -selectDB('test')->getGridFS(); - -$id = $gridfs->storeFile('example.txt', array('contentType' => 'plain/text')); -$gridfsFile = $gridfs->get($id); - -var_dump($gridfsFile->file); -?> -]]> - - &example.outputs.similar; - - - object(MongoId)#6 (0) { - } - ["contentType"]=> - string(10) "plain/text" - ["filename"]=> - string(11) "example.txt" - ["uploadDate"]=> - object(MongoDate)#7 (0) { - } - ["length"]=> - int(26) - ["chunkSize"]=> - int(262144) - ["md5"]=> - string(32) "c3fcd3d76192e4007dfb496cca67e13b" -} -]]> - - - - - - &reftitle.seealso; - - MongoGridFS::put - MongoGridFS::storeBytes - MongoGridFS::storeUpload - MongoDB core docs on GridFS - - - - - diff --git a/reference/mongo/mongogridfs/storeupload.xml b/reference/mongo/mongogridfs/storeupload.xml deleted file mode 100644 index ac9c141f35..0000000000 --- a/reference/mongo/mongogridfs/storeupload.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - MongoGridFS::storeUpload - Stores an uploaded file in the database - - - - &reftitle.description; - - public mixedMongoGridFS::storeUpload - stringname - arraymetadata - - - - - &reftitle.parameters; - - - - - name - - - - The name of the uploaded file(s) to store. This should correspond to the - file field's name attribute in the HTML form. - - - - - - metadata - - - - Other metadata fields to include in the file document. - - &mongo.gridfs.store.metadata.note; - - - The filename field will be populated with the - client's filename (e.g. $_FILES['foo']['name']). - - - - - - - - - - &reftitle.returnvalues; - &mongo.gridfs.store.return; - - - If multiple files are uploaded - using the same field name, this method will not return anything; - however, the files themselves will still be processed. - - - - - - &reftitle.errors; - - Throws MongoGridFSException if there is an error - reading the uploaded file(s) or inserting into the chunks - or files collections. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.5 - - Changed second parameter to an array of metadata. Pre-1.2.5, the - second parameter was an optional string overriding the filename. - - - - - - - - - - &reftitle.examples; - - <function>MongoGridFS::storeUpload</function> HTML form example - - Suppose you have the following HTML form: - - - - - - - - - - - -]]> - - - If you wanted to store the uploaded image in MongoDB, you could do the - following in the script handling the form submission: - - -selectDB('test')->getGridFS(); - -$gridfs->storeUpload('pic', array('username' => $_POST['username'])); -?> -]]> - - - - - - &reftitle.seealso; - - MongoGridFS::put - MongoGridFS::storeBytes - MongoGridFS::storeFile - MongoDB core docs on GridFS - - - - - diff --git a/reference/mongo/mongogridfscursor.xml b/reference/mongo/mongogridfscursor.xml deleted file mode 100644 index 0d042738f6..0000000000 --- a/reference/mongo/mongogridfscursor.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - The MongoGridFSCursor class - MongoGridFSCursor - - - - -
- &reftitle.intro; - - Cursor for database file results. - -
- - -
- &reftitle.classsynopsis; - - - - MongoGridFSCursor - - - - - extends - MongoCursor - - - - - Fields - - protected - MongoGridFS - gridfs - &null; - - - &Methods; - - - - -
- -
- - &reference.mongo.entities.mongogridfscursor; - -
- - diff --git a/reference/mongo/mongogridfscursor/construct.xml b/reference/mongo/mongogridfscursor/construct.xml deleted file mode 100644 index e76df22af6..0000000000 --- a/reference/mongo/mongogridfscursor/construct.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - MongoGridFSCursor::__construct - Create a new cursor - - - - &reftitle.description; - - public MongoGridFSCursor::__construct - MongoGridFSgridfs - resourceconnection - stringns - arrayquery - arrayfields - - - - - &reftitle.parameters; - - - - - gridfs - - - - Related GridFS collection. - - - - - - connection - - - - Database connection. - - - - - - ns - - - - Full name of database and collection. - - - - - - query - - - - Database query. - - - - - - fields - - - - Fields to return. - - - - - - - - - &reftitle.returnvalues; - - Returns the new cursor. - - - - - diff --git a/reference/mongo/mongogridfscursor/current.xml b/reference/mongo/mongogridfscursor/current.xml deleted file mode 100644 index 42a3dfd072..0000000000 --- a/reference/mongo/mongogridfscursor/current.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - MongoGridFSCursor::current - Returns the current file - - - - &reftitle.description; - - public MongoGridFSFileMongoGridFSCursor::current - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The current file. - - - - diff --git a/reference/mongo/mongogridfscursor/getnext.xml b/reference/mongo/mongogridfscursor/getnext.xml deleted file mode 100644 index fb143feca1..0000000000 --- a/reference/mongo/mongogridfscursor/getnext.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - MongoGridFSCursor::getNext - Return the next file to which this cursor points, and advance the cursor - - - - &reftitle.description; - - public MongoGridFSFileMongoGridFSCursor::getNext - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the next file. - - - - diff --git a/reference/mongo/mongogridfscursor/key.xml b/reference/mongo/mongogridfscursor/key.xml deleted file mode 100644 index cd771497e0..0000000000 --- a/reference/mongo/mongogridfscursor/key.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - MongoGridFSCursor::key - Returns the current result's filename - - - - &reftitle.description; - - public stringMongoGridFSCursor::key - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The current result's _id as a string. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.3.0 - - The document's _id is returned as a string value, - since the key should be unique. Pre-1.3.0, filename - was returned. - - - - - - - - - - diff --git a/reference/mongo/mongogridfsexception.xml b/reference/mongo/mongogridfsexception.xml deleted file mode 100644 index 5e98736c1c..0000000000 --- a/reference/mongo/mongogridfsexception.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - The MongoGridFSException class - MongoGridFSException - - - - -
- &reftitle.intro; - - Thrown when there are errors reading or writing files - to or from the database. - -
- - -
- &reftitle.classsynopsis; - - - - MongoGridFSException - - - - - MongoGridFSException - - - extends - MongoException - - - - - - - -
- -
- Error codes - - - <classname>MongoGridFSException</classname> error codes - - - - Code - Message - Reason - - - - - 3 - Could not open file $filename - Attempting to store an invalid file, such as directory - - - 4 - File $filename is too large: $filesize bytes - Maximum filesize in GridFS is 4GB - - - 5 - could not find filehandle - Resource doesn't have a filehandle - - - 6 - no file is associate with this filehandle - Resource isn't a file resource - - - 7 - error setting up file: $filenames - Could not open file for reading - - - 9 - error reading file $filenames - Failed reading file - - - 10 - error reading filehandle - Failed reading from a resource - - - 11 - could not find uploaded file %s - Filename doesn't seem to be uploaded file - - - 12 - Couldn't find tmp_name in the $_FILES array. Are you sure the upload worked? - Uploaded filename probably failed - - - 13 - tmp_name was not a string or an array - Invalid filename given - - - 14 - couldn't find file size - The length property is missing - - - 15 - Cannot find filename - No filename provided, and no filename property set - - - 16 - could not open destination file %s - Destination filename not writable - - - 17 - error reading chunk of file - Chunk corruption - - - 18 - couldn't create a php_stream - Couldn't create a stream resource - - - 19 - couldn't find property - Chunk corruption - - - 20 - chunk number has wrong size (size) when the max is maxchunksize - Chunk larger then expected - - - 21 - chunk has wrong format - Chunk corruption - - - -
-
-
- -
- -
- - diff --git a/reference/mongo/mongogridfsfile.xml b/reference/mongo/mongogridfsfile.xml deleted file mode 100644 index 76c6671656..0000000000 --- a/reference/mongo/mongogridfsfile.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - The MongoGridFSFile class - MongoGridFSFile - - - - -
- &reftitle.intro; - - A database file object. - -
- - -
- &reftitle.classsynopsis; - - - - MongoGridFSFile - - - - - MongoGridFSFile - - - - - Fields - - public - array - file - &null; - - - protected - MongoGridFS - gridfs - &null; - - - &Methods; - - - - -
- -
- - &reference.mongo.entities.mongogridfsfile; - -
- - diff --git a/reference/mongo/mongogridfsfile/construct.xml b/reference/mongo/mongogridfsfile/construct.xml deleted file mode 100644 index 2aa25ef7ff..0000000000 --- a/reference/mongo/mongogridfsfile/construct.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - MongoGridfsFile::__construct - Create a new GridFS file - - - &reftitle.description; - - public MongoGridfsFile::__construct - MongoGridFSgridfs - arrayfile - - - - - &reftitle.parameters; - - - - - gridfs - - - - The parent MongoGridFS instance. - - - - - - file - - - - A file from the database. - - - - - - - - - &reftitle.returnvalues; - - Returns a new MongoGridFSFile. - - - - diff --git a/reference/mongo/mongogridfsfile/getbytes.xml b/reference/mongo/mongogridfsfile/getbytes.xml deleted file mode 100644 index c7d60e7c1c..0000000000 --- a/reference/mongo/mongogridfsfile/getbytes.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - MongoGridFSFile::getBytes - Returns this file's contents as a string of bytes - - - - &reftitle.description; - - public stringMongoGridFSFile::getBytes - - - - Warning: this will load the file into memory. If the file is bigger than - your memory, this will cause problems! - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns a string of the bytes in the file. - - - - - &reftitle.examples; - - <methodname>MongoGridFSFile::getBytes</methodname> example - -my_db->getGridFS('images'); - -$image = $images->findOne('jwage.png'); - -header('Content-type: image/png;'); -echo $image->getBytes(); -?> -]]> - - - - - - diff --git a/reference/mongo/mongogridfsfile/getfilename.xml b/reference/mongo/mongogridfsfile/getfilename.xml deleted file mode 100644 index aabb9a7e6a..0000000000 --- a/reference/mongo/mongogridfsfile/getfilename.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - MongoGridFSFile::getFilename - Returns this file's filename - - - &reftitle.description; - - public stringMongoGridFSFile::getFilename - - - - - &reftitle.parameters; - &no.function.parameters; - - - &reftitle.returnvalues; - - Returns the filename. - - - - diff --git a/reference/mongo/mongogridfsfile/getresource.xml b/reference/mongo/mongogridfsfile/getresource.xml deleted file mode 100644 index 03fc84d992..0000000000 --- a/reference/mongo/mongogridfsfile/getresource.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - MongoGridFSFile::getResource - Returns a resource that can be used to read the stored file - - - - &reftitle.description; - - public resourceMongoGridFSFile::getResource - - - - This method returns a stream resource that can be used with all file - functions in PHP that deal with reading files. The contents of the file are - pulled out of MongoDB on the fly, so that the whole file does not have to - be loaded into memory first. - - - At most two GridFSFile chunks will be loaded in memory. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns a resource that can be used to read the file with - - - - - &reftitle.examples; - - <methodname>MongoGridFSFile::getResource</methodname> example - -my_db->getGridFS('images'); - -$image = $images->findOne('mongo.png'); - -header('Content-type: image/png;'); -$stream = $image->getResource(); - -while (!feof($stream)) { - echo fread($stream, 8192); -} -?> -]]> - - - - - - diff --git a/reference/mongo/mongogridfsfile/getsize.xml b/reference/mongo/mongogridfsfile/getsize.xml deleted file mode 100644 index eeeb93c87a..0000000000 --- a/reference/mongo/mongogridfsfile/getsize.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - MongoGridFSFile::getSize - Returns this file's size - - - &reftitle.description; - - public intMongoGridFSFile::getSize - - - - - &reftitle.parameters; - &no.function.parameters; - - - &reftitle.returnvalues; - - Returns this file's size - - - - diff --git a/reference/mongo/mongogridfsfile/write.xml b/reference/mongo/mongogridfsfile/write.xml deleted file mode 100644 index 59a78fff90..0000000000 --- a/reference/mongo/mongogridfsfile/write.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - MongoGridFSFile::write - Writes this file to the filesystem - - - &reftitle.description; - - public intMongoGridFSFile::write - stringfilename&null; - - - - &reftitle.parameters; - - - - - filename - - - - The location to which to write the file. If none is given, - the stored filename will be used. - - - - - - - - &reftitle.returnvalues; - - Returns the number of bytes written. - - - - - &reftitle.examples; - - <methodname>MongoGridFSFile::write</methodname> example - -my_db->getGridFS('images'); - -$image = $images->findOne('jwage.png'); -$image->write('/path/to/write/jwage.png'); -?> -]]> - - - - - diff --git a/reference/mongo/mongoid.xml b/reference/mongo/mongoid.xml deleted file mode 100644 index f9063e704d..0000000000 --- a/reference/mongo/mongoid.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - The MongoId class - MongoId - - - - - &mongo.alternative.class.note; - - MongoDB\BSON\ObjectId - - - - -
- &reftitle.intro; - - A unique identifier created for database objects. If an object is inserted - into the database without an _id field, an _id field will be added to it - with a MongoId instance as its value. If the data - has a naturally occuring unique field (e.g. username or timestamp) it is - fine to use this as the _id field instead, and it will not be replaced with - a MongoId. - - - Instances of the MongoId class fulfill the role that - autoincrementing does in a relational database: to provide a unique key if - the data does not naturally have one. Autoincrementing does not work well - with a sharded database, as it is difficult to determine the next number in - the sequence. This class fulfills the constraints of quickly generating a - value that is unique across shards. - - - Each MongoId is 12 bytes (making its string form 24 hexadecimal characters). - The first four bytes are a timestamp, the next three are a hash of the - client machine's hostname, the next two are the two least significant bytes - of the process id running the script, and the last three bytes are an - incrementing value. - - - MongoIds are serializable/unserializable. Their - serialized form is similar to their string form: - - - - -
- - -
- &reftitle.classsynopsis; - - - - MongoId - - - - - MongoId - - - - - - public - string - $id - &null; - - - &Methods; - - - - -
- -
- Fields - - - $id - - - This field contains the string representation of this object. - - - - The property name begins with a $ character. It may - be accessed using - complex variable - parsed syntax (e.g. $mongoId->{'$id'}). - - - - - -
- -
- &reftitle.seealso; - - MongoDB core docs on ObjectIds. - -
-
- - &reference.mongo.entities.mongoid; - -
- - diff --git a/reference/mongo/mongoid/construct.xml b/reference/mongo/mongoid/construct.xml deleted file mode 100644 index 20119df51b..0000000000 --- a/reference/mongo/mongoid/construct.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - MongoId::__construct - Creates a new id - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\ObjectId::__construct - - - - - - &reftitle.description; - - public MongoId::__construct - stringMongoIdid&null; - - - - - &reftitle.parameters; - - - - - id - - - - A string (must be 24 hexadecimal characters) or a - MongoId instance. - - - - - - - - - &reftitle.returnvalues; - - Returns a new id. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - PECL mongo 1.4.0 - - An exception is thrown when passed invalid string - - - - - - - - - &reftitle.examples; - - <function>MongoId::__construct</function> example - - This example shows how to create a new id. This is seldom necessary, as the - driver adds an id to arrays automatically before storing them in the - database. - - - -]]> - - &example.outputs.similar; - - - - - - Parameter example - This example shows how to use a string parameter to initialize a MongoId with a given value. - - -]]> - - &example.outputs.similar; - - - - - - - - &reftitle.seealso; - - - MongoId::__toString - MongoId::isvalid - - - - - - diff --git a/reference/mongo/mongoid/gethostname.xml b/reference/mongo/mongoid/gethostname.xml deleted file mode 100644 index 9ed00fac61..0000000000 --- a/reference/mongo/mongoid/gethostname.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - MongoId::getHostname - Gets the hostname being used for this machine's ids - - - - - &mongo.noalternative.method.note; - - - - - &reftitle.description; - - public static stringMongoId::getHostname - - - - This returns the hostname MongoId is using to - generate unique ids. This should be the same value - gethostname returns. - - - It is identical to the function: - - - -]]> - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the hostname. - - - - - diff --git a/reference/mongo/mongoid/getinc.xml b/reference/mongo/mongoid/getinc.xml deleted file mode 100644 index e3d2a2472e..0000000000 --- a/reference/mongo/mongoid/getinc.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - MongoId::getInc - Gets the incremented value to create this id - - - - - &mongo.noalternative.method.note; - - - - - &reftitle.description; - - public intMongoId::getInc - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the incremented value used to create this MongoId. - - - - - diff --git a/reference/mongo/mongoid/getpid.xml b/reference/mongo/mongoid/getpid.xml deleted file mode 100644 index 295ccd1010..0000000000 --- a/reference/mongo/mongoid/getpid.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - MongoId::getPID - Gets the process ID - - - - - &mongo.noalternative.method.note; - - - - - &reftitle.description; - - public intMongoId::getPID - - - - Extracts the pid from the Mongo ID - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the PID of the MongoId. - - - - - diff --git a/reference/mongo/mongoid/gettimestamp.xml b/reference/mongo/mongoid/gettimestamp.xml deleted file mode 100644 index 1c2f55345b..0000000000 --- a/reference/mongo/mongoid/gettimestamp.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - MongoId::getTimestamp - Gets the number of seconds since the epoch that this id was created - - - - - &mongo.noalternative.method.note; - - - - - &reftitle.description; - - public intMongoId::getTimestamp - - - - This returns the same thing as running time when the id is created. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the number of seconds since the epoch that this id was created. There are only - four bytes of timestamp stored, so MongoDate is a better choice - for storing exact or wide-ranging times. - - - - - diff --git a/reference/mongo/mongoid/isvalid.xml b/reference/mongo/mongoid/isvalid.xml deleted file mode 100644 index 800831b627..0000000000 --- a/reference/mongo/mongoid/isvalid.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - MongoId::isValid - Check if a value is a valid ObjectId - - - - - &mongo.noalternative.method.note; - - - - - &reftitle.description; - - public static boolMongoId::isValid - mixedvalue - - - This method may be used to check a variable before passing it as an argument - to MongoId::__construct. - - - - - &reftitle.parameters; - - - - - value - - - - The value to check for validity. - - - - - - - - - &reftitle.returnvalues; - - Returns &true; if value is a - MongoId instance or a string consisting of exactly 24 - hexadecimal characters; otherwise, &false; is returned. - - - - - diff --git a/reference/mongo/mongoid/set-state.xml b/reference/mongo/mongoid/set-state.xml deleted file mode 100644 index 9aa7adc673..0000000000 --- a/reference/mongo/mongoid/set-state.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - MongoId::__set_state - Create a dummy MongoId - - - - - &mongo.noalternative.method.note; - - - - - &reftitle.description; - - public static MongoIdMongoId::__set_state - arrayprops - - - This function is only used by PHP internally, it shouldn't need to ever be - called by the user. - - - It is identical to the function: - - - -]]> - - - - - &reftitle.parameters; - - - - - props - - - - Theoretically, an array of properties used to create the new id. - However, as MongoId instances have no properties, this is not used. - - - - - - - - - &reftitle.returnvalues; - - A new id with the value "000000000000000000000000". - - - - - diff --git a/reference/mongo/mongoid/tostring.xml b/reference/mongo/mongoid/tostring.xml deleted file mode 100644 index 8586167c43..0000000000 --- a/reference/mongo/mongoid/tostring.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - MongoId::__toString - Returns a hexidecimal representation of this id - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\ObjectId::__toString - - - - - - &reftitle.description; - - public stringMongoId::__toString - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This id. - - - - - &reftitle.examples; - - <function>MongoId::__toString</function> example - -selectDB("foo")->selectCollection("bar"); - -$collection->insert(array( "x" => "y" )); -$collection->insert(array( "x" => "y" )); - -$cursor = $collection->find(); -$r1 = $cursor->next(); -$r2 = $cursor->next(); - -echo $r1["_id"] . "\n"; -echo $r2["_id"] . "\n"; - -?> -]]> - - &example.outputs.similar; - - - - - - - - diff --git a/reference/mongo/mongoinsertbatch.xml b/reference/mongo/mongoinsertbatch.xml deleted file mode 100644 index 80f43e4bfa..0000000000 --- a/reference/mongo/mongoinsertbatch.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - The MongoInsertBatch class - MongoInsertBatch - - - - -
- &reftitle.intro; - - Constructs a batch of INSERT operations. See MongoWriteBatch. - -
- - -
- &reftitle.classsynopsis; - - - - MongoInsertBatch - - - - - MongoInsertBatch - - - - extends - MongoWriteBatch - - - - - &Methods; - - - &InheritedMethods; - - - - - -
- -
- - &reference.mongo.entities.mongoinsertbatch; - -
- - diff --git a/reference/mongo/mongoinsertbatch/construct.xml b/reference/mongo/mongoinsertbatch/construct.xml deleted file mode 100644 index 589879c7e7..0000000000 --- a/reference/mongo/mongoinsertbatch/construct.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - MongoInsertBatch::__construct - Description - - - - &reftitle.description; - - public MongoInsertBatch::__construct - MongoCollectioncollection - arraywrite_options - - - Constructs a batch of INSERT operations. See MongoWriteBatch. - - - - - - &reftitle.parameters; - - - collection - &mongo.mongowritebatch.collection.description; - - - write_options - &mongo.mongowritebatch.writeoptions.description; - - - - - - &reftitle.returnvalues; - - A new MongoInsertBatch. - - - - - - - diff --git a/reference/mongo/mongoint32.xml b/reference/mongo/mongoint32.xml deleted file mode 100644 index 59c48ee2e0..0000000000 --- a/reference/mongo/mongoint32.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - The MongoInt32 class - MongoInt32 - - - - &mongo.noalternative.class.note; - - Instead, the new extension chooses the appropriate database type depending - on the integer's value. - - - - -
- &reftitle.intro; - - The class can be used to save 32-bit integers to the database on a 64-bit - system. - -
- - -
- &reftitle.classsynopsis; - - - - MongoInt32 - - - - - MongoInt32 - - - - - Fields - - public - string - value - - - &Methods; - - - - -
- -
- Fields - - - value - - - This is the string value of the 32-bit number. For instance, 123's value - would be "123". - - - - -
- -
- - &reference.mongo.entities.mongoint32; - -
- - diff --git a/reference/mongo/mongoint32/construct.xml b/reference/mongo/mongoint32/construct.xml deleted file mode 100644 index 51ae05859d..0000000000 --- a/reference/mongo/mongoint32/construct.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - MongoInt32::__construct - Creates a new 32-bit integer - - - - - &mongo.noalternative.class.note; - - Instead, the new extension chooses the appropriate database type depending - on the integer's value. - - - - - - &reftitle.description; - - public MongoInt32::__construct - stringvalue - - - Creates a new 32-bit number with the given value. - - - - - &reftitle.parameters; - - - - - value - - - - A number. - - - - - - - - - &reftitle.returnvalues; - - Returns a new integer. - - - - - - diff --git a/reference/mongo/mongoint32/tostring.xml b/reference/mongo/mongoint32/tostring.xml deleted file mode 100644 index 80526e7803..0000000000 --- a/reference/mongo/mongoint32/tostring.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - MongoInt32::__toString - Returns the string representation of this 32-bit integer - - - - - &mongo.noalternative.class.note; - - Instead, the new extension chooses the appropriate database type depending - on the integer's value. - - - - - - &reftitle.description; - - public stringMongoInt32::__toString - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the string representation of this integer. - - - - - - diff --git a/reference/mongo/mongoint64.xml b/reference/mongo/mongoint64.xml deleted file mode 100644 index 33a1cb38fa..0000000000 --- a/reference/mongo/mongoint64.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - The MongoInt64 class - MongoInt64 - - - - &mongo.noalternative.class.note; - - Instead, the new extension chooses the appropriate database type depending - on the integer's value. - - - - -
- &reftitle.intro; - - The class can be used to save 64-bit integers to the database on a 32-bit - system. - -
- - -
- &reftitle.classsynopsis; - - - - MongoInt64 - - - - - MongoInt64 - - - - - Fields - - public - string - value - - - &Methods; - - - - -
- -
- Fields - - - value - - - This is the string value of the 64-bit number. For instance, 123's value - would be "123". - - - - -
- -
- - &reference.mongo.entities.mongoint64; - -
- - diff --git a/reference/mongo/mongoint64/construct.xml b/reference/mongo/mongoint64/construct.xml deleted file mode 100644 index ab6b217be2..0000000000 --- a/reference/mongo/mongoint64/construct.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - MongoInt64::__construct - Creates a new 64-bit integer - - - - - &mongo.noalternative.class.note; - - Instead, the new extension chooses the appropriate database type depending - on the integer's value. - - - - - - &reftitle.description; - - public MongoInt64::__construct - stringvalue - - - Creates a new 64-bit number with the given value. - - - - - &reftitle.parameters; - - - - - value - - - - A number. - - - - - - - - - &reftitle.returnvalues; - - Returns a new integer. - - - - - - diff --git a/reference/mongo/mongoint64/tostring.xml b/reference/mongo/mongoint64/tostring.xml deleted file mode 100644 index 6d9f46a34e..0000000000 --- a/reference/mongo/mongoint64/tostring.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - MongoInt64::__toString - Returns the string representation of this 64-bit integer - - - - - &mongo.noalternative.class.note; - - Instead, the new extension chooses the appropriate database type depending - on the integer's value. - - - - - - &reftitle.description; - - public stringMongoInt64::__toString - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the string representation of this integer. - - - - - - diff --git a/reference/mongo/mongolog.xml b/reference/mongo/mongolog.xml deleted file mode 100644 index f3fca9c7fb..0000000000 --- a/reference/mongo/mongolog.xml +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - The MongoLog class - MongoLog - - - - -
- &reftitle.intro; - - Logging can be used to get detailed information about what the driver is - doing. Logging is disabled by default, but this class allows you to activate - specific levels of logging for various parts of the driver. Some examples: - - - -]]> - - - - By default, MongoLog emits all log messages as PHP notices. Depending - on the SAPI you use, messages may be sent to - stderr (for CLI) or the web server's - error log. If, after configuring MongoLog, log messages are not appearing - as expected, ensure that the E_NOTICE bit is included - in error_reporting and that - display_errors is on. - - -
- - -
- &reftitle.classsynopsis; - - - - MongoLog - - - - - MongoLog - - - - - &Constants; - - const - int - MongoLog::NONE - 0 - - - const - int - MongoLog::ALL - 31 - - - level constants - - const - int - MongoLog::WARNING - 1 - - - const - int - MongoLog::INFO - 2 - - - const - int - MongoLog::FINE - 4 - - - module constants - - const - int - MongoLog::RS - 1 - - - const - int - MongoLog::POOL - 1 - - - const - int - MongoLog::CON - 2 - - - const - int - MongoLog::IO - 4 - - - const - int - MongoLog::SERVER - 8 - - - const - int - MongoLog::PARSE - 16 - - - Fields - - private - static - int - callback - - - private - static - int - level - - - private - static - int - module - - - &Methods; - - - - -
- -
- &reftitle.constants; -
- MongoLog Constants - - These constants can be used by both - MongoLog::setLevel and - MongoLog::setModule. - - - - - MongoLog::NONE - - - Log nothing. - - - - - MongoLog::ALL - - - Log everything. - - - - -
- -
- MongoLog Level Constants - - These constants can be used by MongoLog::setLevel. - - - - MongoLog::WARNING - - - Log events that are somewhat exceptional, but not quite worthy of an - actual exception (e.g. recoverable connection errors). - - - - - MongoLog::INFO - - - Log events that may be of interest to administrators, but are not - particularly noteworthy (e.g. option parsing, authentication steps). - - - - - MongoLog::FINE - - - Log most events that the driver performs (e.g. server selection, socket - communication). Depending on the module being logged, this can be - extremely noisy and is primarily useful for debugging. - - - - -
- -
- MongoLog Module Constants - - These constants can be used by MongoLog::setModule. - - - - MongoLog::CON - - - Log connection activity. Creating new connections, authentication, - pinging, timeouts, etc. - - - - - MongoLog::IO - - - Log traffic to/from the database. Unless your program is trivial, this - will create an enormous number of log messages. - - - - - MongoLog::PARSE - - - Log parsing of the connection string and options when constructing - MongoClient. - - - - - MongoLog::POOL - - - Previously used to log connection pool activity. This option is now a - deprecated alias of MongoLog::RS. - - - - - MongoLog::RS - - - Log replica set activity. Failovers, read preference selection, etc. - - - - - MongoLog::SERVER - - - Previously used to log server status changes. This option is deprecated - in favor of MongoLog::RS. - - - - -
-
- -
- &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.3.0 - - Added MongoLog::CON and deprecated - MongoLog::POOL and - MongoLog::SERVER. - - - - - - -
- -
- - &reference.mongo.entities.mongolog; - -
- - diff --git a/reference/mongo/mongolog/getcallback.xml b/reference/mongo/mongolog/getcallback.xml deleted file mode 100644 index 2f937691b0..0000000000 --- a/reference/mongo/mongolog/getcallback.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - MongoLog::getCallback - Gets the previously set callback function - - - - &reftitle.description; - - public static callableMongoLog::getCallback - - - - Retrieves the callback function. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the callback function, or &false; if not set yet. - - - - - &reftitle.notes; - - - This function is only available with PHP 5.3.0 and later. - - - - - - - diff --git a/reference/mongo/mongolog/getlevel.xml b/reference/mongo/mongolog/getlevel.xml deleted file mode 100644 index 58ff883188..0000000000 --- a/reference/mongo/mongolog/getlevel.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - MongoLog::getLevel - Gets the level(s) currently being logged - - - - &reftitle.description; - - public static intMongoLog::getLevel - - - - This function can be used to see which log levels are currently enabled. - The returned integer may be compared with the - MongoLog level constants - using bitwise operators to check for specific log levels. - - - -]]> - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the level(s) currently being logged. - - - - - - diff --git a/reference/mongo/mongolog/getmodule.xml b/reference/mongo/mongolog/getmodule.xml deleted file mode 100644 index 03038091ab..0000000000 --- a/reference/mongo/mongolog/getmodule.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - MongoLog::getModule - Gets the module(s) currently being logged - - - - &reftitle.description; - - public static intMongoLog::getModule - - - - This function can be used to see which driver modules are currently being - logged. The returned integer may be compared with the - MongoLog module constants - using bitwise operators to check if specific modules are being logged. - - - -]]> - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the module(s) currently being logged. - - - - - - diff --git a/reference/mongo/mongolog/setcallback.xml b/reference/mongo/mongolog/setcallback.xml deleted file mode 100644 index 62077cfbd6..0000000000 --- a/reference/mongo/mongolog/setcallback.xml +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - MongoLog::setCallback - Sets a callback function to be invoked for events - - - - &reftitle.description; - - public static voidMongoLog::setCallback - callablelog_function - - - This function will set a callback function to be invoked for events in lieu - of emitting of PHP notice. - - - - - &reftitle.parameters; - - - - log_function - - - The callback function to be invoked on events. It should have the following prototype: - - - - log_function - intmodule - intlevel - stringmessage - - - - module - - - One of the MongoLog - module constants. - - - - - level - - - One of the MongoLog - level constants. - - - - - message - - - The log message itself. - - - - - - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - <methodname>MongoLog::setCallback</methodname> example - - -]]> - - &example.outputs.similar; - - - - - - - - &reftitle.notes; - - - This function is only available with PHP 5.3.0 and later. - - - - - - - - diff --git a/reference/mongo/mongolog/setlevel.xml b/reference/mongo/mongolog/setlevel.xml deleted file mode 100644 index b39a305480..0000000000 --- a/reference/mongo/mongolog/setlevel.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - MongoLog::setLevel - Sets the level(s) to be logged - - - - &reftitle.description; - - public static voidMongoLog::setLevel - intlevel - - - This function can be used to control logging verbosity and the types of - activities that should be logged. The - MongoLog level constants - may be used with bitwise operators to specify multiple levels. - - - -]]> - - - Note that you must also call MongoLog::setModule to - specify which modules(s) of the driver should log. - - - - - &reftitle.parameters; - - - - - level - - - - The level(s) you would like to log. - - - - - - - - - diff --git a/reference/mongo/mongolog/setmodule.xml b/reference/mongo/mongolog/setmodule.xml deleted file mode 100644 index 7c687ac5fa..0000000000 --- a/reference/mongo/mongolog/setmodule.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - MongoLog::setModule - Sets the module(s) to be logged - - - - &reftitle.description; - - public static voidMongoLog::setModule - intmodule - - - This function can be used to set which driver modules should be logged. The - MongoLog module constants - may be used with bitwise operators to specify multiple modules. - - - -]]> - - - Note that you must also call MongoLog::setLevel to - enable logging. - - - - - &reftitle.parameters; - - - - - module - - - - The module(s) you would like to log. - - - - - - - - - diff --git a/reference/mongo/mongomaxkey.xml b/reference/mongo/mongomaxkey.xml deleted file mode 100644 index 3ec42afbf1..0000000000 --- a/reference/mongo/mongomaxkey.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - The MongoMaxKey class - MongoMaxKey - - - - - &mongo.alternative.class.note; - - MongoDB\BSON\MaxKey - - - - -
- &reftitle.intro; - - MongoMaxKey is an special type used by the database - that compares greater than all other possible BSON values. Thus, if a query - is sorted by a given field in ascending order, any document with a - MongoMaxKey as its value will be returned last. - - - MongoMaxKey has no associated fields, methods, or - constants. It is merely the "greatest" value that can be represented in the - database. - - - - MongoMaxKey is used internally by MongoDB for - indexing and sharding. There is generally no reason to use this class in - an application. - - -
- - -
- &reftitle.classsynopsis; - - - - MongoMaxKey - - - - - MongoMaxKey - - - - - - -
- -
- Using <classname>MongoMaxKey</classname> as a value - -insert(array("task" => "dishes", "doBy" => new MongoMaxKey)); -$collection->insert(array("task" => "staff meeting", "doBy" => new MongoDate(strtotime("+4 days")))); - -$cursor = $collection->find()->sort(array("doBy" => 1)); - -?> -]]> - - - The cursor will return the staff meeting document followed by the dishes - document. The dishes document will always be returned last, regardless of - what else is added to the collection (unless other documents are added with - MongoMaxKey in their "doBy" field). - -
- - - &reftitle.seealso; - - MongoMinKey - - -
- -
- - diff --git a/reference/mongo/mongominkey.xml b/reference/mongo/mongominkey.xml deleted file mode 100644 index eb5dfe4972..0000000000 --- a/reference/mongo/mongominkey.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - The MongoMinKey class - MongoMinKey - - - - - &mongo.alternative.class.note; - - MongoDB\BSON\MinKey - - - - -
- &reftitle.intro; - - MongoMinKey is an special type used by the database - that compares less than all other possible BSON values. Thus, if a query is - sorted by a given field in ascending order, any document with a - MongoMinKey as its value will be returned first. - - - MongoMinKey has no associated fields, methods, or - constants. It is merely the "smallest" value that can be represented in the - database. - - - - MongoMinKey is used internally by MongoDB for - indexing and sharding. There is generally no reason to use this class in - an application. - - -
- - -
- &reftitle.classsynopsis; - - - - MongoMinKey - - - - - MongoMinKey - - - - - - -
- -
- Using <classname>MongoMinKey</classname> as a value - -insert(array("task" => "lunch", "doBy" => new MongoMinKey)); -$collection->insert(array("task" => "staff meeting", "doBy" => new MongoDate(strtotime("+4 days")))); - -$cursor = $collection->find()->sort(array("doBy" => 1)); - -?> -]]> - - - The cursor will return the lunch document followed by the staff meeting - document. The lunch document will always be returned first, regardless of - what else is added to the collection (unless other documents are added with - MongoMinKey in their "doBy" field). - -
- - - &reftitle.seealso; - - MongoMaxKey - - -
- -
- - diff --git a/reference/mongo/mongopool.xml b/reference/mongo/mongopool.xml deleted file mode 100644 index 2c786bfb30..0000000000 --- a/reference/mongo/mongopool.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - The MongoPool class - MongoPool - - - - -
- &reftitle.intro; - - - The current (1.3.0+) releases of the driver no longer implements pooling. - This class and its methods are therefore deprecated and should not be - used. - - -
- - -
- &reftitle.classsynopsis; - - - - MongoPool - - - - - MongoPool - - - - - &Methods; - - - - -
-
- &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.3.0 - - This functionality has been removed and no longer does anything other - than emit deprecation warnings. This class is only kept around for - backwards compatibility and will be removed in the near future. - - - - PECL mongo 1.2.11 - - Emits E_DEPRECATED when used. - - - - - - -
- -
- - &reference.mongo.entities.mongopool; - -
- - diff --git a/reference/mongo/mongopool/getsize.xml b/reference/mongo/mongopool/getsize.xml deleted file mode 100644 index e133ab7170..0000000000 --- a/reference/mongo/mongopool/getsize.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - MongoPool::getSize - Get pool size for connection pools - - - - &reftitle.description; - - public static intMongoPool::getSize - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the current pool size. - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - &reftitle.examples; - - Changing pool size - - This returns the default pool size, sets a new pool size, then prints the - new pool size and the pool debugging information. Note that changing the - pool size only affects new connection pools, it does not change old ones. - - - -]]> - - - - - - &reftitle.seealso; - - - MongoPool::setSize - MongoPool::info - The connection documentation. - - - - - - diff --git a/reference/mongo/mongopool/info.xml b/reference/mongo/mongopool/info.xml deleted file mode 100644 index 8146af4bef..0000000000 --- a/reference/mongo/mongopool/info.xml +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - MongoPool::info - Returns information about all connection pools - - - - &reftitle.description; - - public arrayMongoPool::info - - - - - Returns an array of information about all connection pools. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Each connection pool has an identifier, which starts with the host. For each - pool, this function shows the following fields: - - - - in use - - - - The number of connections currently being used by - Mongo instances. - - - - - - in pool - - - - The number of connections currently in the pool (not being used). - - - - - - remaining - - - - The number of connections that could be created by this pool. For - example, suppose a pool had 5 connections remaining and 3 connections in - the pool. We could create 8 new instances of - MongoClient before we exhausted this pool - (assuming no instances of MongoClient went out of - scope, returning their connections to the pool). - - - A negative number means that this pool will spawn unlimited connections. - - - Before a pool is created, you can change the max number of connections by - calling Mongo::setPoolSize. Once a pool is showing - up in the output of this function, its size cannot be changed. - - - - - - total - - - - The total number of connections allowed for this pool. This should be - greater than or equal to "in use" + "in pool" (or -1). - - - - - - timeout - - - - The socket timeout for connections in this pool. This is how long - connections in this pool will attempt to connect to a server before - giving up. - - - - - - waiting - - - - If you have capped the pool size, workers requesting connections from - the pool may block until other workers return their connections. This - field shows how many milliseconds workers have blocked for connections to - be released. If this number keeps increasing, you may want to use - MongoPool::setSize to add more connections to your - pool. - - - - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - diff --git a/reference/mongo/mongopool/setsize.xml b/reference/mongo/mongopool/setsize.xml deleted file mode 100644 index 334e551c5d..0000000000 --- a/reference/mongo/mongopool/setsize.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - MongoPool::setSize - Set the size for future connection pools - - - - &reftitle.description; - - public static boolMongoPool::setSize - intsize - - - - Sets the max number of connections new pools will be able to create. - - - - - &reftitle.parameters; - - - - - size - - - - The max number of connections future pools will be able to create. - Negative numbers mean that the pool will spawn an infinite number of - connections. - - - - - - - - - &reftitle.returnvalues; - - Returns the former value of pool size. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL mongo 1.2.11 - Emits E_DEPRECATED when used. - - - - - - - - - - &reftitle.examples; - - - <function>Mongo::setPoolSize</function> example - - If you set the pool size to n and then create - n connections, attempting to create an - n+1st connection will throw a - MongoConnectionException. - - - -]]> - - &example.outputs.similar; - -__construct() -#1 {main} - thrown in /path/to/php/script.php on line 10 -]]> - - - - - - - - &reftitle.seealso; - - - MongoPool::getSize - MongoPool::info - The connection documentation. - - - - - diff --git a/reference/mongo/mongoprotocolexception.xml b/reference/mongo/mongoprotocolexception.xml deleted file mode 100644 index b08e84c253..0000000000 --- a/reference/mongo/mongoprotocolexception.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - The MongoProtocolException class - MongoProtocolException - - - - -
- &reftitle.intro; - - When talking to MongoDB 2.6.0, and later, certain operations (such as writes) may throw MongoProtocolException when the response - from the server did not make sense - for example during network failure (we could read the entire response) or data corruption. - - - This exception is also thrown when attempting to talk newer protocols then the server supports, for example using the - MongoWriteBatch when talking to a MongoDB server prior to 2.6.0. - -
- - -
- &reftitle.classsynopsis; - - - - MongoProtocolException - - - - - MongoProtocolException - - - - extends - MongoException - - - - &InheritedProperties; - - - - - -
- -
- &reftitle.examples; - - Catching MongoProtocolException - - Running the following example against MongoDB prior to 2.6.0 will throw an MongoProtocolException - - -selectCollection("test", "test"); - -try { - $batch = new MongoInsertBatch($c); -} catch(MongoProtocolException $e) { - echo $e->getMessage(); -} -?> -]]> - - &examples.outputs.similar; - - - - -
- - -
- -
- - diff --git a/reference/mongo/mongoregex.xml b/reference/mongo/mongoregex.xml deleted file mode 100644 index adf8dc7fa5..0000000000 --- a/reference/mongo/mongoregex.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - The MongoRegex class - MongoRegex - - - - - &mongo.alternative.class.note; - - MongoDB\BSON\Regex - - - - -
- &reftitle.intro; - - This class can be used to create regular expressions. Typically, these - expressions will be used to query the database and find matching strings. - More unusually, they can be saved to the database and retrieved. - - - Regular expressions consist of four parts. First a / - as starting delimiter, then the pattern, another / - and finally a string containing flags. - - - - Regular expression pattern - - - - - - - MongoDB recognizes six regular expression flags: - - - - - i: Case insensitive - - - - - m: Multiline - - - - - x: Can contain comments - - - - - l: locale - - - - - s: dotall, "." matches everything, including newlines - - - - - u: match unicode - - - -
- - -
- &reftitle.classsynopsis; - - - - MongoRegex - - - - - MongoRegex - - - - - Fields - - public - string - regex - - - public - string - flags - - - &Methods; - - - - -
- -
- - &reference.mongo.entities.mongoregex; - -
- - diff --git a/reference/mongo/mongoregex/construct.xml b/reference/mongo/mongoregex/construct.xml deleted file mode 100644 index 885bebb9ae..0000000000 --- a/reference/mongo/mongoregex/construct.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - MongoRegex::__construct - Creates a new regular expression - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\Regex::__construct - - - - - - &reftitle.description; - - public MongoRegex::__construct - stringregex - - - Creates a new regular expression. - - - - - &reftitle.parameters; - - - - - regex - - - - Regular expression string of the form /expr/flags. - - - - - - - - - &reftitle.returnvalues; - - Returns a new regular expression. - - - - - &reftitle.examples; - - - <function>MongoRegex::__construct</function> example - This example uses a regular expression to query for all documents - with a username field starting (^) with an - l and a vowel ([aeiouy]), - case-insensitive (/i). - -find(array("username" => $luke_search)); -?> -]]> - - - - - - - &reftitle.seealso; - - - MongoRegex::__toString - - - - - - diff --git a/reference/mongo/mongoregex/tostring.xml b/reference/mongo/mongoregex/tostring.xml deleted file mode 100644 index 6d004631f1..0000000000 --- a/reference/mongo/mongoregex/tostring.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - MongoRegex::__toString - A string representation of this regular expression - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\Regex::__toString - - - - - - &reftitle.description; - - public stringMongoRegex::__toString - - - - Returns a string representation of this regular expression. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This regular expression in the form "/expr/flags". - - - - - &reftitle.examples; - - - <function>MongoRegex::__toString</function> example - -regex . "\n"; -echo $r->flags . "\n"; -echo "$r\n"; - -?> -]]> - - &example.outputs.similar; - - - - - - - - - diff --git a/reference/mongo/mongoresultexception.xml b/reference/mongo/mongoresultexception.xml deleted file mode 100644 index 21ba7acd87..0000000000 --- a/reference/mongo/mongoresultexception.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - The MongoResultException class - MongoResultException - - - - -
- &reftitle.intro; - - The MongoResultException is thrown by several command helpers (such as - MongoCollection::findAndModify) in the event of - failure. The original result document is available through - MongoResultException::getDocument. - -
- - -
- &reftitle.classsynopsis; - - - - MongoResultException - - - - - MongoResultException - - - - extends - MongoException - - - - &Properties; - - public - document - - - &InheritedProperties; - - - &Methods; - - - - - -
- - - -
- &reftitle.properties; - - - document - - The raw result document as an array. - - - -
- - - -
- - &reference.mongo.entities.mongoresultexception; - -
- - diff --git a/reference/mongo/mongoresultexception/getdocument.xml b/reference/mongo/mongoresultexception/getdocument.xml deleted file mode 100644 index 55f80710bf..0000000000 --- a/reference/mongo/mongoresultexception/getdocument.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - MongoResultException::getDocument - Retrieve the full result document - - - - &reftitle.description; - - public arrayMongoResultException::getDocument - - - - Retrieves the full error result document. - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The full result document as an array, including partial data if available and - additional keys. - - - - - &reftitle.examples; - - <methodname>MongoResultException::getDocument</methodname> example - -selectCollection("test", "test"); - -$c->insert(array( - "name" => "Next promo", - "inprogress" => false, - "priority" => 0, - "tasks" => array( "select product", "add inventory", "do placement"), -) ); - -$c->insert(array( - "name" => "Biz report", - "inprogress" => false, - "priority" => 1, - "tasks" => array( "run sales report", "email report" ) -) ); - -$c->insert(array( - "name" => "Biz report", - "inprogress" => false, - "priority" => 2, - "tasks" => array( "run marketing report", "email report" ) - ), - array("w" => true) -); - -try { - $retval = $c->findAndModify( - array("inprogress" => false, "name" => "Biz report"), - array('$set' => array('$set' => array('inprogress' => true, "started" => new MongoDate()))), - null, - array( - "sort" => array("priority" => -1), - "new" => true, - ) - ); -} catch(MongoResultException $e) { - echo $e->getMessage(), "\n"; - $res = $e->getDocument(); - var_dump($res); -} -?> -]]> - - &examples.outputs.similar; - - - array(5) { - ["connectionId"]=> - int(6) - ["err"]=> - string(30) "$set is not valid for storage." - ["code"]=> - int(52) - ["n"]=> - int(0) - ["ok"]=> - float(1) - } - ["ok"]=> - float(0) - ["errmsg"]=> - string(30) "$set is not valid for storage." -} -]]> - - - - - - diff --git a/reference/mongo/mongotimestamp.xml b/reference/mongo/mongotimestamp.xml deleted file mode 100644 index 72e92b1aea..0000000000 --- a/reference/mongo/mongotimestamp.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - The MongoTimestamp class - MongoTimestamp - - - - - &mongo.alternative.class.note; - - MongoDB\BSON\Timestamp - - - - -
- &reftitle.intro; - - MongoTimestamp is an internal type used by MongoDB - for replication and sharding. It consists of a 4-byte timestamp (i.e. - seconds since the epoch) and a 4-byte increment. This type is not intended - for storing time or date values (e.g. a "createdAt" field on a document). - - - - Unless you are writing an application that interacts with MongoDB's - replication oplog or sharding internals: stop, go directly to - MongoDate, do not pass go, and do not collect 200 - dollars. This is not the class you are looking for. - - -
- - -
- &reftitle.classsynopsis; - - - - MongoTimestamp - - - - - MongoTimestamp - - - - - Fields - - public - int - sec - 0 - - - public - int - inc - 0 - - - &Methods; - - - - - -
-
- - &reference.mongo.entities.mongotimestamp; - -
- - diff --git a/reference/mongo/mongotimestamp/construct.xml b/reference/mongo/mongotimestamp/construct.xml deleted file mode 100644 index 36c9105c92..0000000000 --- a/reference/mongo/mongotimestamp/construct.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - MongoTimestamp::__construct - Creates a new timestamp - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\Timestamp::__construct - - - - - - &reftitle.description; - - public MongoTimestamp::__construct - intsectime() - intinc - - - Creates a new timestamp. If no parameters are given, the current time is - used and the increment is automatically provided. The increment is set to 0 - when the module is loaded and is incremented every time this constructor is - called (without the $inc parameter passed in). - - - - - &reftitle.parameters; - - - - - sec - - - - Number of seconds since the epoch (i.e. 1 Jan 1970 00:00:00.000 UTC). - - - - - - inc - - - - Increment. - - - - - - - - - &reftitle.returnvalues; - - Returns this new timestamp. - - - - - &reftitle.seealso; - - - MongoTimestamp::__toString - - - - - - - diff --git a/reference/mongo/mongotimestamp/tostring.xml b/reference/mongo/mongotimestamp/tostring.xml deleted file mode 100644 index b3e8db9e8c..0000000000 --- a/reference/mongo/mongotimestamp/tostring.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - MongoTimestamp::__toString - Returns a string representation of this timestamp - - - - - &mongo.alternative.method.note; - - MongoDB\BSON\Timestamp::__toString - - - - - - &reftitle.description; - - public stringMongoTimestamp::__toString - - - - Returns the "sec" field of this timestamp. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The seconds since epoch represented by this timestamp. - - - - - diff --git a/reference/mongo/mongoupdatebatch.xml b/reference/mongo/mongoupdatebatch.xml deleted file mode 100644 index a550b8dc29..0000000000 --- a/reference/mongo/mongoupdatebatch.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - The MongoUpdateBatch class - MongoUpdateBatch - - - - -
- &reftitle.intro; - - Constructs a batch of UPDATE operations. See MongoWriteBatch. - -
- - -
- &reftitle.classsynopsis; - - - - MongoUpdateBatch - - - - - MongoUpdateBatch - - - - extends - MongoWriteBatch - - - - - &Methods; - - - &InheritedMethods; - - - - - -
- -
- - &reference.mongo.entities.mongoupdatebatch; - -
- - diff --git a/reference/mongo/mongoupdatebatch/construct.xml b/reference/mongo/mongoupdatebatch/construct.xml deleted file mode 100644 index dbf8ad930c..0000000000 --- a/reference/mongo/mongoupdatebatch/construct.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - MongoUpdateBatch::__construct - Description - - - - &reftitle.description; - - public MongoUpdateBatch::__construct - MongoCollectioncollection - arraywrite_options - - - Constructs a batch of UPDATE operations. See MongoWriteBatch. - - - - - - &reftitle.parameters; - - - collection - &mongo.mongowritebatch.collection.description; - - - write_options - &mongo.mongowritebatch.writeoptions.description; - - - - - - &reftitle.returnvalues; - - A new MongoUpdateBatch. - - - - - - - diff --git a/reference/mongo/mongowritebatch.xml b/reference/mongo/mongowritebatch.xml deleted file mode 100644 index 01b2b502ef..0000000000 --- a/reference/mongo/mongowritebatch.xml +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - The MongoWriteBatch class - MongoWriteBatch - - - - -
- &reftitle.intro; - - MongoWriteBatch is the base class for the MongoInsertBatch, - MongoUpdateBatch and MongoDeleteBatch classes. - - - MongoWriteBatch allows you to "batch up" multiple operations (of same type) and shipping them all - to MongoDB at the same time. This can be especially useful when operating on many documents at the - same time to reduce roundtrips. - - - Prior to version 1.5.0 of the driver it was possible to use MongoCollection::batchInsert, - however, as of 1.5.0 that method is now discouraged. - - - Note: This class is only available when talking to MongoDB 2.6.0 (and later) servers. It will throw - MongoProtocolException if attempting to use it on older MongoDB servers. - -
- - -
- &reftitle.classsynopsis; - - - - MongoWriteBatch - - - - - MongoWriteBatch - - - - - &Constants; - - const - int - MongoWriteBatch::COMMAND_INSERT - 1 - - - const - int - MongoWriteBatch::COMMAND_UPDATE - 2 - - - const - int - MongoWriteBatch::COMMAND_DELETE - 3 - - - &Methods; - - - - - -
- MongoWriteBatch types - - - - MongoWriteBatch::COMMAND_INSERT - - Create an Insert Write Batch - - - - - MongoWriteBatch::COMMAND_UPDATE - - Create an Update Write Batch - - - - - MongoWriteBatch::COMMAND_DELETE - - Create an Delete Write Batch - - - - -
-
- -
- &reftitle.description; - - When executing a batch by calling - MongoWriteBatch::execute, MongoWriteBatch will send - up to maxWriteBatchSize (defaults to 1000) documents or - maxBsonObjectSize (defaults to 16777216 bytes), whichever - comes first. - - - - Documents will never be partially transferred. When adding documents to the batch, that overflows the limit, a new - batch will be created and the document put into the new batch. - - -
- -
- &reftitle.errors; - - Exception on parameter parsing failures - Exception on argument validation errors (e.g. missing keys) - MongoProtocolException when talking to MongoDB server older then 2.6.0. - MongoProtocolException on socket errors. - MongoWriteConcernException when a write fails due to WriteConcerns - -
- -
- &reftitle.examples; - - <classname>MongoWriteBatch</classname> example - - Adding documents to a Insert batch and then execute it - - -selectCollection("test", "test"); - - -$docs = array(); -$docs[] = array("my" => "demo"); -$docs[] = array("is" => "working"); -$docs[] = array("pretty" => "well"); - -$batch = new MongoInsertBatch($collection); -foreach($docs as $document) { - $batch->add($document); -} -$retval = $batch->execute(array("w" => 1)); -var_dump($retval); -?> -]]> - - &example.outputs; - - - int(3) - ["ok"]=> - bool(true) -} -]]> - - -
- -
- - &reference.mongo.entities.mongowritebatch; - -
- - diff --git a/reference/mongo/mongowritebatch/add.xml b/reference/mongo/mongowritebatch/add.xml deleted file mode 100644 index d725c988b7..0000000000 --- a/reference/mongo/mongowritebatch/add.xml +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - MongoWriteBatch::add - Adds a write operation to a batch - - - - &reftitle.description; - - public boolMongoWriteBatch::add - arrayitem - - - Adds a write operation to the batch. - - - If $item causes the batch to exceed the - maxWriteBatchSize or maxBsonObjectSize - limits, the driver will internally split the batches into multiple write - commands upon calling MongoWriteBatch::execute. - - - - - &reftitle.parameters; - - - item - - - An array that describes a write operation. The structure of this value - depends on the batch's operation type. - - - - Batch type - Argument expectation - - - - - MongoWriteBatch::COMMAND_INSERT - - The document to add. - - - - MongoWriteBatch::COMMAND_UPDATE - - Raw update operation. - Required keys are "q" and "u", which correspond to the $criteria and $new_object parameters of MongoCollection::update, respectively. - Optional keys are "multi" and "upsert", which correspond to the "multiple" and "upsert" options for MongoCollection::update, respectively. If unspecified, both options default to &false;. - - - - MongoWriteBatch::COMMAND_DELETE - - Raw delete operation. - Required keys are: "q" and "limit", which correspond to the $criteria parameter and "justOne" option of MongoCollection::remove, respectively. - The "limit" option is an int; however, MongoDB only supports 0 (i.e. remove all matching documents) and 1 (i.e. remove at most one matching document) at this time. - - - - - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success and throws an exception on failure. - - - - - &reftitle.errors; - - Exception on parameter parsing failures - Exception on argument validation errors (e.g. missing keys) - - - - - &reftitle.examples; - - <methodname>MongoWriteBatch::add</methodname> example - - Batching up multiple insert operations - - -selectCollection("test", "test"); - - -$docs = array(); -$docs[] = array("my" => "demo"); -$docs[] = array("is" => "working"); -$docs[] = array("pretty" => "well"); - -$batch = new MongoInsertBatch($collection); -foreach($docs as $document) { - $batch->add($document); -} -$batch->execute(array("w" => 1)); -?> -]]> - - - - - <methodname>MongoWriteBatch::add</methodname> example - - Batching up multiple update operations - - -selectCollection("test", "test"); - - -$item1 = array( - "q" => array("my" => "demo"), - "u" => array('$set' => array("try" => 1)), - "multi" => false, /* default value */ - "upsert" => false, /* default value */ -); -$item2 = array( - "q" => array("is" => "working"), - "u" => array('$set' => array("try" => 2)), - "multi" => true, -); -$item3 = array( - "q" => array("created" => "new-document"), - "u" => array('$set' => array("try" => 3)), - "upsert" => true, -); - -$batch = new MongoUpdateBatch($collection); -$batch->add($item1); -$batch->add($item2); -$batch->add($item3); -$batch->execute(array("w" => 1)); - -?> -]]> - - - - - <methodname>MongoWriteBatch::add</methodname> example - - Batching up multiple delete operations - - -selectCollection("test", "test"); - - -$item1 = array( - "q" => array("my" => "demo"), - "limit" => 1, -); -$item2 = array( - "q" => array("try" => 3), - "limit" => 1, -); - - -$batch = new MongoDeleteBatch($collection); -$batch->add($item1); -$batch->add($item2); -$batch->execute(array("w" => 1)); -?> -]]> - - - - - - - - - diff --git a/reference/mongo/mongowritebatch/construct.xml b/reference/mongo/mongowritebatch/construct.xml deleted file mode 100644 index bfbe1bf877..0000000000 --- a/reference/mongo/mongowritebatch/construct.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - MongoWriteBatch::__construct - Creates a new batch of write operations - - - - &reftitle.description; - - protected MongoWriteBatch::__construct - MongoCollectioncollection - stringbatch_type - arraywrite_options - - - Constructs a new MongoWriteBatch. - - - - This is a protected constructor. Please use one of the classes inheriting MongoWriteBatch. - - - - - - - &reftitle.parameters; - - - collection - &mongo.mongowritebatch.collection.description; - - - batch_type - - - One of: - - 0 - make an MongoWriteBatch::COMMAND_INSERT batch - 1 - make an MongoWriteBatch::COMMAND_UPDATE batch - 2 - make a MongoWriteBatch::COMMAND_DELETE batch - - - - - - write_options - &mongo.mongowritebatch.writeoptions.description; - - - - - - &reftitle.returnvalues; - - A new MongoWriteBatch of type batch_type. - - - - - &reftitle.seealso; - - MongoInsertBatch - MongoUpdateBatch - MongoDeleteBatch - - - - - - diff --git a/reference/mongo/mongowritebatch/execute.xml b/reference/mongo/mongowritebatch/execute.xml deleted file mode 100644 index 1437117728..0000000000 --- a/reference/mongo/mongowritebatch/execute.xml +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - MongoWriteBatch::execute - Executes a batch of write operations - - - - &reftitle.description; - - final public arrayMongoWriteBatch::execute - arraywrite_options - - - Executes the batch of write operations. - - - - - - &reftitle.parameters; - - - write_options - - - See MongoWriteBatch::__construct. - - - - - - - - &reftitle.returnvalues; - - Returns an array containing statistical information for the full batch. - If the batch had to be split into multiple batches, the return value will aggregate - the values from individual batches and return only the totals. - - - If the batch was empty, an array containing only the 'ok' field is returned (as &true;) although - nothing will be shipped over the wire (NOOP). - - - - - - Array key - Value meaning - Returned for batch type - - - - - nInserted - Number of inserted documents - MongoWriteBatch::COMMAND_INSERT batch - - - nMatched - Number of documents matching the query criteria - MongoWriteBatch::COMMAND_UPDATE batch - - - nModified - Number of documents actually needed to be modied - MongoWriteBatch::COMMAND_UPDATE batch - - - nUpserted - Number of upserted documents - MongoWriteBatch::COMMAND_UPDATE batch - - - nRemoved - Number of documents removed - MongoWriteBatch::COMMAND_DELETE batch - - - ok - Command success indicator - All - - - - - - - - &reftitle.errors; - - A MongoWriteConcernException exception is thrown on failure. - - - - - &reftitle.examples; - - <methodname>MongoWriteBatch::add</methodname> example - - Batching up multiple insert operations - - -selectCollection("test", "test"); - - -$docs = array(); -$docs[] = array("my" => "demo"); -$docs[] = array("is" => "working"); -$docs[] = array("pretty" => "well"); - -$batch = new MongoInsertBatch($collection); -foreach($docs as $document) { - $batch->add($document); -} -$retval = $batch->execute(array("w" => 1)); -var_dump($retval); -?> -]]> - - &example.outputs; - - - int(3) - ["ok"]=> - bool(true) -} -]]> - - - - - <methodname>MongoWriteBatch::add</methodname> example - - Batching up multiple update operations - - -selectCollection("test", "test"); - - -$item1 = array( - "q" => array("my" => "demo"), - "u" => array('$set' => array("try" => 1)), - "multi" => false, /* default value */ - "upsert" => false, /* default value */ -); -$item2 = array( - "q" => array("is" => "working"), - "u" => array('$set' => array("try" => 2)), - "multi" => true, -); -$item3 = array( - "q" => array("created" => "new-document"), - "u" => array('$set' => array("try" => 3)), - "upsert" => true, -); - -$batch = new MongoUpdateBatch($collection); -$batch->add($item1); -$batch->add($item2); -$batch->add($item3); -$retval = $batch->execute(array("w" => 1)); -var_dump($retval); - -?> -]]> - - &example.outputs; - - - int(18) - ["nModified"]=> - int(2) - ["nUpserted"]=> - int(0) - ["ok"]=> - bool(true) -} -]]> - - - - - <methodname>MongoWriteBatch::add</methodname> example - - Batching up multiple delete operations - - -selectCollection("test", "test"); - - -$item1 = array( - "q" => array("my" => "demo"), - "limit" => 1, -); -$item2 = array( - "q" => array("try" => 3), - "limit" => 1, -); - - -$batch = new MongoDeleteBatch($collection); -$batch->add($item1); -$batch->add($item2); -$retval = $batch->execute(array("w" => 1)); -var_dump($retval); -?> -]]> - - &example.outputs; - - - int(1) - ["ok"]=> - bool(true) -} -]]> - - - - - - - diff --git a/reference/mongo/mongowriteconcernexception.xml b/reference/mongo/mongowriteconcernexception.xml deleted file mode 100644 index 21fc3ffff5..0000000000 --- a/reference/mongo/mongowriteconcernexception.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - The MongoWriteConcernException class - MongoWriteConcernException - - - - -
- &reftitle.intro; - - MongoWriteConcernException is thrown when a write fails. See for how to set failure thresholds. - - - Prior to MongoDB 2.6.0, the getLastError command would determine whether a write failed. - -
- - -
- &reftitle.classsynopsis; - - - - MongoWriteConcernException - - - - - MongoWriteConcernException - - - - extends - MongoCursorException - - - - &InheritedProperties; - - - - &Methods; - - - &InheritedMethods; - - - - - -
- -
- - &reference.mongo.entities.mongowriteconcernexception; - -
- - diff --git a/reference/mongo/queries.xml b/reference/mongo/queries.xml deleted file mode 100644 index 3777b41cc5..0000000000 --- a/reference/mongo/queries.xml +++ /dev/null @@ -1,382 +0,0 @@ - - - - Querying - - - Distributing queries to secondaries - - - All queries (reads and writes) are only sent to the primary member of a - replica set by default. This is however easily configurable by using the - Read Preferences which allow - you to set some generic read preferences (such as allowing secondary reads - of the nearest server), and also provide ways to specifically target a - server in a specific country, datacenter, or even hardware, by the use of - replica set tag sets. - - - Read preferences can be configured at every level of the driver: - - As a query parameter or option to MongoClient::__construct - Specifically by calling MongoClient::setReadPreference - At the database level with MongoDB::setReadPreference - At the collection level with MongoCollection::setReadPreference - At the cursor level with MongoCursor::setReadPreference or MongoCommandCursor::setReadPreference - - Each class inherits its read preference setting from the "parent" context. - - - Inheriting read preferences from the database level down to the cursor - -setReadPreference(MongoClient::RP_SECONDARY_PREFERRED); -$c = $db->myCollection; - -$cursor = $c->find(); -?> -]]> - - - - In this example, the query will be executed against a secondary. The - collection inherits MongoClient::RP_SECONDARY_PREFERRED - from the database and the cursor inherits it from the collection. - - - - - How secondaries are chosen - - - Each instance of MongoClient chooses its own - secondary using the available secondary with the lowest ping time. So, if we - had a PHP client in Europe and one in Australia and we had one secondary in - each of these data centers, we could do: - - - - "setName", "readPreference" => MongoClient::RP_SECONDARY_PREFERRED); - -// on the Australian client -$m = new MongoClient("mongodb://primary,australianhost.secondary,europeanhost.secondary", $options); -$cursor = $m->foo->bar->find(); -$cursor->getNext(); -echo "Reading from: ", $cursor->info()["server"], "\n"; - -// on the European client -$m = new MongoClient("mongodb://primary,australianhost.secondary,europeanhost.secondary", $options); -$cursor = $m->foo->bar->find(); -$cursor->getNext(); -echo "Reading from: ", $cursor->info()["server"], "\n"; -?> -]]> - - &example.outputs.similar; - - - - - Note that we have to do a query before a secondary is chosen: secondaries - are chosen lazily by the driver, and for each query separately. - - - - - You can see what the driver thinks is the current status of the set - members by running MongoClient::getHosts or - MongoClient::getConnections. - - - - If no secondary is readable, the driver will send reads to the - primary as we specified - MongoClient::RP_SECONDARY_PREFERRED which will - fallback to execute a query on a primary if no secondaries are available. - A server is considered readable if its state is 2 (SECONDARY) and its - health is 1. You can check this with - MongoClient::getHosts and - MongoClient::getConnections. - - - - - Random notes - - - Writes are always sent to the primary—and by default all reads are sent - to the primary too. - - - - - - Querying by _id - - Every object inserted is automatically assigned a unique - _id field, which is often a useful field to use in - queries. This works similarly to "get last insert ID" functionality, except - that the _id is chosen by the client. - - - Suppose that we wish to find the document we just inserted. Inserting adds - an _id field to the document, so we can query by that: - - - - "joe"); - -$people->insert($person); - -// now $joe has an _id field -$joe = $people->findOne(array("_id" => $person['_id'])); -?> -]]> - - - - - Unless the user has specified otherwise, the _id field is a - MongoId. The most common mistake is attempting to use - a string to match a MongoId. Keep in mind that these - are two different datatypes, and will not match each other in the same way - that the string "array()" is not the same as an empty array. For example: - - - - "joe"); - -$people->insert($person); - -// convert the _id to a string -$pid = $person['_id'] . ""; - -// FAILS - $pid is a string, not a MongoId -$joe = $people->findOne(array("_id" => $pid)); -?> -]]> - - - - - - - Arrays - - - Arrays are special in a couple ways. First, there are two types that - MongoDB uses: "normal" arrays and associative arrays. Associative arrays can - have any mix of key types and values. "Normal" arrays are defined as arrays - with ascending numeric indexes starting at 0 and increasing by one for each - element. These are, typically, just your usual PHP array. - - - - For instance, if you want to save a list of awards in a document, you could - say: - - - - -save(array("awards" => array("gold", "silver", "bronze"))); - -?> -]]> - - - - - Queries can reach into arrays to search for elements. Suppose that we wish - to find all documents with an array element of a given value. For example, - documents with a "gold" award, such as: - - - - - - - - This can be done with a simple query, ignoring the fact that "awards" is an - array: - - - - -find(array("awards" => "gold")); - -?> -]]> - - - - - Suppose we are querying for a more complex object, if each element of the - array were an object itself, such as: - - - - - - - - Still ignoring that this is an array, we can use dot notation to query the - subobject: - - - - -find(array("awards.first place" => "gold")); - -?> -]]> - - - - - Notice that it doesn't matter that there is a space in the field name - (although it may be best not to use spaces, just to make things more - readable). - - - - You can also use an array to query for a number of possible values. For - instance, if we were looking for documents "gold" or "copper", we could do: - - - - -find(array("awards" => array('$in' => array("gold", "copper")))); - -?> -]]> - - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - - 1.3.0 - - Introduced the Read - Preferences framework to allow more fine grained control over - secondary reads. - - - - 1.3.0 - - Deprecated slaveOkay usage, the alternative is Read Preferences. - - - - 1.1.0 - - Introduced the possiblity of routing reads to secondaries of replica set - members using Mongo::setSlaveOkay - - - - - - - - - - - diff --git a/reference/mongo/readpreferences.xml b/reference/mongo/readpreferences.xml deleted file mode 100644 index 0213ba186c..0000000000 --- a/reference/mongo/readpreferences.xml +++ /dev/null @@ -1,312 +0,0 @@ - - - - - Read Preferences - - MongoDB 2.2 and version 1.3.0 of the driver add support for - read preferences, - which allow control over how queries are directed to mongod instances in a - replica set environment. Read preferences may be specified on either a - per-connection, per-database, or per-collection basis. Preferences defined - at a higher level - will be inherited by default (e.g. MongoCollection will - inherit read preferences defined on the corresponding - MongoDB instance). - - - Read preferences are specified with a combination of modes and tag sets. Modes - determine how mongod instances are prioritized, while - tag sets specify criteria - for eligible mongod instances. Mongod instances are only eligible if they - are within a 15ms difference in ping time from the nearest mongod instance. - - - Read Preference Modes - - - All read preference modes except MongoClient::RP_PRIMARY - may return stale data as secondaries replicate operations from the primary - with some delay. Ensure that your application can tolerate stale data if you - choose to use a mode other than MongoClient::RP_PRIMARY. - - - - - - MongoClient::RP_PRIMARY - - - All read operations use only the current replica set primary. This is the - default. If the primary is unavailable, read operations will produce an - exception. - - - This mode is incompatible with use of tag sets. Specifying a tag set with - MongoClient::RP_PRIMARY will result in an exception. - - - - - MongoClient::RP_PRIMARY_PREFERRED - - - In most situations, operations read from the primary member of the set. - However, if the primary is unavailable, as is the case during failover - situations, operations read from secondary members. - - - When the read preference includes a tag set, the client reads first from - the primary, if available, and then from secondaries that match the - specified tags. If no secondaries have matching tags, the read operation - will produce an exception. - - - - Version 2.2 of mongos added full support for read preferences. When - connecting to older mongos instances, - MongoClient::RP_PRIMARY_PREFERRED will send queries to - secondaries. - - - - - - MongoClient::RP_SECONDARY - - - Operations read only from the secondary members of the set. If no - secondaries are available, read operations will produce an exception. - - - Most sets have at least one secondary, but there are situations where - there may be no available secondary. For example, a set with a primary, a - secondary, and an arbiter may not have any secondaries if a member is in - recovering state or unavailable. - - - When the read preference includes a tag set, the client attempts to find - secondary members that match the specified tag set and directs reads to a - random secondary from among the nearest group. If no secondaries have - matching tags, the read operation will produce an exception. - - - - - MongoClient::RP_SECONDARY_PREFERRED - - - In most situations, operations read from secondary members, but in - situations where the set consists of a single primary with no other - members, the read operation will use the set's primary. - - - When the read preference includes a tag set, the client attempts to find a - secondary member that matches the specified tag set and directs reads to a - random secondary from among the nearest group. If no secondaries have - matching tags, the read operation will produce an exception. - - - - - MongoClient::RP_NEAREST - - - The driver reads from a random member of the set - that has a ping time that is less than 15ms slower than the member with - the lowest ping time. Reads in the - MongoClient::RP_NEAREST mode do not consider the - member's type and may read from both primaries and secondaries. - - - Set this mode to minimize the effect of network latency on read operations - without preference for current or stale data. - - - If you specify a tag set, the client attempts to find a member - that matches the specified tag set and directs reads to a random node - from among the nearest group. - - - - All operations read from the nearest member of the replica set that - matches the specified read preference mode. The - MongoClient::RP_NEAREST mode prefers low latency reads - over a member's primary or secondary status. - - - - - - - Tag Sets - - Tag sets allow you to - specify criteria so that your application can target read operations to - specific members, based on custom parameters. Tag sets make it possible to - ensure that read operations target members in a particular data center or - target mongod instances designated for a particular class of operations, such - as reporting or analytics. - - - You can specify tag sets with the following read preference modes: - - - - - MongoClient::RP_PRIMARY_PREFERRED - - - - - MongoClient::RP_SECONDARY - - - - - MongoClient::RP_SECONDARY_PREFERRED - - - - - MongoClient::RP_NEAREST - - - - - You cannot specify tag sets with the - MongoClient::RP_PRIMARY read preference mode. Tags apply - only when selecting a secondary member of a set, except for the when in the - nearest mode. - - - - Specifying Read Preferences - - Read preferences may be specified in either the connection URI provided to - MongoClient::__construct, which uses a query string - syntax, or via setter methods on the core classes, which use an array syntax - for tag sets. - - - When specifying read preference modes in a query string, the tag sets for - the readPreferenceTags value should be a comma-delimited - sequence of colon-delimited key/value pairs. - - - - Each tag set defined in the query string will use the - readPreferenceTags name. Unlike how PHP might handle URL - query strings, successive values for readPreferenceTags - will not overwrite each other. The driver will collect tag sets in the order - they appear in the query string. - - - - - If the driver cannot find a matching tag set the read will fail! It is - your responsibility of providing suitable fallback, such as an empty - readPreferenceTags value to fallback to "no tag set - preference". - - - - - Connection URI read preferences with query string syntax - - 'rs')); - -// Pick the nearest server in the "east" data center -$uri = 'mongodb://rs1.example.com,rs2.example.com/'; -$uri .= '?readPreference=nearest'; -$uri .= '&readPreferenceTags=dc:east'; -$m = new MongoClient($uri, array('replicaSet' => 'rs')); - -// Prefer the nearest server in the "east" data center also used for reporting, -// but fall back to a server in the "west" data center -$uri = 'mongodb://rs1.example.com,rs2.example.com/'; -$uri .= '?readPreference=nearest'; -$uri .= '&readPreferenceTags=dc:east,use:reporting'; -$uri .= '&readPreferenceTags=dc:west'; -$m = new MongoClient($uri, array('replicaSet' => 'rs')); - -// Prefer the nearest server in the "east" data center, then a server in the -// "west" data center, and finally fall back to no tag set preference -$uri = 'mongodb://rs1.example.com,rs2.example.com/'; -$uri .= '?readPreference=nearest'; -$uri .= '&readPreferenceTags=dc:east'; -$uri .= '&readPreferenceTags=dc:west'; -$uri .= '&readPreferenceTags='; -$m = new MongoClient($uri, array('replicaSet' => 'rs')); -?> -]]> - - - - - - Setting read preferences with array syntax for tag sets - - 'rs', -)); - -// Prefer the nearest server with no tag preference -$m->setReadPreference(MongoClient::RP_NEAREST, array()); - -// Pick the nearest server in the "east" data center -$m->setReadPreference(MongoClient::RP_NEAREST, array( - array('dc' => 'east'), -)); - -// Prefer the nearest server in the "east" data center also used for reporting, -// but fall back to a server in the "west" data center -$m->setReadPreference(MongoClient::RP_NEAREST, array( - array('dc' => 'east', 'use' => 'reporting'), - array('dc' => 'west'), -)); - -// Prefer the nearest server in the "east" data center, then a server in the -// "west" data center, and finally fall back to no tag set preference -$m->setReadPreference(MongoClient::RP_NEAREST, array( - array('dc' => 'east'), - array('dc' => 'west'), - array(), -)); -?> -]]> - - - - - - - - diff --git a/reference/mongo/reference.xml b/reference/mongo/reference.xml deleted file mode 100644 index 23a48bfb4f..0000000000 --- a/reference/mongo/reference.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Mongo &Functions; - - &reference.mongo.entities.functions; - - - - - diff --git a/reference/mongo/security.xml b/reference/mongo/security.xml deleted file mode 100644 index 7f453dc45a..0000000000 --- a/reference/mongo/security.xml +++ /dev/null @@ -1,169 +0,0 @@ - - - - - Security - -
- Request Injection Attacks - - If you are passing $_GET (or $_POST) - parameters to your queries, make sure that they are cast to strings first. - Users can insert associative arrays in GET and POST requests, which could - then become unwanted $-queries. - - - - A fairly innocuous example: suppose you are looking up a user's information - with the request http://www.example.com?username=bob. - Your application does the query - $collection->find(array("username" => $_GET['username'])). - - - - Someone could subvert this by getting - http://www.example.com?username[$ne]=foo, which PHP - will magically turn into an associative array, turning your query into - $collection->find(array("username" => array('$ne' => "foo"))), - which will return all users not named "foo" (all of your users, probably). - - - - This is a fairly easy attack to defend against: make sure $_GET and $_POST - parameters are the type you expect before you send them to the database - (cast them to strings, in this case). - - - - Note that this type of attack can be used with any databases interation that - locates a document, including updates, upserts, find-and-modifies, and - removes. - - - - Thanks to Phil for pointing this out. - - - - See the main documentation - for more information about SQL-injection-like issues with MongoDB. - -
- -
- Script Injection Attacks - - If you are using JavaScript, make sure that any variables that cross the PHP- - to-JavaScript boundry are passed in the scope field of - MongoCode, not interpolated into the JavaScript - string. This can come up when using MongoDB::execute, - $where clauses, MapReduces, group-bys, and any other time - you may pass JavaScript into the database. - - - - MapReduce ignore the scope field of - MongoCode, but there is a scope - option on the command that can be used instead. - - - - For example, suppose we have some JavaScript to greet a user in the database - logs. We could do: - - -execute("print('Hello, $username!');"); - -?> -]]> - - - However, what if a malicious user passes in some JavaScript? - - -execute("print('Hello, $username!');"); - -?> -]]> - - - Now MongoDB executes the JavaScript string - "print('Hello, '); db.users.drop(); print('!');". - This attack is easy to avoid: use scope to pass - variables from PHP to JavaScript: - - - $username); -$db->execute(new MongoCode("print('Hello, '+user+'!');", $scope)); - -?> -]]> - - - This adds a variable user to the JavaScript scope. Now if - someone tries to send malicious code, MongoDB will harmlessly print - Hello, '); db.dropDatabase(); print('!. - - - - Using scope helps prevent malicious input from being - executed by the database. However, you must make sure that your code does - not turn around and execute the input anyway! For example, never use the - JavaScript eval function on user input: - - - $jsShellInput); -$db->execute(new MongoCode("eval(input);", $scope)); - -?> -]]> - - - Always use scope and never allow the database to execute - user input as code. - -
-
- - - diff --git a/reference/mongo/setup.xml b/reference/mongo/setup.xml deleted file mode 100644 index 25d3c5bb05..0000000000 --- a/reference/mongo/setup.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - &reftitle.setup; - - - &mongo.deprecated.note; - - - -
- &reftitle.required; - &no.requirement; -
- - - - &reference.mongo.configure; - - - - &reference.mongo.ini; - - -
- - - diff --git a/reference/mongo/sqltomongo.xml b/reference/mongo/sqltomongo.xml deleted file mode 100644 index 1e89dfd86d..0000000000 --- a/reference/mongo/sqltomongo.xml +++ /dev/null @@ -1,254 +0,0 @@ - - - - SQL to Mongo Mapping Chart - - This is a PHP-specific version of the - SQL to Mongo - mapping chart in the main docs. - - - - - - - SQL Statement - Mongo Query Language Statement - - - - - - - CREATE TABLE USERS (a Number, b Number) - - - Implicit or use MongoDB::createCollection. - - - - - INSERT INTO USERS VALUES(1,1) - - - $db->users->insert(array("a" => 1, "b" => 1)); - - - - - SELECT a,b FROM users - - - $db->users->find(array(), array("a" => 1, "b" => 1)); - - - - - SELECT * FROM users WHERE age=33 - - - $db->users->find(array("age" => 33)); - - - - - SELECT a,b FROM users WHERE age=33 - - - $db->users->find(array("age" => 33), array("a" => 1, "b" => 1)); - - - - - SELECT a,b FROM users WHERE age=33 ORDER BY name - - - $db->users->find(array("age" => 33), array("a" => 1, "b" => 1))->sort(array("name" => 1)); - - - - - SELECT * FROM users WHERE age>33 - - - $db->users->find(array("age" => array('$gt' => 33))); - - - - - SELECT * FROM users WHERE age<33 - - - $db->users->find(array("age" => array('$lt' => 33))); - - - - - SELECT * FROM users WHERE name LIKE "%Joe%" - - - $db->users->find(array("name" => new MongoRegex("/Joe/"))); - - - - - SELECT * FROM users WHERE name LIKE "Joe%" - - - $db->users->find(array("name" => new MongoRegex("/^Joe/"))); - - - - - SELECT * FROM users WHERE age>33 AND age<=40 - - - $db->users->find(array("age" => array('$gt' => 33, '$lte' => 40))); - - - - - SELECT * FROM users ORDER BY name DESC - - - $db->users->find()->sort(array("name" => -1)); - - - - - CREATE INDEX myindexname ON users(name) - - - $db->users->ensureIndex(array("name" => 1)); - - - - - CREATE INDEX myindexname ON users(name,ts DESC) - - - $db->users->ensureIndex(array("name" => 1, "ts" => -1)); - - - - - SELECT * FROM users WHERE a=1 and b='q' - - - $db->users->find(array("a" => 1, "b" => "q")); - - - - - SELECT * FROM users LIMIT 20, 10 - - - $db->users->find()->limit(10)->skip(20); - - - - - SELECT * FROM users WHERE a=1 or b=2 - - - $db->users->find(array('$or' => array(array("a" => 1), array("b" => 2)))); - - - - - SELECT * FROM users LIMIT 1 - - - $db->users->find()->limit(1); - - - - - EXPLAIN SELECT * FROM users WHERE z=3 - - - $db->users->find(array("z" => 3))->explain() - - - - - SELECT DISTINCT last_name FROM users - - - $db->command(array("distinct" => "users", "key" => "last_name")); - - - - - SELECT COUNT(*y) FROM users - - - $db->users->count(); - - - - - SELECT COUNT(*y) FROM users where AGE > 30 - - - $db->users->find(array("age" => array('$gt' => 30)))->count(); - - - - - SELECT COUNT(AGE) from users - - - $db->users->find(array("age" => array('$exists' => true)))->count(); - - - - - UPDATE users SET a=1 WHERE b='q' - - - $db->users->update(array("b" => "q"), array('$set' => array("a" => 1))); - - - - - UPDATE users SET a=a+2 WHERE b='q' - - - $db->users->update(array("b" => "q"), array('$inc' => array("a" => 2))); - - - - - DELETE FROM users WHERE z="abc" - - - $db->users->remove(array("z" => "abc")); - - - - - - - - - diff --git a/reference/mongo/testing.xml b/reference/mongo/testing.xml deleted file mode 100644 index 135f8b4133..0000000000 --- a/reference/mongo/testing.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Running the Driver's Tests - - - The PECL package does not come with the tests, but they are available at - Github. - - -
- .phpt Tests - - .phpt tests are the standard way of testing PHP extensions. After compiling - the MongoDB driver with "make" you can then issue "make test" to run the - tests. These tests require MongoDB to be working, and hence, you need to - configure the test suite itself. - - - There is more information on running the tests in the contributing - guidelines on - GitHub. - -
- -
- Reporting Errors - - Please report any failures or errors in the - bugtracker. There may be skipped - tests, these are normal and can be ignored. - - - New tests are always welcome! Please feel free to contribute new tests of any - type testing any functionality. - -
-
- - - diff --git a/reference/mongo/trouble.xml b/reference/mongo/trouble.xml deleted file mode 100644 index 948e3d22c9..0000000000 --- a/reference/mongo/trouble.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - Troubleshooting - - - If you're having trouble, there are lots of resources you can turn to. - - - - - IRC - - The official MongoDB IRC room is irc.freenode.net/#mongodb. This is the - fastest way to get help. - - - - Mailing List - - MongoDB's mailing list - is a good (and usually very fast) way to get answers to questions. - - - - Bug Tracker - - Found a bug? Want a feature? Have a question? File it in the - PHP driver's bug tracker. - - - - - - You can make the driver log all kinds of error messages as - E_NOTICE level PHP error messages. Have a look at - the MongoLog for an example. - - - - - - diff --git a/reference/mongo/tutorial.xml b/reference/mongo/tutorial.xml deleted file mode 100644 index d0ceb20edd..0000000000 --- a/reference/mongo/tutorial.xml +++ /dev/null @@ -1,576 +0,0 @@ - - - - - Tutorial - - &mongo.deprecated.note; - - - This is the official MongoDB driver for PHP. - - Here's a quick code sample that connects, inserts documents, queries for - documents, iterates through query results, and disconnects from MongoDB. - There are more details on each step in the tutorial below. - - - -comedy; - -// select a collection (analogous to a relational database's table) -$collection = $db->cartoons; - -// add a record -$document = array( "title" => "Calvin and Hobbes", "author" => "Bill Watterson" ); -$collection->insert($document); - -// add another record, with a different "shape" -$document = array( "title" => "XKCD", "online" => true ); -$collection->insert($document); - -// find everything in the collection -$cursor = $collection->find(); - -// iterate through the results -foreach ($cursor as $document) { - echo $document["title"] . "\n"; -} - -?> -]]> - - &example.outputs; - - - - - - -
- Making a Connection - - To connect to the database server, use one of the following: - - - - - -]]> - - - - You do not have to explicitly disconnect from the database. The driver uses - persistent connections and will re-use already established connections. - -
- See Also - - The chapter on connecting - covers different types of connections. - - - The API documentation on the MongoClient class and - MongoClient::__construct give a comprehensive look at - all possible options with a number of examples. - -
-
- -
- Getting a Database - - To select a database, use: - - - -dbname; -?> -]]> - - - - The database does not need to be created in advance, you can create new - databases by selecting them. - - - Be careful of typos! You can inadvertently create a new database, which can - cause confusing errors (here name is misspelled as - anme in the second selection: - - - -mybiglongdbname; -// do some stuff - -$db = $connection->mybiglongdbanme; -// now connected to a different database! -?> -]]> - - - -
- See Also - - The API documentation on the MongoDB class contains - more information about database objects. - -
-
- -
- Getting A Collection - - Getting a collection has the same syntax as getting a database: - - - -baz; - -// select a collection: -$collection = $db->foobar; - -// or, directly selecting a database and collection: -$collection = $connection->baz->foobar; -?> -]]> - - - - A collection is analogous to a table (if you are familiar with relational - databases). - -
- See Also - - The API documentation on the MongoCollection class - contains more information about collection objects. - -
-
- -
- Inserting a Document - - Associative arrays are the basic object that can be saved to a collection in - the database. A somewhat random "document" might be: - - - - "MongoDB", - "type" => "database", - "count" => 1, - "info" => (object)array( "x" => 203, "y" => 102), - "versions" => array("0.9.7", "0.9.8", "0.9.9") -); -?> -]]> - - - - Note that you can have nested arrays and objects. The driver will always - store an associative array as an object in the database. A - numerically indexed array is stored as an array in case the keys start at - 0 and are not interrupted, and as an object if the array keys don't start - at 0 or have gaps (ie: 0, 1, 4, 5). - - - To insert this document, use MongoCollection::insert: - - - -database->collectionName; - -$collection->insert( $doc ); -?> -]]> - - -
- See Also - - The API documentation on MongoCollection::insert - contains more information about inserting data. - -
-
- -
- - Finding Documents using <function>MongoCollection::findOne</function> - - - To show that the document we inserted in the previous step is stored in - the database, we can do a simple - MongoCollection::findOne operation to get a single - document from the collection. This method is useful when there is only one - document matching the query or you are only interested in one result. - - - -database->collectionName; - -$document = $collection->findOne(); -var_dump( $document ); -?> -]]> - - &example.outputs; - - - object(MongoId)#8 (1) { - ["$id"]=> - string(24) "4e2995576803fab768000000" - } - ["name"]=> - string(7) "MongoDB" - ["type"]=> - string(8) "database" - ["count"]=> - int(1) - ["info"]=> - array(2) { - ["x"]=> - int(203) - ["y"]=> - int(102) - } - ["versions"]=> - array(3) { - [0]=> - string(5) "0.9.7" - [1]=> - string(5) "0.9.8" - [2]=> - string(5) "0.9.9" - } -} -]]> - - - - Note that there is an _id field that has been added - automatically to your document. _id is the "primary key" - field. If your document does not specify one, the driver will add one - automatically. - - - If you specify your own _id field, it must be unique to - the collection. See the example here: - - - -database; - -$db->foo->insert(array("_id" => 1)); -// this will throw an exception -$db->foo->insert(array("_id" => 1)); - -// this is fine, as it is a different collection -$db->bar->insert(array("_id" => 1)); -?> -]]> - - - - By default the driver will ensure the server has acknowledged the write - before returning. You can optionally turn this behaviour off by passing - array("w" => 0) as the second argument. This means that - the driver should not wait for the database to acknowledge the write and - would not throw the duplicate _id exception. - -
- See Also - - MongoCollection::findOne for more information about - finding data. - - - MongoId goes into more detail on unique ids. - - - The writes section covers - writes in more depth, and the - chapter goes into details of the various Write Concern options. - -
-
- -
- Adding Multiple Documents - - In order to do more interesting things with queries, let's add multiple - simple documents to the collection. These documents will just be of the form - array( "i" => value ); and we - can do this fairly efficiently in a loop: - - - -database->collectionName; - -for ( $i = 0; $i < 100; $i++ ) -{ - $collection->insert( array( 'i' => $i, "field{$i}" => $i * 2 ) ); -} -?> -]]> - - - - - Notice that we can insert arrays with different keys into the same - collection. This aspect is what we mean when we say that MongoDB is - "schema-free". In the example above each document has an - i field, but also a field name in the form of - field + $i. - -
- -
- Counting Documents in A Collection - - Now that we've inserted 101 documents (the 100 we did in the loop, plus the - first one), we can check to see if we have them all using the - MongoCollection::count method. - - -database->collectionName; - -echo $collection->count(); -?> -]]> - - - and it should print 101. - -
- -
- Using a Cursor to Get All of the Documents - - In order to get all the documents in the collection, we will use - MongoCollection::find. The find() method returns a - MongoCursor object which allows us to iterate over the - set of documents that matched our query. So to query all of the documents and - print them out: - - - -database->collectionName; - -$cursor = $collection->find(); -foreach ( $cursor as $id => $value ) -{ - echo "$id: "; - var_dump( $value ); -} -?> -]]> - - - - and that should print all 101 documents in the collection. - $id is the _id field of a document - (cast to a string) and $value is the document itself. - -
- See Also - - The API documentation on MongoCollection::find - contains more information about finding data. - -
-
- -
- Setting Criteria for a Query - - We can create a query to pass to the - MongoCollection::find method to get a subset of the - documents in our collection. For example, if we wanted to find the document - for which the value of the "i" field is - 71, we would do the following: - - - -database->collectionName; - -$query = array( 'i' => 71 ); -$cursor = $collection->find( $query ); - -while ( $cursor->hasNext() ) -{ - var_dump( $cursor->getNext() ); -} -?> -]]> - - &example.outputs; - - - object(MongoId)#6 (0) { - } - ["i"]=> - int(71) - ["_ns"]=> - "testCollection" -} -]]> - - -
- -
- Getting A Set of Documents With a Query - - We can use the query to get a set of documents from our collection. For - example, if we wanted to get all documents where "i" - > 50, we could write: - - - -database->collectionName; - -$query = array( "i" => array( '$gt' => 50 ) ); //note the single quotes around '$gt' -$cursor = $collection->find( $query ); - -while ( $cursor->hasNext() ) -{ - var_dump( $cursor->getNext() ); -} -?> -]]> - - - which should print the documents where "i" > - 50. We could also get a range, say - 20 < i <= 30: - - -database->collectionName; - -$query = array( 'i' => array( '$gt' => 20, "\$lte" => 30 ) ); -$cursor = $collection->find( $query ); - -while ( $cursor->hasNext() ) -{ - var_dump( $cursor->getNext() ); -} -?> -]]> - - - - Remember to always escape the $-symbol or use single quotes. Otherwise PHP - will interpret it to be the variable $gt. - -
- -
- Creating An Index - - MongoDB supports indexes, and they are very easy to add on a collection. To - create an index, you specify the field name and direction: ascending (1) or - descending (-1). The following creates an ascending index on the "i" field: - - - -database->collectionName; - -$collection->ensureIndex( array( "i" => 1 ) ); // create index on "i" -$collection->ensureIndex( array( "i" => -1, "j" => 1 ) ); // index on "i" descending, "j" ascending -?> -]]> - - - - Indexing is critical for good read performance as your data grows. If you - are not familiar with indexing, check out the - MongoCollection::ensureIndex documentation and the core - MongoDB indexing documentation. - -
-
- - diff --git a/reference/mongo/types.xml b/reference/mongo/types.xml deleted file mode 100644 index ffc191da08..0000000000 --- a/reference/mongo/types.xml +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - Types - - -
- - MongoDB allows programmers to save and query for data expressed in all of the - basic PHP types, compound types (arrays, associative arrays, and objects), and - a half-dozen classes provided by the MongoDB PHP driver (for regular - expressions, dates, and other specialized applications). - -
- -
- Booleans and &null; - - &true;, &false;, and &null; can be used as-is. - -
- -
- Numbers - - Numbers are distinct from strings in MongoDB: "123" does not match 123. - Thus, if you want to make sure numbers are sorted and matched correctly, you - must make sure that they are actually saved as numbers. - - - 123, "b" => "123"); -$collection->insert($doc); - -$doc->find(array("a" => 123)); // matches -$doc->find(array("a" => "123")); // doesn't match -$doc->find(array("a" => 123.0)); // matches -$doc->find(array("b" => 123)); // doesn't match -$doc->find(array("b" => "123")); // matches - -?> -]]> - - - As noted above, floating point numbers do compare with/match integer numbers - as one would expect. - -
- Large Numbers - - By default, on a 32-bit system, numbers are sent to the database as 32-bit - integers. On a 64-bit system, they are sent as 64-bit integers. For - backwards compatibility, all systems deserialize 64-bit integers as floating - point numbers. Floating point numbers are not exact. If you need exact - values, you must tweak your - php.ini settings. - - - On a 32-bit system, if mongo.long_as_object is set, - 64-bit integers will be returns as MongoInt64 - objects. The integer will be stored in the value field - with perfect precision (as a string). You can also use - MongoInt64 to save 64-bit integers on 32-bit - machines. - - - On 64-bit systems, you can either set mongo.long_as_object - or set mongo.native_long. - mongo.native_long will return 64-bit integers and - "normal" PHP integers. You can use MongoInt32 to - save 32-bit integers on 64-bit machines. - - - You should set the mongo.long_as_object and - mongo.native_long behavior that you plan to use, even if - it is the default behavior (to protect against future changes to the - defaults). - - - See also: php.ini Options, - MongoInt32, MongoInt64. - -
-
- -
- Strings - - Strings must be UTF-8. Non-UTF-8 strings must either be converted to UTF-8 - before being sent to the database or saved as binary data. - - - Regular expressions can be used to match strings, and are expressed using the - MongoRegex class. - -
- -
- Binary Data - - Non-UTF-8 strings, images, and any other binary data should be sent to the - database using the MongoBinData type. - -
- -
- Dates - - Dates can be created using the MongoDate class. They - are stored as milliseconds since the epoch. - - - MongoTimestamp is not for saving dates or timestamps, - it is used internally by MongoDB. Unless you are creating a tool that - interacts with the internals of replication or sharding, you should use - MongoDate, not - MongoTimestamp. - -
- -
- Unique Ids - - The driver will automatically create an _id field before - inserting a document (unless one is specified by the user). This field is an - instance of MongoId (called "ObjectId" in most other - languages). - - - These ids are 12 bytes long and composed of: - - - 4 bytes of timestamp - - No two records can have the same id if they were inserted at different - times. - - - - 3 bytes machine id - - No two records can have the same id if they were inserted on different - machines - - - - 2 bytes thread id - - No two records can have the same id if they were inserted by different - threads running on the same machine. - - - - 3 bytes incrementing value - - Each time an id is created, a global counter is incremented and used - as the increment value of the next id. - - - - Thus, no two records can have the same id unless a single process on a - single machine managed to insert 256^3 (over 16 million) documents in - one second, overflowing the increment field. - -
- -
- JavaScript - - MongoDB comes with a JavaScript engine, so you can embed JavaScript in - queries (using a $where clause), send it directly to the database to be - executed, and use it to perform aggregations. - - - For security, use MongoCode's scope - field to use PHP variables in JavaScript. Code that does not require - external values can either use MongoCode or just be - a string. See the - section on security for more - information about sending JavaScript to the database. - -
- -
- Arrays and Objects - - - Arrays and objects can also be saved to the database. An array with ascending - numeric keys will be saved as a an array, anything else will be saved as an - object. - - - -insert(array("scores" => $scores)); - -// $scores will be saved as an object -$scores = array("quiz1" => 98, "midterm" => 100, "quiz2" => 73, "final" => 85); -$collection->insert(array("scores" => $scores)); - -?> -]]> - - - - If you query for these objects using the database shell, they will look like: - - db.students.find() -{ "_id" : ObjectId("4b06beada9ad6390dab17c43"), "scores" : [ 98, 100, 73, 85 ] } -{ "_id" : ObjectId("4b06bebea9ad6390dab17c44"), "scores" : { "quiz1" : 98, "midterm" : 100, "quiz2" : 73, "final" : 85 } } -]]> - - - - - The database can also save arbitrary PHP objects (although they will be - returned as associative arrays). The fields are used for the key/value - pairs. For example, a blog post might look like: - -author = $author; -$this->content = $content; - $this->date = new MongoDate(); - } - - public function setTitle($title) { - $this->title = $title; - } -} - -// create a simple blog post and insert it into the database -$post1 = new Post("Adam", "This is a blog post"); - -$blog->insert($post1); - - -// there is nothing restricting the type of the "author" field, so we can make -// it a nested object -$author = array("name" => "Fred", "karma" => 42); -$post2 = new Post($author, "This is another blog post."); - -// we create an extra field by setting the title -$post2->setTitle("Second Post"); - -$blog->insert($post2); - -?> -]]> - - - - - From the database shell, this will look something like: - - db.blog.find() -{ "_id" : ObjectId("4b06c263edb87a281e09dad8"), "author" : "Adam", "content" : "This is a blog post", "comments" : [ ], "date" : "Fri Nov 20 2009 11:22:59 GMT-0500 (EST)" } -{ "_id" : ObjectId("4b06c282edb87a281e09dad9"), "author" : { "name" : "Fred", "karma" : 42 }, "content" : "This is a blog post", "comments" : [ ], "date" : "Fri Nov 20 2009 11:23:30 GMT-0500 (EST)", "title" : "Second Post" } -]]> - - - - - The driver will not detect reference loops in arrays and objects. For - example, this will give a fatal error: - -insert($GLOBALS); - -?> -]]> - - - - - If you need to insert documents that may have recursive dependency, you have - to check for it yourself before passing it to the driver. - -
-
- &reference.mongo.mongoid; - &reference.mongo.mongocode; - &reference.mongo.mongodate; - &reference.mongo.mongoregex; - &reference.mongo.mongobindata; - &reference.mongo.mongoint32; - &reference.mongo.mongoint64; - &reference.mongo.mongodbref; - &reference.mongo.mongominkey; - &reference.mongo.mongomaxkey; - &reference.mongo.mongotimestamp; - -
diff --git a/reference/mongo/updates.xml b/reference/mongo/updates.xml deleted file mode 100644 index 1d4bc2eb94..0000000000 --- a/reference/mongo/updates.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - - Updates - - - Updates can be one of the most complicated operation available with - MongoDB. They combine a query with an action, modifying documents that match - the criteria. They are also extremely powerful, allowing you to change - documents quickly and replace them altogether. They are done in-place (when - possible) with little overhead. - - -
- Modifying vs. replacing documents - - - There are two types of updates you can use: modifying updates and replacing - updates. Modifying updates contain $-operators and change fields in a - document: they might increment counters, push new elements onto an array, - or change the type of a field. - - - - For example, a modifying update could add a new field to a document. - -update(array("username" => "joe"), array('$set' => array("twitter" => "@joe4153"))); - -/** now the document will look like: - * {"username" : "joe", "password" : "...", "email" : "...", "twitter" : "@joe4153"} - */ -?> -]]> - - - - - Replacing updates replace the entire matching document with a new document. - They are generally not as efficient as using $-modifiers, but can be very - usefully for complex operations or updates that can't be expressed in terms - of $-operators. - - - - For example, a replacing update can completely change the structure of a - document. - -update(array("username" => "joe"), array("userId" => 12345, "info" => array( - "name" => "joe", "twitter" => "@joe4153", "email" => "..."), "likes" => array())); - -/** now the document will look like: - * { - * "userId" : 12345, - * "info" : { - * "name" : "joe", - * "twitter" : "@joe4153", - * "email" : "..." - * }, - * "likes" : [] - * } - */ -?> -]]> - - - -
- -
- Updating Nested Objects - - - Suppose we wish to change the name of a comment's author in this document: - - - - - - In order to change an inner field, we use $set (so that all of the other - fields are not removed!) with the index of comment to change: - - -update($criteria, array('$set' => array("comments.1" => array("author" => "Jim")))); - -?> -]]> - - -
- -
- The Positional Operator - - The positional operator $ is useful for updating objects - that are in arrays. In the example above, for instance, suppose that we did - not know the index of the comment that we needed to change, merely that we - needed to change "John" to "Jim". We can use $ to do so. - - -update( - array("comments.author" => "John"), - array('$set' => array('comments.$.author' => "Jim"))); - -?> -]]> - -
-
- - - diff --git a/reference/mongo/versions.xml b/reference/mongo/versions.xml deleted file mode 100644 index bc89f67668..0000000000 --- a/reference/mongo/versions.xml +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reference/mongo/writeconcerns.xml b/reference/mongo/writeconcerns.xml deleted file mode 100644 index 81507f32ae..0000000000 --- a/reference/mongo/writeconcerns.xml +++ /dev/null @@ -1,413 +0,0 @@ - - - - - Write Concerns - - - MongoDB provides several different ways of selecting how durable a write to - the database should be. These ways are called Write - Concerns and span everything from completely ignoring all errors, - to specifically targetting which servers are required to confirm the write - before returning the operation. - - - When a write (such as with MongoCollection::insert, - MongoCollection::update, and - MongoCollection::remove) is given a Write Concern - option ("w") the driver will send the query to MongoDB - and piggy back a getLastError command - (GLE) with the Write Concern option at the same time. - The server only returns when the Write Concern condition is verified to be - fulfilled, or the query times out (controlled with the - "wtimeout" option, 10000 milliseconds - is the default). - - - - - Even though a getLastError command times out the data - will most likely have been written to the primary server and will be - replicated to all the secondaries once they have caught up. - - - The typical reasons for a timeout to happen is if you specify a Write - Concern which requires confirmation from more servers then you currently - have available. - - - - - When using acknowledged writes and the replica set has failed over, the driver - will automatically disconnect from the primary, throw an exception, and - attempt to find a new primary on the next operation (your application must - decide whether or not to retry the operation on the new primary). - - - When using unacknowledged writes (w=0) and the replica set has failed over, - there will be no way for the driver to know about the change so it will - continue and silently fail to write. - - - The default Write Concern for the MongoClient is - 1: acknowledge write operations. - - - - - - Available Write Concerns - - - - Write Concern - Meaning - Description - - - - - - w=0 - Unacknowledged - A write will not be followed up with a GLE call, and therefore not checked ("fire and forget") - - - w=1 - Acknowledged - The write will be acknowledged by the server (the primary on replica set configuration) - - - w=N - Replica Set Acknowledged - The write will be acknowledged by the primary server, and - replicated to N-1 secondaries. - - - w=majority - Majority Acknowledged - The write will be acknowledged by the majority of the replica set (including the primary). This is a special reserved string. - - - w=<tag set> - Replica Set Tag Set Acknowledged - The write will be acknowledged by members of the entire tag set - - - j=true - Journaled - The write will be acknowledged by primary and the journal flushed to disk - - - -
-
- - - Using WriteConcerns - - Each of the methods that causes writes - (MongoCollection::insert, - MongoCollection::update, - MongoCollection::remove, and - MongoCollection::batchInsert) allow an optional - argument to send a set of options to the MongoDB server. With this option - array you can set the WriteConcern as the following example illustrates: - - - Passing a WriteConcern to a write operation - -insert($someDoc, array("w" => 0)); - -// Setting w=majority for update: -$collection->update($someDoc, $someUpdates, array("w" => "majority")); - -// Setting w=5 and j=true for remove: -$collection->update($someDoc, array("w" => 5, "j" => true)); - -// Setting w="AllDCs" for batchInsert: -$collection->update(array($someDoc1, $someDoc2), array("w" => "AllDCs")); -?> -]]> - - - - Besides setting WriteConcerns per operation as an option argument, it is - also possible to set a default WriteConcern in different ways. - - - The first way is through the connection - string. The connection string accepts the - journal, w, and - wTimeoutMS options: - - - Connection string WriteConcerns - - -]]> - - - - - Since driver version 1.5 it is also possible to call - MongoDB::setWriteConcern and - MongoCollection::setWriteConcern to set a default - WriteConcern for all operations created from that specific - MongoDB or MongoCollection - object: - - - MongoDB::setWriteConcern and MongoCollection::setWriteConcern - -demoDb; -$c = $d->demoCollection; - -// Set w=3 on the database object with a timeout of 25000ms -$d->setWriteConcern(3, 25000); - -// Set w=majority on the collection object without changing the timeout -$c->setWriteConcern("majority"); -?> -]]> - - - - - - Unacknowledged Writes - - By not requiring the server to acknowledge writes the writes can be performed - extremely quickly, but you don't know whether or not they actually succeeded. - Writes can fail for a number of reasons: if there are network problems, if a - database server goes down, or if the write was simply invalid (e.g., writing - to a system collection; or duplicate key errors). - - - While developing, you should always use acknowledged writes (to protect against - inadvertent mistakes, such as syntax errors, invalid operators, duplicate key errors and so on). In - production, unacknowledged writes can be used for "unimportant" data. Unimportant - data varies on application, but it's generally automatically (instead of user - generated) data, such as click tracking or GPS locations, where you can get - thousands of records per second. - - - It is strongly recommended that you do an acknowledged write at the end of - series of unacknowledged writes. Doing so will not incur in a too large - performance penalty, but still allow you to catch any errors that may have - occurred. - - - Unacknowledged WriteConcern, followed with Acknowledged Write - -insert($someDoc, array("w" => 0)); -$collection->update($criteria, $newObj, array("w" => 0)); -$collection->insert($somethingElse, array("w" => 0)); -try { - $collection->remove($something, array("w" => 1)); -} catch(MongoCursorException $e) { - /* Handle the exception.. */ - /* Here we should issue find() queries on the IDs generated for - $somethingElse and $someDoc to verify they got written to the database and - attempt to figureout where in the chain something happened. */ -} -?> -]]> - - - If the last write throws an exception, you know that there's a problem - with your database. - - - - - - Acknowledged Writes - - These type of write operations will make sure that the database has - accepted the write operation before returning success. If the write failed, - it will throw a MongoCursorException with an - explanation of the failure. The MongoClient default - behaviour is to acknowledge the write (w=1). - - - It is possible to specify how many members of an replica set have to - acknowledge the write (i.e. have it replicated) before the write is deemed - acknowledged and the operation returns. - - Acknowledged Writes - -insert($doc, array("w" => 1)); - -// Force acknowledgement from the primary, and one other member of the -// replica set -$collection->insert($doc, array("w" => 2)); - -// Force acknowledgement from the primary, and six other members of the -// replica set (you probably never should do this): -$collection->insert($doc, array("w" => 7)); -?> -]]> - - - Keep in mind to select your Write Concern carefully. If you have a - replica set with 5 members, and you select Write Concern of - 4 you will risk the write blocking forever when one - member of the replica set goes down for maintenance or a temporary network - outage happens. - - - - - - Passing in a string value for Write Concern has a specific meaning - (Replica Set Tag Set Acknowledged). Please be careful of - NOT using string values for numbers (i.e. - array("w" => "1")) as it will be treated as a tag set - name. - - - - - - Majority Acknowledged Writes - - Using the special majority Write Concern option is the - recommended way for writes that are required to survive the apocalypse, as - it will ensure the majority of your replica set will have the write and will - therefore be guaranteed to survive all usual suspect outage scenarios. - - - Majority Acknowledged Write - -insert($someDoc, array("w" => "majority")); -?> -]]> - - - - - - - - Journaled Writes - - When connecting to a replica set the default Write Concern is only to have - the primary server acknowledge the write. There is however a 100ms window - until the write gets journaled and flushed to disk. It is possible to force - the write to be journaled before acknowledging the write by setting the - j option: - - Acknowledged and Journaled Write - Forcing journal flush - - 1, - "j" => true, -); -try { - $collection->insert($document, $options); -} catch(MongoCursorException $e) { - /* handle the exception */ -} -?> -]]> - - - - - - - &reftitle.seealso; - - - MongoDB WriteConcern docs - - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 1.3.0 - - MongoClient was introduced and defaults to - acknowledged writes. - The deprecated Mongo defaults to unacknowledged - writes. - - - - 1.3.0 - - The "safe" write option has been deprecated and is - not available with the new MongoClient class. - Use the "w" option instead. - - - - - - - -
- - - diff --git a/reference/mongo/writes.xml b/reference/mongo/writes.xml deleted file mode 100644 index e17bb12fb6..0000000000 --- a/reference/mongo/writes.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - Writes -
- Updating Nested Objects - - - Suppose we wish to change the name of a comment's author in this document: - - - - - - In order to change an inner field, we use $set (so that all of the other - fields are not removed!) with the index of comment to change: - - -update($criteria, array('$set' => array("comments.1" => array("author" => "Jim")))); - -?> -]]> - - -
- -
- The Positional Operator - - The positional operator $ is useful for updating objects - that are in arrays. In the example above, for instance, suppose that we did - not know the index of the comment that we needed to change, merely that we - needed to change "John" to "Jim". We can use $ to do so. - - -update( - array('comments.author' => 'John'), - array('$set' => array('comments.$.author' => 'Jim'))); - -?> -]]> - -
- -
- - - diff --git a/reference/mongodb/architecture.xml b/reference/mongodb/architecture.xml index 5d70ca3909..6034cd8a2a 100644 --- a/reference/mongodb/architecture.xml +++ b/reference/mongodb/architecture.xml @@ -13,8 +13,8 @@ This section explains how all the different parts of the driver fit together. From the different language runtimes, through the extension and to the PHP libraries on top. This new architecture has replaced the old - mongo extension. We refer to the new one - as the mongodb extension. + mongo extension. We refer to the new one + as the mongodb extension. @@ -197,7 +197,7 @@ foreach ($managers as $manager) { 127.0.0.1 and one connection to each of rs1.example.com and rs2.example.com. If the driver discovers additional members of the replica set after issuing - isMaster commands, it will open additional connections to + hello commands, it will open additional connections to those servers as well. @@ -205,7 +205,7 @@ foreach ($managers as $manager) { If the same worker executes the script again in a second request, the three clients will be re-used and no new connections should be made. Depending on how long ago the previous request was served, the driver may need to issue - additional isMaster commands to update its view of the + additional hello commands to update its view of the topologies. @@ -267,8 +267,9 @@ foreach ($managers as $manager) { Arrays - If an array is a packed array — i.e. the keys start - at 0 and are sequential without gaps: BSON array. + If an array is a packed array — i.e. empty array or + the keys start at 0 and are sequential without gaps: BSON + array. @@ -513,16 +514,15 @@ class UpperClass implements MongoDB\BSON\Persistable { Deserialization from BSON - The legacy mongo extension deserialized + The legacy mongo extension deserialized both BSON documents and arrays as PHP arrays. While PHP arrays are convenient to work with, this behavior was problematic because different BSON types could deserialize to the same PHP value (e.g. - {"0": "foo"} and ["foo"]) and make it + {"0": "foo"} and ["foo"]) and make it impossible to infer the original BSON type. By default, the current driver addresses this concern by ensuring that BSON arrays and documents are converted to PHP arrays and objects, respectively. - For compound types, there are three data types: diff --git a/reference/mongodb/configure.xml b/reference/mongodb/configure.xml index b7ecc2ae99..34289717ff 100644 --- a/reference/mongodb/configure.xml +++ b/reference/mongodb/configure.xml @@ -24,7 +24,7 @@ $ sudo pecl install mongodb If your system has multiple version of PHP installed (e.g. macOS default, - Homebrew, XAMPP), note that that each + Homebrew, XAMPP), note that each version of PHP has its own pecl command and &php.ini; file. diff --git a/reference/mongodb/functions/driver/monitoring/addsubscriber.xml b/reference/mongodb/functions/driver/monitoring/addsubscriber.xml index de0fcc8a5b..242e3ca3a0 100644 --- a/reference/mongodb/functions/driver/monitoring/addsubscriber.xml +++ b/reference/mongodb/functions/driver/monitoring/addsubscriber.xml @@ -4,7 +4,7 @@ MongoDB\Driver\Monitoring\addSubscriber - Registers a new monitoring event subscriber + Registers a monitoring event subscriber globally @@ -14,12 +14,15 @@ MongoDB\Driver\Monitoring\Subscribersubscriber - Registers a new monitoring event subscriber with the driver. Registered - subscribers will be notified of monitoring events through specific methods. + Registers a monitoring event subscriber globally. The subscriber will be + notified of all events in the driver for any Manager. - If the object is already registered, this function is a no-op. + If subscriber is already registered globally, this + function is a no-op. If subscriber is also registered + with one or more Managers, it will still only be notified once of each event + for each Manager. @@ -31,7 +34,7 @@ subscriber (MongoDB\Driver\Monitoring\Subscriber) - A monitoring event subscriber object to register. + A monitoring event subscriber to register globally. @@ -55,9 +58,10 @@ &reftitle.seealso; + MongoDB\Driver\Monitoring\removeSubscriber MongoDB\Driver\Monitoring\Subscriber MongoDB\Driver\Monitoring\CommandSubscriber - MongoDB\Driver\Monitoring\removeSubscriber + MongoDB\Driver\Manager::addSubscriber diff --git a/reference/mongodb/functions/driver/monitoring/removesubscriber.xml b/reference/mongodb/functions/driver/monitoring/removesubscriber.xml index 2d7063688b..a26c8b07ed 100644 --- a/reference/mongodb/functions/driver/monitoring/removesubscriber.xml +++ b/reference/mongodb/functions/driver/monitoring/removesubscriber.xml @@ -4,7 +4,7 @@ MongoDB\Driver\Monitoring\removeSubscriber - Unregisters an existing monitoring event subscriber + Unregisters a monitoring event subscriber globally @@ -14,12 +14,12 @@ MongoDB\Driver\Monitoring\Subscribersubscriber - Unregisters an existing monitoring event subscriber from the driver. - Unregistered subscribers will no longer be notified of monitoring events. + Unregisters a monitoring event subscriber globally. - If the object is not registered, this function is a no-op. + If subscriber is not already registered globally, + this function is a no-op. @@ -31,7 +31,7 @@ subscriber (MongoDB\Driver\Monitoring\Subscriber) - A monitoring event subscriber object to unregister. + A monitoring event subscriber to unregister globally. @@ -55,9 +55,10 @@ &reftitle.seealso; + MongoDB\Driver\Monitoring\addSubscriber MongoDB\Driver\Monitoring\Subscriber MongoDB\Driver\Monitoring\CommandSubscriber - MongoDB\Driver\Monitoring\addSubscriber + MongoDB\Driver\Manager::removeSubscriber diff --git a/reference/mongodb/mongodb.xml b/reference/mongodb/mongodb.xml index 5797721b40..6f42d9d8a3 100644 --- a/reference/mongodb/mongodb.xml +++ b/reference/mongodb/mongodb.xml @@ -11,6 +11,7 @@ &reference.mongodb.mongodb.driver.bulkwrite; &reference.mongodb.mongodb.driver.session; &reference.mongodb.mongodb.driver.clientencryption; + &reference.mongodb.mongodb.driver.serverapi; &reference.mongodb.mongodb.driver.writeconcern; &reference.mongodb.mongodb.driver.readpreference; diff --git a/reference/mongodb/mongodb/driver/clientencryption/createdatakey.xml b/reference/mongodb/mongodb/driver/clientencryption/createdatakey.xml index 43cac245f7..f36af3d1c6 100644 --- a/reference/mongodb/mongodb/driver/clientencryption/createdatakey.xml +++ b/reference/mongodb/mongodb/driver/clientencryption/createdatakey.xml @@ -26,8 +26,10 @@ kmsProvider - The KMS provider ("local" or "aws") that - will be used to encrypt the new encryption key. + The KMS provider (e.g. "local", + "aws", "azure", + "gcp") that will be used to encrypt the new encryption + key. @@ -53,8 +55,12 @@ The masterKey identifies a KMS-specific key used to encrypt the new - data key. If the kmsProvider is aws it is - required and has the following fields: + data key. This option is required unless + kmsProvider is "local". + + + If kmsProvider is "aws", + this option is required and has the following fields: AWS masterKey options @@ -85,6 +91,87 @@
+ + If kmsProvider is "azure", + this option is required and has the following fields: + + Azure masterKey options + + + + Option + Type + Description + + + + + keyVaultEndpoint + string + Required. Host with optional port (e.g. "example.vault.azure.net"). + + + keyName + string + Required. + + + keyVersion + string + Optional. A specific version of the named key. Defaults to using the key's primary version. + + + +
+
+ + If kmsProvider is "gcp", + this option is required and has the following fields: + + GCP masterKey options + + + + Option + Type + Description + + + + + projectId + string + Required. + + + location + string + Required. + + + keyRing + string + Required. + + + keyName + string + Required. + + + keyVersion + string + Optional. A specific version of the named key. Defaults to using the key's primary version. + + + endpoint + string + Optional. Host with optional port. Defaults to "cloudkms.googleapis.com". + + + +
+
@@ -123,6 +210,31 @@ Throws MongoDB\Driver\Exception\EncryptionException if an error occurs while creating the data key + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + PECL mongodb 1.10.0 + + Azure and GCP are now supported as KMS providers for client-side + encryption. + + + + + + +
diff --git a/reference/mongodb/mongodb/driver/cursor/getserver.xml b/reference/mongodb/mongodb/driver/cursor/getserver.xml index 543aee4477..7d417c6f03 100644 --- a/reference/mongodb/mongodb/driver/cursor/getserver.xml +++ b/reference/mongodb/mongodb/driver/cursor/getserver.xml @@ -1,5 +1,5 @@ - + @@ -83,9 +83,9 @@ object(MongoDB\Driver\Server)#5 (10) { bool(false) ["is_passive"]=> bool(false) - ["last_is_master"]=> + ["last_hello_response"]=> array(8) { - ["ismaster"]=> + ["isWritablePrimary"]=> bool(true) ["maxBsonObjectSize"]=> int(16777216) diff --git a/reference/mongodb/mongodb/driver/manager.xml b/reference/mongodb/mongodb/driver/manager.xml index 5b0de41eef..4c3ffb3724 100644 --- a/reference/mongodb/mongodb/driver/manager.xml +++ b/reference/mongodb/mongodb/driver/manager.xml @@ -64,53 +64,24 @@ This can be useful to debug how the driver views your MongoDB setup, and which options are used.
- + ]]> - - &example.outputs.similar; - + + &example.outputs.similar; + - int(1714636915) +object(MongoDB\Driver\Manager)#1 (2) { ["uri"]=> - string(25) "mongodb://localhost:27017" + string(26) "mongodb://127.0.0.1:27017/" ["cluster"]=> - array(13) { - ["mode"]=> - string(6) "direct" - ["state"]=> - string(4) "born" - ["request_id"]=> - int(0) - ["sockettimeoutms"]=> - int(300000) - ["last_reconnect"]=> - int(0) - ["uri"]=> - string(25) "mongodb://localhost:27017" - ["requires_auth"]=> - int(0) - ["nodes"]=> - array(...) - ["max_bson_size"]=> - int(16777216) - ["max_msg_size"]=> - int(50331648) - ["sec_latency_ms"]=> - int(15) - ["peers"]=> - array(0) { - } - ["replSet"]=> - NULL + array(0) { } } ]]> diff --git a/reference/mongodb/mongodb/driver/manager/addsubscriber.xml b/reference/mongodb/mongodb/driver/manager/addsubscriber.xml new file mode 100644 index 0000000000..b05b5fda57 --- /dev/null +++ b/reference/mongodb/mongodb/driver/manager/addsubscriber.xml @@ -0,0 +1,90 @@ + + + + + + MongoDB\Driver\Manager::addSubscriber + Registers a monitoring event subscriber with this Manager + + + + &reftitle.description; + + final public voidMongoDB\Driver\Manager::addSubscriber + MongoDB\Driver\Monitoring\Subscribersubscriber + + + Registers a monitoring event subscriber with this Manager. The subscriber + will be notified of all events for this Manager. + + + + If subscriber is already registered with this + Manager, this function is a no-op. If subscriber is + also registered globally, it will still only be notified once of each event + for this Manager. + + + + + + &reftitle.parameters; + + + subscriber (MongoDB\Driver\Monitoring\Subscriber) + + + A monitoring event subscriber to register with this Manager. + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.errors; + + &mongodb.throws.argumentparsing; + + + + + &reftitle.seealso; + + MongoDB\Driver\Manager::removeSubscriber + MongoDB\Driver\Monitoring\Subscriber + MongoDB\Driver\Monitoring\CommandSubscriber + MongoDB\Driver\Monitoring\addSubscriber + + + + + + + diff --git a/reference/mongodb/mongodb/driver/manager/construct.xml b/reference/mongodb/mongodb/driver/manager/construct.xml index a705f10c33..75bdfbbe5b 100644 --- a/reference/mongodb/mongodb/driver/manager/construct.xml +++ b/reference/mongodb/mongodb/driver/manager/construct.xml @@ -1,5 +1,5 @@ - + @@ -434,27 +434,13 @@ mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][ - - slaveOk - bool - - - Specifies "secondaryPreferred" for the read - preference mode if &true;. For details, see - MongoDB\Driver\ReadPreference. - - - This option is deprecated and should not be used. - - - socketCheckIntervalMS int If a socket has not been used recently, the driver must check it via - an isMaster command before using it for any + a hello command before using it for any operation. Defaults to 5,000 milliseconds. @@ -768,7 +754,7 @@ mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][ are not bypassed will result in error. To bypass automatic encryption for all operations, set bypassAutoEncryption=true in autoEncryption. For more information on - whitelisted operations, see the + allowed operations, see the Client-Side Encryption Specification. @@ -856,6 +842,23 @@ mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][ string Path to a certificate revocation list file. + + disableClientPersistence + bool + + + If &true;, this Manager will use a new libmongoc client, which will + not be persisted or shared with other Manager objects. When this + Manager object is freed, its client will be destroyed and any + connections will be closed. Defaults to &false;. + + + + Disabling client persistence is not generally recommended. + + + + driver array @@ -904,6 +907,16 @@ mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][ + + serverApi + MongoDB\Driver\ServerApi + + + This option is used to declare a server API version for the manager. + If omitted, no API version is declared. + + + weak_cert_validation bool @@ -946,6 +959,23 @@ mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][ + + PECL mongodb 1.10.0 + + + Added the "disableClientPersistence" driver option. + + + Azure and GCP are now supported as KMS providers for client-side + encryption and may be configured in the + "kmsProviders" field of the + "autoEncryption" driver option. Base64-encoded + strings are now accepted as an alternative to + MongoDB\BSON\Binary for options within + "kmsProviders". + + + PECL mongodb 1.8.0 diff --git a/reference/mongodb/mongodb/driver/manager/createclientencryption.xml b/reference/mongodb/mongodb/driver/manager/createclientencryption.xml index 9f1f4fbc45..4032cd3da9 100644 --- a/reference/mongodb/mongodb/driver/manager/createclientencryption.xml +++ b/reference/mongodb/mongodb/driver/manager/createclientencryption.xml @@ -63,6 +63,34 @@ + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + PECL mongodb 1.10.0 + + Azure and GCP are now supported as KMS providers for client-side + encryption and may be configured in the + "kmsProviders" option. Base64-encoded strings are now + accepted as an alternative to MongoDB\BSON\Binary + for options within "kmsProviders". + + + + + + + + &reftitle.seealso; diff --git a/reference/mongodb/mongodb/driver/manager/getservers.xml b/reference/mongodb/mongodb/driver/manager/getservers.xml index b5c78285af..9259dc9cb1 100644 --- a/reference/mongodb/mongodb/driver/manager/getservers.xml +++ b/reference/mongodb/mongodb/driver/manager/getservers.xml @@ -1,5 +1,5 @@ - + @@ -93,9 +93,9 @@ array(1) { bool(false) ["is_passive"]=> bool(false) - ["last_is_master"]=> + ["last_hello_response"]=> array(8) { - ["ismaster"]=> + ["isWritablePrimary"]=> bool(true) ["maxBsonObjectSize"]=> int(16777216) diff --git a/reference/mongodb/mongodb/driver/manager/removesubscriber.xml b/reference/mongodb/mongodb/driver/manager/removesubscriber.xml new file mode 100644 index 0000000000..c3bd4ef249 --- /dev/null +++ b/reference/mongodb/mongodb/driver/manager/removesubscriber.xml @@ -0,0 +1,87 @@ + + + + + + MongoDB\Driver\Manager::removeSubscriber + Unregisters a monitoring event subscriber with this Manager + + + + &reftitle.description; + + final public voidMongoDB\Driver\Manager::removeSubscriber + MongoDB\Driver\Monitoring\Subscribersubscriber + + + Unregisters a monitoring event subscriber with this Manager. + + + + If subscriber is not already registered with this + Manager, this function is a no-op. + + + + + + &reftitle.parameters; + + + subscriber (MongoDB\Driver\Monitoring\Subscriber) + + + A monitoring event subscriber to unregister with this Manager. + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.errors; + + &mongodb.throws.argumentparsing; + + + + + &reftitle.seealso; + + MongoDB\Driver\Manager::addSubscriber + MongoDB\Driver\Monitoring\Subscriber + MongoDB\Driver\Monitoring\CommandSubscriber + MongoDB\Driver\Monitoring\removeSubscriber + + + + + + + diff --git a/reference/mongodb/mongodb/driver/query/construct.xml b/reference/mongodb/mongodb/driver/query/construct.xml index e1f111c778..8b289c3d58 100644 --- a/reference/mongodb/mongodb/driver/query/construct.xml +++ b/reference/mongodb/mongodb/driver/query/construct.xml @@ -1,5 +1,5 @@ - + @@ -368,11 +368,6 @@ int Number of documents to skip. Defaults to 0. - - slaveOk - bool - Allow query of replica set secondaries - snapshot bool @@ -483,9 +478,10 @@ "allowPartialResults" is not specified. - Removed the "slaveOk" option, which is obsolete. - For queries using the legacy wire protocol OP_QUERY, the driver will - set the slaveOk bit as needed in accordance with the + Removed the legacy "secondaryOk" option, which is + obsolete. For queries using the legacy wire protocol OP_QUERY, the + driver will set the secondaryOk bit as needed in + accordance with the Server Selection Specification. diff --git a/reference/mongodb/mongodb/driver/server/getinfo.xml b/reference/mongodb/mongodb/driver/server/getinfo.xml index 750b48b2c8..4c73d799c1 100644 --- a/reference/mongodb/mongodb/driver/server/getinfo.xml +++ b/reference/mongodb/mongodb/driver/server/getinfo.xml @@ -1,5 +1,5 @@ - + @@ -60,7 +60,7 @@ var_dump($server->getInfo()); + ["isWritablePrimary"]=> bool(true) ["maxBsonObjectSize"]=> int(16777216) diff --git a/reference/mongodb/mongodb/driver/server/getlatency.xml b/reference/mongodb/mongodb/driver/server/getlatency.xml index a5c4cc145a..e7cf53788e 100644 --- a/reference/mongodb/mongodb/driver/server/getlatency.xml +++ b/reference/mongodb/mongodb/driver/server/getlatency.xml @@ -1,5 +1,5 @@ - + @@ -16,7 +16,7 @@ Returns the latency of this server (i.e. the client's measured round trip time - of an ismaster command). + of a hello command). diff --git a/reference/mongodb/mongodb/driver/serverapi.xml b/reference/mongodb/mongodb/driver/serverapi.xml new file mode 100644 index 0000000000..2888e796af --- /dev/null +++ b/reference/mongodb/mongodb/driver/serverapi.xml @@ -0,0 +1,185 @@ + + + + + + The MongoDB\Driver\ServerApi class + MongoDB\Driver\ServerApi + + + + +
+ &reftitle.intro; + + + +
+ + +
+ &reftitle.classsynopsis; + + + + MongoDB\Driver\ServerApi + + + + final + + MongoDB\Driver\ServerApi + + + MongoDB\BSON\Serializable + + + + Serializable + + + + Constants + + const + string + MongoDB\Driver\ServerAPI::V1 + "1" + + + &Methods; + + + + +
+ + +
+ &reftitle.constants; + + + + MongoDB\Driver\ServerApi::V1 + + Server API version 1. + + + + +
+ + +
+ &reftitle.examples; + + + Declare an API version on a manager + + $v1]); + +$command = new MongoDB\Driver\Command(['buildInfo' => 1]); + +try { + $cursor = $manager->executeCommand('admin', $command); +} catch(MongoDB\Driver\Exception $e) { + echo $e->getMessage(), "\n"; + exit; +} + +/* The buildInfo command returns a single result document, so we need to access + * the first result in the cursor. */ +$buildInfo = $cursor->toArray()[0]; + +echo $buildInfo->version, "\n"; + +?> +]]> + + + &example.outputs; + + + + + + + Declare a strict API version on a manager + + The following example sets the strict flag, which + tells the server to reject any command that is not part of the declared API + version. This results in an error when running the buildInfo command. + + + $v1]); + +$command = new MongoDB\Driver\Command(['buildInfo' => 1]); + +try { + $cursor = $manager->executeCommand('admin', $command); +} catch(MongoDB\Driver\Exception $e) { + echo $e->getMessage(), "\n"; + exit; +} + +/* The buildInfo command returns a single result document, so we need to access + * the first result in the cursor. */ +$buildInfo = $cursor->toArray()[0]; + +echo $buildInfo->version, "\n"; + +?> +]]> + + + &example.outputs; + + + + +
+ +
+ + &reference.mongodb.mongodb.driver.entities.serverapi; + +
+ + diff --git a/reference/mongo/mongocursorinterface/getreadpreference.xml b/reference/mongodb/mongodb/driver/serverapi/bsonserialize.xml similarity index 60% rename from reference/mongo/mongocursorinterface/getreadpreference.xml rename to reference/mongodb/mongodb/driver/serverapi/bsonserialize.xml index 8dc235eb33..c200ba2570 100644 --- a/reference/mongo/mongocursorinterface/getreadpreference.xml +++ b/reference/mongodb/mongodb/driver/serverapi/bsonserialize.xml @@ -1,17 +1,17 @@ - - + + - MongoCursorInterface::getReadPreference - Get the read preference for this query + MongoDB\Driver\ServerApi::bsonSerialize + Returns an object for BSON serialization &reftitle.description; - abstract public arrayMongoCursorInterface::getReadPreference - + final public objectMongoDB\Driver\ServerApi::bsonSerialize + @@ -22,16 +22,26 @@ &reftitle.returnvalues; - &mongo.getreadpreference.returnvalues; + + Returns an object for serializing the ServerApi as BSON. + + + &reftitle.errors; + + &mongodb.throws.argumentparsing; + + + + &reftitle.seealso; - The read preferences documentation. - MongoCursorInterface::setReadPreference + MongoDB\BSON\Serializable::bsonSerialize + + + + + MongoDB\Driver\ServerApi::__construct + Create a new ServerApi instance + + + + &reftitle.description; + + final public MongoDB\Driver\ServerApi::__construct + stringversion + boolstrict&null; + booldeprecationErrors&null; + + + + Creates a new MongoDB\Driver\ServerApi instance used to + declare an API version when creating a + MongoDB\Driver\Manager. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + + diff --git a/reference/mongo/mongocommandcursor/next.xml b/reference/mongodb/mongodb/driver/serverapi/serialize.xml similarity index 53% rename from reference/mongo/mongocommandcursor/next.xml rename to reference/mongodb/mongodb/driver/serverapi/serialize.xml index cd94fad9c4..1882c23bd9 100644 --- a/reference/mongo/mongocommandcursor/next.xml +++ b/reference/mongodb/mongodb/driver/serverapi/serialize.xml @@ -1,17 +1,17 @@ + - - + - MongoCommandCursor::next - Advances the cursor to the next result + MongoDB\Driver\ServerApi::serialize + Serialize a ServerApi &reftitle.description; - public voidMongoCommandCursor::next - + final public stringMongoDB\Driver\ServerApi::serialize + @@ -23,26 +23,29 @@ &reftitle.returnvalues; - &null;. + Returns the serialized representation of the + MongoDB\Driver\ServerApi. &reftitle.errors; - - Throws MongoConnectionException if it cannot reach the - database and MongoCursorTimeoutException if the - timeout is exceeded. - + + &mongodb.throws.argumentparsing; + &reftitle.seealso; - Iterator::next + MongoDB\Driver\ServerApi::unserialize + serialize + Serializing Objects + + +--> diff --git a/reference/mongodb/mongodb/driver/serverapi/unserialize.xml b/reference/mongodb/mongodb/driver/serverapi/unserialize.xml new file mode 100644 index 0000000000..2d20677860 --- /dev/null +++ b/reference/mongodb/mongodb/driver/serverapi/unserialize.xml @@ -0,0 +1,80 @@ + + + + + + MongoDB\Driver\ServerApi::unserialize + Unserialize a ServerApi + + + + &reftitle.description; + + final public voidMongoDB\Driver\ServerApi::unserialize + stringserialized + + + + + &reftitle.parameters; + + + + serialized + + + The serialized MongoDB\Driver\ServerApi. + + + + + + + + + &reftitle.returnvalues; + + Returns the unserialized MongoDB\Driver\ServerApi. + + + + + &reftitle.errors; + + &mongodb.throws.argumentparsing; + Throws MongoDB\Driver\Exception\UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed). + Throws MongoDB\Driver\Exception\InvalidArgumentException if the properties are invalid (e.g. missing fields or invalid values). + + + + + &reftitle.seealso; + + MongoDB\Driver\ServerApi::serialize + unserialize + Serializing Objects + + + + + + diff --git a/reference/mongodb/set.xml b/reference/mongodb/set.xml index 448f42e58c..576d2e8922 100644 --- a/reference/mongodb/set.xml +++ b/reference/mongodb/set.xml @@ -8,8 +8,7 @@ - Unlike the mongo extension, this - extension is developed atop the + This extension is developed atop the libmongoc and libbson libraries. It provides a minimal API for core driver functionality: diff --git a/reference/mongodb/tutorial/apm.xml b/reference/mongodb/tutorial/apm.xml index db8112ef4a..ba88668ecc 100644 --- a/reference/mongodb/tutorial/apm.xml +++ b/reference/mongodb/tutorial/apm.xml @@ -67,7 +67,9 @@ class QueryTimeCollector implements \MongoDB\Driver\Monitoring\CommandSubscriber Once a subscriber object is instantiated, it needs to be registered with the driver's monitoring system. This is done by calling - MongoDB\Driver\Monitoring\addSubscriber. + MongoDB\Driver\Monitoring\addSubscriber or + MongoDB\Driver\Manager::addSubscriber to register + the subscriber globally or with a specific Manager, respectively. diff --git a/reference/mongodb/versions.xml b/reference/mongodb/versions.xml index d1396d0719..7602601887 100644 --- a/reference/mongodb/versions.xml +++ b/reference/mongodb/versions.xml @@ -56,6 +56,7 @@ + @@ -67,6 +68,7 @@ + @@ -112,6 +114,12 @@ + + + + + + diff --git a/reference/mqseries/book.xml b/reference/mqseries/book.xml index 759f36b737..21f2e576eb 100644 --- a/reference/mqseries/book.xml +++ b/reference/mqseries/book.xml @@ -2,6 +2,7 @@ + mqseries diff --git a/reference/mqseries/setup.xml b/reference/mqseries/setup.xml index 0ca785bc66..44bcc7a67c 100644 --- a/reference/mqseries/setup.xml +++ b/reference/mqseries/setup.xml @@ -18,14 +18,6 @@ just the way the WebSphere MQ Client Interface works. -
- Installation requirements on non windows platforms - Build the extension and put it in the PHP extension directory. -
-
- Installation requirements on Windows - No additional requirements. -
diff --git a/reference/mysql/book.xml b/reference/mysql/book.xml index 5281bf76bc..a5a3b9c9d4 100644 --- a/reference/mysql/book.xml +++ b/reference/mysql/book.xml @@ -1,8 +1,7 @@ - - + - + Original MySQL API MySQL (Original) @@ -36,7 +35,6 @@ &reference.mysql.reference; - + + Mysql_xdevapi Mysql_xdevapi @@ -26,6 +27,7 @@ &reference.mysql-xdevapi.setup; &reference.mysql-xdevapi.constants; + &reference.mysql-xdevapi.changelog; &reference.mysql-xdevapi.examples; &reference.mysql-xdevapi.reference; diff --git a/reference/mysql_xdevapi/changelog.xml b/reference/mysql_xdevapi/changelog.xml new file mode 100644 index 0000000000..a453f3af0d --- /dev/null +++ b/reference/mysql_xdevapi/changelog.xml @@ -0,0 +1,63 @@ + + + + + &ChangelogListingTitle; + &ChangelogListingDescription; + + + General Changelog for the ext/mysql_xdevapi extension + + This changelog references the ext/mysql_xdevapi extension. + + + + + Global ext/mysql_xdevapi changes + + + + + + &Version; + &Description; + + + + + 8.0.26 + + + Deprecated TLSv1 and TLSv1.1 support. + + + + + + + + + + + + + diff --git a/reference/mysqli/functions/mysqli-get-client-stats.xml b/reference/mysqli/functions/mysqli-get-client-stats.xml index b2dbcc5c2f..aa398609d2 100644 --- a/reference/mysqli/functions/mysqli-get-client-stats.xml +++ b/reference/mysqli/functions/mysqli-get-client-stats.xml @@ -14,8 +14,12 @@ Returns client per-process statistics. - &mysqli.available.mysqlnd; + + + &mysqli.available.mysqlnd; + + diff --git a/reference/mysqli/ini.xml b/reference/mysqli/ini.xml index e0a9e11010..fab903c11f 100644 --- a/reference/mysqli/ini.xml +++ b/reference/mysqli/ini.xml @@ -84,7 +84,7 @@
mysqli.rollback_on_cached_plink - TRUE + "0" PHP_INI_SYSTEM diff --git a/reference/mysqli/mysqli/affected-rows.xml b/reference/mysqli/mysqli/affected-rows.xml index 749af36671..d12e2fe560 100644 --- a/reference/mysqli/mysqli/affected-rows.xml +++ b/reference/mysqli/mysqli/affected-rows.xml @@ -20,10 +20,8 @@ Returns the number of rows affected by the last INSERT, UPDATE, REPLACE or DELETE query. - - - For SELECT statements mysqli_affected_rows works like - mysqli_num_rows. + Works like mysqli_num_rows for + SELECT statements. @@ -40,16 +38,18 @@ &reftitle.returnvalues; An integer greater than zero indicates the number of rows affected or - retrieved. - Zero indicates that no records were updated for an UPDATE statement, no - rows matched the WHERE clause in the query or that no - query has yet been executed. -1 indicates that the query returned an - error. + retrieved. Zero indicates that no records were updated for an + UPDATE statement, no rows matched the + WHERE clause in the query or that no query has yet been + executed. -1 indicates that the query returned an error or + that mysqli_affected_rows was called for an unbuffered + SELECT query. - If the number of affected rows is greater than the maximum integer value( PHP_INT_MAX ), the - number of affected rows will be returned as a string. + If the number of affected rows is greater than the maximum int value + (PHP_INT_MAX), the number of affected rows will be + returned as a string. @@ -62,13 +62,9 @@ query("CREATE TABLE Language SELECT * from CountryLanguage"); @@ -88,26 +84,17 @@ printf("Affected rows (DELETE): %d\n", $mysqli->affected_rows); $result = $mysqli->query("SELECT CountryCode FROM Language"); printf("Affected rows (SELECT): %d\n", $mysqli->affected_rows); -$result->close(); - /* Delete table Language */ $mysqli->query("DROP TABLE Language"); - -/* close connection */ -$mysqli->close(); -?> ]]> &style.procedural; ]]> &examples.outputs; diff --git a/reference/mysqli/mysqli/autocommit.xml b/reference/mysqli/mysqli/autocommit.xml index ca7af2f3dc..146c795487 100644 --- a/reference/mysqli/mysqli/autocommit.xml +++ b/reference/mysqli/mysqli/autocommit.xml @@ -53,16 +53,6 @@ - - &reftitle.notes; - - - This function does not work with non transactional table types (like - MyISAM or ISAM). - - - - &reftitle.examples; @@ -209,6 +199,16 @@ Committed 2 row in the database + + &reftitle.notes; + + + This function does not work with non transactional table types (like + MyISAM or ISAM). + + + + &reftitle.seealso; diff --git a/reference/mysqli/mysqli/begin-transaction.xml b/reference/mysqli/mysqli/begin-transaction.xml index 4f5c67093d..83c294fee8 100644 --- a/reference/mysqli/mysqli/begin-transaction.xml +++ b/reference/mysqli/mysqli/begin-transaction.xml @@ -83,16 +83,6 @@ - - &reftitle.notes; - - - This function does not work with non transactional table types (like - MyISAM or ISAM). - - - - &reftitle.changelog; @@ -200,6 +190,16 @@ try { + + &reftitle.notes; + + + This function does not work with non transactional table types (like + MyISAM or ISAM). + + + + &reftitle.seealso; diff --git a/reference/mysqli/mysqli/change-user.xml b/reference/mysqli/mysqli/change-user.xml index 9a4dbb5804..c659ebb664 100644 --- a/reference/mysqli/mysqli/change-user.xml +++ b/reference/mysqli/mysqli/change-user.xml @@ -81,19 +81,6 @@ - - &reftitle.notes; - - - Using this command will always cause the current database connection to - behave as if was a completely new database connection, regardless of if - the operation was completed successfully. This reset includes performing - a rollback on any active transactions, closing all temporary tables, and - unlocking all locked tables. - - - - &reftitle.examples; @@ -185,6 +172,19 @@ Value of variable a is NULL + + &reftitle.notes; + + + Using this command will always cause the current database connection to + behave as if was a completely new database connection, regardless of if + the operation was completed successfully. This reset includes performing + a rollback on any active transactions, closing all temporary tables, and + unlocking all locked tables. + + + + &reftitle.seealso; diff --git a/reference/mysqli/mysqli/character-set-name.xml b/reference/mysqli/mysqli/character-set-name.xml index ce20149de2..29c29662a9 100644 --- a/reference/mysqli/mysqli/character-set-name.xml +++ b/reference/mysqli/mysqli/character-set-name.xml @@ -4,7 +4,7 @@ mysqli::character_set_name mysqli_character_set_name - Returns the default character set for the database connection + Returns the current character set of the database connection @@ -20,7 +20,7 @@ mysqlimysql - Returns the current character set for the database connection. + Returns the current character set of the database connection. @@ -35,7 +35,7 @@ &reftitle.returnvalues; - The default character set for the current connection + The current character set of the connection @@ -46,49 +46,38 @@ set_charset('utf8mb4'); /* Print current character set */ $charset = $mysqli->character_set_name(); -printf ("Current character set is %s\n", $charset); - -$mysqli->close(); -?> +printf("Current character set is %s\n", $charset); ]]> &style.procedural; +$charset = mysqli_character_set_name($mysqli); +printf("Current character set is %s\n", $charset); ]]> &examples.outputs; diff --git a/reference/mysqli/mysqli/close.xml b/reference/mysqli/mysqli/close.xml index 43dca7f3af..1b176b1a43 100644 --- a/reference/mysqli/mysqli/close.xml +++ b/reference/mysqli/mysqli/close.xml @@ -22,7 +22,14 @@ Closes a previously opened database connection. - &mysql.close.connections.result.sets; + + Open non-persistent MySQL connections and result sets are automatically + closed when their objects are destroyed. Explicitly closing open + connections and freeing result sets is optional. However, it's a good idea + to close the connection as soon as the script finishes performing all of its + database operations, if it still has a lot of processing to do after + getting the results. + @@ -43,9 +50,45 @@ &reftitle.examples; - - See mysqli_connect. - + + <methodname>mysqli::close</methodname> example + &style.oop; + +query("SELECT Name, CountryCode FROM City ORDER BY ID LIMIT 3"); + +/* Close the connection as soon as it's no longer needed */ +$mysqli->close(); + +foreach ($result as $row) { + /* Processing of the data retrieved from the database */ +} +]]> + + &style.procedural; + + + + diff --git a/reference/mysqli/mysqli/commit.xml b/reference/mysqli/mysqli/commit.xml index 11cb538d79..6720f251e7 100644 --- a/reference/mysqli/mysqli/commit.xml +++ b/reference/mysqli/mysqli/commit.xml @@ -59,16 +59,6 @@ - - &reftitle.notes; - - - This function does not work with non transactional table types (like - MyISAM or ISAM). - - - - &reftitle.changelog; @@ -100,6 +90,16 @@ + + &reftitle.notes; + + + This function does not work with non transactional table types (like + MyISAM or ISAM). + + + + &reftitle.seealso; diff --git a/reference/mysqli/mysqli/connect-errno.xml b/reference/mysqli/mysqli/connect-errno.xml index fdf397765a..c2ff4af4d4 100644 --- a/reference/mysqli/mysqli/connect-errno.xml +++ b/reference/mysqli/mysqli/connect-errno.xml @@ -10,32 +10,27 @@ &reftitle.description; &style.oop; - static intmysqli->connect_errno + intmysqli->connect_errno &style.procedural; intmysqli_connect_errno - Returns the last error code number from the last call to - mysqli_connect. + Returns the error code from the last connection attempt. - - - Client error message numbers are listed in the MySQL - errmsg.h header file, server error message numbers - are listed in mysqld_error.h. In the MySQL source - distribution you can find a complete list of error messages and error - numbers in the file Docs/mysqld_error.txt. - - + + + + &reftitle.parameters; + &no.function.parameters; &reftitle.returnvalues; - An error code value for the last call to mysqli_connect, if it failed. - zero means no error occurred. + An error code for the last connection attempt, if it failed. + Zero means no error occurred. @@ -47,30 +42,32 @@ connect_errno) { - die('Connect Error: ' . $mysqli->connect_errno); + /* Use your preferred error logging method here */ + error_log('Connection error: ' . $mysqli->connect_errno); } -?> ]]> &style.procedural; ]]> &examples.outputs; diff --git a/reference/mysqli/mysqli/connect-error.xml b/reference/mysqli/mysqli/connect-error.xml index 1c1041d8e3..27d3330b40 100644 --- a/reference/mysqli/mysqli/connect-error.xml +++ b/reference/mysqli/mysqli/connect-error.xml @@ -4,23 +4,27 @@ mysqli::$connect_error mysqli_connect_error - Returns a string description of the last connect error + Returns a description of the last connection error &reftitle.description; &style.oop; - static stringnullmysqli->connect_error + stringnullmysqli->connect_error &style.procedural; stringnullmysqli_connect_error - Returns the last error message string from the last call to - mysqli_connect. + Returns the error message from the last connection attempt. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -37,30 +41,32 @@ connect_error) { - die('Connect Error: ' . $mysqli->connect_error); + /* Use your preferred error logging method here */ + error_log('Connection error: ' . $mysqli->connect_error); } -?> ]]> &style.procedural; ]]> &examples.outputs; diff --git a/reference/mysqli/mysqli/construct.xml b/reference/mysqli/mysqli/construct.xml index b9010d4f95..6a47f46ed7 100644 --- a/reference/mysqli/mysqli/construct.xml +++ b/reference/mysqli/mysqli/construct.xml @@ -13,29 +13,29 @@ &style.oop; public mysqli::__construct - stringhostini_get("mysqli.default_host") + stringhostnameini_get("mysqli.default_host") stringusernameini_get("mysqli.default_user") - stringpasswdini_get("mysqli.default_pw") - stringdbname"" + stringpasswordini_get("mysqli.default_pw") + stringdatabase"" intportini_get("mysqli.default_port") stringsocketini_get("mysqli.default_socket") public voidmysqli::connect - stringhostini_get("mysqli.default_host") + stringhostnameini_get("mysqli.default_host") stringusernameini_get("mysqli.default_user") - stringpasswdini_get("mysqli.default_pw") - stringdbname"" + stringpasswordini_get("mysqli.default_pw") + stringdatabase"" intportini_get("mysqli.default_port") stringsocketini_get("mysqli.default_socket") &style.procedural; mysqlifalsemysqli_connect - stringhostini_get("mysqli.default_host") + stringhostnameini_get("mysqli.default_host") stringusernameini_get("mysqli.default_user") - stringpasswdini_get("mysqli.default_pw") - stringdbname"" + stringpasswordini_get("mysqli.default_pw") + stringdatabase"" intportini_get("mysqli.default_port") stringsocketini_get("mysqli.default_socket") @@ -49,7 +49,7 @@ - host + hostname Can be either a host name or an IP address. The local host is @@ -73,7 +73,7 @@ - passwd + password If not provided or &null;, the MySQL server will attempt to authenticate @@ -84,7 +84,7 @@ - dbname + database If provided will specify the default database to be used when @@ -111,7 +111,7 @@ Specifying the socket parameter will not explicitly determine the type of connection to be used when connecting to the MySQL server. How the connection is made to the - MySQL database is determined by the host + MySQL database is determined by the hostname parameter. diff --git a/reference/mysqli/mysqli/debug.xml b/reference/mysqli/mysqli/debug.xml index 0c629a78fd..f3f0e4cd01 100644 --- a/reference/mysqli/mysqli/debug.xml +++ b/reference/mysqli/mysqli/debug.xml @@ -47,16 +47,6 @@ - - &reftitle.notes; - - - To use the mysqli_debug function you must compile - the MySQL client library to support debugging. - - - - &reftitle.examples; @@ -76,6 +66,16 @@ mysqli_debug("d:t:o,/tmp/client.trace"); + + &reftitle.notes; + + + To use the mysqli_debug function you must compile + the MySQL client library to support debugging. + + + + &reftitle.seealso; diff --git a/reference/mysqli/mysqli/errno.xml b/reference/mysqli/mysqli/errno.xml index d51766fa76..f2a2169a9e 100644 --- a/reference/mysqli/mysqli/errno.xml +++ b/reference/mysqli/mysqli/errno.xml @@ -20,14 +20,6 @@ Returns the last error code for the most recent MySQLi function call that can succeed or fail. - - Client error message numbers are listed in the MySQL - errmsg.h header file, server error message numbers - are listed in mysqld_error.h. - In the MySQL source distribution you can find a complete list of error - messages and error numbers in the file - Docs/mysqld_error.txt. - diff --git a/reference/mysqli/mysqli/get-client-info.xml b/reference/mysqli/mysqli/get-client-info.xml index c239d91151..bbda134b7b 100644 --- a/reference/mysqli/mysqli/get-client-info.xml +++ b/reference/mysqli/mysqli/get-client-info.xml @@ -26,6 +26,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/mysqli/mysqli/get-client-version.xml b/reference/mysqli/mysqli/get-client-version.xml index e9bea790f5..5194c982a5 100644 --- a/reference/mysqli/mysqli/get-client-version.xml +++ b/reference/mysqli/mysqli/get-client-version.xml @@ -21,6 +21,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/mysqli/mysqli/get-connection-stats.xml b/reference/mysqli/mysqli/get-connection-stats.xml index 304c0f56be..aa21ee97af 100644 --- a/reference/mysqli/mysqli/get-connection-stats.xml +++ b/reference/mysqli/mysqli/get-connection-stats.xml @@ -21,8 +21,12 @@ Returns statistics about the client connection. - &mysqli.available.mysqlnd; + + + &mysqli.available.mysqlnd; + + diff --git a/reference/mysqli/mysqli/init.xml b/reference/mysqli/mysqli/init.xml index 9668752893..f133ece6e5 100644 --- a/reference/mysqli/mysqli/init.xml +++ b/reference/mysqli/mysqli/init.xml @@ -32,6 +32,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/mysqli/mysqli/insert-id.xml b/reference/mysqli/mysqli/insert-id.xml index 97eb53b38b..f22f51a7f4 100644 --- a/reference/mysqli/mysqli/insert-id.xml +++ b/reference/mysqli/mysqli/insert-id.xml @@ -4,7 +4,7 @@ mysqli::$insert_id mysqli_insert_id - Returns the auto generated id used in the latest query + Returns the value generated for an AUTO_INCREMENT column by the last query @@ -17,19 +17,25 @@ mysqlimysql - The mysqli_insert_id function returns the ID generated - by a query (usually INSERT) on a table with a column having the - AUTO_INCREMENT attribute. If no INSERT or UPDATE statements were sent via this -connection, or if the modified table does not have a column - with the AUTO_INCREMENT attribute, this function will return zero. + Returns the ID generated by an INSERT or + UPDATE query on a table with a column having the + AUTO_INCREMENT attribute. In the case of a multiple-row + INSERT statement, it returns the first automatically + generated value that was successfully inserted. + + + Performing an INSERT or UPDATE + statement using the LAST_INSERT_ID() + MySQL function will also modify the value returned by mysqli_insert_id. + If LAST_INSERT_ID(expr) was used to generate the value of + AUTO_INCREMENT, it returns the value of the last expr + instead of the generated AUTO_INCREMENT value. + + + Returns 0 if the previous statement did not change an + AUTO_INCREMENT value. mysqli_insert_id must be + called immediately after the statement that generated the value. - - - Performing an INSERT or UPDATE statement using the LAST_INSERT_ID() - function will also modify the value returned by the - mysqli_insert_id function. - - @@ -49,10 +55,14 @@ connection, or if the modified table does not have a column connection or if the query did not update an AUTO_INCREMENT value. + + Only statements issued using the current connection affect the return value. The + value is not affected by statements issued using other connections or clients. + - If the number is greater than maximal int value, mysqli_insert_id - will return a string. + If the number is greater than the maximum int value, it will be returned as + a string. @@ -65,60 +75,44 @@ connection, or if the modified table does not have a column query("CREATE TABLE myCity LIKE City"); $query = "INSERT INTO myCity VALUES (NULL, 'Stuttgart', 'DEU', 'Stuttgart', 617000)"; $mysqli->query($query); -printf ("New Record has id %d.\n", $mysqli->insert_id); +printf("New record has ID %d.\n", $mysqli->insert_id); /* drop table */ $mysqli->query("DROP TABLE myCity"); - -/* close connection */ -$mysqli->close(); -?> ]]> &style.procedural; ]]> &examples.outputs; diff --git a/reference/mysqli/mysqli/multi-query.xml b/reference/mysqli/mysqli/multi-query.xml index dc30f7f0de..9667c67358 100644 --- a/reference/mysqli/mysqli/multi-query.xml +++ b/reference/mysqli/mysqli/multi-query.xml @@ -42,9 +42,7 @@ The query, as a string. - - Data inside the query should be properly escaped. - + &mysqli.sqlinjection.warning; diff --git a/reference/mysqli/mysqli/poll.xml b/reference/mysqli/mysqli/poll.xml index 52071d5b3a..8e6e83737f 100644 --- a/reference/mysqli/mysqli/poll.xml +++ b/reference/mysqli/mysqli/poll.xml @@ -29,10 +29,14 @@ Poll connections. - &mysqli.available.mysqlnd; The method can be used as static. + + + &mysqli.available.mysqlnd; + + diff --git a/reference/mysqli/mysqli/query.xml b/reference/mysqli/mysqli/query.xml index 3df7427eed..e240544576 100644 --- a/reference/mysqli/mysqli/query.xml +++ b/reference/mysqli/mysqli/query.xml @@ -77,17 +77,7 @@ The query string. - - Security warning: SQL injection - - If the query contains any variable input then - parameterized - prepared statements should be used instead. Alternatively, the - data must be properly formatted and all strings must be escaped using - the mysqli_real_escape_string - function. - - + &mysqli.sqlinjection.warning; diff --git a/reference/mysqli/mysqli/real-query.xml b/reference/mysqli/mysqli/real-query.xml index e4e5f08fc5..b7a2e4e42d 100644 --- a/reference/mysqli/mysqli/real-query.xml +++ b/reference/mysqli/mysqli/real-query.xml @@ -42,17 +42,7 @@ The query string. - - Security warning: SQL injection - - If the query contains any variable input then - parameterized - prepared statements should be used instead. Alternatively, the - data must be properly formatted and all strings must be escaped using - the mysqli_real_escape_string - function. - - + &mysqli.sqlinjection.warning; diff --git a/reference/mysqli/mysqli/reap-async-query.xml b/reference/mysqli/mysqli/reap-async-query.xml index 0f61e33477..da4a0d413f 100644 --- a/reference/mysqli/mysqli/reap-async-query.xml +++ b/reference/mysqli/mysqli/reap-async-query.xml @@ -21,8 +21,12 @@ Get result from async query. - &mysqli.available.mysqlnd; + + + &mysqli.available.mysqlnd; + + diff --git a/reference/mysqli/mysqli/rollback.xml b/reference/mysqli/mysqli/rollback.xml index c94f89174f..83fbe34eed 100644 --- a/reference/mysqli/mysqli/rollback.xml +++ b/reference/mysqli/mysqli/rollback.xml @@ -59,16 +59,6 @@ - - &reftitle.notes; - - - This function does not work with non transactional table types (like - MyISAM or ISAM). - - - - &reftitle.changelog; @@ -100,6 +90,16 @@ + + &reftitle.notes; + + + This function does not work with non transactional table types (like + MyISAM or ISAM). + + + + &reftitle.seealso; diff --git a/reference/mysqli/mysqli/set-charset.xml b/reference/mysqli/mysqli/set-charset.xml index ae5821dea0..494d37a72f 100644 --- a/reference/mysqli/mysqli/set-charset.xml +++ b/reference/mysqli/mysqli/set-charset.xml @@ -50,24 +50,6 @@ - - &reftitle.notes; - - - To use this function on a Windows platform you need MySQL client library - version 4.1.11 or above (for MySQL 5.0 you need 5.0.6 or above). - - - - - This is the preferred way to change the charset. Using - mysqli_query to set it (such as SET NAMES utf8) - is not recommended. See the MySQL character set concepts - section for more information. - - - - &reftitle.examples; @@ -134,6 +116,24 @@ Current character set: utf8mb4 + + &reftitle.notes; + + + To use this function on a Windows platform you need MySQL client library + version 4.1.11 or above (for MySQL 5.0 you need 5.0.6 or above). + + + + + This is the preferred way to change the charset. Using + mysqli_query to set it (such as SET NAMES utf8) + is not recommended. See the MySQL character set concepts + section for more information. + + + + &reftitle.seealso; diff --git a/reference/mysqli/mysqli/store-result.xml b/reference/mysqli/mysqli/store-result.xml index bef496cb0f..98c8987011 100644 --- a/reference/mysqli/mysqli/store-result.xml +++ b/reference/mysqli/mysqli/store-result.xml @@ -88,6 +88,13 @@ + + &reftitle.examples; + + See mysqli_multi_query. + + + &reftitle.notes; @@ -101,13 +108,6 @@ - - &reftitle.examples; - - See mysqli_multi_query. - - - &reftitle.seealso; diff --git a/reference/mysqli/mysqli/thread-safe.xml b/reference/mysqli/mysqli/thread-safe.xml index af3d61562c..6537d506e6 100644 --- a/reference/mysqli/mysqli/thread-safe.xml +++ b/reference/mysqli/mysqli/thread-safe.xml @@ -24,6 +24,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/mysqli/mysqli/use-result.xml b/reference/mysqli/mysqli/use-result.xml index de9dedf301..88cf8bf488 100644 --- a/reference/mysqli/mysqli/use-result.xml +++ b/reference/mysqli/mysqli/use-result.xml @@ -45,6 +45,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/mysqli/mysqli_result/data-seek.xml b/reference/mysqli/mysqli_result/data-seek.xml index 41fd36ea38..6fe01de290 100644 --- a/reference/mysqli/mysqli_result/data-seek.xml +++ b/reference/mysqli/mysqli_result/data-seek.xml @@ -52,17 +52,6 @@ - - &reftitle.notes; - - - This function can only be used with buffered results attained from the - use of the mysqli_store_result or - mysqli_query functions. - - - - &reftitle.examples; @@ -144,6 +133,17 @@ City: Benin City Countrycode: NGA + + &reftitle.notes; + + + This function can only be used with buffered results attained from the + use of the mysqli_store_result or + mysqli_query functions. + + + + &reftitle.seealso; diff --git a/reference/mysqli/mysqli_result/fetch-all.xml b/reference/mysqli/mysqli_result/fetch-all.xml index 0f5750d640..e4439fb345 100644 --- a/reference/mysqli/mysqli_result/fetch-all.xml +++ b/reference/mysqli/mysqli_result/fetch-all.xml @@ -4,7 +4,7 @@ mysqli_result::fetch_all mysqli_fetch_all - Fetches all result rows as an associative array, a numeric array, or both + Fetch all result rows as an associative array, a numeric array, or both @@ -21,9 +21,14 @@ intmodeMYSQLI_NUM - mysqli_fetch_all fetches all result rows and returns the result - set as an associative array, a numeric array, or both. + Returns a two-dimensional array of all result rows + as an associative array, a numeric array, or both. + + + &mysqli.available.mysqlnd; + + @@ -53,24 +58,51 @@ - - &reftitle.mysqlnd; + + &reftitle.examples; + + <methodname>mysqli_result::fetch_all</methodname> example + &style.oop; + + - &mysqli.available.mysqlnd; - +mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); +$mysqli = new mysqli("localhost", "my_user", "my_password", "world"); - - As mysqli_fetch_all returns all the rows as an - array in a single step, it may consume more memory than some similar - functions such as mysqli_fetch_array, which - only returns one row at a time from the result set. Further, if you - need to iterate over the result set, you will need a looping - construct that will further impact performance. For these reasons - mysqli_fetch_all should only be used in those - situations where the fetched result set will be sent to another - layer for processing. - +$result = $mysqli->query("SELECT Name, CountryCode FROM City ORDER BY ID LIMIT 3"); + +$rows = $result->fetch_all(MYSQLI_ASSOC); +foreach ($rows as $row) { + printf("%s (%s)\n", $row["Name"], $row["CountryCode"]); +} +]]> + + &style.procedural; + + + + &examples.outputs; + + + + diff --git a/reference/mysqli/mysqli_stmt/affected-rows.xml b/reference/mysqli/mysqli_stmt/affected-rows.xml index 1ad820cc50..ba6e8ce840 100644 --- a/reference/mysqli/mysqli_stmt/affected-rows.xml +++ b/reference/mysqli/mysqli_stmt/affected-rows.xml @@ -4,8 +4,8 @@ mysqli_stmt::$affected_rows mysqli_stmt_affected_rows - Returns the total number of rows changed, deleted, or - inserted by the last executed statement + Returns the total number of rows changed, deleted, inserted, or + matched by the last statement executed @@ -21,11 +21,8 @@ Returns the number of rows affected by INSERT, UPDATE, or DELETE query. - - - This function only works with queries which update a table. In order to - get the number of rows from a SELECT query, use - mysqli_stmt_num_rows instead. + Works like mysqli_stmt_num_rows for + SELECT statements. @@ -42,15 +39,17 @@ &reftitle.returnvalues; An integer greater than zero indicates the number of rows affected or - retrieved. - Zero indicates that no records where updated for an UPDATE/DELETE - statement, no rows matched the WHERE clause in the query or that no query - has yet been executed. -1 indicates that the query has returned an error. - NULL indicates an invalid argument was supplied to the function. + retrieved. Zero indicates that no records were updated for an + UPDATE statement, no rows matched the + WHERE clause in the query or that no query has yet been + executed. -1 indicates that the query returned an error or + that, for a SELECT query, + mysqli_stmt_affected_rows was called prior to calling + mysqli_stmt_store_result. - If the number of affected rows is greater than maximal PHP int value, the + If the number of affected rows is greater than maximum PHP int value, the number of affected rows will be returned as a string value. @@ -59,17 +58,14 @@ &reftitle.examples; - &style.oop; + <methodname>mysqli_stmt_affected_rows</methodname> example + &style.oop; query("CREATE TEMPORARY TABLE myCountry LIKE Country"); @@ -77,39 +73,25 @@ $mysqli->query("CREATE TEMPORARY TABLE myCountry LIKE Country"); $query = "INSERT INTO myCountry SELECT * FROM Country WHERE Code LIKE ?"; /* prepare statement */ -if ($stmt = $mysqli->prepare($query)) { +$stmt = $mysqli->prepare($query); - /* Bind variable for placeholder */ - $code = 'A%'; - $stmt->bind_param("s", $code); +/* Bind variable for placeholder */ +$code = 'A%'; +$stmt->bind_param("s", $code); - /* execute statement */ - $stmt->execute(); +/* execute statement */ +$stmt->execute(); - printf("rows inserted: %d\n", $stmt->affected_rows); - - /* close statement */ - $stmt->close(); -} - -/* close connection */ -$mysqli->close(); -?> +printf("Rows inserted: %d\n", $stmt->affected_rows); ]]> - - - &style.procedural; + &style.procedural; +printf("Rows inserted: %d\n", mysqli_stmt_affected_rows($stmt)); ]]> &examples.outputs; @@ -151,7 +125,7 @@ rows inserted: 17 mysqli_stmt_num_rows - mysqli_prepare + mysqli_stmt_store_result diff --git a/reference/mysqli/mysqli_stmt/attr-set.xml b/reference/mysqli/mysqli_stmt/attr-set.xml index c011de53f4..5df59422ea 100644 --- a/reference/mysqli/mysqli_stmt/attr-set.xml +++ b/reference/mysqli/mysqli_stmt/attr-set.xml @@ -98,6 +98,13 @@ + + &reftitle.returnvalues; + + &return.success; + + + &reftitle.seealso; diff --git a/reference/mysqli/mysqli_stmt/bind-param.xml b/reference/mysqli/mysqli_stmt/bind-param.xml index 438c2a7e3e..433de60321 100644 --- a/reference/mysqli/mysqli_stmt/bind-param.xml +++ b/reference/mysqli/mysqli_stmt/bind-param.xml @@ -25,8 +25,8 @@ mixedvars - Bind variables for the parameter markers in the SQL statement that was - passed to mysqli_prepare. + Bind variables for the parameter markers in the SQL statement prepared by + mysqli_prepare or mysqli_stmt_prepare. @@ -113,17 +113,14 @@ &reftitle.examples; - &style.oop; + <methodname>mysqli_stmt::bind_param</methodname> example + &style.oop; prepare("INSERT INTO CountryLanguage VALUES (?, ?, ?, ?)"); $stmt->bind_param('sssd', $code, $language, $official, $percent); @@ -133,36 +130,22 @@ $language = 'Bavarian'; $official = "F"; $percent = 11.2; -/* execute prepared statement */ $stmt->execute(); -printf("%d Row inserted.\n", $stmt->affected_rows); - -/* close statement and connection */ -$stmt->close(); +printf("%d row inserted.\n", $stmt->affected_rows); /* Clean up table CountryLanguage */ $mysqli->query("DELETE FROM CountryLanguage WHERE Language='Bavarian'"); -printf("%d Row deleted.\n", $mysqli->affected_rows); - -/* close connection */ -$mysqli->close(); -?> +printf("%d row deleted.\n", $mysqli->affected_rows); ]]> - - - &style.procedural; + &style.procedural; +printf("%d row deleted.\n", mysqli_affected_rows($link)); ]]> &examples.outputs; + + + + Using <literal>...</literal> to provide arguments + + The ... operator can be used to provide variable-length + argument list, e.g. in a WHERE IN clause. + + +prepare("SELECT Language FROM CountryLanguage WHERE CountryCode IN (?, ?)"); +/* Using ... to provide arguments */ +$stmt->bind_param('ss', ...['DEU', 'POL']); +$stmt->execute(); +$stmt->store_result(); + +printf("%d rows found.\n", $stmt->num_rows()); +]]> + + &examples.outputs; + + diff --git a/reference/mysqli/mysqli_stmt/bind-result.xml b/reference/mysqli/mysqli_stmt/bind-result.xml index b741beefad..bde4d1150c 100644 --- a/reference/mysqli/mysqli_stmt/bind-result.xml +++ b/reference/mysqli/mysqli_stmt/bind-result.xml @@ -30,20 +30,31 @@ MySQL client/server protocol places the data for the bound columns into the specified variables var/vars. + + A column can be bound or rebound at any time, even after a result set has + been partially retrieved. The new binding takes effect the next time + mysqli_stmt_fetch is called. + - Note that all columns must be bound after + All columns must be bound after mysqli_stmt_execute and prior to calling mysqli_stmt_fetch. + + + + Depending on column types bound variables can silently change to the corresponding PHP type. - - A column can be bound or rebound at any time, even after a result set has - been partially retrieved. The new binding takes effect the next time - mysqli_stmt_fetch is called. - + + + This functions is useful for simple results. To retrieve iterable result + set, or fetch each row as an array or object, + use mysqli_stmt_get_result. + + @@ -85,32 +96,21 @@ prepare("SELECT Code, Name FROM Country ORDER BY Name LIMIT 5")) { - $stmt->execute(); +$stmt = $mysqli->prepare("SELECT Code, Name FROM Country ORDER BY Name LIMIT 5"); +$stmt->execute(); - /* bind variables to prepared statement */ - $stmt->bind_result($col1, $col2); +/* bind variables to prepared statement */ +$stmt->bind_result($col1, $col2); - /* fetch values */ - while ($stmt->fetch()) { - printf("%s %s\n", $col1, $col2); - } - - /* close statement */ - $stmt->close(); +/* fetch values */ +while ($stmt->fetch()) { + printf("%s %s\n", $col1, $col2); } -/* close connection */ -$mysqli->close(); - -?> ]]> @@ -119,36 +119,24 @@ $mysqli->close(); ]]> - &examples.outputs; + &examples.outputs.similar; mysqli_stmt_fetch mysqli_prepare mysqli_stmt_prepare - mysqli_stmt_init - mysqli_stmt_errno - mysqli_stmt_error diff --git a/reference/mysqli/mysqli_stmt/errno.xml b/reference/mysqli/mysqli_stmt/errno.xml index d579bcc736..69571e3430 100644 --- a/reference/mysqli/mysqli_stmt/errno.xml +++ b/reference/mysqli/mysqli_stmt/errno.xml @@ -20,15 +20,6 @@ Returns the error code for the most recently invoked statement function that can succeed or fail. - - Client error message numbers are listed in the MySQL - errmsg.h header file, - server error message numbers are listed in - mysqld_error.h. - In the MySQL source distribution you can find a complete list of error - messages and error numbers in the file - Docs/mysqld_error.txt. - diff --git a/reference/mysqli/mysqli_stmt/get-result.xml b/reference/mysqli/mysqli_stmt/get-result.xml index ab099f6cae..51e46486e6 100644 --- a/reference/mysqli/mysqli_stmt/get-result.xml +++ b/reference/mysqli/mysqli_stmt/get-result.xml @@ -4,7 +4,7 @@ mysqli_stmt::get_result mysqli_stmt_get_result - Gets a result set from a prepared statement + Gets a result set from a prepared statement as a mysqli_result object @@ -20,8 +20,23 @@ mysqli_stmtstatement - Call to return a result set from a prepared statement query. + Retrieves a result set from a prepared statement as a + mysqli_result object. The data will be fetched from + the MySQL server to PHP. This method should be called only for + queries which produce a result set. + + + &mysqli.available.mysqlnd; + + + + + This function cannot be used together + with mysqli_stmt_store_result. Both of these functions + retrieve the full result set from the MySQL server. + + @@ -45,60 +60,34 @@ - - &reftitle.mysqlnd; - - - &mysqli.available.mysqlnd; - - - &reftitle.examples; &style.oop; connect_error) -{ - die("$mysqli->connect_errno: $mysqli->connect_error"); -} +mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); +$mysqli = new mysqli("localhost", "my_user", "my_password", "world"); $query = "SELECT Name, Population, Continent FROM Country WHERE Continent=? ORDER BY Name LIMIT 1"; -$stmt = $mysqli->stmt_init(); -if(!$stmt->prepare($query)) -{ - print "Failed to prepare statement\n"; -} -else -{ - $stmt->bind_param("s", $continent); +$stmt = $mysqli->prepare($query); +$stmt->bind_param("s", $continent); - $continent_array = array('Europe','Africa','Asia','North America'); +$continentList = array('Europe', 'Africa', 'Asia', 'North America'); - foreach($continent_array as $continent) - { - $stmt->execute(); - $result = $stmt->get_result(); - while ($row = $result->fetch_array(MYSQLI_NUM)) - { - foreach ($row as $r) - { - print "$r "; - } - print "\n"; +foreach ($continentList as $continent) { + $stmt->execute(); + $result = $stmt->get_result(); + while ($row = $result->fetch_array(MYSQLI_NUM)) { + foreach ($row as $r) { + print "$r "; } + print "\n"; } } - -$stmt->close(); -$mysqli->close(); -?> ]]> @@ -106,51 +95,31 @@ $mysqli->close(); &style.procedural; ]]> - &examples.outputs; + &examples.outputs.similar; mysqli_stmt_fetch mysqli_fetch_array mysqli_stmt_store_result - mysqli_errno diff --git a/reference/mysqli/mysqli_stmt/more-results.xml b/reference/mysqli/mysqli_stmt/more-results.xml index fd4a47b7f1..eac3a0e830 100644 --- a/reference/mysqli/mysqli_stmt/more-results.xml +++ b/reference/mysqli/mysqli_stmt/more-results.xml @@ -22,6 +22,11 @@ Checks if there are more query results from a multiple query. + + + &mysqli.available.mysqlnd; + + @@ -40,14 +45,6 @@ - - &reftitle.mysqlnd; - - - &mysqli.available.mysqlnd; - - - &reftitle.seealso; diff --git a/reference/mysqli/mysqli_stmt/next-result.xml b/reference/mysqli/mysqli_stmt/next-result.xml index 812ab25ae4..08c97bf09c 100644 --- a/reference/mysqli/mysqli_stmt/next-result.xml +++ b/reference/mysqli/mysqli_stmt/next-result.xml @@ -22,6 +22,11 @@ Reads the next result from a multiple query. + + + &mysqli.available.mysqlnd; + + @@ -49,14 +54,6 @@ - - &reftitle.mysqlnd; - - - &mysqli.available.mysqlnd; - - - &reftitle.seealso; diff --git a/reference/mysqli/mysqli_stmt/num-rows.xml b/reference/mysqli/mysqli_stmt/num-rows.xml index 66d4fdd377..f9865d8cfb 100644 --- a/reference/mysqli/mysqli_stmt/num-rows.xml +++ b/reference/mysqli/mysqli_stmt/num-rows.xml @@ -5,7 +5,7 @@ mysqli_stmt::$num_rows mysqli_stmt::num_rows mysqli_stmt_num_rows - Return the number of rows in statements result set + Returns the number of rows fetched from the server
@@ -22,15 +22,13 @@ mysqli_stmtstatement - Returns the number of rows in the result set. - The use of mysqli_stmt_num_rows - depends on whether or not you used - mysqli_stmt_store_result to buffer the entire result - set in the statement handle. + Returns the number of rows buffered in the statement. This function will only + work after mysqli_stmt_store_result is called to buffer + the entire result set in the statement handle. - If you use mysqli_stmt_store_result, - mysqli_stmt_num_rows may be called immediately. + This function returns 0 unless all rows have been + fetched from the server. @@ -46,7 +44,9 @@ &reftitle.returnvalues; - An integer representing the number of rows in result set. + An int representing the number of buffered rows. + Returns 0 in unbuffered mode unless all rows have been + fetched from the server. @@ -57,33 +57,18 @@ prepare($query)) { +$stmt = $mysqli->prepare($query); +$stmt->execute(); - /* execute query */ - $stmt->execute(); +/* store the result in an internal buffer */ +$stmt->store_result(); - /* store result */ - $stmt->store_result(); - - printf("Number of rows: %d.\n", $stmt->num_rows); - - /* close statement */ - $stmt->close(); -} - -/* close connection */ -$mysqli->close(); -?> +printf("Number of rows: %d.\n", $stmt->num_rows); ]]> @@ -92,33 +77,18 @@ $mysqli->close(); +printf("Number of rows: %d.\n", mysqli_stmt_num_rows($stmt)); ]]> &examples.outputs; @@ -134,9 +104,9 @@ Number of rows: 20. &reftitle.seealso; + mysqli_stmt_store_result mysqli_stmt_affected_rows mysqli_prepare - mysqli_stmt_store_result diff --git a/reference/mysqli/mysqli_stmt/sqlstate.xml b/reference/mysqli/mysqli_stmt/sqlstate.xml index 7a803fb8a8..dcd931a087 100644 --- a/reference/mysqli/mysqli_stmt/sqlstate.xml +++ b/reference/mysqli/mysqli_stmt/sqlstate.xml @@ -42,16 +42,6 @@ - - &reftitle.notes; - - - Note that not all MySQL errors are yet mapped to SQLSTATE's. - The value HY000 (general error) is used for unmapped errors. - - - - &reftitle.examples; @@ -140,6 +130,16 @@ Error: 42S02. + + &reftitle.notes; + + + Note that not all MySQL errors are yet mapped to SQLSTATE's. + The value HY000 (general error) is used for unmapped errors. + + + + &reftitle.seealso; diff --git a/reference/mysqli/mysqli_stmt/store-result.xml b/reference/mysqli/mysqli_stmt/store-result.xml index ef492c390e..1eecc59966 100644 --- a/reference/mysqli/mysqli_stmt/store-result.xml +++ b/reference/mysqli/mysqli_stmt/store-result.xml @@ -4,7 +4,7 @@ mysqli_stmt::store_result mysqli_stmt_store_result - Transfers a result set from a prepared statement + Stores a result set in an internal buffer @@ -20,10 +20,10 @@ mysqli_stmtstatement - You must call mysqli_stmt_store_result for every query that - successfully produces a result set (SELECT, SHOW, DESCRIBE, EXPLAIN), - if and only if you want to buffer the complete result set by the client, - so that the subsequent mysqli_stmt_fetch call returns buffered data. + This function should be called for queries that successfully + produce a result set (e.g. SELECT, SHOW, DESCRIBE, EXPLAIN) + only if the complete result set needs to be buffered in PHP. Each subsequent + mysqli_stmt_fetch call will return buffered data. @@ -58,36 +58,18 @@ prepare($query)) { +$stmt = $mysqli->prepare($query); +$stmt->execute(); - /* execute query */ - $stmt->execute(); +/* store the result in an internal buffer */ +$stmt->store_result(); - /* store result */ - $stmt->store_result(); - - printf("Number of rows: %d.\n", $stmt->num_rows); - - /* free result */ - $stmt->free_result(); - - /* close statement */ - $stmt->close(); -} - -/* close connection */ -$mysqli->close(); -?> +printf("Number of rows: %d.\n", $stmt->num_rows); ]]> @@ -96,36 +78,18 @@ $mysqli->close(); +printf("Number of rows: %d.\n", mysqli_stmt_num_rows($stmt)); ]]> &examples.outputs; diff --git a/reference/mysqli/summary.xml b/reference/mysqli/summary.xml index b8b0f8a09b..489fa3f976 100644 --- a/reference/mysqli/summary.xml +++ b/reference/mysqli/summary.xml @@ -188,7 +188,7 @@ Returns the MySQL client version as a string - mysqli::get_client_stats + N/A mysqli_get_client_stats N/A Returns client per-process statistics. &mysqli.available.mysqlnd; diff --git a/reference/mysqli/versions.xml b/reference/mysqli/versions.xml index 7ce7233846..8ce04bab37 100644 --- a/reference/mysqli/versions.xml +++ b/reference/mysqli/versions.xml @@ -4,222 +4,214 @@ Do NOT translate this file --> - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - + + - + - - - Mysqlnd Memcache plugin - mysqlnd_memcache - - - &reftitle.intro; - - The mysqlnd memcache plugin (mysqlnd_memcache) is an PHP - extension for transparently translating SQL into requests for the - MySQL InnoDB Memcached Daemon Plugin (server plugin). It includes - experimental support for the MySQL Cluster Memcached Daemon. The server - plugin provides access to data stored inside MySQL InnoDB (respectively - MySQL Cluster NDB) tables using the Memcache protocol. - This PHP extension, which supports all PHP MySQL extensions that use - mysqlnd, will identify tables exported in - this way and will translate specific SELECT queries into Memcache requests. - - - mysqlnd_memcache data flow - - - - - - - This plugin depends on the MySQL InnoDB Memcached Daemon Plugin. It is not - provided to be used with a stand-alone Memcached. For a generic query cache - using Memcached look at the mysqlnd query - cache plugin. For direct Memcache access look at the - memcache and - memcached extensions. - - - - The MySQL native driver for PHP is a C library that ships together with - PHP. It serves as a drop-in replacement for the - MySQL Client Library (libmysqlclient). Using mysqlnd has - several advantages: no extra downloads are required because it's bundled with PHP, - it's under the PHP license, there is lower memory consumption in certain cases, and - it contains new functionality such as asynchronous queries. - - - The mysqlnd_mmemcache operates, for the most part, - transparently from a user perspective. The mysqlnd memcache - plugin supports all PHP applications, and all MySQL PHP extensions. - It does not change existing APIs. Therefore, it can easily be used with - existing PHP applications. - - - The MySQL Memcache plugins add key-value style access method for data stored - in InnoDB resp. NDB (MySQL Cluster) SQL tables through the Memcache protocol. - This type of key-value access if often faster than using SQL. - -
- Key Features - - The key features of PECL/mysqlnd_memcache are as follows. - - - - - - Possible performance benefits - - - - - - Client-side: light-weight protocol. - - - - - Server-side: no SQL parsing, direct access to the storage. - - - - - Please, run your own benchmarks! Actual performance results are - highly dependent on setup and hardware used. - - - - - - - -
- -
- Limitations - - The initial version is not binary safe. Due to the way the MySQL Memcache - plugins works there are restrictions related to separators. - - - Prepared statements and asynchronous queries are not supported. Result set - meta data support is limited. - - - The mapping information for tables accessible via Memcache is not cached - in the plugin between requests but fetched from the MySQL server each time - a MySQL connection is associated with a Memcache connection. See - mysqlnd_memcache_set for details. - -
- -
- On the name - - The shortcut mysqlnd_memcache - stands for mysqlnd memcache plugin. - Memcache refers to support of the MySQL Memcache plugins - for InnoDB and NDB (MySQL Cluster). The plugin is not - related to the Memcached cache server. - -
-
- - &reference.mysqlnd-memcache.quickstart; - &reference.mysqlnd-memcache.setup; - &reference.mysqlnd-memcache.constants; - &reference.mysqlnd-memcache.reference; - &reference.mysqlnd-memcache.changes; - -
- - diff --git a/reference/mysqlnd_memcache/changes.xml b/reference/mysqlnd_memcache/changes.xml deleted file mode 100644 index c3306bd3c1..0000000000 --- a/reference/mysqlnd_memcache/changes.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Change History - - This change history is a high level summary of selected changes - that may impact applications and/or break backwards compatibility. - - - See also the CHANGES file in the source distribution - for a complete list of changes. - - -
- PECL/mysqlnd_memcache 1.0 series - - 1.0.0-alpha - - - - Release date: TBD - - - - - Motto/theme: Basic mapping of SQL SELECT to a MySQL Memcache plugin access. - - - - - - The initial release does map basic SQL SELECT statements to a MySQL Memcache plugin - access. This bares potential performance benefits as the direct - key-value access to MySQL storage using the Memcache protocol is usually - faster than using SQL access. - -
- -
- - diff --git a/reference/mysqlnd_memcache/configure.xml b/reference/mysqlnd_memcache/configure.xml deleted file mode 100644 index 3998d69963..0000000000 --- a/reference/mysqlnd_memcache/configure.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - -
- &reftitle.install; - - - &pecl.moved; - - - - &pecl.info; - &url.pecl.package;mysqlnd_memcache - - - - &pecl.windows.download; - - -
- - - diff --git a/reference/mysqlnd_memcache/constants.xml b/reference/mysqlnd_memcache/constants.xml deleted file mode 100644 index 1b0f1d844a..0000000000 --- a/reference/mysqlnd_memcache/constants.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - &reftitle.constants; - &extension.constants; - - - MySQL Memcache Plugin related - - - - - - MYSQLND_MEMCACHE_DEFAULT_REGEXP - (string) - - - - Default regular expression (PCRE style) used for matching SELECT - statements that will be mapped into a MySQL Memcache Plugin access point, if possible. - - - It is also possible to use mysqlnd_memcache_set, but the default - approach is using this regular expression for pattern matching. - - - - - - - - Assorted - - - The version number of this plugin can be obtained by using - MYSQLND_MEMCACHE_VERSION or - MYSQLND_MEMCACHE_VERSION_ID. - MYSQLND_MEMCACHE_VERSION - is the string representation of the numerical version number - MYSQLND_MEMCACHE_VERSION_ID, which is an integer such as 10000. - Developers can calculate the version number as follows. - - - - - - - Version (part) - Example - - - - - Major*10000 - 1*10000 = 10000 - - - Minor*100 - 0*100 = 0 - - - Patch - 0 = 0 - - - MYSQLND_MEMCACHE_VERSION_ID - 10000 - - - - - - - - - - MYSQLND_MEMCACHE_VERSION - (string) - - - - Plugin version string, for example, 1.0.0-alpha. - - - - - - MYSQLND_MEMCACHE_VERSION_ID - (int) - - - - Plugin version number, for example, 10000. - - - - - - - - - diff --git a/reference/mysqlnd_memcache/figures/mymemflow.dot b/reference/mysqlnd_memcache/figures/mymemflow.dot deleted file mode 100644 index a69de553d8..0000000000 --- a/reference/mysqlnd_memcache/figures/mymemflow.dot +++ /dev/null @@ -1,32 +0,0 @@ -/* -Render using -$ dot -Tpng -ofigures/mymemflow.png figures/mymemflow.dot -*/ -graph mymemflow { - rankdir=LR - node [shape=box] - - subgraph clusterPHP { - rankdir=LR - label="PHP" - extmysql [label="ext/mysql"] - extmysql -- mysqlnd_memcache - mysqli -- mysqlnd_memcache - pdo -- mysqlnd_memcache - - subgraph clusterMysqlnd { - label=mysqlnd - mysqlnd_memcache [color=blue] - } - } - - subgraph clusterMySQL { - label="MySQL Server" - color=black - sqlengine [label="SQL Engine"] - innoplugin [label="InnoDB Memcache Daemon" color=blue] - } - - mysqlnd_memcache -- innoplugin [label="memcache protocol" color=blue] - mysqlnd_memcache -- sqlengine [label="MySQL Protocol"] -} diff --git a/reference/mysqlnd_memcache/figures/mymemflow.png b/reference/mysqlnd_memcache/figures/mymemflow.png deleted file mode 100644 index 328d66c138..0000000000 Binary files a/reference/mysqlnd_memcache/figures/mymemflow.png and /dev/null differ diff --git a/reference/mysqlnd_memcache/functions/mysqlnd-memcache-get-config.xml b/reference/mysqlnd_memcache/functions/mysqlnd-memcache-get-config.xml deleted file mode 100644 index c9bdde6284..0000000000 --- a/reference/mysqlnd_memcache/functions/mysqlnd-memcache-get-config.xml +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - mysqlnd_memcache_get_config - Returns information about the plugin configuration - - - - &reftitle.description; - - array - mysqlnd_memcache_get_config - mixedconnection - - - This function returns an array of all mysqlnd_memcache related configuration - information that is attached to the MySQL connection. This includes MySQL, the - Memcache object provided via mysqlnd_memcache_set, - and the table mapping configuration that was automatically collected - from the MySQL Server. - - - - - &reftitle.parameters; - - - connection - - - A handle to a MySQL Server using one of the MySQL API extensions for PHP, which are - PDO_MYSQL, mysqli or - ext/mysql. - - - - - - - - &reftitle.returnvalues; - - An array of mysqlnd_memcache configuration information on success, otherwise &false;. - - - The returned array has these elements: - - - - <function>mysqlnd_memcache_get_config</function> array structure - - - - Array Key - Description - - - - - memcached - - Instance of Memcached associated to this MySQL connection - by mysqlnd_memcache_set. You can use this to - change settings of the memcache connection, or directly by querying the - server on this connection. - - - - pattern - - The PCRE regular expression used to match the SQL query sent to the server. - Queries matching this pattern will be further analyzed to decide whether - the query can be intercepted and sent via the memcache interface or - whether the query is sent using the general MySQL protocol to the - server. The pattern is either the default pattern - (MYSQLND_MEMCACHE_DEFAULT_REGEXP) or it is set via - mysqlnd_memcache_set. - - - - mappings - - An associative array with a list of all configured containers as they - were discovered by this plugin. The key for these elements is the name - of the container in the MySQL configuration. The value is described - below. The contents of this field is created by querying the MySQL - Server during association to MySQL and a memcache connection using - mysqlnd_memcache_set. - - - - mapping_query - An SQL query used during - mysqlnd_memcache_set - to identify the available containers and mappings. The result of that - query is provided in the mappings element. - - - - -
- - Mapping entry structure - - - - Array Key - Description - - - - - prefix - - A prefix used while accessing data via memcache. With the MySQL InnoDB - Memcache Deamon plugin, this usually begins with @@ and ends with a - configurable separator. This prefix is placed in front of the key value - while using the memcache protocol. - - - - schema_name - - Name of the schema (database) which contains the table being accessed. - - - - table_name - - Name of the table which contains the data accessible via memcache - protocol. - - - - id_field_name - - Name of the database field (column) with the id used as key when - accessing the table via memcache. Often this is the database field - having a primary key. - - - - separator - - The separator used to split the different field values. This is needed as - memcache only provides access to a single value while MySQL can map - multiple columns to this value. - - - The separator, which can be set in the MySQL Server configuration, - should not be part of any value retrieved via memcache because proper - mapping can't be guaranteed. - - - - - - fields - - An array with the name of all fields available for this mapping. - - - - -
-
-
- - - &reftitle.examples; - - - <function>mysqlnd_memcache_get_config</function> example - -addServer("host", 11211); -mysqlnd_memcache_set($mysqli, $memc); - -var_dump(mysqlnd_memcache_get_config($mysqli)); -?> -]]> - - &example.outputs; - - - object(Memcached)#2 (0) { - } - ["pattern"]=> - string(125) "/^\s*SELECT\s*(.+?)\s*FROM\s*`?([a-z0-9_]+)`?\s*WHERE\s*`?([a-z0-9_]+)`?\s*=\s*(?(?=["'])["']([^"']*)["']|([0-9e\.]*))\s*$/is" - ["mappings"]=> - array(1) { - ["mymem_test"]=> - array(6) { - ["prefix"]=> - string(13) "@@mymem_test." - ["schema_name"]=> - string(4) "test" - ["table_name"]=> - string(10) "mymem_test" - ["id_field_name"]=> - string(2) "id" - ["separator"]=> - string(1) "|" - ["fields"]=> - array(3) { - [0]=> - string(2) "f1" - [1]=> - string(2) "f2" - [2]=> - string(2) "f3" - } - } - } - ["mapping_query"]=> - string(209) " SELECT c.name, - CONCAT('@@', c.name, (SELECT value FROM innodb_memcache.config_options WHERE name = 'table_map_delimiter')) AS key_prefix, - c.db_schema, - c.db_table, - c.key_columns, - c.value_columns, - (SELECT value FROM innodb_memcache.config_options WHERE name = 'separator') AS sep - FROM innodb_memcache.containers c" -} -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_memcache_set - - - - - -
- - diff --git a/reference/mysqlnd_memcache/functions/mysqlnd-memcache-set.xml b/reference/mysqlnd_memcache/functions/mysqlnd-memcache-set.xml deleted file mode 100644 index 92b40613a6..0000000000 --- a/reference/mysqlnd_memcache/functions/mysqlnd-memcache-set.xml +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - mysqlnd_memcache_set - Associate a MySQL connection with a Memcache connection - - - - &reftitle.description; - - bool - mysqlnd_memcache_set - mixedmysql_connection - Memcachedmemcache_connection - stringpattern - callablecallback - - - Associate mysql_connection with - memcache_connection using pattern - as a PCRE regular expression, and callback as a notification - callback or to unset the association of mysql_connection. - - - While associating a MySQL connection with a Memcache connection, this function - will query the MySQL Server for its configuration. It will automatically - detect whether the server is configured to use the InnoDB Memcache Daemon - Plugin or MySQL Cluster NDB Memcache support. It will also query the server - to automatically identify exported tables and other configuration options. - The results of this automatic configuration can be retrieved using - mysqlnd_memcache_get_config. - - - - - &reftitle.parameters; - - - mysql_connection - - - A handle to a MySQL Server using one of the MySQL API extensions for PHP, which are - PDO_MYSQL, mysqli or - ext/mysql. - - - - - memcache_connection - - - A Memcached instance with a - connection to the MySQL Memcache Daemon plugin. If this parameter - is omitted, then mysql_connection will be unassociated - from any memcache connection. And if a previous association exists, then it will be - replaced. - - - - - pattern - - - A regular expression in Perl Compatible - Regular Expression syntax used to identify potential - Memcache-queries. The query should have three sub patterns. The - first subpattern contains the requested field list, the second the name - of the ID column from the query and the third the requested value. If - this parameter is omitted or os set to &null;, then a default - pattern will be used. - - - - - callback - - - A callback which will be used whenever a query is being sent to - MySQL. The callback will receive a single &boolean; parameter - telling if a query was sent via Memcache. - - - - - - - - &reftitle.returnvalues; - - &true; if the association or disassociation is successful, otherwise &false; if there - is an error. - - - - - &reftitle.examples; - - - - <function>mysqlnd_memcache_set</function> example with - <function>var_dump</function> as a simple debugging callback. - - -addServer("host", 11211); -mysqlnd_memcache_set($mysqli, $memc, NULL, 'var_dump'); - -/* This query will be intercepted and executed via Memcache protocol */ -echo "Sending query for id via Memcache: "; -$mysqli->query("SELECT f1, f2, f3 FROM test WHERE id = 1"); - -/* f1 is not configured as valid key field, this won't be sent via Memcache */ -echo "Sending query for f1 via Memcache: "; -$mysqli->query("SELECT id FROM test WHERE f1 = 1"); - -mysqlnd_memcache_set($mysqli); - -/* Now the regular MySQL protocol will be used */ -echo "var_dump won't be invoked: "; -$mysqli->query("SELECT f1, f2, f3 WHERE id = 1"); - -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - - mysqlnd_memcache_get_config - - - - - - - - diff --git a/reference/mysqlnd_memcache/ini.xml b/reference/mysqlnd_memcache/ini.xml deleted file mode 100644 index 4cf3d3869c..0000000000 --- a/reference/mysqlnd_memcache/ini.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - -
- &reftitle.runtime; - &extension.runtime; - - - Mysqlnd_memcache &ConfigureOptions; - - - - &Name; - &Default; - &Changeable; - &Changelog; - - - - - mysqlnd_memcache.enable - 1 - PHP_INI_SYSTEM - Available since 1.0.0 - - - -
-
- - &ini.descriptions.title; - - - - - - - mysqlnd_memcache.enable - int - - - - Enables or disables the plugin. If disabled, the extension will not plug - into - mysqlnd to proxy internal - mysqlnd C API calls. - - - This option is mainly used by developers to build this - extension statically into PHP. General users are encouraged to build - this extension as a shared object, and to unload it completely when - it is not needed. - - - - - - - - -
- - diff --git a/reference/mysqlnd_memcache/quickstart.xml b/reference/mysqlnd_memcache/quickstart.xml deleted file mode 100644 index 6ca7001cc7..0000000000 --- a/reference/mysqlnd_memcache/quickstart.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - Quickstart and Examples - - The mysqlnd memcache plugin is easy to use. - This quickstart will demo typical use-cases, and provide practical advice on getting - started. - - - It is strongly recommended to read the reference sections in addition to the - quickstart. The quickstart tries to avoid discussing theoretical concepts - and limitations. Instead, it will link to the reference sections. It is safe - to begin with the quickstart. However, before using the plugin in mission critical - environments we urge you to read additionally the background information from the - reference sections. - -
- Setup - - The plugin is implemented as a PHP extension. See also the - installation instructions to - install this extension. - - - Compile or configure the PHP MySQL extension (API) (mysqli, - PDO_MYSQL, mysql). - That extension must use the mysqlnd library as - because mysqlnd_memcache is a plugin for the mysqlnd library. For additional information, - refer to the mysqlnd_memcache installation instructions. - - - Then, load this extension into PHP and activate the plugin in the PHP configuration - file using the PHP configuration directive named - mysqlnd_memcache.enable. - - - - Enabling the plugin (php.ini) - - - - - - - Follow the instructions given in the MySQL - Reference Manual on installing the Memcache plugins for the MySQL server. Activate - the plugins and configure Memcache access for SQL tables. - - - The examples in this quickguide assume that the following table exists, and that - Memcache is configured with access to it. - - - - SQL table used for the Quickstart - - - - - -
-
- Usage - - After associating a MySQL connection with a Memcache connection using - mysqnd_memcache_set the plugin attempts to transparently - replace SQL SELECT - statements by a memcache access. For that purpose the plugin monitors - all SQL statements executed and tries to match the statement string - against MYSQLND_MEMCACHE_DEFAULT_REGEXP. - In case of a match, the mysqlnd memcache plugin checks whether the - SELECT is accessing only columns of a mapped table and - the WHERE clause is limited to a single key lookup. - - - In case of the example SQL table, the plugin will use the Memcache interface - of the MySQL server to fetch results for a SQL query like - SELECT f1, f2, f3 WHERE id = n. - - - - - Basic example. - - -addServer("host", 11211); -mysqlnd_memcache_set($mysqli, $memc); - -/* - This is a query which queries table test using id as key in the WHERE part - and is accessing fields f1, f2 and f3. Therefore, mysqlnd_memcache - will intercept it and route it via memcache. -*/ -$result = $mysqli->query("SELECT f1, f2, f3 FROM test WHERE id = 1"); -while ($row = $result->fetch_row()) { - print_r($row); -} - -/* - This is a query which queries table test but using f1 in the WHERE clause. - Therefore, mysqlnd_memcache can't intercept it. This will be executed - using the MySQL protocol -*/ -$mysqli->query("SELECT id FROM test WHERE f1 = 'Lady'"); -while ($row = $result->fetch_row()) { - print_r($row); -} -?> -]]> - - &example.outputs; - - Hello - [f2] => World - [f3] => ! -) -array( - [id] => 2 -) -]]> - - - - -
- -
- diff --git a/reference/mysqlnd_memcache/reference.xml b/reference/mysqlnd_memcache/reference.xml deleted file mode 100644 index 43c158bcff..0000000000 --- a/reference/mysqlnd_memcache/reference.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Mysqlnd_memcache &Functions; - - &reference.mysqlnd-memcache.entities.functions; - - - - diff --git a/reference/mysqlnd_memcache/setup.xml b/reference/mysqlnd_memcache/setup.xml deleted file mode 100644 index d295e20402..0000000000 --- a/reference/mysqlnd_memcache/setup.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - - PHP: this extension requires PHP 5.4+, version PHP 5.4.4 or never. The required - PHP extensions are PCRE (enabled by default), and - the memcached extension version 2.0.x. - - - The mysqlnd_memcache Memcache - plugin supports all PHP applications and all available PHP MySQL extensions - (mysqli, - mysql, - PDO_MYSQL). - The PHP MySQL extension must be configured with - mysqlnd support. - - - For accessing InnoDB tables, this PHP extension requires - MySQL Server 5.6.6 or newer with the InnoDB Memcache - Daemon Plugin enabled. - - - For accessing MySQL Cluster NDB tables, this PHP extension requires - MySQL Cluster 7.2 or newer with the NDB Memcache API nodes - enabled. - -
- - &reference.mysqlnd-memcache.configure; - &reference.mysqlnd-memcache.ini; - -
- - diff --git a/reference/mysqlnd_memcache/versions.xml b/reference/mysqlnd_memcache/versions.xml deleted file mode 100644 index ebbe0568a5..0000000000 --- a/reference/mysqlnd_memcache/versions.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/reference/mysqlnd_ms/book.xml b/reference/mysqlnd_ms/book.xml deleted file mode 100644 index 2f5a3a8a9c..0000000000 --- a/reference/mysqlnd_ms/book.xml +++ /dev/null @@ -1,359 +0,0 @@ - - - - - Mysqlnd replication and load balancing plugin - mysqlnd_ms - - - &reftitle.intro; - - The mysqlnd replication and load balancing plugin (mysqlnd_ms) - adds easy to use MySQL replication support to all PHP MySQL extensions that use - mysqlnd. - - - As of version PHP 5.3.3 the MySQL native driver for PHP - (mysqlnd) - features an internal plugin C API. C plugins, such as the replication and - load balancing plugin, can extend the functionality of - mysqlnd. - - - The MySQL native driver for PHP is a C library that ships together with - PHP. It serves as a drop-in replacement for the - MySQL Client Library (libmysqlclient). Using mysqlnd has - several advantages: no extra downloads are required because it's bundled with PHP, - it's under the PHP license, there is lower memory consumption in certain cases, and - it contains new functionality such as asynchronous queries. - - - Mysqlnd plugins like mysqlnd_ms operate, for the most part, - transparently from a user perspective. The replication and load balancing - plugin supports all PHP applications, and all MySQL PHP extensions. - It does not change existing APIs. Therefore, it can easily be used with - existing PHP applications. - -
- Key Features - - The key features of PECL/mysqlnd_ms are as follows. - - - - - - Transparent and therefore easy to use. - - - - - - Supports all of the PHP MySQL extensions. - - - - - SSL support. - - - - - A consistent API. - - - - - Little to no application changes required, dependent on the required usage scenario. - - - - - Lazy connections: connections to master and slave servers are not - opened before a SQL statement is executed. - - - - - Optional: automatic use of master after the first write in a web request, to - lower the possible impact of replication lag. - - - - - - - - - Can be used with any MySQL clustering solution. - - - - - - MySQL Replication: Read-write splitting is done by the plugin. - Primary focus of the plugin. - - - - - MySQL Cluster: Read-write splitting can be disabled. - Configuration of multiple masters possible - - - - - Third-party solutions: the plugin is optimized for MySQL Replication - but can be used with any other kind of MySQL clustering solution. - - - - - - - - - Featured read-write split strategies - - - - - - Automatic detection of SELECT. - - - - - Supports SQL hints to overrule automatism. - - - - - User-defined. - - - - - Can be disabled for, for example, when using synchronous clusters such as MySQL Cluster. - - - - - - - - - Featured load balancing strategies - - - - - - Round Robin: choose a different slave in round-robin fashion for every slave request. - - - - - Random: choose a random slave for every slave request. - - - - - Random once (sticky): choose a random slave once to run all slave requests for the duration of a web request. - - - - - User-defined. The application can register callbacks with mysqlnd_ms. - - - - - PHP 5.4.0 or newer: transaction aware when using API calls only to control transactions. - - - - - Weighted load balancing: servers can be assigned different priorities, for example, to - direct more requests to a powerful machine than to another less powerful machine. Or, to - prefer nearby machines to reduce latency. - - - - - - - - - Global transaction ID - - - - - - Client-side emulation. Makes manual master server failover and slave promotion easier - with asynchronous clusters, such as MySQL Replication. - - - - - Support for built-in global transaction identifier feature of MySQL 5.6.5 or newer. - - - - - Supports using transaction ids to identify up-to-date asynchronous slaves - for reading when session consistency is required. Please, note the restrictions - mentioned in the manual. - - - - - Throttling: optionally, the plugin can wait for a slave to become "synchronous" before - continuing. - - - - - - - - - Service and consistency levels - - - - - - Applications can request eventual, session and strong consistency - service levels for connections. Appropriate cluster nodes will - be searched automatically. - - - - - Eventual consistent MySQL Replication slave accesses can be replaced - with fast local cache accesses transparently to reduce server load. - - - - - - - - - Partitioning and sharding - - - - - - Servers of a replication cluster can be organized into groups. SQL hints - can be used to manually direct queries to a specific group. - Grouping can be used to partition (shard) the data, or to cure the issue of - hotspots with updates. - - - - - MySQL Replication filters are supported through the table filter. - - - - - - - - - MySQL Fabric - - - - - - Experimental support - for MySQL Fabric is included. - - - - - - - -
- -
- Limitations - - The built-in read-write-split mechanism is very basic. Every - query which starts with SELECT - is considered a read request to be sent to a MySQL slave server. - All other queries (such as SHOW statements) - are considered as write requests that are sent to the MySQL master server. - The build-in behavior can be overruled using - SQL hints, or a user-defined - callback function. - - - The read-write splitter is not aware of multi-statements. Multi-statements - are considered as one statement. The decision of where to run the statement - will be based on the beginning of the statement string. For example, if - using mysqli_multi_query - to execute the multi-statement SELECT id FROM test ; INSERT INTO test(id) VALUES (1), - the statement will be redirected to a slave server because it begins with - SELECT. The INSERT statement, which is - also part of the multi-statement, will not be redirected to a master server. - - - - Applications must be aware of the consequences of connection switches that are - performed for load balancing purposes. Please check the documentation on - connection pooling and switching, - transaction handling, - failover - load balancing&listendand; - read-write splitting. - - -
- -
- On the name - - The shortcut mysqlnd_ms - stands for mysqlnd master slave plugin. The name - was chosen for a quick-and-dirty proof-of-concept. In the beginning - the developers did not expect to continue using the code base. - -
-
- - &reference.mysqlnd-ms.quickstart; - &reference.mysqlnd-ms.concepts; - &reference.mysqlnd-ms.setup; - &reference.mysqlnd-ms.constants; - &reference.mysqlnd-ms.reference; - &reference.mysqlnd-ms.changes; - -
- - diff --git a/reference/mysqlnd_ms/changes.xml b/reference/mysqlnd_ms/changes.xml deleted file mode 100644 index c057ea8991..0000000000 --- a/reference/mysqlnd_ms/changes.xml +++ /dev/null @@ -1,1008 +0,0 @@ - - - - - Change History - - This change history is a high level summary of selected changes - that may impact applications and/or break backwards compatibility. - - - See also the CHANGES file in the source distribution - for a complete list of changes. - - -
- PECL/mysqlnd_ms 1.6 series - - 1.6.0-alpha - - - - Release date: TBD - - - - - Motto/theme: Maintenance and initial MySQL Fabric support - - - - - - - This is the current development series. All - features are at an early stage. Changes may happen at any time without - prior notice. Please, do not use this version in production environments. - - - The documentation may not reflect all changes yet. - - - - Bug fixes - - - - Won't fix: #66616 R/W split fails: QOS with mysqlnd_get_last_gtid with built-in MySQL GTID - - - This is not a bug in the plugins implementation but a server side feature - limitation not considered and documented before. MySQL 5.6 built-in GTIDs cannot be - used to ensure session consistency when reading from slaves in all cases. - In the worst case the plugin will not consider using the slaves and - fallback to using the master. There will be no wrong results but no benefit - from doing GTID checks either. - - - - - Fixed #66064 - Random once load balancer ignoring weights - - - Due to a config parsing bug random load balancing has ignored node - weights if, and only if, the sticky flag was set (random once). - - - - - Fixed #65496 - Wrong check for slave delay - - - The quality of service filter has erroneously ignored slaves - that lag for zero (0) seconds if a any maximum lag had been set. - Although a slave was not lagging behind, it was excluded from the - load balancing list if a maximum age was set by the QoS filter. - This was due to using the wrong comparison operator in the source - of the filter. - - - - - Fixed #65408 - Compile failure with -Werror=format-security - - - - - - Feature changes - - - - Introduced an internal connection pool. When using Fabric and switching - from shard group A to shard group B, we are replacing the entire list of - masters and slaves. This troubles the connections state alignment logic and - some filters. Some filters cache information on the master and slave lists. - The new internal connection pool abstraction allows us to inform the filters - of changes, hence they can update their caches. - - - Later on, the pool can also be used to reduce connection overhead. Assume - you are switching from a shard group to another and back again. Whenever - the switch is done, the pool's active server (and connection) lists are - replaced. However, no longer used connections are not necessarily closed - immediately but can be kept in the pool for later reuse. - - - Please note, the connection pool is internalat this point. There are some - new statistics to monitor it. However, you cannot yet configure pool size - of behaviour. - - - - - Added a basic distributed transaction abstraction. - XA transactions can are supported ever since using standard SQL calls. - This is inconvenient as XA participants must be managed manually. - PECL/mysqlnd_ms introduces API calls to control XA transaction among MySQL servers. - When using the new functions, PECL/mysqlnd_ms acts as a transaction coordinator. - After starting a distributed transaction, the plugin tracks all servers - involved until the transaction is ended and issues appropriate SQL statements - on the XA participants. - - - This is useful, for example, when using Fabric and sharding. When using - Fabric the actual shard servers involved in a business transaction may not be known - in advance. Thus, manually controlling a transaction that spawns multiple shards becomes - difficult. - Please, be warned about current limitations. - - - - - Introduced automatic retry loop for - transient errors and - corresponding statistic - to count the number of implicit retries. Some distributed - database clusters use transient errors to hint a client to retry - its operation in a bit. Most often, the client is then supposed - to halt execution (sleep) for a short moment before retrying the - desired operation. Immediately failing over to another node - is not necessary in response to the error. Instead, a retry loop - can be performed. Common situation when using MySQL Cluster. - - - - - Introduced automatic retry loop for - transient errors and - corresponding statistic - to count the number of implicit retries. Some distributed - database clusters use transient errors to hint a client to retry - its operation in a bit. Most often, the client is then supposed - to halt execution (sleep) for a short moment before retrying the - desired operation. Immediately failing over to another node - is not necessary in response to the error. Instead, a retry loop - can be performed. Common situation when using MySQL Cluster. - - - - - Introduced most basic support - for the MySQL Fabric High Availability and sharding framework. - - - Please, consider this pre-alpha quality. Both the - server side framework and the client side code is supposed to work flawless - considering the MySQL Fabric quickstart examples only. However, testing has not been - performed to the level of prior plugin alpha releases. - Either sides are moving targets, API changes may happen at any - time without prior warning. - - - As this is work in progress, the manual may not yet reflect allow - feature limitations and known bugs. - - - - - New - statistics - to monitor the Fabric XML RPC call sharding.lookup_servers: - fabric_sharding_lookup_servers_success, - fabric_sharding_lookup_servers_failure, - fabric_sharding_lookup_servers_time_total, - fabric_sharding_lookup_servers_bytes_total, - fabric_sharding_lookup_servers_xml_failure. - - - - - New functions related to MySQL Fabric: - mysqlnd_ms_fabric_select_shard, - mysqlnd_ms_fabric_select_global, - mysqlnd_ms_dump_servers. - - - - -
- -
- PECL/mysqlnd_ms 1.5 series - - 1.5.1-stable - - - - Release date: 06/2013 - - - - - Motto/theme: Sharding support, improved transaction support - - - - - - - This is the current stable series. Use this version in production environments. - - - The documentation is complete. - - - - 1.5.0-alpha - - - - Release date: 03/2013 - - - - - Motto/theme: Sharding support, improved transaction support - - - - - - Bug fixes - - - - Fixed #60605 PHP segmentation fault when mysqlnd_ms is enabled. - - - - - Setting transaction stickiness disables all load balancing, including - automatic failover, for the duration of a transaction. So far - connection switches could have happened in the middle of a transaction - in multi-master configurations and during automatic failover although - transaction monitoring had detected transaction boundaries properly. - - - - - BC break and bug fix. SQL hints enforcing the use of a specific - kind of server (MYSQLND_MS_MASTER_SWITCH, - MYSQLND_MS_SLAVE_SWITCH, - MYSQLND_MS_LAST_USED_SWITCH) are ignored for the - duration of a transaction of transaction stickiness is enabled and - transaction boundaries have been detected properly. - - - This is a change in behaviour. However, it is also a bug fix and a step - to align behaviour. If, in previous versions, transaction stickiness, - one of the above listed SQL hints and the quality of service filtering - was combined it could happened that the SQL hints got ignored. In some - case the SQL hints did work, in other cases they did not. The new - behaviour is more consistent. SQL hints will always be ignore for - the duration of a transaction, if - transaction stickiness - is enabled. - - - Please note, transaction boundary detection continues to be based on API - call monitoring. SQL commands controlling transactions are not monitored. - - - - - BC break and bug fix. Calls to mysqlnd_ms_set_qos - will fail when done in the middle of a transaction if - transaction stickiness - is enabled. Connection switches are not allowed for the duration of a - transaction. Changing the quality of service likely results on a different - set of servers qualifying for query execution, possibly making it - necessary to switch connections. Thus, the call is not allowed in - during an active transaction. The quality of server can, however, be - changed in between transactions. - - - - - - Feature changes - - - - Introduced the node_group filter. - The filter lets you organize servers (master and slaves) - into groups. Queries can be directed to a certain group of servers - by prefixing the query statement with a SQL hint/comment that contains - the groups configured name. Grouping can be used for - partitioning and sharding, and also to optimize for local caching. - In the case of sharding, a group name can be thought of like a shard key. - All queries for a given shard key will be executed on the - configured shard. Note: both the client and server must support sharding - for sharding to function with mysqlnd_ms. - - - - - Extended configuration file validation during PHP startup (RINIT). - An E_WARNING level error will be thrown if the configuration - file can not be read (permissions), is empty, or the file (JSON) could not be parsed. - Warnings may appear in log files, which depending on how PHP is configured. - - - Distributions that aim to provide a pre-configured setup, including a - configuration file stub, are asked to put {} into - the configuration file to prevent this warning about an invalid - configuration file. - - - Further configuration file validation is done when parsing sections - upon opening a connection. Please, note that there may still be situations - when an invalid plugin configuration file does not lead to proper error messages - but a failure to connect. - - - - - As of PHP 5.5.0, improved support for transaction boundaries detection was added for - mysqli. The mysqli extension has been - modified to use the new C API calls of the mysqlnd - library to begin, commit, and rollback a transaction or savepoint. - If trx_stickiness - is used to enable transaction aware load balancing, the mysqli_begin, - mysqli_commit and mysqli_rollback functions - will now be monitered by the plugin, to go along with the mysqli_autocommit - function that was already supported. All SQL features to control - transactions are also available through the improved mysqli - transaction control related functions. This means that it is not required to - issue SQL statements instead of using API calls. Applications - using the appropriate API calls can be load balanced by PECL/mysqlnd_ms - in a completely transaction-aware way. - - - Please note, PDO_MySQL has not been updated - yet to utilize the new mysqlnd API calls. Thus, transaction boundary - detection with PDO_MySQL continues to be limited to - the monitoring by passing in PDO::ATTR_AUTOCOMMIT to - PDO::setAttribute. - - - - - Introduced trx_stickiness=on. This - trx_stickiness - option differs from trx_stickiness=master as it - tries to execute a read-only transaction on a slave, if - quality of service (consistency level) allows the use of a slave. - Read-only transactions were introduced in MySQL 5.6, and they - offer performance gains. - - - - - Query cache support is considered beta if used with the mysqli - API. It should work fine with primary copy based clusters. For all other - APIs, this feature continues to be called experimental. - - - - - The code examples in the mysqlnd_ms source were updated. - - - - -
- -
- PECL/mysqlnd_ms 1.4 series - - 1.4.2-stable - - - - Release date: 08/2012 - - - - - Motto/theme: Tweaking based on user feedback - - - - - - 1.4.1-beta - - - - Release date: 08/2012 - - - - - Motto/theme: Tweaking based on user feedback - - - - - - Bug fixes - - - - Fixed build with PHP 5.5 - - - - - - 1.4.0-alpha - - - - Release date: 07/2012 - - - - - Motto/theme: Tweaking based on user feedback - - - - - - Feature changes - - - - BC break: Renamed plugin configuration setting ini_file - to config_file. In early versions the plugin configuration - file used ini style. Back then the configuration setting was named accordingly. - It has now been renamed to reflect the newer file format and to distinguish it - from PHP's own ini file (configuration directives file). - - - - - Introduced new default charset setting server_charset - to allow proper escaping before a connection - is opened. This is most useful when using lazy connections, which are a default. - - - - - Introduced wait_for_gtid_timeout setting to throttle - slave reads that need session consistency. If global transaction identifier are - used and the service level is set to session consistency, the plugin - tries to find up-to-date slaves. The slave status check is done by - a SQL statement. If nothing else is set, the slave status is checked only - one can the search for more up-to-date slaves continues immediately - thereafter. Setting wait_for_gtid_timeout instructs the plugin - to poll a slaves status for wait_for_gtid_timeout seconds - if the first execution of the SQL statement has shown that the slave is not - up-to-date yet. The poll will be done once per second. This way, the plugin - will wait for slaves to catch up and throttle the client. - - - - - New failover strategy loop_before_master. - By default the plugin does no failover. It is possible to enable - automatic failover if a connection attempt fails. Upto version 1.3 - only master strategy existed to failover to a master if - a slave connection fails. loop_before_master is - similar but tries all other slaves before attempting to connect to the master - if a slave connection fails. - - - The number of attempts can be limited using the max_retries option. - Failed hosts can be remembered and skipped in load balancing for the rest of - the web request. max_retries and - remember_failed are considered experimental although - decent stability is given. Syntax and semantics may change in the future - without prior notice. - - - - -
- -
- PECL/mysqlnd_ms 1.3 series - - 1.3.2-stable - - - - Release date: 04/2012 - - - - - Motto/theme: see 1.3.0-alpha - - - - - - Bug fixes - - - - Fixed problem with multi-master where although in a transaction - the queries to the master weren't sticky and were spread all - over the masters (RR). Still not sticky for Random. Random_once - is not affected. - - - - - - 1.3.1-beta - - - - Release date: 04/2012 - - - - - Motto/theme: see 1.3.0-alpha - - - - - - Bug fixes - - - - Fixed problem with building together with QC. - - - - - - 1.3.0-alpha - - - - Release date: 04/2012 - - - - - Motto/theme: Query caching through quality-of-service concept - - - - - - The 1.3 series aims to improve the performance of applications - and the overall load of an asynchronous MySQL cluster, for example, a MySQL - cluster using MySQL Replication. This is done by transparently replacing - a slave access with a local cache access, if the application allows it by - setting an appropriate quality of service flag. When using MySQL replication - a slave can serve stale data. An application using MySQL replication must - continue to work correctly with stale data. Given that the application - is know to work correctly with stale data, the slave access can transparently - be replace with a local cache access. - - - PECL/mysqlnd_qc serves as a cache - backend. PECL/mysqlnd_qc supports use of various storage locations, - among others main memory, APC and MEMCACHE. - - - Feature changes - - - - Added cache option to quality-of-service (QoS) filter. - - - - New configure option enable-mysqlnd-ms-cache-support - - - - - New constant MYSQLND_MS_HAVE_CACHE_SUPPORT. - - - - - New constant MYSQLND_MS_QOS_OPTION_CACHE to be used - with mysqlnd_ms_set_qos. - - - - - - - - Support for built-in global transaction identifier feature of MySQL 5.6.5-m8 or newer. - - - - -
- -
- PECL/mysqlnd_ms 1.2 series - - 1.2.1-beta - - - - Release date: 01/2012 - - - - - Motto/theme: see 1.2.0-alpha - - - - - - Minor test changes. - - - 1.2.0-alpha - - - - Release date: 11/2011 - - - - - Motto/theme: Global Transaction ID injection and quality-of-service concept - - - - - - In version 1.2 the focus continues to be on supporting MySQL database clusters - with asynchronous replication. The plugin tries to make using the cluster - introducing a quality-of-service filter which applications can use to define - what service quality they need from the cluster. Service levels provided are - eventual consistency with optional maximum age/slave slag, session consistency - and strong consistency. - - - Additionally the plugin can do client-side global transaction id injection - to make manual master failover easier. - - - Feature changes - - - - Introduced quality-of-service (QoS) filter. Service levels provided by QoS filter: - - - - eventual consistency, optional option slave lag - - - - - session consistency, optional option GTID - - - - - strong consistency - - - - - - - - Added the mysqlnd_ms_set_qos function to set the - required connection quality at runtime. The new constants related to - mysqlnd_ms_set_qos are: - - - - MYSQLND_MS_QOS_CONSISTENCY_STRONG - - - - - MYSQLND_MS_QOS_CONSISTENCY_SESSION - - - - - MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL - - - - - MYSQLND_MS_QOS_OPTION_GTID - - - - - MYSQLND_MS_QOS_OPTION_AGE - - - - - - - - Added client-side global transaction id injection (GTID). - - - - - New statistics related to GTID: - - - - gtid_autocommit_injections_success - - - - - gtid_autocommit_injections_failure - - - - - gtid_commit_injections_success - - - - - gtid_commit_injections_failure - - - - - gtid_implicit_commit_injections_success - - - - - gtid_implicit_commit_injections_failure - - - - - - - - Added mysqlnd_ms_get_last_gtid to fetch the last - global transaction id. - - - - - Enabled support for multi master without slaves. - - - - -
- -
- PECL/mysqlnd_ms 1.1 series - - 1.1.0 - - - - Release date: 09/2011 - - - - - Motto/theme: Cover replication basics with production quality - - - - - - The 1.1 and 1.0 series expose a similar feature set. Internally, - the 1.1 series has been refactored to plan for future feature - additions. A new configuration file format has been introduced, - and limitations have been lifted. And the code quality and quality - assurance has been improved. - - - Feature changes - - - - Added the (chainable) filter concept: - - - - BC break: - mysqlnd_ms_set_user_pick_server - has been removed. Thehttp://svn.php.net/viewvc/pecl/mysqlnd_ms/trunk/ - user - filter has been introduced to replace it. - The filter offers similar functionality, but see below for an - explanation of the differences. - - - - - - - - New powerful JSON based configuration syntax. - - - - - Lazy connections improved: - security relevant, and state changing commands are covered. - - - - - Support for (native) prepared statements. - - - - - New statistics: use_master_guess, - use_slave_guess. - - - - BC break: Semantics of statistics changed for - use_slave, use_master. - Future changes are likely. Please see, - mysqlnd_ms_get_stats. - - - - - - - - List of broadcasted messages extended by ssl_set. - - - - - Library calls now monitored to remember settings for lazy connections: - change_user, select_db, - set_charset, set_autocommit. - - - - - Introduced mysqlnd_ms.disable_rw_split. - The configuration setting allows using the load balancing and lazy connection - functionality independently of read write splitting. - - - - - - Bug fixes - - - - Fixed PECL #22724 - Server switching (mysqlnd_ms_query_is_select() case sensitive) - - - - - Fixed PECL #22784 - Using mysql_connect and mysql_select_db did not work - - - - - Fixed PECL #59982 - Unusable extension with --enable-mysqlnd-ms-table-filter. - Use of the option is NOT supported. You must not used it. Added note to m4. - - - - - Fixed Bug #60119 - host="localhost" lost in mysqlnd_ms_get_last_used_connection() - - - - - - The mysqlnd_ms_set_user_pick_server function was removed, and - replaced in favor of a new user filter. You can no longer set a - callback function using mysqlnd_ms_set_user_pick_server at - runtime, but instead have to configure it in the plugins configuration file. The user - filter will pass the same arguments to the callback as before. - Therefore, you can continue to use the same procedural function as a callback.callback - It is no longer possible to use static class methods, or class methods of - an object instance, as a callback. Doing so will cause the function - executing a statement handled by the plugin to emit an - E_RECOVERABLE_ERROR level error, which might look like: - "(mysqlnd_ms) Specified callback (picker) is not a valid callback." - Note: this may halt your application. - -
- -
- PECL/mysqlnd_ms 1.0 series - - 1.0.1-alpha - - - - Release date: 04/2011 - - - - - Motto/theme: bug fix release - - - - - - 1.0.0-alpha - - - - Release date: 04/2011 - - - - - Motto/theme: Cover replication basics to test user feedback - - - - - - The first release of practical use. It features basic automatic read-write splitting, - SQL hints to overrule automatic redirection, load balancing of - slave requests, lazy connections, and optional, automatic use of the master - after the first write. - - - The public feature set is close to that of the 1.1 release. - - - 1.0.0-pre-alpha - - - - Release date: 09/2010 - - - - - Motto/theme: Proof of concept - - - - - - Initial check-in. Essentially a demo of the - mysqlnd plugin API. - -
- -
- - diff --git a/reference/mysqlnd_ms/concepts.xml b/reference/mysqlnd_ms/concepts.xml deleted file mode 100644 index 75c491144a..0000000000 --- a/reference/mysqlnd_ms/concepts.xml +++ /dev/null @@ -1,2353 +0,0 @@ - - - - - Concepts - - This explains the architecture and related concepts for this plugin, and - describes the impact that MySQL replication and this plugin have on developmental - tasks while using a database cluster. Reading and understanding these concepts - is required, in order to use this plugin with success. - -
- Architecture - - The mysqlnd replication and load balancing plugin is - implemented as a PHP extension. - It is written in C and operates under the hood of PHP. During the - startup of the PHP interpreter, in the module init phase of the - PHP engine, it gets registered as a - mysqlnd plugin to replace selected - mysqlnd C methods. - - - At PHP runtime, it inspects queries sent from - mysqlnd (PHP) to the MySQL server. If a query is recognized as read-only, - it will be sent to one of the configured slave servers. Statements are - considered read-only if they either start with SELECT, - the SQL hint /*ms=slave*/ or a slave had been chosen for - running the previous query, and the query started with the SQL hint - /*ms=last_used*/. In all other cases, the query will - be sent to the MySQL replication master server. - - - For better portability, applications should use the - MYSQLND_MS_MASTER_SWITCH, - MYSQLND_MS_SLAVE_SWITCH, and - MYSQLND_MS_LAST_USED_SWITCH - predefined mysqlnd_ms constants, - instead of their literal values, such as /*ms=slave*/. - - - The plugin handles the opening and closing of database connections - to both master and slave servers. From an application - point of view, there continues to be only one connection handle. However, - internally, this one public connection handle represents a pool of - network connections that are managed by the plugin. The plugin proxies queries - to the master server, and to the slaves using multiple connections. - - - Database connections have a state consisting of, for example, transaction - status, transaction settings, character set settings, and temporary tables. - The plugin will try to maintain the same state among all internal - connections, whenever this can be done in an automatic and transparent way. - In cases where it is not easily possible to maintain state among all - connections, such as when using BEGIN TRANSACTION, the - plugin leaves it to the user to handle. - - -
- -
- Connection pooling and switching - - The replication and load balancing plugin changes the semantics of a PHP - MySQL connection handle. The existing API of the PHP MySQL extensions - (mysqli, - mysql, and - PDO_MYSQL) are not changed in - a way that functions are added or removed. But their behavior - changes when using the plugin. Existing applications do not need to - be adapted to a new API, but they may need to be modified because of - the behavior changes. - - - The plugin breaks the one-by-one relationship between a - mysqli, - mysql, and - PDO_MYSQL connection - handle and a MySQL network connection. And a - mysqli, - mysql, and - PDO_MYSQL connection - handle represents a local pool of connections to the configured - MySQL replication master and MySQL replication slave servers. - The plugin redirects queries to the master and slave servers. - At some point in time one and the same PHP connection handle - may point to the MySQL master server. Later on, it may point - to one of the slave servers or still the master. Manipulating - and replacing the network connection referenced by a PHP MySQL - connection handle is not a transparent operation. - - - Every MySQL connection has a state. The state of the connections in - the connection pool of the plugin can differ. Whenever the - plugin switches from one wire connection to another, the current state of - the user connection may change. The applications must be aware of this. - - - The following list shows what the connection state consists of. The list - may not be complete. - - - - - - Transaction status - - - - - Temporary tables - - - - - Table locks - - - - - Session system variables and session user variables - - - - - The current database set using USE and other state chaining SQL commands - - - - - Prepared statements - - - - - HANDLER variables - - - - - Locks acquired with GET_LOCK() - - - - - - Connection switches happen right before queries are executed. The plugin does - not switch the current connection until the next statement is executed. - - - Replication issues - - See also the MySQL reference manual chapter about - replication features and - related issues. Some restrictions may not be related to the PHP plugin, but - are properties of the MySQL replication system. - - - Broadcasted messages - - The plugins philosophy is to align the state of connections in the - pool only if the state is under full control of the plugin, or if it is - necessary for security reasons. Just a few actions that change the - state of the connection fall into this category. - - - The following is a list of connection client library calls that change state, - and are broadcasted to all open connections in the connection pool. - - - If any of the listed calls below are to be executed, the plugin loops over all - open master and slave connections. The loop continues until all servers - have been contacted, and the loop does not break if a server indicates a failure. - If possible, the failure will propagate to the called user API function, which may - be detected depending on which underlying library function was triggered. - - - - - - - - - Library call - Notes - Version - - - - - - change_user() - - - Called by the mysqli_change_user user API call. - Also triggered upon reuse of a persistent mysqli - connection. - - Since 1.0.0. - - - - select_db - - - Called by the following user API calls: - mysql_select_db, - mysql_list_tables, - mysql_db_query, - mysql_list_fields, - mysqli_select_db. - Note, that SQL USE is not monitored. - - Since 1.0.0. - - - - set_charset() - - - Called by the following user API calls: - mysql_set_charset. - mysqli_set_charset. - Note, that SQL SET NAMES is not monitored. - - Since 1.0.0. - - - - set_server_option() - - - Called by the following user API calls: - mysqli_multi_query, - mysqli_real_query, - mysqli_query, - mysql_query. - - Since 1.0.0. - - - - set_client_option() - - - Called by the following user API calls: - mysqli_options, - mysqli_ssl_set, - mysqli_connect, - mysql_connect, - mysql_pconnect. - - Since 1.0.0. - - - - set_autocommit() - - - Called by the following user API calls: - mysqli_autocommit, - PDO::setAttribute(PDO::ATTR_AUTOCOMMIT). - - Since 1.0.0. PHP >= 5.4.0. - - - - ssl_set() - - - Called by the following user API calls: - mysqli_ssl_set. - - Since 1.1.0. - - - - - Broadcasting and lazy connections - - The plugin does not proxy or - remember all settings to apply them on connections - opened in the future. This is important to remember, if - using - lazy connections. - Lazy connections are connections which are not - opened before the client sends the first connection. - Use of lazy connections is the default plugin action. - - - The following connection library calls each changed state, and their execution is - recorded for later use when lazy connections are opened. This helps ensure that - the connection state of all connections in the connection pool are comparable. - - - - - - - - - Library call - Notes - Version - - - - - - change_user() - - - User, password and database recorded for future use. - - Since 1.1.0. - - - - select_db - - - Database recorded for future use. - - Since 1.1.0. - - - - set_charset() - - - Calls set_client_option(MYSQL_SET_CHARSET_NAME, charset) - on lazy connection to ensure charset will be used - upon opening the lazy connection. - - Since 1.1.0. - - - - set_autocommit() - - - Adds SET AUTOCOMMIT=0|1 to the list of init commands - of a lazy connection using - set_client_option(MYSQL_INIT_COMMAND, "SET AUTOCOMMIT=...%quot;). - - Since 1.1.0. PHP >= 5.4.0. - - - - - - - Connection state - - The connection state is not only changed by API calls. Thus, even if - PECL mysqlnd_ms monitors all API calls, the application must still - be aware. Ultimately, it is the applications responsibility to maintain - the connection state, if needed. - - - - Charsets and string escaping - - Due to the use of lazy connections, which are a default, it can happen that - an application tries to escape a string for use within SQL statements before - a connection has been established. In this case string escaping is not possible. - The string escape function does not know what charset to use before a connection - has been established. - - - To overcome the problem a new configuration setting - server_charset - has been introduced in version 1.4.0. - - - Attention has to be paid on escaping strings with a certain charset but using - the result on a connection that uses a different charset. Please note, - that PECL/mysqlnd_ms manipulates connections and one application level connection - represents a pool of multiple connections that all may have different default charsets. - It is recommended to configure the servers involved to use the same default charsets. - The configuration setting server_charset does help with this situation as well. - If using server_charset, the plugin will set the given - charset on all newly opened connections. - -
- -
- Local transaction handling - - Transaction handling is fundamentally changed. - An SQL transaction is a unit of work that is run on one database server. The - unit of work consists of one or more SQL statements. - - - By default the plugin is not aware of SQL transactions. The plugin may - switch connections for load balancing at any point in time. Connection - switches may happen in the middle of a transaction. This is against the - nature of an SQL transaction. By default, the plugin is not transaction safe. - - - Any kind of MySQL load balancer must be hinted about the begin and end of a - transaction. Hinting can either be done implicitly by monitoring API calls - or using SQL hints. Both options are supported by the plugin, depending on - your PHP version. API monitoring requires PHP 5.4.0 or newer. The plugin, - like any other MySQL load balancer, cannot detect transaction boundaries based - on the MySQL Client Server Protocol. Thus, entirely transparent transaction - aware load balancing is not possible. The least intrusive option is API - monitoring, which requires little to no application changes, depending - on your application. - - - Please, find examples of using SQL hints or the API monitoring in the - examples section. The - details behind the API monitoring, which makes the plugin transaction - aware, are described below. - - - Beginning with PHP 5.4.0, the mysqlnd - library allows this plugin to subclass the library C API call - set_autocommit(), to detect the status of - autocommit mode. - - - The PHP MySQL extensions either issue a query (such as SET AUTOCOMMIT=0|1), - or use the mysqlnd library call set_autocommit() to control - the autocommit setting. If an extension makes use of - set_autocommit(), the plugin can be made transaction aware. - Transaction awareness cannot be achieved if using SQL to set the autocommit - mode. - The library function set_autocommit() is called by the - mysqli_autocommit and - PDO::setAttribute(PDO::ATTR_AUTOCOMMIT) user API calls. - - - The plugin configuration option - trx_stickiness=master - can be used to make the plugin transactional aware. In this mode, the plugin stops load - balancing if autocommit becomes disabled, and directs all statements to the master until - autocommit gets enabled. - - - An application that does not want to set SQL hints for transactions but wants - to use the transparent API monitoring to avoid application changes must make - sure that the autocommit settings is changed exclusively through the listed - API calls. - - - API based transaction boundary detection has been improved with PHP 5.5.0 and - PECL/mysqlnd_ms 1.5.0 to cover not only calls to mysqli_autocommit - but also mysqli_begin, - mysqli_commit and mysqli_rollback. - -
- -
- Error handling - - Applications using PECL/mysqlnd_ms should implement proper error handling - for all user API calls. And because the plugin changes the semantics - of a connection handle, API calls may return unexpected errors. If using - the plugin on a connection handle that no longer represents an individual network - connection, but a connection pool, an error code and error message will - be set on the connection handle whenever an error occurs on any of the network - connections behind. - - - If using lazy connections, which is the default, connections are not - opened until they are needed for query execution. Therefore, - an API call for a statement execution may return a connection error. - In the example below, an error is provoked when trying to run a statement on a slave. - Opening a slave connection fails because the plugin configuration file - lists an invalid host name for the slave. - - - - Provoking a connection error - - - - - - - The explicit activation of lazy connections is for demonstration purpose only. - - - - Connection error on query execution - -query("SET @myrole='master'")) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} - -/* Connection 2, run on slave because SELECT, provoke connection error */ -if (!($res = $mysqli->query("SELECT @myrole AS _role"))) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} else { - $row = $res->fetch_assoc(); - $res->close(); - printf("@myrole = '%s'\n", $row['_role']); -} -$mysqli->close(); -?> -]]> - -&example.outputs.similar; - - - - - - - Applications are expected to handle possible connection errors by - implementing proper error handling. - - - Depending on the use case, applications may want to handle connection errors - differently from other errors. Typical connection errors are - 2002 (CR_CONNECTION_ERROR) - Can't connect to local MySQL server through socket '%s' (%d), - 2003 (CR_CONN_HOST_ERROR) - Can't connect to MySQL server on '%s' (%d) and - 2005 (CR_UNKNOWN_HOST) - Unknown MySQL server host '%s' (%d). - For example, the application may test for the error codes and manually - perform a fail over. The plugins philosophy is not to offer automatic fail over, - beyond master fail over, because fail over is not a transparent operation. - - - - Provoking a connection error - - - - - - - Explicitly activating lazy connections is done for demonstration purposes, - as is round robin load balancing as opposed to the default random once - type. - - - - Most basic failover - -query("SET @myrole='master'")) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} - -/* Connection 2, first slave */ -$res = $mysqli->query("SELECT VERSION() AS _version"); -/* Hackish manual fail over */ -if (2002 == $mysqli->errno || 2003 == $mysqli->errno || 2004 == $mysqli->errno) { - /* Connection 3, first slave connection failed, trying next slave */ - $res = $mysqli->query("SELECT VERSION() AS _version"); -} - -if (!$res) { - printf("ERROR, [%d] '%s'\n", $mysqli->errno, $mysqli->error); -} else { - /* Error messages are taken from connection 3, thus no error */ - printf("SUCCESS, [%d] '%s'\n", $mysqli->errno, $mysqli->error); - $row = $res->fetch_assoc(); - $res->close(); - printf("version = %s\n", $row['_version']); -} -$mysqli->close(); -?> -]]> - -&example.outputs.similar; - - - - - - - In some cases, it may not be easily possible to retrieve all errors that - occur on all network connections through a connection handle. For example, let's assume a - connection handle represents a pool of three open connections. One connection - to a master and two connections to the slaves. The application changes the - current database using the user API call mysqli_select_db, - which then calls the mysqlnd library function to change the schemata. - mysqlnd_ms monitors the function, and tries to change the current - database on all connections to harmonize their state. Now, assume the master succeeds - in changing the database, and both slaves fail. Upon the initial error - from the first slave, the plugin will set an appropriate error on the - connection handle. The same is done when the second slave fails to change the - database. The error message from the first slave is lost. - - - Such cases can be debugged by either checking for errors of the type - E_WARNING (see above) or, if no other option, investigation - of the mysqlnd_ms debug and trace log. - -
- -
- Transient errors - - Some distributed database clusters make use of transient errors. A transient - error is a temporary error that is likely to disappear soon. By definition - it is safe for a client to ignore a transient error and retry the failed - operation on the same database server. The retry is free of side effects. - Clients are not forced to abort their work or to fail over to another database - server immediately. They may enter a retry loop before to wait for the - error to disappear before giving up on the database server. - Transient errors can be seen, for example, when using MySQL Cluster. But they - are not bound to any specific clustering solution per se. - - - PECL/mysqlnd_ms can perform an automatic retry loop in - case of a transient error. This increases distribution transparency and thus - makes it easier to migrate an application running on a single database - server to run on a cluster of database servers without having to change - the source of the application. - - - The automatic retry loop will repeat the requested operation up to a user - configurable number of times and pause between the attempts for a configurable - amount of time. If the error disappears during the loop, the application will - never see it. If not, the error is forwarded to the application for handling. - - - In the example below a duplicate key error is provoked to make the plugin - retry the failing query two times before the error is passed to the application. - Between the two attempts the plugin sleeps for 100 milliseconds. - - - - Provoking a transient error - - - - - - - - - - - Transient error retry loop - -query("DROP TABLE IF EXISTS test") || - !$mysqli->query("CREATE TABLE test(id INT PRIMARY KEY)") || - !$mysqli->query("INSERT INTO test(id) VALUES (1))")) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} - -/* Retry loop is completely transparent. Checking statistics is - the only way to know about implicit retries */ -$stats = mysqlnd_ms_get_stats(); -printf("Transient error retries before error: %d\n", $stats['transient_error_retries']); - -/* Provoking duplicate key error to see statistics change */ -if (!$mysqli->query("INSERT INTO test(id) VALUES (1))")) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} - -$stats = mysqlnd_ms_get_stats(); -printf("Transient error retries after error: %d\n", $stats['transient_error_retries']); - -$mysqli->close(); -?> -]]> - -&example.outputs.similar; - - - - - - - Because the execution of the retry loop is transparent from a users point of - view, the example checks the - statistics - provided by the plugin to learn about it. - - - As the example shows, the plugin can be instructed to consider any error - transient regardless of the database servers error semantics. The only error - that a stock MySQL server considers temporary has the error code - 1297. When configuring other error codes but - 1297 make sure your configuration reflects - the semantics of your clusters error codes. - - - The following mysqlnd C API calls are monitored by the plugin to check - for transient errors: query(), - change_user(), select_db(), - set_charset(), set_server_option() - prepare(), execute(), - set_autocommit(), - tx_begin(), tx_commit(), - tx_rollback(), tx_commit_or_rollback(). - The corresponding user API calls have similar names. - - - The maximum time the plugin may sleep during the retry loop depends on the - function in question. The a retry loop for query(), - prepare() or execute() will sleep for - up to max_retries * usleep_retry milliseconds. - - - However, functions that - control connection state - are dispatched to all connections. The retry loop settings are applied - to every connection on which the command is to be run. Thus, such a function - may interrupt program execution for longer than a function that is run - on one server only. For example, set_autocommit() is - dispatched to connections and may sleep up to - (max_retries * usleep_retry) * number_of_open_connections) - milliseconds. Please, keep this in mind when setting long sleep times - and large retry numbers. Using the default settings of - max_retries=1, usleep_retry=100 and - lazy_connections=1 it is unlikely that you will - ever see a delay of more than 1 second. - -
- -
- Failover - - By default, connection failover handling is left to the user. - The application is responsible - for checking return values of the database functions it calls and reacting - to possible errors. If, for example, the plugin recognizes a query as a read-only - query to be sent to the slave servers, and the slave server selected by the - plugin is not available, the plugin will raise an error after not executing - the statement. - - - Default: manual failover - - - It is up to - the application to handle the error and, if required, re-issue the query to - trigger the selection of another slave server for statement execution. - The plugin will make no attempts to failover automatically, because the plugin - cannot ensure that an automatic failover will not change the state of - the connection. For example, the application may have issued a query - which depends on SQL user variables which are bound to a specific connection. - Such a query might return incorrect results if the plugin would switch the - connection implicitly as part of automatic failover. To ensure correct - results, the application must take care of the failover, and rebuild - the required connection state. Therefore, by default, no automatic failover - is performed by the plugin. - - - A user that does not change the connection state after opening a connection - may activate automatic failover. Please note, that automatic failover logic - is limited to connection attempts. Automatic failover is not used for already - established connections. There is no way to instruct the plugin to attempt - failover on a connection that has been connected to MySQL already in the past. - - - Automatic failover - - - The failover policy is configured in the plugins configuration file, by - using the failover - configuration directive. - - - Automatic and silent failover can be enabled through the - failover - configuration directive. Automatic failover can either be configured to - try exactly one master after a slave failure or, alternatively, loop - over slaves and masters before returning an error to the user. The number - of connection attempts can be limited and failed hosts can be excluded - from future load balancing attempts. Limiting the number of retries and - remembering failed hosts are considered experimental features, albeit being - reasonable stable. Syntax and semantics may change in future versions. - - - Please note, since version 1.5.0 automatic failover is disabled for the - duration of a transaction if transaction stickiness is enabled and - transaction boundaries have been detected. The plugin will not switch - connections for the duration of a transaction. It will also not perform - automatic and silent failover. Instead an error will be thrown. It is then left - to the user to handle the failure of the transaction. Please check, the - trx_stickiness - documentation how to do this. - - - A basic manual failover example is provided within the - error handling section. - - - Standby servers - - - Using weighted load balancing, - introduced in PECL/mysqlnd 1.4.0, it is possible - to configure standby servers that are sparsely used during normal operations. - A standby server that is primarily used as a worst-case standby failover target - can be assigned a very low weight/priority in relation to all other - servers. As long as all servers are up and running the majority of the workload - is assigned to the servers which have hight weight values. Few requests - will be directed to the standby system which has a very low weight value. - - - Upon failure of the servers with a high priority, you can still failover to - the standby, which has been given a low load balancing priority by assigning a low - weight to it. Failover can be some manually or automatically. If done - automatically, you may want to combine it with the - remember_failed - option. - - - At this point, it is not possible to instruct the load balancer to direct no - requests at all to a standby. This may not be much of a limitation given that - the highest weight you can assign to a server is 65535. Given two slaves, - of which one shall act as a standby and has been assigned a weight of 1, - the standby will have to handle far less than one percent of the overall workload. - - - Failover and primary copy - - - Please note, if using a primary copy cluster, such as MySQL Replication, it is - difficult to do connection failover in case of a master failure. - At any time there is only one master in the cluster for a given dataset. - The master is a single point of failure. If the master fails, clients have no - target to fail over write requests. In case of a master outage the database - administrator must take care of the situation and update the client - configurations, if need be. - -
- -
- Load balancing - - Four load balancing strategies are supported to distribute - statements over the configured MySQL slave servers: - - - - - random - - - Chooses a random server whenever a statement is executed. - - - - - random once (default) - - - Chooses a random server after the first statement is executed, - and uses the decision for the rest of the PHP request. - - - It is the default, and the lowest impact on the connection state. - - - - - round robin - - - Iterates over the list of configured servers. - - - - - user-defined via callback - - - Is used to implement any other strategy. - - - - - - - The load balancing policy is configured in the plugins configuration - file using the - random, - roundrobin, - and user - filters. - - - Servers can be prioritized assigning a weight. A server that has been given - a weight of two will get twice as many requests as a server that has been - given the default weight of one. Prioritization can be handy in heterogenous - environments. For example, you may want to assign more requests to - a powerful machine than to a less powerful. Or, you may have configured - servers that are close or far from the client, thus expose different latencies. - -
- -
- Read-write splitting - - The plugin executes read-only statements on the configured MySQL slaves, and - all other queries on the MySQL master. Statements are - considered read-only if they either start with SELECT, - the SQL hint /*ms=slave*/, or if a slave had been chosen for - running the previous query and the query starts with the SQL hint - /*ms=last_used*/. In all other cases, the query will - be sent to the MySQL replication master server. It is recommended to - use the constants MYSQLND_MS_SLAVE_SWITCH, - MYSQLND_MS_MASTER_SWITCH and MYSQLND_MS_LAST_USED_SWITCH - instead of /*ms=slave*/. See also the - list of mysqlnd_ms constants. - - - SQL hints are a special kind of standard compliant SQL comments. The plugin - does check every statement for certain SQL hints. The SQL hints are described - within the mysqlnd_ms constants - documentation, constants that are exported by the extension. Other systems - involved with the statement processing, such as the MySQL server, SQL firewalls, - and SQL proxies, are unaffected by the SQL hints, because those systems are - designed to ignore SQL comments. - - - The built-in read-write splitter can be replaced by a user-defined filter, see also the - user filter - documentation. - - - A user-defined read-write splitter can request the built-in logic to - send a statement to a specific location, by invoking - mysqlnd_ms_is_select. - - - - The built-in read-write splitter is not aware of multi-statements. - Multi-statements are seen as one statement. The splitter will check the - beginning of the statement to decide where to run the statement. If, for example, - a multi-statement begins with - SELECT 1 FROM DUAL; INSERT INTO test(id) VALUES (1); ... - the plugin will run it on a slave although the statement is not read-only. - - -
- -
- Filter - - Version requirement - - Filters exist as of mysqlnd_ms version 1.1.0-beta. - - - - filters. - PHP applications that implement a MySQL replication cluster must first identify - a group of servers in the cluster which could execute a statement before - the statement is executed by one of the candidates. In other words: a defined - list of servers must be filtered until only one server is available. - - - The process of filtering may include using one or more filters, and filters can be - chained. And they are executed in the order they are defined in the plugins - configuration file. - - - Explanation: comparing filter chaining to pipes - - The concept of chained filters can be compared to using pipes to connect - command line utilities on an operating system command shell. For example, - an input stream is passed to a processor, filtered, and then transferred - to be output. Then, the output is passed as input to the next command, - which is connected to the previous using the pipe operator. - - - - Available filters: - - - - Load balancing filters: - random and - roundrobin. - - - - - Selection filter: - user, - user_multi, - quality_of_service. - - - - - - - The random filter implements the 'random' and 'random once' - load balancing policies. The 'round robin' load balancing can be configured - through the roundrobin filter. Setting a 'user defined - callback' for server selection is possible with the user - filter. The quality_of_service filter finds cluster - nodes capable of delivering a certain service, for example, read-your-writes or, - not lagging more seconds behind the master than allowed. - - - Filters can accept parameters to change their behavior. - The random filter accepts an optional - sticky parameter. If set to true, the filter changes - load balancing from random to random once. Random picks a random server - every time a statement is to be executed. Random once picks a random - server when the first statement is to be executed and uses the same - server for the rest of the PHP request. - - - One of the biggest strength of the filter concept is the possibility to - chain filters. This strength does not become immediately visible because - the random, roundrobin and - user filters are supposed to output no more than one server. - If a filter reduces the list of candidates for running a statement to - only one server, it makes little sense to use that one server as - input for another filter for further reduction of the list of candidates. - - - An example filter sequence that will fail: - - - - Statement to be executed: SELECT 1 FROM DUAL. Passed to all filters. - - - - - All configured nodes are passed as input to the first filter. - Master nodes: master_0. - Slave nodes:slave_0, slave_1 - - - - - Filter: random, argument sticky=1. - Picks a random slave once to be used for the rest of the PHP request. - Output: slave_0. - - - - - Output of slave_0 and the statement to be executed - is passed as input to the next filter. Here: roundrobin, - server list passed to filter is: slave_0. - - - - - Filter: roundrobin. Server list consists of - one server only, round robin will always return the same server. - - - - If trying to use such a filter sequence, - the plugin may emit a warning like (mysqlnd_ms) Error while creating - filter '%s' . Non-multi filter '%s' already created. Stopping in %s on - line %d. Furthermore, an appropriate error on the connection handle - may be set. - - - A second type of filter exists: multi filter. A multi filter emits zero, one or multiple - servers after processing. The quality_of_service filter - is an example. If the service quality requested sets an upper limit for the slave - lag and more than one slave is lagging behind less than the allowed number of seconds, - the filter returns more than one cluster node. A multi filter must be followed by other - to further reduce the list of candidates for statement execution until a candidate - is found. - - - A filter sequence with the quality_of_service - multi filter followed by a load balancing filter. - - - - Statement to be executed: SELECT sum(price) FROM orders WHERE order_id = 1. - Passed to all filters. - - - - - All configured nodes are passed as input to the first filter. - Master nodes: master_0. - Slave nodes: slave_0, slave_1, - slave_2, slave_3 - - - - - Filter: quality_of_service, rule set: session_consistency (read-your-writes) - Output: master_0 - - - - - Output of master_0 - and the statement to be executed - is passed as input to the next filter, which is roundrobin. - - - - - Filter: roundrobin. Server list consists of - one server. Round robin selects master_0. - - - - - - A filter sequence must not end with a multi filter. If trying to use - a filter sequence which ends with a multi filter the plugin may emit a - warning like (mysqlnd_ms) Error in configuration. Last filter is multi - filter. Needs to be non-multi one. Stopping in %s on line %d. - Furthermore, an appropriate error on the connection handle - may be set. - - - - Speculation towards the future: MySQL replication filtering - - In future versions, there may be additional multi filters. - For example, there may be a table - filter to support MySQL replication filtering. This would allow - you to define rules for which database or table is to be replicated to which - node of a replication cluster. Assume your replication cluster - consists of four slaves (slave_0, slave_1, - slave_2, slave_3) two of which replicate a database named - sales (slave_0, slave_1). - If the application queries the database slaves, the - hypothetical table filter reduces the list of possible - servers to slave_0 and slave_1. Because - the output and list of candidates consists of more than one server, it is - necessary and possible to add additional filters to the candidate list, for example, using - a load balancing filter to identify a server for statement execution. - - - -
- -
- Service level and consistency - - Version requirement - - Service levels have been introduced in mysqlnd_ms version 1.2.0-alpha. - mysqlnd_ms_set_qos - requires PHP 5.4.0 or newer. - - - - The plugin can be used with different kinds of MySQL database clusters. - Different clusters can deliver different levels of service to applications. - The service levels can be grouped by the data consistency levels that - can be achieved. The plugin knows about: - - - eventual consistency - - - session consistency - - - strong consistency - - - - - Depending how a cluster is used it may be possible to achieve higher service - levels than the default one. For example, a read from an asynchronous - MySQL replication slave is eventual consistent. Thus, one may say the default - consistency level of a MySQL replication cluster is eventual consistency. - However, if the master only is used by a client for reading and writing during a - session, session consistency (read your writes) is given. PECL mysqlnd 1.2.0 - abstracts the details of choosing an appropriate node for any of the above - service levels from the user. - - - Service levels can be set through the qualify-of-service filter in the - plugins configuration file - and at runtime using the function - mysqlnd_ms_set_qos. - - - The plugin defines the different service levels as follows. - - - Eventual consistency is the default service provided by an asynchronous - cluster, such as classical MySQL replication. A read operation executed - on an arbitrary node may or may not return stale data. The applications - view of the data is eventual consistent. - - - Session consistency is given if a client can always read its own writes. - An asynchronous MySQL replication cluster can deliver session consistency if clients - always use the master after the first write or never query a slave which has - not yet replicated the clients write operation. - - - The plugins understanding of strong consistency is that all clients always - see the committed writes of all other clients. This is the default when - using MySQL Cluster or any other cluster offering - synchronous data distribution. - - - Service level parameters - - - Eventual consistency and session consistency service level accept parameters. - - - Eventual consistency is the service provided by classical MySQL replication. - By default, all nodes qualify for read requests. An optional age - parameter can be given to filter out nodes which lag more than a certain number of - seconds behind the master. The plugin is using SHOW SLAVE STATUS - to measure the lag. Please, see the MySQL reference manual to learn about accuracy and - reliability of the SHOW SLAVE STATUS command. - - - Session consistency (read your writes) accepts an optional GTID - parameter to consider reading not only from the master but also from slaves - which already have replicated a certain write described by its transaction identifier. - This way, when using asynchronous MySQL replication, read requests may be load balanced - over slaves while still ensuring session consistency. - - - The latter requires the use of - client-side global transaction id injection. - - - Advantages of the new approach - - - The new approach supersedes the use of SQL hints and the configuration option - master_on_write in some respects. If an application - running on top of an asynchronous MySQL replication cluster cannot accept stale - data for certain reads, it is easier to tell the plugin to choose appropriate - nodes than prefixing all read statements in question with the SQL hint - to enforce the use of the master. Furthermore, the plugin may be able to - use selected slaves for reading. - - - The master_on_write configuration option makes the plugin - use the master after the first write (session consistency, read your writes). - In some cases, session consistency may not be needed for the rest of the session - but only for some, few read operations. Thus, master_on_write - may result in more read load on the master than necessary. In those cases it - is better to request a higher than default service level only for those reads - that actually need it. Once the reads are done, the application can return to - default service level. Switching between service levels is only possible - using mysqlnd_ms_set_qos. - - - Performance considerations - - - A MySQL replication cluster cannot tell clients which slaves are capable - of delivering which level of service. Thus, in some cases, - clients need to query the slaves to check their status. - PECL mysqlnd_ms transparently runs the necessary SQL in the - background. However, this is an expensive and slow operation. SQL statements - are run if eventual consistency is combined with an age (slave lag) limit and - if session consistency is combined with a global transaction ID. - - - If eventual consistency is combined with an maximum age (slave lag), the plugin - selects candidates for statement execution and load balancing for each statement - as follows. If the statement is a write all masters are considered as candidates. Slaves - are not checked and not considered as candidates. If the statement is a read, the - plugin transparently executes SHOW SLAVE STATUS on every slaves - connection. It will loop over all connections, send the statement and then start - checking for results. Usually, this is slightly faster than a loop over all connections - in which for every connection a query is send and the plugin waits for its results. - A slave is considered a candidate if SHOW SLAVE STATUS reports - Slave_IO_Running=Yes, - Slave_SQL_Running=Yes and - Seconds_Behind_Master is less or equal than the allowed maximum age. - In case of an SQL error, the plugin emits a warning but does not set an error on - the connection. The error is not set to make it possible to use the plugin as a drop-in. - - - If session consistency is combined with a global transaction ID, the plugin executes - the SQL statement set with the fetch_last_gtid entry of the - global_transaction_id_injection section from the plugins configuration file. - Further details are identical to those described above. - - - In version 1.2.0 no additional optimizations are done for executing background queries. - Future versions may contain optimizations, depending on user demand. - - - If no parameters and options are set, no SQL is needed. In that case, - the plugin consider all nodes of the type shown below. - - - eventual consistency, no further options set: all masters, all slaves - - - session consistency, no further options set: all masters - - - strong consistency (no options allowed): all masters - - - - - Throttling - - - The quality of service filter can be combined with - Global transaction IDs to - throttle clients. Throttling does reduce the write load on the master - by slowing down clients. If session consistency is requested and - global transactions identifier are used to check the status of - a slave, the check can be done in two ways. By default a slave - is checked and skipped immediately if it does not match - the criteria for session consistency. Alternatively, the - plugin can wait for a slave to catch up to the master until - session consistency is possible. To enable the throttling, - you have to set - wait_for_gtid_timeout - configuration option. - -
- -
- Global transaction IDs - - Version requirement - - Client side global transaction ID injection exists as of mysqlnd_ms version 1.2.0-alpha. - Transaction boundaries are detected by monitoring API calls. This is possible - as of PHP 5.4.0. Please, see also Transaction handling. - - - As of MySQL 5.6.5-m8 the MySQL server features built-in global transaction identifiers. - The MySQL built-in global transaction ID feature is supported by - PECL/mysqlnd_ms 1.3.0-alpha or - later. Neither are client-side transaction boundary monitoring nor any setup - activities required if using the server feature. - - - Please note, all MySQL 5.6 production versions do not provide - clients with enough information to use GTIDs for enforcing session consistency. - In the worst case, the plugin will choose the master only. - - - - Idea and client-side emulation - - - PECL/mysqlnd_ms can do client-side transparent global transaction ID injection. - In its most basic form, a global transaction identifier is a counter which is - incremented for every transaction executed on the master. The counter is held - in a table on the master. Slaves replicate the counter table. - - - In case of a master failure a database administrator can easily identify the - most recent slave for promoting it as a new master. The most recent slave has - the highest transaction identifier. - - - Application developers can ask the plugin for the global transaction identifier - (GTID) for their last successful write operation. The plugin will return - an identifier that refers to an transaction no older than that of the clients last - write operation. Then, the GTID can be passed as a parameter - to the quality of service (QoS) filter as an option for session consistency. - Session consistency ensures read your writes. The filter ensures that all - reads are either directed to a master or a slave which has replicated the write - referenced by the GTID. - - - When injection is done - - - The plugin transparently maintains the GTID table on the master. - In autocommit mode the plugin injects an UPDATE statement - before executing the users statement for every master use. In manual - transaction mode, the injection is done before the application calls - commit() to close a transaction. The configuration option - report_error of the GTID section in the plugins configuration - file is used to control whether a failed injection shall abort the current - operation or be ignored silently (default). - - - Please note, the - PHP version requirements for - transaction boundary monitoring - and their limits. - - - Limitations - - - Client-side global transaction ID injection has shortcomings. The potential - issues are not specific to PECL/mysqlnd_ms - but are rather of general nature. - - - - Global transaction ID tables must be deployed on all masters and replicas. - - - - - The GTID can have holes. Only PHP clients using the plugin will - maintain the table. Other clients will not. - - - - - Client-side transaction boundary detection is based on API calls only. - - - - - Client-side transaction boundary detection does not take implicit - commit into account. Some MySQL SQL statements cause an implicit - commit and cannot be rolled back. - - - - - - Using server-side global transaction identifier - - - Starting with PECL/mysqlnd_ms 1.3.0-alpha - the MySQL 5.6.5-m8 or newer built-in global - transaction identifier feature is supported. Use of the server feature lifts - all of the above listed limitations. Please, see the MySQL Reference Manual - for limitations and preconditions for using server built-in global transaction - identifiers. - - - Whether to use the client-side emulation or the server built-in - functionality is a question not directly related to the plugin, thus it is not - discussed in depth. There are no plans to remove the client-side emulation and - you can continue to use it, if the server-side solution is no option. This may - be the case in heterogenous environments with old MySQL server or, if any of the - server-side solution limitations is not acceptable. - - - From an applications perspective there is hardly a difference in using one or the - other approach. The following properties differ. - - - - Client-side emulation, as shown in the manual, is using an easy to compare sequence number - for global transactions. Multi-master is not handled to keep the manual examples easy. - - - Server-side built-in feature is using a combination of a server identifier - and a sequence number as a global transaction identifier. Comparison cannot - use numeric algebra. Instead a SQL function must be used. Please, - see the MySQL Reference Manual for details. - - - Server-side built-in feature of MySQL 5.6 cannot be used to ensure session consistency - under all circumstances. Do not use it for the quality-of-service feature. Here is a simple - example why it will not give reliable results. There are more edge cases that cannot - be covered with limited functionality exported by the server. Currently, clients can - ask a MySQL replication master for a list of all executed global transaction IDs only. - If a slave is configured not to replicate all transactions, for example, because replication - filters are set, then the slave will never show the same set of executed global transaction - IDs. Albeit the slave may have replicated a clients writes and it may be a candidate - for a consistent read, it will never be considered by the plugin. Upon write the plugin - learns from the master that the servers complete transaction history consists of GTID=1..3. - There is no way for the plugin to ask for the GTID of the write transaction itself, say GTID=3. - Assume that a slave does not replicate the transactions GTID=1..2 but only GTID=3 because of - a replication feature. Then, the slaves transaction history is GTID=3. However, the plugin tries - to find a node which has a transaction history of GITD=1...3. Albeit the slave has replicated - the clients write and session consistency may be achieved when reading from the slave, it - will not be considered by the plugin. This is not a fault of the plugin implementation but - a feature gap on the server side. Please note, this is a trivial case to illustrate the - issue there are other issues. In sum you are asked not to attempt using MySQL 5.6 built-in GTIDs - for enforcing session consistency. Sooner or later the load balancing will stop working properly - and the plugin will direct all session consistency requests to the master. - - - - - Plugin global transaction ID statistics are only available with client-side - emulation because they monitor the emulation. - - - - - - Global transaction identifiers in distributed systems - - Global transaction identifiers can serve multiple purposes in the context of distributed - systems, such as a database cluster. Global transaction identifiers can - be used for, for example, system wide identification of transactions, - global ordering of transactions, heartbeat mechanism and - for checking the replication status of replicas. PECL/mysqlnd_ms, a clientside - driver based software, does focus on using GTIDs for tasks that can be - handled at the client, such as checking the replication status of replicas - for asynchronous replication setups. - - -
- -
- Cache integration - - Version requirement - - The feature requires use of PECL/mysqlnd_ms 1.3.0-beta or later, - and PECL/mysqlnd_qc 1.1.0-alpha or newer. - PECL/mysqlnd_ms must be - compiled to support the feature. PHP 5.4.0 or newer is required. - - - - Setup: extension load order - - PECL/mysqlnd_ms must be loaded before - PECL/mysqlnd_qc, when using shared - extensions. - - - - Feature stability - - The cache integration is of beta quality. - - - - Suitable MySQL clusters - - The feature is targeted for use with MySQL Replication (primary copy). - Currently, no other kinds of MySQL clusters are supported. Users - of such cluster must control PECL/mysqlnd_qc manually if they are - interested in client-side query caching. - - - - Support for MySQL replication clusters (asynchronous primary copy) is the - main focus of PECL/mysqlnd_ms. - The slaves of a MySQL replication cluster - may or may not reflect the latest updates from the master. - Slaves are asynchronous and can lag behind the master. A read from a slave - is eventual consistent from a cluster-wide perspective. - - - The same level of consistency is offered by a local cache using time-to-live (TTL) - invalidation strategy. Current data or stale data may be served. Eventually, data - searched for in the cache is not available and the source of the cache needs to - be accessed. - - - Given that both a MySQL Replication slave (asynchronous secondary) and a local - TTL-driven cache deliver the same level of service it is possible to transparently - replace a remote database access with a local cache access to gain better possibility. - - - As of PECL/mysqlnd_ms 1.3.0-beta the plugin is - capable of transparently controlling PECL/mysqlnd_ms 1.1.0-alpha - or newer to cache a read-only query if explicitly allowed by setting an - appropriate quality of service through mysqlnd_ms_set_qos. P - lease, see the - quickstart for a code example. - Both plugins must be installed, PECL/mysqlnd_ms - must be compiled to support the cache feature and PHP 5.4.0 or newer has to be used. - - - Applications have full control of cache usage and can request fresh data - at any time, if need be. The cache usage can be enabled and disabled - time during the execution of a script. The cache will be used - if mysqlnd_ms_set_qos sets the quality of service - to eventual consistency and enables cache usage. Cache usage is disabled by - requesting higher consistency levels, for example, - session consistency (read your writes). Once the quality of service has been - relaxed to eventual consistency the cache can be used again. - - - If caching is enabled for a read-only statement, PECL/mysqlnd_ms may inject - SQL hints to control caching - by PECL/mysqlnd_qc. It may modify the SQL statement it got from the application. - Subsequent SQL processors are supposed to ignore the SQL hints. A SQL hint is a - SQL comment. Comments must not be ignored, for example, by the database server. - - - The TTL of a cache entry is computed on a per statement basis. Applications - set an maximum age for the data they want to retrieve using - mysqlnd_ms_set_qos. The age sets an approximate upper limit - of how many seconds the data returned may lag behind the master. - - - The following logic is used to compute the actual TTL if caching is enabled. - The logic takes the estimated slave lag into account for choosing a TTL. If, - for example, there are two slaves lagging 5 and 10 seconds behind and the maximum - age allowed is 60 seconds, the TTL is set to 50 seconds. Please note, the - age setting is no more than an estimated guess. - - - - Check whether the statement is read-only. If not, don't cache. - - - - - If caching is enabled, check the slave lag of all configured slaves. - Establish slave connections if none exist so far and lazy connections are - used. - - - - - Send SHOW SLAVE STATUS to all slaves. Do not wait - for the first slave to reply before sending to the second slave. Clients - often wait long for replies, thus we send out all requests in a burst before - fetching in a second stage. - - - - - Loop over all slaves. For every slave wait for its reply. Do not start - checking another slave before the currently waited for slave has replied. - Check for Slave_IO_Running=Yes and Slave_SQL_Running=Yes. - If both conditions hold true, fetch the value of Seconds_Behind_Master. - In case of any errors or if conditions fail, set an error on the slave connection. - Skip any such slave connection for the rest of connection filtering. - - - - - Search for the maximum value of Seconds_Behind_Master from - all slaves that passed the previous conditions. Subtract the value from - the maximum age provided by the user with mysqlnd_ms_set_qos. - Use the result as a TTL. - - - - - The filtering may sort out all slaves. If so, the maximum age is used as - TTL, because the maximum lag found equals zero. It is perfectly valid to - sort out all slaves. In the following it is up to subsequent filter - to decide what to do. The built-in load balancing filter will pick the - master. - - - - - Inject the appropriate SQL hints to enable caching by PECL/mysqlnd_qc. - - - - - Proceed with the connection filtering, e.g. apply load balancing rules to - pick a slave. - - - - - PECL/mysqlnd_qc is loaded after - PECL/mysqlnd_ms by PHP. Thus, it will see - all query modifications of PECL/mysqlnd_ms and cache - the query if instructed to do so. - - - - - - The algorithm may seem expensive. SHOW SLAVE STATUS is a very - fast operation. Given a sufficient number of requests and cache hits per second the cost of - checking the slaves lag can easily outweigh the costs of the cache decision. - - - Suggestions on a better algorithm are always welcome. - -
- -
- Supported clusters - - Any application using any kind of MySQL cluster is faced with the same tasks: - - - - Identify nodes capable of executing a given statement with - the required service level - - - - - Load balance requests within the list of candidates - - - - - Automatic fail over within candidates, if needed - - - - - - The plugin is optimized for fulfilling these tasks in the context of a classical - asynchronous MySQL replication cluster consisting of a single master and - many slaves (primary copy). When using classical, asynchronous MySQL replication - all of the above listed tasks need to be mastered at the client side. - - - Other types of MySQL cluster may have lower requirements on the application side. - For example, if all nodes in the cluster can answer read and write requests, no - read-write splitting needs to be done (multi-master, update-all). - If all nodes in the cluster are synchronous, they automatically provide the - highest possible quality of service which makes choosing a node easier. - In this case, the plugin may serve the application after some reconfiguration - to disable certain features, such as built-in read-write splitting. - - - Documentation focus - - The documentation focusses describing the use of the plugin with classical - asynchronous MySQL replication clusters (primary copy). Support for this - kind of cluster has been the original development goal. Use of other - clusters is briefly described below. Please note, that - this is still work in progress. - - - - Primary copy (MySQL Replication) - - - This is the primary use case of the plugin. Follow the hints given in the descriptions of each feature. - - - - - - Configure one master and one or more slaves. - Server configuration details - are given in the setup section. - - - - - Use random load balancing policy together with the - sticky flag. - - - - - If you do not plan to use the - service level API calls, - add the master on write - flag. - - - - - Please, make yourself aware of the properties of automatic failover before - adding a failover directive. - - - - - Consider the use of trx_stickiness - to execute transactions on the primary only. Please, read carefully how it works - before you rely on it. - - - - - - - Enabling the plugin (php.ini) - - - - - - - - Basic plugin configuration (mysqlnd_ms_plugin.ini) for MySQL Replication - - - - - - - Primary copy with multi primaries (MMM - MySQL Multi Master) - - - MySQL Replication allows you to create cluster topologies with multiple masters (primaries). - Write-write conflicts are not handled by the replication system. This is no update anywhere setup. - Thus, data must be partitioned manually and clients must redirected in accordance - to the partitioning rules. The recommended setup is equal to the sharding setup below. - - - Manual sharding, possibly combined with primary copy and multiple primaries - - - Use SQL hints and the node group filter for clusters that use data partitioning - but leave query redirection to the client. The example configuration shows a multi master - setup with two shards. - - - - Multiple primaries - multi master (php.ini) - - - - - - - - Primary copy with multiple primaries and paritioning - - - - - - - The plugin can also be used with a loose collection of unrelated shards. For - such a cluster, configure masters only and disable read write splitting. The nodes of - such a cluster are called masters in the plugin configuration as they accept - both reads and writes for their partition. - - - Using synchronous update everywhere clusters such as MySQL Cluster - - - MySQL Cluster is a synchronous cluster solution. All cluster nodes accept - read and write requests. In the context of the plugin, all nodes shall - be considered as masters. - - - Use the load balancing and fail over features only. - - - - - - Disable the plugins built-in read-write splitting. - - - - - Configure masters only. - - - - - Consider random once load balancing strategy, which is the plugins default. - If random once is used, only masters are configured and no SQL hints are used - to force using a certain node, no connection switches will happen for the - duration of a web request. Thus, no special handling is required - for transactions. The plugin will pick one master at the beginning of the - PHP script and use it until the script terminates. - - - - - Do not set the quality of service. All nodes have all the data. This - automatically gives you the highest possible service quality (strong consistency). - - - - - Do not enable client-side global transaction injection. It is neither - required to help with server-side fail over nor to assist the quality of service - filter choosing an appropriate node. - - - - - - Disabling built-in read-write splitting. - - - - Set - mysqlnd_ms.disable_rw_split=1 - - - - - Do not use SQL hints - to enforce the use of slaves - - - - - - Configure masters only. - - - - Set - mysqlnd_ms.multi_master=1. - - - - Do not configure any slaves. - - - - Set - failover=loop_before_master - in the plugins configuration file to avoid warnings about the empty slave list - and to make the failover logic loop over all configured masters before emitting an error. - - - Please, note the warnings about automatic failover given in the previous sections. - - - - - - - Multiple primaries - multi master (php.ini) - - - - - - - - Synchronous update anywhere cluster - - - - - - - If running an update everywhere cluster that has no built-in partitioning to - avoid hot spots and high collision rates, consider using the node groups filter - to keep updates on a frequently accessed table on one of the nodes. This may - help to reduce collision rates and thus improve performance. - -
- -
- XA/Distributed transactions - - Version requirement - - XA related functions have been introduced in PECL/mysqlnd_ms version 1.6.0-alpha. - - - - Early adaptors wanted - - The feature is currently under development. There may be issues and/or - feature limitations. Do not use in production environments, although - early lab tests indicate reasonable quality. - - - Please, contact the development team if you are interested in this feature. - We are looking for real life feedback to complement the feature. - - - Below is a list of some feature restrictions. - - - The feature is not yet compatible with the MySQL Fabric support . This limitation is soon to be lifted. - XA transaction identifier are currently restricted to numbers. This limitation will be lifted upon request, it is a simplification used during the initial implementation. - - - - - - MySQL server restrictions - - The XA support by the MySQL server has some restrictions. Most noteably, - the servers binary log may lack changes made by XA transactions in case - of certain errors. Please, see the MySQL manual for details. - - - - XA/Distributed transactions can spawn multiple MySQL servers. - Thus, they may seem like a perfect - tool for sharded MySQL clusters, for example, clusters managed with MySQL Fabric. - PECL/mysqlnd_ms hides most of the SQL commands - to control XA transactions and performs automatic administrative tasks in cases - of errors, to provide the user with a comprehensive API. Users should - setup the plugin carefully and be well aware of server restrictions prior - to using the feature. - - - - General pattern for XA transactions - -query("UPDATE some_table SET col_a = 1"); -... - -/* COMMIT */ -mysqlnd_ms_xa_commit($link, 1); -?> -]]> - - - - - XA transactions use the two-phase commit protocol. The two-phase commit - protocol is a blocking protocol. During the first phase participating servers - begin a transaction and the client carries out its work. This phase is followed - by a second voting phase. During voting, the servers first make a firm promise - that they are ready to commit the work even in case of their possible unexpected - failure. Should a server crash in this phase, it will still recall the aborted - transaction after recover and wait for the client to decide on whether - it shall be committed or rolled back. - - - Should a client that has initiated a global transaction crash after all the - participating servers gave their promise to be ready to commit, then the servers - must wait for a decision. The servers are not allowed to unilaterally decide on the - transaction. - - - A client crash or disconnect from a participant, a server crash or server error - during the fist phase of the protocol is uncritical. In most cases, the server - will forget about the XA transaction and its work is rolled back. Additionally, - the plugin tries to reach out to as many participants as it can to instruct - the server to roll back the work immediately. It is not possible to disable this implicit - rollback carried out by PECL/mysqlnd_ms in case of errors - during the first phase of the protocol. This design decision has been made to - keep the implementation simple. - - - An error during the second phase of the commit protocol can develop into a - more severe situation. The servers will not forget about - prepared but unfinished transactions in all cases. The plugin will not - attempt to solve these cases immediately but waits for optional background - garbage collection to ensure progress of the commit protocol. It is assumed - that a solution will take significant time as it may include waiting - for a participating server to recover from a crash. This time span may - be longer than a developer and end user expects when trying to commit a - global transaction with mysqlnd_ms_xa_commit. Thus, - the function returns with the unfinished global transaction still - requiring attention. Please, be warned that at this point, it is not yet - clear whether the global transaction will be committed or rolled back later on. - - - Errors during the second phase can be ignored, handled by yourself or solved - by the build-int garbage collection logic. Ignoring them is not recommended - as you may experience unfinished global transactions on your servers that block - resources virtually indefinitely. Handling the errors requires knowing the - participants, checking their state and issuing appropriate SQL commands on them. - There are no user API calls to expose this very information. You will have to - configure a state store and make the plugin record its actions in it to receive - the desired facts. - - - Please, see the - quickstart and - related plugin - configuration file settings for an example how to configure a state. - In addition to configuring a state store, you have to setup some SQL tables. - The table definitions are given in the description of the plugin configuration - settings. - - - Setting up and configuring a state store is also a precondition for using the - built-in garbage collection for XA transactions that fail during the - second commit phase. Recording information about ongoing XA transactions is - an unavoidable extra task. The extra task consists of updating the state - store after each and every operation that changes the state of the global transaction - itself (started, committed, rolled back, errors and aborts), the addition of - participants (host, optionally user and password required to connect) and any - changes to a participants state. Please note, depending on configuration and your - security policies, these recordings may be considered sensitive. - It is therefore recommended to restrict access to the state store. Unless the - state store itself becomes overloaded, writing the state information may contribute - noteworthy to the runtime but should overall be only a minor factor. - - - It is possible that the effort it takes to implement your own routines for handling - XA transactions that failed during the second commit phase exceeds the benefits - of using the XA feature of PECL/mysqlnd_ms in the first place. - Thus, the manual focussed on using the built-on garbage collection only. - - - Garbage collection can be triggered manually or automatically in the background. - You may want to call mysqlnd_ms_xa_gc immediately after - a commit failure to attempt to solve any failed but still open global transactions - as soon as possible. You may also decide to disable the automatic background - garbage collection, implement your own rule set for invoking the built-in - garbage collection and trigger it when desired. - - - By default the plugin will start the garbage collection with a certain probability - in the extensions internal RSHUTDOWN method. The request - shutdown is called after your script finished. Whether the garbage collection - will be triggered is determined by computing a random value between - 1...1000 and comparing it with the configuration setting - probability - (default: 5). If the setting is - greater or equal to the random value, the garbage collection will be triggered. - - - Once started, the garbage collection acts upon up to - max_transactions_per_run (default: 100) global transactions - recorded. Records include successfully finished but also unfinished XA - transactions. Records for successful transactions are removed and unfinished - transactions are attempted to be solved. There are no statistics that help - you finding the right balance between keeping garbage collection runs short - by limiting the number of transactions considered per run and preventing the garbage - collection to fall behind, resulting in many records. - - - For each failed XA transaction the garbage collection makes - max_retries (default: 5) attempts to finish it. After that - PECL/mysqlnd_ms gives up. There are two possible reasons for this. Either - a participating server crashed and has not become accessible again within - max_retries invocations of the garbage collection, or there - is a situation that the built-in garbage collection cannot cope with. Likely, the - latter would be considered a bug. However, you can manually force more - garbage collection runs calling mysqlnd_ms_xa_gc with the - appropriate parameter set. Should even those function runs fail to solve - the situation, then the problem must be solved by an operator. - - - The function mysqlnd_ms_get_stats - provides some statistics on how many XA transactions have been started, - committed, failed or rolled back. - - -
- -
- - diff --git a/reference/mysqlnd_ms/configure.xml b/reference/mysqlnd_ms/configure.xml deleted file mode 100644 index 06a73b3730..0000000000 --- a/reference/mysqlnd_ms/configure.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - -
- &reftitle.install; - - - &pecl.moved; - - - - &pecl.info; - &url.pecl.package;mysqlnd_ms - - - - &pecl.windows.download; - - -
- - - diff --git a/reference/mysqlnd_ms/constants.xml b/reference/mysqlnd_ms/constants.xml deleted file mode 100644 index fa77dbc60d..0000000000 --- a/reference/mysqlnd_ms/constants.xml +++ /dev/null @@ -1,326 +0,0 @@ - - - - - &reftitle.constants; - &extension.constants; - - - SQL hint related - - - - Example demonstrating the usage of mysqlnd_ms constants - - The mysqlnd replication and load balancing plugin (mysqlnd_ms) - performs read/write splitting. This directs write queries to a MySQL - master server, and read-only queries to the MySQL slave servers. - The plugin has a built-in read/write split logic. - All queries which start with SELECT are considered read-only - queries, which are then sent to a MySQL slave server that is listed in - the plugin configuration file. All other queries are directed to the - MySQL master server that is also specified in the plugin configuration file. - - - User supplied SQL hints can be used to overrule automatic read/write splitting, - to gain full control on the process. SQL hints are standards compliant - SQL comments. The plugin will scan the beginning of a query string for - an SQL comment for certain commands, which then control query redirection. - Other systems involved in the query processing are unaffected by the - SQL hints because other systems will ignore the SQL comments. - - - The plugin supports three SQL hints to direct queries to either the MySQL slave - servers, the MySQL master server, or the last used MySQL server. SQL hints - must be placed at the beginning of a query to be recognized by the plugin. - - - For better portability, it is recommended to use the string constants - MYSQLND_MS_MASTER_SWITCH, - MYSQLND_MS_SLAVE_SWITCH and - MYSQLND_MS_LAST_USED_SWITCH instead of their literal - values. - - - -]]> - - &examples.outputs; - - - - - - - - - - MYSQLND_MS_MASTER_SWITCH - (string) - - - - SQL hint used to send a query to the MySQL replication master server. - - - - - - MYSQLND_MS_SLAVE_SWITCH - (string) - - - - SQL hint used to send a query to one of the MySQL replication slave servers. - - - - - - MYSQLND_MS_LAST_USED_SWITCH - (string) - - - - SQL hint used to send a query to the last used MySQL server. The last - used MySQL server can either be a master or a slave server in a - MySQL replication setup. - - - - - - - - mysqlnd_ms_query_is_select - related - - - - - - MYSQLND_MS_QUERY_USE_MASTER - (int) - - - - If mysqlnd_ms_is_select returns - MYSQLND_MS_QUERY_USE_MASTER for a given query, the - built-in read/write split mechanism recommends sending the query to - a MySQL replication master server. - - - - - - MYSQLND_MS_QUERY_USE_SLAVE - (int) - - - - If mysqlnd_ms_is_select returns - MYSQLND_MS_QUERY_USE_SLAVE for a given query, the - built-in read/write split mechanism recommends sending the query to - a MySQL replication slave server. - - - - - - MYSQLND_MS_QUERY_USE_LAST_USED - (int) - - - - If mysqlnd_ms_is_select returns - MYSQLND_MS_QUERY_USE_LAST_USED for a given query, the - built-in read/write split mechanism recommends sending the query to - the last used server. - - - - - - - - mysqlnd_ms_set_qos, - quality of service filter and service level related - - - - - - MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL - (int) - - - - Use to request the service level eventual consistency from the - mysqlnd_ms_set_qos. Eventual consistency is the - default quality of service when reading from an asynchronous MySQL - replication slave. Data returned in this service level may or may not - be stale, depending on whether the selected slaves happen to have replicated - the latest changes from the MySQL replication master or not. - - - - - - MYSQLND_MS_QOS_CONSISTENCY_SESSION - (int) - - - - Use to request the service level session consistency from the - mysqlnd_ms_set_qos. Session consistency - is defined as read your writes. The client is guaranteed to see his - latest changes. - - - - - - MYSQLND_MS_QOS_CONSISTENCY_STRONG - (int) - - - - Use to request the service level strong consistency from the - mysqlnd_ms_set_qos. Strong consistency - is used to ensure all clients see each others changes. - - - - - - MYSQLND_MS_QOS_OPTION_GTID - (int) - - - - Used as a service level option with - mysqlnd_ms_set_qos to parameterize session - consistency. - - - - - - MYSQLND_MS_QOS_OPTION_AGE - (int) - - - - Used as a service level option with - mysqlnd_ms_set_qos to parameterize eventual - consistency. - - - - - - - - Other - - - The plugins version number can be obtained using - MYSQLND_MS_VERSION or - MYSQLND_MS_VERSION_ID. - MYSQLND_MS_VERSION - is the string representation of the numerical version number - MYSQLND_MS_VERSION_ID, which is an integer such as 10000. - Developers can calculate the version number as follows. - - - - - - - Version (part) - Example - - - - - Major*10000 - 1*10000 = 10000 - - - Minor*100 - 0*100 = 0 - - - Patch - 0 = 0 - - - MYSQLND_MS_VERSION_ID - 10000 - - - - - - - - - - MYSQLND_MS_VERSION - (string) - - - - Plugin version string, for example, 1.0.0-prototype. - - - - - - MYSQLND_MS_VERSION_ID - (int) - - - - Plugin version number, for example, 10000. - - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-dump-servers.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-dump-servers.xml deleted file mode 100644 index 0fe21e2629..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-dump-servers.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - mysqlnd_ms_dump_servers - Returns a list of currently configured servers - - - - &reftitle.description; - - array - mysqlnd_ms_dump_servers - mixedconnection - - - Returns a list of currently configured servers. - - - - - &reftitle.parameters; - - - connection - - - A MySQL connection handle obtained from any of the - connect functions of the mysqli, - mysql or - PDO_MYSQL extensions. - - - - - - - - &reftitle.returnvalues; - - &false; on error. Otherwise, returns an array with two entries - masters and slaves each of which contains - an array listing all corresponding servers. - - - The function can be used to check and debug the list of servers currently - used by the plugin. It is mostly useful when the list of servers changes at - runtime, for example, when using MySQL Fabric. - - - masters and slaves server entries - - - - - - - - - Key - Description - Version - - - - - - name_from_config - - - - Server entry name from config, if appliciable. NULL if no - configuration name is available. - - - Since 1.6.0. - - - - hostname - - - - Host name of the server. - - - Since 1.6.0. - - - - user - - - - Database user used to authenticate against the server. - - - Since 1.6.0. - - - - port - - - - TCP/IP port of the server. - - - Since 1.6.0. - - - - socket - - - - Unix domain socket of the server. - - - Since 1.6.0. - - - - - - - - &reftitle.notes; - - - mysqlnd_ms_dump_servers requires - PECL mysqlnd_ms >> 1.6.0. - - - - - - &reftitle.examples; - - - <function>mysqlnd_ms_dump_servers</function> example - - - - - -]]> - - &example.outputs; - - - array(1) { - [0]=> - array(5) { - ["name_from_config"]=> - string(7) "master1" - ["hostname"]=> - string(12) "master1_host" - ["user"]=> - string(12) "master1_user" - ["port"]=> - int(3306) - ["socket"]=> - string(14) "master1_socket" - } - } - ["slaves"]=> - array(2) { - [0]=> - array(5) { - ["name_from_config"]=> - string(7) "slave_0" - ["hostname"]=> - string(11) "slave0_host" - ["user"]=> - string(11) "slave0_user" - ["port"]=> - int(3306) - ["socket"]=> - string(13) "slave0_socket" - } - [1]=> - array(5) { - ["name_from_config"]=> - string(7) "slave_1" - ["hostname"]=> - string(11) "slave1_host" - ["user"]=> - string(12) "gloabal_user" - ["port"]=> - int(1234) - ["socket"]=> - string(13) "global_socket" - } - } -} -]]> - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-fabric-select-shard.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-fabric-select-shard.xml deleted file mode 100644 index 8bdf8c6e91..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-fabric-select-shard.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - mysqlnd_ms_fabric_select_shard - Switch to shard - - - - &reftitle.description; - - array - mysqlnd_ms_fabric_select_shard - mixedconnection - mixedtable_name - mixedshard_key - - - &warn.undocumented.func; - - - MySQL Fabric related. - - - Switch the connection to the shards responsible for the - given table name and shard key. - - - - - &reftitle.parameters; - - - connection - - - A MySQL connection handle obtained from any of the - connect functions of the mysqli, - mysql or - PDO_MYSQL extensions. - - - - - table_name - - - The table name to ask Fabric about. - - - - - shard_key - - - The shard key to ask Fabric about. - - - - - - - - &reftitle.returnvalues; - - &false; on error. Otherwise, &true; - - - - - &reftitle.notes; - - - mysqlnd_ms_fabric_select_shard requires - PECL mysqlnd_ms >> 1.6.0. - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-get-last-gtid.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-get-last-gtid.xml deleted file mode 100644 index 5bf9bf9588..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-get-last-gtid.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - mysqlnd_ms_get_last_gtid - Returns the latest global transaction ID - - - - &reftitle.description; - - string - mysqlnd_ms_get_last_gtid - mixedconnection - - - Returns a global transaction identifier which belongs to a write operation no - older than the last write performed by the client. It is not guaranteed that - the global transaction identifier is identical to that one created for the - last write transaction performed by the client. - - - - - &reftitle.parameters; - - - connection - - - A PECL/mysqlnd_ms connection handle to a MySQL server of the type - PDO_MYSQL, mysqli> or - ext/mysql. - The connection handle is obtained when opening a connection with - a host name that matches a mysqlnd_ms configuration file - entry using any of the above three MySQL driver extensions. - - - - - - - - &reftitle.returnvalues; - - Returns a global transaction ID (GTID) on success. - Otherwise, returns &false;. - - - The function mysqlnd_ms_get_last_gtid returns the - GTID obtained when executing the SQL statement from - the fetch_last_gtid entry of the - global_transaction_id_injection section from - the plugins configuration file. - - - The function may be called after the GTID has been incremented. - - - - - &reftitle.notes; - - - mysqlnd_ms_get_last_gtid requires - PHP >= 5.4.0 and PECL mysqlnd_ms >= 1.2.0. Internally, it is using - a mysqlnd library C functionality not available with PHP 5.3. - - - Please note, all MySQL 5.6 production versions do not provide - clients with enough information to use GTIDs for enforcing session consistency. - In the worst case, the plugin will choose the master only. - - - - - - &reftitle.examples; - - - <function>mysqlnd_ms_get_last_gtid</function> example - -query("DROP TABLE IF EXISTS test")) - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); - -printf("GTID after transaction %s\n", mysqlnd_ms_get_last_gtid($mysqli)); - -/* auto commit mode, transaction on master, GTID must be incremented */ -if (!$mysqli->query("CREATE TABLE test(id INT)")) - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); - -printf("GTID after transaction %s\n", mysqlnd_ms_get_last_gtid($mysqli)); -?> -]]> - - - - - - - &reftitle.seealso; - - - - Global Transaction IDs - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-get-last-used-connection.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-get-last-used-connection.xml deleted file mode 100644 index e48104432c..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-get-last-used-connection.xml +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - mysqlnd_ms_get_last_used_connection - Returns an array which describes the last used connection - - - - &reftitle.description; - - array - mysqlnd_ms_get_last_used_connection - mixedconnection - - - Returns an array which describes the last used connection from the plugins - connection pool currently pointed to by the user connection handle. If using the - plugin, a user connection handle represents a pool of database connections. - It is not possible to tell from the user connection handles properties to which - database server from the pool the user connection handle points. - - - The function can be used to debug or monitor PECL mysqlnd_ms. - - - - - &reftitle.parameters; - - - connection - - - A MySQL connection handle obtained from any of the - connect functions of the mysqli, - mysql or - PDO_MYSQL extensions. - - - - - - - - &reftitle.returnvalues; - - &false; on error. Otherwise, an - array which describes the connection used to - execute the last statement on. - - - Array which describes the connection. - - - - - - - - - Property - Description - Version - - - - - - scheme - - - Connection scheme. Either tcp://host:port - or unix://host:socket. If you want to - distinguish connections from each other use a combination - of scheme and thread_id as a unique - key. Neither scheme nor thread_id - alone are sufficient to distinguish two connections from each other. - Two servers may assign the same thread_id to two - different connections. Thus, connections in the pool may have the same - thread_id. Also, do not rely on uniqueness of - scheme in a pool. Your QA engineers may use the - same MySQL server instance for two distinct logical roles and add it - multiple times to the pool. This hack is used, for example, - in the test suite. - - Since 1.1.0. - - - - host - - - Database server host used with the connection. - The host is only set with TCP/IP connections. - It is empty with Unix domain or Windows named pipe connections, - - Since 1.1.0. - - - - host_info - - - A character string representing the server hostname and the connection type. - - Since 1.1.2. - - - - port - - - Database server port used with the connection. - - Since 1.1.0. - - - - socket_or_pipe - - - Unix domain socket or Windows named pipe used with the connection. - The value is empty for TCP/IP connections. - - Since 1.1.2. - - - - thread_id - - - Connection thread id. - - Since 1.1.0. - - - - last_message - - - Info message obtained from the - MySQL C API function mysql_info(). Please, see - mysqli_info for - a description. - - Since 1.1.0. - - - - errno - - - Error code. - - Since 1.1.0. - - - - error - - - Error message. - - Since 1.1.0. - - - - sqlstate - - - Error SQLstate code. - - Since 1.1.0. - - - - - - - - &reftitle.notes; - - - mysqlnd_ms_get_last_used_connection requires - PHP >= 5.4.0 and PECL mysqlnd_ms >> 1.1.0. Internally, it is using - a mysqlnd library C call not available with PHP 5.3. - - - - - - &reftitle.examples; - - The example assumes that myapp refers to a - plugin configuration file section and represents a connection pool. - - - - <function>mysqlnd_ms_get_last_used_connection</function> example - -query("SELECT 1 FROM DUAL"); -var_dump(mysqlnd_ms_get_last_used_connection($link)); -?> -]]> - - &example.outputs; - - - string(22) "unix:///tmp/mysql.sock" - ["host_info"]=> - string(25) "Localhost via UNIX socket" - ["host"]=> - string(0) "" - ["port"]=> - int(3306) - ["socket_or_pipe"]=> - string(15) "/tmp/mysql.sock" - ["thread_id"]=> - int(46253) - ["last_message"]=> - string(0) "" - ["errno"]=> - int(0) - ["error"]=> - string(0) "" - ["sqlstate"]=> - string(5) "00000" -} -]]> - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-get-stats.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-get-stats.xml deleted file mode 100644 index 18f0185a59..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-get-stats.xml +++ /dev/null @@ -1,792 +0,0 @@ - - - - - - mysqlnd_ms_get_stats - Returns query distribution and connection statistics - - - - &reftitle.description; - - array - mysqlnd_ms_get_stats - - - - Returns an array of statistics collected by the replication - and load balancing plugin. - - - The PHP configuration setting - mysqlnd_ms.collect_statistics - controls the collection of statistics. The collection of statistics - is disabled by default for performance reasons. - - - The scope of the statistics is the - PHP process. - Depending on your deployment model a - PHP process may handle one or multiple requests. - - - Statistics are aggregated for all connections and all storage handler. It is not possible - to tell how much queries originating from - mysqli, - PDO_MySQL or - mysql API calls have - contributed to the aggregated data values. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &null; if - the PHP configuration directive - mysqlnd_ms.enable - has disabled the plugin. Otherwise, returns array of statistics. - - - Array of statistics - - - - - - - - - Statistic - Description - Version - - - - - - use_slave - - - - The semantics of this statistic has changed between 1.0.1 - 1.1.0. - - - The meaning for version 1.0.1 is as follows. - Number of statements considered as read-only by the built-in query analyzer. - Neither statements which begin with a SQL hint to force - use of slave nor statements directed to a slave by an user-defined - callback are included. The total number of statements sent to the slaves is - use_slave + use_slave_sql_hint + - use_slave_callback. - - - PECL/mysqlnd_ms 1.1.0 introduces a new concept of chained filters. The - statistics is now set by the internal load balancing filter. With - version 1.1.0 the load balancing filter is always the last in the - filter chain, if used. In future versions a load balancing filter may be - followed by other filters causing another change in the meaning of - the statistic. If, in the future, a load balancing filter is followed - by another filter it is no longer guaranteed that the statement, which - increments use_slave, will be executed on the slaves. - - - The meaning for version 1.1.0 is as follows. Number of statements - sent to the slaves. Statements directed to a slave by the user filter - (an user-defined callback) are not included. The latter are counted by - use_slave_callback. - - - Since 1.0.0. - - - - use_master - - - - The semantics of this statistic has changed between 1.0.1 - 1.1.0. - - - The meaning for version 1.0.1 is as follows. - Number of statements not considered as read-only by the built-in query analyzer. - Neither statements which begin with a SQL hint to force - use of master nor statements directed to a master by an user-defined - callback are included. The total number of statements sent to the master is - use_master + use_master_sql_hint + - use_master_callback. - - - PECL/mysqlnd_ms 1.1.0 introduces a new concept of chained filters. The - statictics is now set by the internal load balancing filter. With - version 1.1.0 the load balancing filter is always the last in the - filter chain, if used. In future versions a load balancing filter may be - followed by other filters causing another change in the meaning of - the statistic. If, in the future, a load balancing filter is followed - by another filter it is no longer guaranteed that the statement, which - increments use_master, will be executed on the slaves. - - - The meaning for version 1.1.0 is as follows. Number of statements - sent to the masters. Statements directed to a master by the user filter - (an user-defined callback) are not included. The latter are counted by - use_master_callback. - - - Since 1.0.0. - - - - use_slave_guess - - - Number of statements the built-in query analyzer recommends sending to - a slave because they contain no SQL hint to force use of a - certain server. The recommendation may be overruled in the following. - It is not guaranteed whether the statement will be executed on a slave - or not. This is how often the internal is_select - function has guessed that a slave shall be used. Please, see also the - user space function mysqlnd_ms_query_is_select. - - Since 1.1.0. - - - - use_master_guess - - - Number of statements the built-in query analyzer recommends sending to - a master because they contain no SQL hint to force use of a - certain server. The recommendation may be overruled in the following. - It is not guaranteed whether the statement will be executed on a slave - or not. This is how often the internal is_select - function has guessed that a master shall be used. Please, see also the - user space function mysqlnd_ms_query_is_select. - - Since 1.1.0. - - - - use_slave_sql_hint - - - Number of statements sent to a slave because statement begins with - the SQL hint to force use of slave. - - Since 1.0.0. - - - - use_master_sql_hint - - - Number of statements sent to a master because statement begins with - the SQL hint to force use of master. - - Since 1.0.0. - - - - use_last_used_sql_hint - - - Number of statements sent to server which has run the previous statement, - because statement begins with the SQL hint to force use of previously - used server. - - Since 1.0.0. - - - - use_slave_callback - - - Number of statements sent to a slave because an user-defined callback - has chosen a slave server for statement execution. - - Since 1.0.0. - - - - use_master_callback - - - Number of statements sent to a master because an user-defined callback - has chosen a master server for statement execution. - - Since 1.0.0. - - - - non_lazy_connections_slave_success - - - Number of successfully opened slave connections from - configurations not using - lazy connections. - The total number of successfully opened slave connections - is non_lazy_connections_slave_success + - lazy_connections_slave_success - - Since 1.0.0. - - - - non_lazy_connections_slave_failure - - - Number of failed slave connection attempts from - configurations not using - lazy connections. - The total number of failed slave connection attempts - is non_lazy_connections_slave_failure + - lazy_connections_slave_failure - - Since 1.0.0. - - - - non_lazy_connections_master_success - - - Number of successfully opened master connections from - configurations not using - lazy connections. - The total number of successfully opened master connections - is non_lazy_connections_master_success + - lazy_connections_master_success - - Since 1.0.0. - - - - non_lazy_connections_master_failure - - - Number of failed master connection attempts from - configurations not using - lazy connections. - The total number of failed master connection attempts - is non_lazy_connections_master_failure + - lazy_connections_master_failure - - Since 1.0.0. - - - - lazy_connections_slave_success - - - Number of successfully opened slave connections from - configurations using - lazy connections. - - Since 1.0.0. - - - - lazy_connections_slave_failure - - - Number of failed slave connection attempts from - configurations using - lazy connections. - - Since 1.0.0. - - - - lazy_connections_master_success - - - Number of successfully opened master connections from - configurations using - lazy connections. - - Since 1.0.0. - - - - lazy_connections_master_failure - - - Number of failed master connection attempts from - configurations using - lazy connections. - - Since 1.0.0. - - - - trx_autocommit_on - - - Number of autocommit mode activations via API calls. - This figure may be used to monitor activity related to the plugin configuration - setting - trx_stickiness. - If, for example, you want to know if a certain API call invokes the - mysqlnd library function trx_autocommit(), - which is a requirement for - trx_stickiness, - you may call the user API function in question and check if the - statistic has changed. The statistic is modified only by the - plugins internal subclassed trx_autocommit() - method. - - Since 1.0.0. - - - - trx_autocommit_off - - - Number of autocommit mode deactivations via API calls. - - Since 1.0.0. - - - - trx_master_forced - - - Number of statements redirected to the master while - trx_stickiness=master - and autocommit mode is disabled. - - Since 1.0.0. - - - - gtid_autocommit_injections_success - - - Number of successful SQL injections in autocommit mode as part - of the plugins client-side - global transaction id emulation. - - Since 1.2.0. - - - - gtid_autocommit_injections_failure - - - Number of failed SQL injections in autocommit mode as part - of the plugins client-side - global transaction id emulation. - - Since 1.2.0. - - - - gtid_commit_injections_success - - - Number of successful SQL injections in commit mode as part - of the plugins client-side - global transaction id emulation. - - Since 1.2.0. - - - - gtid_commit_injections_failure - - - Number of failed SQL injections in commit mode as part - of the plugins client-side - global transaction id emulation. - - Since 1.2.0. - - - - gtid_implicit_commit_injections_success - - - Number of successful SQL injections when implicit commit is detected as part - of the plugins client-side - global transaction id emulation. - Implicit commit happens, for example, when autocommit has been turned - off, a query is executed and autocommit is enabled again. In that case, - the statement will be committed by the server and SQL to maintain is - injected before the autocommit is re-enabled. Another sequence - causing an implicit commit is begin(), - query(), begin(). The second call - to begin() will implicitly commit the transaction - started by the first call to begin(). - begin() refers to internal library calls not actual - PHP user API calls. - - Since 1.2.0. - - - - gtid_implicit_commit_injections_failure - - - Number of failed SQL injections when implicit commit is detected as part - of the plugins client-side - global transaction id emulation. - Implicit commit happens, for example, when autocommit has been turned - off, a query is executed and autocommit is enabled again. In that case, - the statement will be committed by the server and SQL to maintain is - injected before the autocommit is re-enabled. - - Since 1.2.0. - - - - transient_error_retries - - - How often an operation has been retried when a transient error was - detected. See also, - transient_error - plugin configuration file setting. - - Since 1.6.0. - - - - fabric_sharding_lookup_servers_success - - - Number of successful sharding.lookup_servers - remote procedure calls to MySQL Fabric. - A call is considered successful if the plugin could reach MySQL - Fabric and got any reply. The reply itself may or may not be - understood by the plugin. Success refers to the network transport - only. If the reply was not understood or indicates a valid error condition, - fabric_sharding_lookup_servers_xml_failure - gets incremented. - - Since 1.6.0. - - - - fabric_sharding_lookup_servers_failure - - - Number of failed sharding.lookup_servers - remote procedure calls to MySQL Fabric. - A remote procedure call is considered failed if there was a - network error in connecting to, writing to or reading from - MySQL Fabric. - - Since 1.6.0. - - - - fabric_sharding_lookup_servers_time_total - - - Time spent connecting to,writing to and reading from MySQL - Fabrich during the sharding.lookup_servers - remote procedure call. The value is aggregated for all calls. Time is - measured in microseconds. - - Since 1.6.0. - - - - fabric_sharding_lookup_servers_bytes_total - - - Total number of bytes received from MySQL Fabric in reply to - sharding.lookup_servers calls. - - Since 1.6.0. - - - - fabric_sharding_lookup_servers_xml_failure - - - How often a reply from MySQL Fabric to - sharding.lookup_servers calls was not understood. - Please note, the current experimental implementation does not - distinguish between valid errors returned and malformed replies. - - Since 1.6.0. - - - - xa_begin - - - How many XA/distributed transactions have been started - using mysqlnd_ms_xa_begin. - - Since 1.6.0. - - - - xa_commit_success - - - How many XA/distributed transactions have been successfully committed - using mysqlnd_ms_xa_commit. - - Since 1.6.0. - - - - xa_commit_failure - - - How many XA/distributed transactions failed to commit - during mysqlnd_ms_xa_commit. - - Since 1.6.0. - - - - xa_rollback_success - - - How many XA/distributed transactions have been successfully rolled back - using mysqlnd_ms_xa_rollback. The figure does - not include implict rollbacks performed as a result of - mysqlnd_ms_xa_commit failure. - - Since 1.6.0. - - - - xa_rollback_failure - - - How many XA/distributed transactions could not be rolled back. - This includes failures of mysqlnd_ms_xa_rollback - but also failured during rollback when closing a connection, if - rollback_on_close is set. Please, see also - xa_rollback_on_close below. - - Since 1.6.0. - - - - xa_participants - - - Total number of participants in any XA transaction started with - mysqlnd_ms_xa_begin. - - Since 1.6.0. - - - - xa_rollback_on_close - - - How many XA transactions have been rolled back implicitly when - a connection was close and rollback_on_close is set. - Depending on your coding policies, this may hint a flaw in your code as - you may prefer to explicitly clean up resources. - - Since 1.6.0. - - - - pool_masters_total - - - Number of master servers (connections) in the internal connection pool. - - Since 1.6.0. - - - - pool_slaves_total - - - Number of slave servers (connections) in the internal connection pool. - - Since 1.6.0. - - - - pool_masters_active - - - Number of master servers (connections) from the internal connection pool - which are currently used for picking a connection. - - Since 1.6.0. - - - - pool_slaves_active - - - Number of slave servers (connections) from the internal connection pool - which are currently used for picking a connection. - - Since 1.6.0. - - - - pool_updates - - - How often the active connection list has been replaced and a - new set of master and slave servers had been installed. - - Since 1.6.0. - - - - pool_master_reactivated - - - How often a master connection has been reused after being - flushed from the active list. - - Since 1.6.0. - - - - pool_slave_reactivated - - - How often a slave connection has been reused after being - flushed from the active list. - - Since 1.6.0. - - - - - - - - &reftitle.examples; - - - <function>mysqlnd_ms_get_stats</function> example - - -]]> - - &example.outputs; - - - string(1) "0" - ["use_master"]=> - string(1) "0" - ["use_slave_guess"]=> - string(1) "0" - ["use_master_guess"]=> - string(1) "0" - ["use_slave_sql_hint"]=> - string(1) "0" - ["use_master_sql_hint"]=> - string(1) "0" - ["use_last_used_sql_hint"]=> - string(1) "0" - ["use_slave_callback"]=> - string(1) "0" - ["use_master_callback"]=> - string(1) "0" - ["non_lazy_connections_slave_success"]=> - string(1) "0" - ["non_lazy_connections_slave_failure"]=> - string(1) "0" - ["non_lazy_connections_master_success"]=> - string(1) "0" - ["non_lazy_connections_master_failure"]=> - string(1) "0" - ["lazy_connections_slave_success"]=> - string(1) "0" - ["lazy_connections_slave_failure"]=> - string(1) "0" - ["lazy_connections_master_success"]=> - string(1) "0" - ["lazy_connections_master_failure"]=> - string(1) "0" - ["trx_autocommit_on"]=> - string(1) "0" - ["trx_autocommit_off"]=> - string(1) "0" - ["trx_master_forced"]=> - string(1) "0" - ["gtid_autocommit_injections_success"]=> - string(1) "0" - ["gtid_autocommit_injections_failure"]=> - string(1) "0" - ["gtid_commit_injections_success"]=> - string(1) "0" - ["gtid_commit_injections_failure"]=> - string(1) "0" - ["gtid_implicit_commit_injections_success"]=> - string(1) "0" - ["gtid_implicit_commit_injections_failure"]=> - string(1) "0" - ["transient_error_retries"]=> - string(1) "0" -} -]]> - - - - - - - &reftitle.seealso; - - - - Runtime configuration - - - mysqlnd_ms.collect_statistics - - - mysqlnd_ms.enable - - - Monitoring - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-match-wild.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-match-wild.xml deleted file mode 100644 index d1a3fdbbc6..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-match-wild.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - mysqlnd_ms_match_wild - Finds whether a table name matches a wildcard pattern or not - - - - &reftitle.description; - - bool - mysqlnd_ms_match_wild - stringtable_name - stringwildcard - - - Finds whether a table name matches a wildcard pattern or not. - - - This function is not of much practical relevance with PECL mysqlnd_ms 1.1.0 - because the plugin does not support MySQL replication table filtering yet. - - - - - &reftitle.parameters; - - - table_name - - - The table name to check if it is matched by the wildcard. - - - - - wildcard - - - The wildcard pattern to check against the table name. - The wildcard pattern supports the same placeholders as - MySQL replication filters do. - - - MySQL replication filters - can be configured by using the MySQL Server configuration - options --replicate-wild-do-table and - --replicate-wild-do-db. Please, consult - the MySQL Reference Manual to learn more about this MySQL - Server feature. - - - The supported placeholders are: - - - - % - zero or more literals - - - - - _ - one literal - - - - - - Placeholders can be escaped using \. - - - - - - - - &reftitle.returnvalues; - - Returns &true; table_name is - matched by wildcard. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>mysqlnd_ms_match_wild</function> example - - -]]> - - &example.outputs; - - - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-query-is-select.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-query-is-select.xml deleted file mode 100644 index 2281dd7a6b..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-query-is-select.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - mysqlnd_ms_query_is_select - Find whether to send the query to the master, the slave or the last used MySQL server - - - - &reftitle.description; - - int - mysqlnd_ms_query_is_select - stringquery - - - Finds whether to send the query to the master, the slave or the - last used MySQL server. - - - The plugins built-in read/write split mechanism - will be used to analyze the query string to make a recommendation where - to send the query. The built-in read/write split mechanism is very - basic and simple. The plugin will recommend sending all queries to the - MySQL replication master server but those which begin with - SELECT, or begin with a SQL hint which - enforces sending the query to a slave server. Due to the basic - but fast algorithm the plugin may propose to run some read-only - statements such as SHOW TABLES on the replication master. - - - - - &reftitle.parameters; - - - query - - - Query string to test. - - - - - - - - &reftitle.returnvalues; - - A return value of MYSQLND_MS_QUERY_USE_MASTER - indicates that the query should be send to the MySQL replication - master server. The function returns a value of - MYSQLND_MS_QUERY_USE_SLAVE if the query can be run - on a slave because it is considered read-only. A value of - MYSQLND_MS_QUERY_USE_LAST_USED is returned to recommend - running the query on the last used server. This can either be a MySQL - replication master server or a MySQL replication slave server. - - - If read write splitting has been disabled by setting - mysqlnd_ms.disable_rw_split, the function will - always return MYSQLND_MS_QUERY_USE_MASTER or - MYSQLND_MS_QUERY_USE_LAST_USED. - - - - - &reftitle.examples; - - - <function>mysqlnd_ms_query_is_select</function> example - - -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - - Predefined Constants - - - user filter - - - - - Runtime configuration - - - mysqlnd_ms.disable_rw_split - - - mysqlnd_ms.enable - - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-set-qos.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-set-qos.xml deleted file mode 100644 index 44e5721ebe..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-set-qos.xml +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - mysqlnd_ms_set_qos - Sets the quality of service needed from the cluster - - - - &reftitle.description; - - bool - mysqlnd_ms_set_qos - mixedconnection - intservice_level - intservice_level_option - mixedoption_value - - - Sets the quality of service needed from the cluster. A database cluster delivers - a certain quality of service to the user depending on its architecture. A major - aspect of the quality of service is the consistency level the cluster can offer. - An asynchronous MySQL replication cluster defaults to eventual consistency for - slave reads: a slave may serve stale data, current data, or it may have not the - requested data at all, because it is not synchronous to the master. In a - MySQL replication cluster, only master accesses can give strong consistency, which - promises that all clients see each others changes. - - - PECL/mysqlnd_ms hides the complexity of choosing appropriate nodes to achieve - a certain level of service from the cluster. The - "Quality of Service" filter implements the necessary logic. The filter can either - be configured in the plugins configuration file, or at runtime using - mysqlnd_ms_set_qos. - - - Similar results can be achieved with PECL mysqlnd_ms < 1.2.0, if using - SQL hints to force the use of a certain type of node or using the - master_on_write plugin configuration option. The first - requires more code and causes more work on the application side. - The latter is less refined than using the quality of service filter. - Settings made through the function call can be reversed, as shown in the example - below. The example temporarily switches to a higher service level - (session consistency, read your writes) and returns - back to the clusters default after it has performed all operations that require the - better service. This way, read load on the master can be minimized compared to - using master_on_write, which would continue using the master - after the first write. - - - Since 1.5.0 calls will fail when done in the middle of a transaction if - transaction stickiness - is enabled and transaction boundaries have been detected. - properly. - - - - - &reftitle.parameters; - - - connection - - - A PECL/mysqlnd_ms connection handle to a MySQL server of the type - PDO_MYSQL, mysqli or - ext/mysql for which a service level is to be set. - The connection handle is obtained when opening a connection with - a host name that matches a mysqlnd_ms configuration file - entry using any of the above three MySQL driver extensions. - - - - - service_level - - - The requested service level: MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL, - MYSQLND_MS_QOS_CONSISTENCY_SESSION or - MYSQLND_MS_QOS_CONSISTENCY_STRONG. - - - - - service_level_option - - - An option to parameterize the requested service level. - The option can either be MYSQLND_MS_QOS_OPTION_GTID - or MYSQLND_MS_QOS_OPTION_AGE. - - - The option MYSQLND_MS_QOS_OPTION_GTID can be used - to refine the service level MYSQLND_MS_QOS_CONSISTENCY_SESSION. - It must be combined with a fourth function parameter, the - option_value. The option_value - shall be a global transaction ID obtained from - mysqlnd_ms_get_last_gtid. If set, the - plugin considers both master servers and asynchronous slaves for session - consistency (read your writes). Otherwise, only masters are - used to achieve session consistency. A slave is considered up-to-date and - checked if it has already replicated the global transaction ID from - option_value. Please note, searching appropriate slaves - is an expensive and slow operation. Use the feature sparsely, if the - master cannot handle the read load alone. - - - The MYSQLND_MS_QOS_OPTION_AGE option can be combined - with the MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL - service level, to filter out asynchronous slaves that lag more seconds behind - the master than option_value. If set, the plugin - will only consider slaves for reading if - SHOW SLAVE STATUS reports - Slave_IO_Running=Yes, - Slave_SQL_Running=Yes and - Seconds_Behind_Master <= option_value. Please note, - searching appropriate slaves is an expensive and slow operation. - Use the feature sparsely in version 1.2.0. Future versions may improve the - algorithm used to identify candidates. Please, see the MySQL reference - manual about the precision, accuracy and limitations of the MySQL administrative - command SHOW SLAVE STATUS. - - - - - option_value - - - Parameter value for the service level option. See also the - service_level_option parameter. - - - - - - - - &reftitle.returnvalues; - - Returns &true; if the connections service level - has been switched to the requested. Otherwise, returns &false; - - - - - &reftitle.notes; - - - mysqlnd_ms_set_qos requires - PHP >= 5.4.0 and PECL mysqlnd_ms >= 1.2.0. Internally, it is using - a mysqlnd library C functionality not available with PHP 5.3. - - -Please note, all MySQL 5.6 production versions do not provide - clients with enough information to use GTIDs for enforcing session consistency. - In the worst case, the plugin will choose the master only. - - - - - - &reftitle.examples; - - - <function>mysqlnd_ms_set_qos</function> example - -errno, $mysqli->error)); - -/* Will use master and return fresh data, client can see his last write */ -if (!$res = $mysqli->query("SELECT item, price FROM orders WHERE order_id = 1")) - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); - -/* Back to default: use of all slaves and masters permitted, stale data can happen */ -if (!mysqlnd_ms_set_qos($mysqli, MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL)) - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -?> -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_ms_get_last_gtid - - - Service level and consistency concept - - - Filter concept - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-set-user-pick-server.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-set-user-pick-server.xml deleted file mode 100644 index 6cec75740e..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-set-user-pick-server.xml +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - mysqlnd_ms_set_user_pick_server - Sets a callback for user-defined read/write splitting - - - - &reftitle.description; - - bool - mysqlnd_ms_set_user_pick_server - stringfunction - - - Sets a callback for user-defined read/write splitting. The plugin will - call the callback only if pick[]=user is the default - rule for server picking in the relevant section of the plugins configuration - file. - - - The plugins built-in read/write query split mechanism decisions can be - overwritten in two ways. The easiest way is to prepend the query string - with the SQL hints MYSQLND_MS_MASTER_SWITCH, - MYSQLND_MS_SLAVE_SWITCH or - MYSQLND_MS_LAST_USED_SWITCH. Using SQL hints one can - control, for example, whether a query shall be send to the MySQL replication - master server or one of the slave servers. By help of SQL hints it is - not possible to pick a certain slave server for query execution. - - - Full control on server selection can be gained using a callback function. - Use of a callback is recommended to expert users only because the callback - has to cover all cases otherwise handled by the plugin. - - - The plugin will invoke the callback function for selecting a server from the - lists of configured master and slave servers. The callback function - inspects the query to run and picks a server for query execution by returning - the hosts URI, as found in the master and slave list. - - - If the lazy connections are enabled and the callback chooses a slave server for - which no connection has been established so far and establishing the connection - to the slave fails, the plugin will return an error upon the next action - on the failed connection, for example, when running a query. It is the - responsibility of the application developer to handle the error. For example, - the application can re-run the query to trigger a new server selection and - callback invocation. If so, the callback must make sure to select - a different slave, or check slave availability, before returning to - the plugin to prevent an endless loop. - - - - - &reftitle.parameters; - - - function - - - The function to be called. Class methods may also be invoked - statically using this function by passing - array($classname, $methodname) to this parameter. - Additionally class methods of an object instance may be called by passing - array($objectinstance, $methodname) to this parameter. - - - - - - - - &reftitle.returnvalues; - - Host to run the query on. The host URI is to be taken from the - master and slave connection lists passed to the callback function. - If callback returns a value neither found in the master nor in the slave - connection lists the plugin will fallback to the second pick method configured - via the pick[] setting in the plugin configuration file. - If not second pick method is given, the plugin falls back to the build-in - default pick method for server selection. - - - - - &reftitle.notes; - - - mysqlnd_ms_set_user_pick_server is available - with PECL mysqlnd_ms < 1.1.0. It has been replaced by the - user filter. Please, check the - Change History - for upgrade notes. - - - - - - &reftitle.examples; - - - <function>mysqlnd_ms_set_user_pick_server</function> example - - - - -query("SELECT 1 FROM DUAL"))) - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -else - $res->close(); - -if (!($res = $mysqli->query("SELECT 2 FROM DUAL"))) - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -else - $res->close(); - - -if (!($res = $mysqli->query("SELECT * FROM table_on_slave_a_only"))) - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -else - $res->close(); - -$mysqli->close(); -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - - mysqlnd_ms_query_is_select - - - Filter concept - - - user filter - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-begin.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-begin.xml deleted file mode 100644 index bb96c09af2..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-begin.xml +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - mysqlnd_ms_xa_begin - Starts a distributed/XA transaction among MySQL servers - - - - &reftitle.description; - - int - mysqlnd_ms_xa_begin - mixedconnection - stringgtrid - inttimeout - - - Starts a XA transaction among MySQL servers. PECL/mysqlnd_ms acts as a transaction - coordinator the distributed transaction. - - - Once a global transaction has been started, the plugin injects appropriate - XA BEGIN SQL statements on all MySQL servers used in the following. - The global transaction is either ended by calling mysqlnd_ms_xa_commit, - mysqlnd_ms_xa_rollback or by an implicit rollback in case - of an error. - - - During a global transaction, the plugin tracks all server switches, - for example, when switching from one MySQL shard to another MySQL shard. - Immediately before a query is run on a server that has not been participating - in the global transaction yet, XA BEGIN is executed on - the server. From a users perspective the injection happens during a call to a - query execution function such as mysqli_query. Should - the injection fail an error is reported to the caller of the query execution - function. The failing server does not become a participant in the global - transaction. The user may retry executing a query on the server and hereby retry - injecting XA BEGIN, abort the global transaction because - not all required servers can participate, or ignore and continue the global without - the failed server. - - - Reasons to fail executing XA BEGIN include but are not limited to - a server being unreachable or the server having an open, concurrent - XA transaction using the same xid. - - - Please note, global and local transactions - are mutually exclusive. You cannot start a XA transaction when you have a local - transaction open. The local transaction must be ended first. The plugin tries - to detect this conflict as early as possible. It monitors API calls for controlling - local transactions to learn about the current state. However, if using - SQL statements for local transactions such as BEGIN, the - plugin may not know the current state and the conflict is not detected - before XA BEGIN is injected and executed. - - - The use of other XA resources but MySQL servers is not supported by - the function. To carry out a global transaction among, for example, - a MySQL server and another vendors database system, you should issue - the systems SQL commands yourself. - - - Experimental - - The feature is currently under development. There may be issues and/or - feature limitations. Do not use in production environments. - - - - - - &reftitle.parameters; - - - connection - - - A MySQL connection handle obtained from any of the - connect functions of the mysqli, - mysql or - PDO_MYSQL extensions. - - - - - gtrid - - - Global transaction identifier (gtrid). The gtrid is a binary string - up to 64 bytes long. Please note, depending on your character set settings, - 64 characters may require more than 64 bytes to store. - - - In accordance with the MySQL SQL syntax, - XA transactions use identifiers made of three parts. An xid consists of a - global transaction identifier (gtrid), a branch qualifier (bqual) and a - format identifier (formatID). Only the global transaction identifier can - and needs to be set. - - - The branch qualifier and format identifier are set automatically. The details - should be considered implementation dependent, which may change without - prior notice. In version 1.6 the branch qualifier is consecutive number - which is incremented whenever a participant joins the global transaction. - - - - - timeout - - - Timeout in seconds. The default value is 60 seconds. - - - The timeout is a hint to the garbage collection. If a transaction is recorded - to take longer than expected, the garbage collection begins checking the - transactions status. - - - Setting a low value may make the garbage collection check the progress - too often. Please note, checking the status of a global transaction may - involve connecting to all recorded participants and possibly issuing - queries on the servers. - - - - - - - - &reftitle.returnvalues; - - Returns &true; if there is no open local or global transaction and a new global - transaction can be started. Otherwise, returns &false; - - - - - &reftitle.seealso; - - - - Quickstart XA/Distributed transactions - - - Runtime configuration - - - mysqlnd_ms_get_stats - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-commit.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-commit.xml deleted file mode 100644 index adb179c7e1..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-commit.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - mysqlnd_ms_xa_commit - Commits a distributed/XA transaction among MySQL servers - - - - &reftitle.description; - - bool - mysqlnd_ms_xa_commit - mixedconnection - stringgtrid - - - - Commits a global transaction among MySQL servers started by - mysqlnd_ms_xa_begin. - - - If any of the global transaction participants fails to commit - an implicit rollback is performed. It may happen that not - all cases can be handled during the rollback. For example, - no attempts will be made to reconnect to a participant after - the connection to the participant has been lost. Solving - cases that cannot easily be rolled back is left to the - garbage collection. - - - Experimental - - The feature is currently under development. There may be issues and/or - feature limitations. Do not use in production environments. - - - - - - &reftitle.parameters; - - - connection - - - A MySQL connection handle obtained from any of the - connect functions of the mysqli, - mysql or - PDO_MYSQL extensions. - - - - - gtrid - - - Global transaction identifier (gtrid). - - - - - - - - &reftitle.returnvalues; - - Returns &true; if the global transaction has been committed. Otherwise, returns &false; - - - - - &reftitle.seealso; - - - - Quickstart XA/Distributed transactions - - - Runtime configuration - - - mysqlnd_ms_get_stats - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-gc.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-gc.xml deleted file mode 100644 index 6f32f117df..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-gc.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - mysqlnd_ms_xa_gc - Garbage collects unfinished XA transactions after severe errors - - - - &reftitle.description; - - int - mysqlnd_ms_xa_gc - mixedconnection - stringgtrid - boolignore_max_retries - - - - - Garbage collects unfinished XA transactions. - - - The XA protocol is a blocking protocol. There exist cases when servers - participating in a global transaction cannot make progress when the transaction - coordinator crashes or disconnects. In such a case, the MySQL servers - keep waiting for instructions to finish the XA transaction in question. - Because transactions occupy resources, transactions should always be - terminated properly. - - - Garbage collection requires configuring a state store to track global - transactions. Should a PHP client crash in the middle of a transaction - and a new PHP client be started, then the built-in garbage collection - can learn about the aborted global transaction and terminate it. If you - do not configure a state store, the garbage collection cannot perform - any cleanup tasks. - - - The state store should be crash-safe and be highly available to survive - its own crash. Currently, only MySQL is supported as a state store. - - - Garbage collection can also be performed automatically in the background. - See the plugin configuration directive garbage_collection - for details. - - - Experimental - - The feature is currently under development. There may be issues and/or - feature limitations. Do not use in production environments. - - - - - - &reftitle.parameters; - - - connection - - - A MySQL connection handle obtained from any of the - connect functions of the mysqli, - mysql or - PDO_MYSQL extensions. - - - - - gtrid - - - Global transaction identifier (gtrid). If given, the garbage - collection considers the transaction only. Otherwise, - the state store is scanned for any unfinished transaction. - - - - - ignore_max_retries - - - Whether to ignore the plugin configuration max_retries setting. - If garbage collection continuously fails and the max_retries - limit is reached prior to finishing the failed global transaction, - you can attempt further runs prior to investigating the cause - and solving the issue manually by issuing appropriate SQL statements - on the participants. Setting the parameter has the same effect - as temporarily setting max_retries = 0. - - - - - - - - - &reftitle.returnvalues; - - Returns &true; if garbage collection was successful. Otherwise, returns &false; - - - - - &reftitle.seealso; - - - - Quickstart XA/Distributed transactions - - - Runtime configuration - - - State store configuration - - - mysqlnd_ms_get_stats - - - - - - - - diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-rollback.xml b/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-rollback.xml deleted file mode 100644 index f4b9530737..0000000000 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-xa-rollback.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - mysqlnd_ms_xa_rollback - Rolls back a distributed/XA transaction among MySQL servers - - - - &reftitle.description; - - int - mysqlnd_ms_xa_rollback - mixedconnection - stringgtrid - - - - Rolls back a global transaction among MySQL servers started by - mysqlnd_ms_xa_begin. - - - If any of the global transaction participants fails to rollback - the situation is left to be solved by the garbage collection. - - - Experimental - - The feature is currently under development. There may be issues and/or - feature limitations. Do not use in production environments. - - - - - - &reftitle.parameters; - - - connection - - - A MySQL connection handle obtained from any of the - connect functions of the mysqli, - mysql or - PDO_MYSQL extensions. - - - - - gtrid - - - Global transaction identifier (gtrid). - - - - - - - - &reftitle.returnvalues; - - Returns &true; if the global transaction has been rolled back. Otherwise, returns &false; - - - - - &reftitle.seealso; - - - - Quickstart XA/Distributed transactions - - - Runtime configuration - - - mysqlnd_ms_get_stats - - - - - - - - diff --git a/reference/mysqlnd_ms/ini.xml b/reference/mysqlnd_ms/ini.xml deleted file mode 100644 index 681b199446..0000000000 --- a/reference/mysqlnd_ms/ini.xml +++ /dev/null @@ -1,232 +0,0 @@ - - - -
- &reftitle.runtime; - &extension.runtime; - - - Mysqlnd_ms &ConfigureOptions; - - - - &Name; - &Default; - &Changeable; - &Changelog; - - - - - mysqlnd_ms.enable - 0 - PHP_INI_SYSTEM - - - - mysqlnd_ms.force_config_usage - 0 - PHP_INI_SYSTEM - - - - mysqlnd_ms.ini_file - "" - PHP_INI_SYSTEM - - - - mysqlnd_ms.config_file - "" - PHP_INI_SYSTEM - - - - mysqlnd_ms.collect_statistics - 0 - PHP_INI_SYSTEM - - - - mysqlnd_ms.multi_master - 0 - PHP_INI_SYSTEM - - - - mysqlnd_ms.disable_rw_split - 0 - PHP_INI_SYSTEM - - - - -
-
- - &ini.descriptions.title; - - - - - - - mysqlnd_ms.enable - int - - - - Enables or disables the plugin. If disabled, the extension will not plug - into - mysqlnd to proxy internal - mysqlnd C API calls. - - - - - - - mysqlnd_ms.force_config_usage - int - - - - If enabled, the plugin checks if the host (server) parameters value of any - MySQL connection attempt, matches a section name from the plugin configuration - file. If not, the connection attempt is blocked. - - - This setting is not only useful to restrict PHP to certain servers but also - to debug configuration file problems. The configuration file validity is checked - at two different stages. The first check is performed when PHP begins to - handle a web request. At this point the plugin reads and decodes the configuration - file. Errors thrown at this early stage in an extensions life cycle may not be - shown properly to the user. Thus, the plugin buffers the errors, if any, and - additionally displays them when establishing a connection to MySQL. - By default a buffered startup error will emit an error of type - E_WARNING. If force_config_usage is set, - the error type used is E_RECOVERABLE_ERROR. - - - Please, see also configuration - file debugging notes. - - - - - - - mysqlnd_ms.ini_file - string - - - - Plugin specific configuration file. This setting has been - renamed to mysqlnd_ms.config_file in version 1.4.0. - - - - - - - mysqlnd_ms.config_file - string - - - - Plugin specific configuration file. This setting superseeds - mysqlnd_ms.ini_file since 1.4.0. - - - - - - - mysqlnd_ms.collect_statistics - int - - - - Enables or disables the collection of statistics. The collection of - statistics is disabled by default for performance reasons. - Statistics are returned by the function - mysqlnd_ms_get_stats. - - - - - - - mysqlnd_ms.multi_master - int - - - - Enables or disables support of MySQL multi master replication setups. - Please, see also supported clusters. - - - - - - - mysqlnd_ms.disable_rw_split - int - - - - Enables or disables built-in read write splitting. - - - Controls whether load balancing and lazy connection functionality can - be used independently of read write splitting. If read write splitting - is disabled, only servers from the master list will be used for - statement execution. All configured slave servers will be ignored. - - - The SQL hint MYSQLND_MS_USE_SLAVE will not be recognized. - If found, the statement will be redirected to a master. - - - Disabling read write splitting impacts the return value of - mysqlnd_ms_query_is_select. - The function will no longer propose query execution on slave servers. - - - Multiple master servers - - Setting mysqlnd_ms.multi_master=1 allows the plugin - to use multiple master servers, instead of only the first master server - of the master list. - - - Please, see also supported clusters. - - - - - - - -
- - diff --git a/reference/mysqlnd_ms/quickstart.xml b/reference/mysqlnd_ms/quickstart.xml deleted file mode 100644 index 2d17778e52..0000000000 --- a/reference/mysqlnd_ms/quickstart.xml +++ /dev/null @@ -1,2384 +0,0 @@ - - - - Quickstart and Examples - - The mysqlnd replication load balancing plugin is easy to use. - This quickstart will demo typical use-cases, and provide practical advice on getting - started. - - - It is strongly recommended to read the reference sections in addition to the - quickstart. The quickstart tries to avoid discussing theoretical concepts - and limitations. Instead, it will link to the reference sections. It is safe - to begin with the quickstart. However, before using the plugin in mission critical - environments we urge you to read additionally the background information from the - reference sections. - - - The focus is on using PECL mysqlnd_ms for work with an asynchronous MySQL cluster, - namely MySQL replication. Generally speaking an asynchronous cluster is more - difficult to use than a synchronous one. Thus, users of, for example, MySQL Cluster - will find more information than needed. - -
- Setup - - The plugin is implemented as a PHP extension. See also the - installation instructions to - install the - PECL/mysqlnd_ms extension. - - - Compile or configure the PHP MySQL extension (API) (mysqli, - PDO_MYSQL, - mysql) that you plan to use with support - for the mysqlnd library. PECL/mysqlnd_ms - is a plugin for the mysqlnd library. To use the plugin with any of the PHP - MySQL extensions, the extension has to use the mysqlnd library. - - - Then, load the extension into PHP and activate the plugin in the PHP configuration - file using the PHP configuration directive named - mysqlnd_ms.enable. - - - - Enabling the plugin (php.ini) - - - - - - - The plugin uses its own configuration file. Use the PHP - configuration directive - mysqlnd_ms.config_file - to set the full file path to the plugin-specific configuration file. - This file must be readable by PHP (e.g., the web server user). - Please note, the configuration directive mysqlnd_ms.config_file - superseeds mysqlnd_ms.ini_file - since 1.4.0. It is a common pitfall to use the old, no longer available - configuration directive. - - - Create a plugin-specific configuration file. Save the file to the path - set by the PHP configuration directive - mysqlnd_ms.config_file. - - - The plugins configuration file - is JSON based. It is divided into one or more sections. - Each section has a name, for example, myapp. Every section - makes its own set of configuration settings. - - - A section must, at a minimum, list the MySQL replication master server, and set - a list of slaves. The plugin supports using only one master server per section. - Multi-master MySQL replication setups are not yet fully supported. - Use the configuration setting - master - to set the hostname, and the port or socket of the MySQL master server. - MySQL slave servers are configured using the - slave - keyword. - - - - Minimal plugin-specific configuration file (mysqlnd_ms_plugin.ini) - - - - - - - Configuring a MySQL slave server list is required, although it may - contain an empty list. It is recommended to always configure at - least one slave server. - - - Server lists can use - anonymous or non-anonymous syntax. Non-anonymous - lists include alias names for the servers, such as master_0 - for the master in the above example. The quickstart uses the - more verbose non-anonymous syntax. - - - - Recommended minimal plugin-specific config (mysqlnd_ms_plugin.ini) - - - - - - - If there are - at least two servers in total, the plugin can start to load balance and switch - connections. Switching connections is not always transparent and can cause - issues in certain cases. The reference sections about - connection pooling and switching, - transaction handling, - fail over - load balancing and - read-write splitting all provide - more details. And potential pitfalls are described later in this guide. - - - It is the responsibility of the application to handle potential issues caused - by connection switches, by configuring a master with at least one slave - server, which allows switching to work therefore related problems can be found. - - - The MySQL master and MySQL slave servers, which you configure, do not need to - be part of MySQL replication setup. For testing purpose you can use single - MySQL server and make it known to the plugin as a master and slave server - as shown below. This could help you to detect many potential issues with - connection switches. However, such a setup will not be prone to the issues - caused by replication lag. - - - - Using one server as a master and as a slave (testing only!) - - - - - - - The plugin attempts to notify you of invalid configurations. Since 1.5.0 it - will throw a warning during PHP startup if the configuration file cannot be read, - is empty or parsing the JSON failed. Depending on your PHP settings those - errors may appear in some log files only. Further validation is done when a connection - is to be established and the configuration file is searched for valid sections. - Setting mysqlnd_ms.force_config_usage - may help debugging a faulty setup. Please, see also - configuration file debugging notes. - - -
- -
- Running statements - - The plugin can be used with any PHP MySQL extension - (mysqli, - mysql, and - PDO_MYSQL) that is - compiled to use the mysqlnd library. - PECL/mysqlnd_ms plugs into the mysqlnd library. - It does not change the API or behavior of those extensions. - - - Whenever a connection to MySQL is being opened, the plugin compares the host - parameter value of the connect call, with the section names - from the plugin specific configuration file. If, for example, the - plugin specific configuration file has a section myapp then - the section should be referenced by opening a MySQL connection to the - host myapp - - - - Plugin specific configuration file (mysqlnd_ms_plugin.ini) - - - - - - - - Opening a load balanced connection - - -]]> - - - - - The connection examples above will be load balanced. - The plugin will send read-only statements to the MySQL slave server with the - IP 192.168.2.27 and will listen on port 3306 - for the MySQL client connection. All other statements will be directed to the - MySQL master server running on the host localhost. If on Unix like - operating systems, the master on localhost will be accepting - MySQL client connections on the Unix domain socket /tmp/mysql.sock, - while TCP/IP is the default port on Windows. - The plugin will use the user name username and the password - password to connect to any of the MySQL servers listed in - the section myapp of the plugins configuration file. Upon - connect, the plugin will select database as the current - schemata. - - - The username, password and schema name are taken from the connect - API calls and used for all servers. In other words: you must use the same - username and password for every MySQL server listed in a plugin configuration - file section. The is not a general limitation. As of PECL/mysqlnd_ms 1.1.0, - it is possible to set the - username and - password for any server in the - plugins configuration file, to be used instead of the credentials passed - to the API call. - - - The plugin does not change the API for running statements. - Read-write splitting - works out of the box. The following example assumes that there is no - significant replication lag between the master and the slave. - - - - Executing statements - -query("DROP TABLE IF EXISTS test")) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} -if (!$mysqli->query("CREATE TABLE test(id INT)")) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} -if (!$mysqli->query("INSERT INTO test(id) VALUES (1)")) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} - -/* read-only: statement will be run on a slave */ -if (!($res = $mysqli->query("SELECT id FROM test"))) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} else { - $row = $res->fetch_assoc(); - $res->close(); - printf("Slave returns id = '%s'\n", $row['id']); -} -$mysqli->close(); -?> -]]> - - &example.outputs.similar; - - - - - -
- -
- Connection state - - The plugin changes the semantics of a PHP MySQL connection handle. - A new connection handle represents a connection pool, instead of a - single MySQL client-server network connection. The connection pool consists - of a master connection, and optionally any number of slave connections. - - - Every connection from the connection pool has its own state. For example, - SQL user variables, temporary tables and transactions are part of the state. - For a complete list of items that belong to the state of a connection, see the - connection pooling and switching - concepts documentation. - If the plugin decides to switch connections for load balancing, the - application could be given a connection which has a different state. - Applications must be made aware of this. - - - - Plugin config with one slave and one master - - - - - - - - Pitfall: connection state and SQL user variables - -query("SET @myrole='master'")) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} - -/* Connection 2, run on slave because SELECT */ -if (!($res = $mysqli->query("SELECT @myrole AS _role"))) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} else { - $row = $res->fetch_assoc(); - $res->close(); - printf("@myrole = '%s'\n", $row['_role']); -} -$mysqli->close(); -?> -]]> - -&example.outputs; - - - - - - - The example opens a load balanced connection and executes two statements. - The first statement SET @myrole='master' does not begin - with the string SELECT. Therefore the plugin does not - recognize it as a read-only query which shall be run on a slave. The - plugin runs the statement on the connection to the master. The statement - sets a SQL user variable which is bound to the master connection. The - state of the master connection has been changed. - - - The next statement is SELECT @myrole AS _role. - The plugin does recognize it as a read-only query and sends it to - the slave. The statement is run on a connection to the slave. This - second connection does not have any SQL user variables bound to it. - It has a different state than the first connection to the master. - The requested SQL user variable is not set. The example script prints - @myrole = ''. - - - It is the responsibility of the application developer to take care - of the connection state. The plugin does not monitor all - connection state changing activities. Monitoring all possible cases would - be a very CPU intensive task, if it could be done at all. - - - The pitfalls can easily be worked around using SQL hints. - -
- -
- SQL Hints - - SQL hints can force a query to choose a specific server from the connection pool. - It gives the plugin a hint to use a designated server, which can solve - issues caused by connection switches and connection state. - - - SQL hints are standard compliant SQL comments. Because - SQL comments are supposed to be ignored by SQL processing systems, they - do not interfere with other programs such as the MySQL Server, the MySQL Proxy, - or a firewall. - - - Three SQL hints are supported by the plugin: The - MYSQLND_MS_MASTER_SWITCH hint makes the plugin run a - statement on the master, MYSQLND_MS_SLAVE_SWITCH - enforces the use of the slave, and - MYSQLND_MS_LAST_USED_SWITCH will run a statement on - the same server that was used for the previous statement. - - - The plugin scans the beginning of a statement for the existence of an SQL - hint. SQL hints are only recognized if they appear at the beginning of - the statement. - - - - Plugin config with one slave and one master - - - - - - - - SQL hints to prevent connection switches - -query("SET @myrole='master'")) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} - -/* Connection 1, run on master because of SQL hint */ -if (!($res = $mysqli->query(sprintf("/*%s*/SELECT @myrole AS _role", MYSQLND_MS_LAST_USED_SWITCH)))) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} else { - $row = $res->fetch_assoc(); - $res->close(); - printf("@myrole = '%s'\n", $row['_role']); -} -$mysqli->close(); -?> -]]> - -&example.outputs; - - - - - - - In the above example, using MYSQLND_MS_LAST_USED_SWITCH prevents - session switching from the master to a slave when running the SELECT - statement. - - - SQL hints can also be used to run SELECT statements - on the MySQL master server. This may be desired if the MySQL slave servers - are typically behind the master, but you need current data from the cluster. - - - In version 1.2.0 the concept of a service level has been introduced to address - cases when current data is required. Using a service level requires less attention - and removes the need of using SQL hints for this use case. Please, find more - information below in the service level and consistency section. - - - - Fighting replication lag - -query(sprintf("/*%s*/SELECT critical_data FROM important_table", MYSQLND_MS_MASTER_SWITCH))) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} -?> -]]> - - - - - A use case may include the creation of tables on a slave. - If an SQL hint is not given, then the plugin will send CREATE - and INSERT statements to the master. Use the - SQL hint MYSQLND_MS_SLAVE_SWITCH if you want to - run any such statement on a slave, for example, to build temporary - reporting tables. - - - - Table creation on a slave - -query(sprintf("/*%s*/CREATE TABLE slave_reporting(id INT)", MYSQLND_MS_SLAVE_SWITCH))) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} -/* Continue using this particular slave connection */ -if (!$mysqli->query(sprintf("/*%s*/INSERT INTO slave_reporting(id) VALUES (1), (2), (3)", MYSQLND_MS_LAST_USED_SWITCH))) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} -/* Don't use MYSQLND_MS_SLAVE_SWITCH which would allow switching to another slave! */ -if ($res = $mysqli->query(sprintf("/*%s*/SELECT COUNT(*) AS _num FROM slave_reporting", MYSQLND_MS_LAST_USED_SWITCH))) { - $row = $res->fetch_assoc(); - $res->close(); - printf("There are %d rows in the table 'slave_reporting'", $row['_num']); -} else { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} -$mysqli->close(); -?> -]]> - - - - - The SQL hint MYSQLND_MS_LAST_USED forbids switching a - connection, and forces use of the previously used connection. - -
- -
- Local transactions - - The current version of the plugin is not transaction safe by default, - because it is not aware of running transactions in all cases. SQL transactions are - units of work to be run on a single server. The plugin does not always know - when the unit of work starts and when it ends. Therefore, the plugin may - decide to switch connections in the middle of a transaction. - - - No kind of MySQL load balancer can detect transaction boundaries without any - kind of hint from the application. - - - You can either use SQL hints to work around this limitation. Alternatively, - you can activate transaction API call monitoring. In the latter case you - must use API calls only to control transactions, see below. - - - - Plugin config with one slave and one master - - - - - - - - Using SQL hints for transactions - -query("START TRANSACTION")) { - /* Please use better error handling in your code */ - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Prevent connection switch! */ -if (!$mysqli->query(sprintf("/*%s*/INSERT INTO test(id) VALUES (1)", MYSQLND_MS_LAST_USED_SWITCH))) { - /* Please do proper ROLLBACK in your code, don't just die */ - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -if ($res = $mysqli->query(sprintf("/*%s*/SELECT COUNT(*) AS _num FROM test", MYSQLND_MS_LAST_USED_SWITCH))) { - $row = $res->fetch_assoc(); - $res->close(); - if ($row['_num'] > 1000) { - if (!$mysqli->query(sprintf("/*%s*/INSERT INTO events(task) VALUES ('cleanup')", MYSQLND_MS_LAST_USED_SWITCH))) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); - } - } -} else { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -if (!$mysqli->query(sprintf("/*%s*/UPDATE log SET last_update = NOW()", MYSQLND_MS_LAST_USED_SWITCH))) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -if (!$mysqli->query(sprintf("/*%s*/COMMIT", MYSQLND_MS_LAST_USED_SWITCH))) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -$mysqli->close(); -?> -]]> - - - - - Starting with PHP 5.4.0, the mysqlnd library allows the - plugin to monitor the status of the autocommit mode, if - the mode is set by API calls instead of using SQL statements such as - SET AUTOCOMMIT=0. This makes it possible for the plugin to - become transaction aware. In this case, you do not need to use SQL hints. - - - If using PHP 5.4.0 or newer, API calls that enable autocommit mode, - and when setting the plugin configuration option - trx_stickiness=master, - the plugin can automatically disable load balancing and connection switches - for SQL transactions. In this configuration, the plugin stops load balancing - if autocommit is disabled and directs all statements to - the master. This prevents connection switches in the middle of - a transaction. Once autocommit is re-enabled, the plugin - starts to load balance statements again. - - - API based transaction boundary detection has been improved with PHP 5.5.0 and - PECL/mysqlnd_ms 1.5.0 to cover not only calls to mysqli_autocommit - but also mysqli_begin, - mysqli_commit and mysqli_rollback. - - - - Transaction aware load balancing: trx_stickiness setting - - - - - - - - Transaction aware - -autocommit(false); - -if (!$mysqli->query("INSERT INTO test(id) VALUES (1)")) { - /* Please do proper ROLLBACK in your code, don't just die */ - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -if ($res = $mysqli->query("SELECT COUNT(*) AS _num FROM test")) { - $row = $res->fetch_assoc(); - $res->close(); - if ($row['_num'] > 1000) { - if (!$mysqli->query("INSERT INTO events(task) VALUES ('cleanup')")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); - } - } -} else { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -if (!$mysqli->query("UPDATE log SET last_update = NOW()")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -if (!$mysqli->commit()) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Plugin assumes that the transaction has ended and starts load balancing again */ -$mysqli->autocommit(true); -$mysqli->close(); -?> -]]> - - - - - Version requirement - - The plugin configuration option - trx_stickiness=master - requires PHP 5.4.0 or newer. - - - - Please note the restrictions outlined in the - transaction handling concepts - section. - -
- -
- XA/Distributed Transactions - - Version requirement - - XA related functions have been introduced in PECL mysqlnd_ms version 1.6.0-alpha. - - - - Early adaptors wanted - - The feature is currently under development. There may be issues and/or - feature limitations. Do not use in production environments, although - early lab tests indicate reasonable quality. - - - Please, contact the development team if you are interested in this feature. - We are looking for real life feedback to complement the feature. - - - - XA transactions are a standardized method for executing transactions across - multiple resources. Those resources can be databases or other transactional - systems. The MySQL server supports XA SQL statements which allows users - to carry out a distributed SQL transaction that spawns multiple database servers - or any kind as long as they support the SQL statements too. In such a scenario - it is in the responsibility of the user to coordinate the participating - servers. - - - PECL/mysqlnd_ms can act as a transaction coordinator for a global (distributed, XA) - transaction carried out on MySQL servers only. As a transaction coordinator, the plugin - tracks all servers involved in a global transaction and transparently issues - appropriate SQL statements on the participants. The global transactions are controlled with - mysqlnd_ms_xa_begin, mysqlnd_ms_xa_commit - and mysqlnd_ms_xa_rollback. SQL details are mostly hidden from - the application as is the need to track and coordinate participants. - - - - General pattern for XA transactions - -errno, $mysqli->error)); -} - -/* run queries as usual: XA BEGIN will be injected upon running a query */ -if (!$mysqli->query("INSERT INTO orders(order_id, item) VALUES (1, 'christmas tree, 1.8m')")) { - /* Either INSERT failed or the injected XA BEGIN failed */ - if ('XA' == substr($mysqli->sqlstate, 0, 2)) { - printf("Global transaction/XA related failure, [%d] %s\n", $mysqli->errno, $mysqli->error); - } else { - printf("INSERT failed, [%d] %s\n", $mysqli->errno, $mysqli->error); - } - /* rollback global transaction */ - mysqlnd_ms_xa_rollback($mysqli, $xid); - die("Stopping."); -} - -/* continue carrying out queries on other servers, e.g. other shards */ - -/* commit the global transaction */ -if (!mysqlnd_ms_xa_commit($mysqli, $xa_id)) { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -} -?> -]]> - - - - - Unlike with local transactions, which are carried out on a single server, - XA transactions have an identifier (xid) associated with them. - The XA transaction identifier is composed of a global transaction - identifier (gtrid), a branch qualifier (bqual) - a format identifier (formatID). Only the global transaction identifier can - and must be given when calling any of the plugins XA functions. - - - Once a global transaction has been started, the plugin begins tracking servers - until the global transaction ends. When a server is picked for query execution, - the plugin injects the SQL statement XA BEGIN prior to - executing the actual SQL statement on the server. XA BEGIN - makes the server participate in the global transaction. If the injected - SQL statement fails, the plugin will report the issue in reply to the query - execution function that was used. In the above example, - $mysqli->query("INSERT INTO orders(order_id, item) VALUES (1, 'christmas tree, 1.8m')") - would indicate such an error. You may want to check the errors SQL state code to - determine whether the actual query (here: INSERT) has failed - or the error is related to the global transaction. It is up to you to ignore the - failure to start the global transaction on a server and continue execution - without having the server participate in the global transaction. - - - - Local and global transactions are mutually exclusive - -begin_transaction()) { - die(sprintf("[%d/%s] %s\n", $mysqli->errno, $mysqli->sqlstate, $mysqli->error)); -} - -/* cannot start global transaction now - must end local transaction first */ -$gtrid_id = "12345"; -if (!mysqlnd_ms_xa_begin($mysqli, $gtrid_id)) { - die(sprintf("[%d/%s] %s\n", $mysqli->errno, $mysqli->sqlstate, $mysqli->error)); -} -?> -]]> - - &example.outputs; - - - - - - - A global transaction cannot be started when a local transaction is active. - The plugin tries to detect this situation as early as possible, that is when - mysqlnd_ms_xa_begin is called. If using API calls only to - control transactions, the plugin will know that a local transaction is open and - return an error for mysqlnd_ms_xa_begin. However, note the - plugins limitations on detecting - transaction boundaries.. In the worst case, if using direct SQL - for local transactions (BEGIN, - COMMIT, ...), it may happen that an error is delayed - until some SQL is executed on a server. - - - To end a global transaction invoke mysqlnd_ms_xa_commit or - mysqlnd_ms_xa_rollback. When a global transaction is ended - all participants must be informed of the end. Therefore, PECL/mysqlnd_ms - transparently issues appropriate XA related SQL statements - on some or all of them. Any failure during this phase will cause an implicit - rollback. The XA related API is intentionally kept simple here. A more - complex API that gave more control would bare few, if any, advantages over - a user implementation that issues all lower level XA SQL statements itself. - - - XA transactions use the two-phase commit protocol. The two-phase commit - protocol is a blocking protocol. There are cases when no progress can - be made, not even when using timeouts. Transaction coordinators - should survive their own failure, be able to detect blockades and break ties. - PECL/mysqlnd_ms takes the role of a transaction coordinator and can be - configured to survive its own crash to avoid issues with blocked MySQL servers. - Therefore, the plugin can and should be configured to use a persistent and crash-safe state - to allow garbage collection of unfinished, aborted global transactions. - A global transaction can be aborted in an open state if either the plugin fails (crashes) - or a connection from the plugin to a global transaction participant fails. - - - - Transaction coordinator state store - - - - - - - Currently, PECL/mysqlnd_ms supports only using MySQL database tables - as a state store. The SQL definitions of the tables are given in the - plugin configuration section. - Please, make sure to use a transactional and crash-safe - storage engine for the tables, such as InnoDB. InnoDB is the default - table engine in recent versions of the MySQL server. Make also sure - the database server itself is highly available. - - - If a state store has been configured, the plugin can perform a garbage collection. - During garbage collection it may be necessary to connect to a participant - of a failed global transaction. Thus, the state store holds a list of participants - and, among others, their host names. If the garbage collection is run - on another host but the one that has written a participant entry with the - host name localhost, then localhost - resolves to different machines. There are two solutions to the problem. - Either you do not configure any servers with the host name localhost but - configure an IP address (and port) or, you hint the garbage collection. - In the above example, localhost is used for - master_0, hence it may not resolve to the correct - host during garbage collection. However, participant_localhost_ip - is also set to hint the garbage collection that localhost - stands for the IP 192.168.2.12. - -
- -
- Service level and consistency - - Version requirement - - Service levels have been introduced in PECL mysqlnd_ms version 1.2.0-alpha. - mysqlnd_ms_set_qos - is available with PHP 5.4.0 or newer. - - - - Different types of MySQL cluster solutions offer different service and - data consistency levels to their users. An asynchronous MySQL replication cluster - offers eventual consistency by default. A read executed on an asynchronous slave - may return current, stale or no data at all, depending on whether the slave - has replayed all changesets from the master or not. - - - Applications using an MySQL replication cluster need to be designed to work - correctly with eventual consistent data. In some cases, however, stale data - is not acceptable. In those cases only certain slaves or even only master accesses are - allowed to achieve the required quality of service from the cluster. - - - As of PECL mysqlnd_ms 1.2.0 the plugin is capable of selecting - MySQL replication nodes automatically that deliver session consistency or - strong consistency. Session consistency means that one client can read its writes. - Other clients may or may not see the clients' write. Strong consistency means - that all clients will see all writes from the client. - - - - Session consistency: read your writes - - - - - - - - Requesting session consistency - -query("INSERT INTO orders(order_id, item) VALUES (1, 'christmas tree, 1.8m')")) { - /* Please use better error handling in your code */ - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Request session consistency: read your writes */ -if (!mysqlnd_ms_set_qos($mysqli, MYSQLND_MS_QOS_CONSISTENCY_SESSION)) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Plugin picks a node which has the changes, here: master */ -if (!$res = $mysqli->query("SELECT item FROM orders WHERE order_id = 1")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -var_dump($res->fetch_assoc()); - -/* Back to eventual consistency: stale data allowed */ -if (!mysqlnd_ms_set_qos($mysqli, MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL)) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Plugin picks any slave, stale data is allowed */ -if (!$res = $mysqli->query("SELECT item, price FROM specials")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -?> -]]> - - - - - Service levels can be set in the plugins configuration file and at runtime - using mysqlnd_ms_set_qos. - In the example the function is used to enforce - session consistency (read your writes) for all future statements until further notice. - The SELECT statement on the orders table - is run on the master to ensure the previous write can be seen by the client. - Read-write splitting logic has been adapted to fulfill the service level. - - - After the application has read its changes from the orders table - it returns to the default service level, which is eventual consistency. Eventual - consistency puts no restrictions on choosing a node for statement execution. - Thus, the SELECT statement on the specials - table is executed on a slave. - - - The new functionality supersedes the use of SQL hints and the - master_on_write configuration option. In many cases - mysqlnd_ms_set_qos is easier to use, more powerful - improves portability. - - - - Maximum age/slave lag - - - - - - - - Limiting slave lag - -errno, $mysqli->error)); -} - -/* Plugin picks any slave, which may or may not have the changes */ -if (!$res = $mysqli->query("SELECT item, price FROM daytrade")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Back to default: use of all slaves and masters permitted */ -if (!mysqlnd_ms_set_qos($mysqli, MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL)) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -?> -]]> - - - - - The eventual consistency service level can be used with an optional - parameter to set a maximum slave lag for choosing slaves. If set, - the plugin checks SHOW SLAVE STATUS for all - configured slaves. In case of the example, only slaves - for which Slave_IO_Running=Yes, - Slave_SQL_Running=Yes and - Seconds_Behind_Master <= 4 - is true are considered for executing the statement - SELECT item, price FROM daytrade. - - - Checking SHOW SLAVE STATUS is done transparently from - an applications perspective. Errors, if any, are reported as - warnings. No error will be set on the connection handle. Even if all - SHOW SLAVE STATUS SQL statements executed by - the plugin fail, the execution of the users statement is not stopped, given - that master fail over is enabled. Thus, no application changes are required. - - - Expensive and slow operation - - Checking SHOW SLAVE STATUS for all slaves adds overhead - to the application. It is an expensive and slow background operation. - Try to minimize the use of it. Unfortunately, a MySQL replication cluster - does not give clients the possibility to request a list of candidates - from a central instance. - Thus, a more efficient way of checking the slaves lag is not available. - - - Please, note the limitations and properties of SHOW SLAVE STATUS - as explained in the MySQL reference manual. - - - - To prevent mysqlnd_ms from emitting a warning if no slaves can be found - that lag no more than the defined number of seconds behind the master, - it is necessary to enable master fail over in the plugins configuration file. - If no slaves can be found and fail over is turned on, the plugin - picks a master for executing the statement. - - - If no slave can be found and fail over is turned off, the plugin emits - a warning, it does not execute the statement and it sets an error - on the connection. - - - - Fail over not set - - - - - - - - No slave within time limit - -errno, $mysqli->error)); -} - -/* Plugin picks any slave, which may or may not have the changes */ -if (!$res = $mysqli->query("SELECT item, price FROM daytrade")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - - -/* Back to default: use of all slaves and masters permitted */ -if (!mysqlnd_ms_set_qos($mysqli, MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL)) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -?> -]]> - - &example.outputs; - - - - - -
-
- Global transaction IDs - - Version requirement - - A client-side global transaction ID injection has been introduced in mysqlnd_ms version 1.2.0-alpha. - The feature is not required for synchronous clusters, such as MySQL Cluster. - Use it with asynchronous clusters such as classical MySQL replication. - - - As of MySQL 5.6.5-m8 release candidate the MySQL server features built-in global transaction identifiers. - The MySQL built-in global transaction ID feature is supported by PECL/mysqlnd_ms 1.3.0-alpha or - later. However, the final feature set found in MySQL 5.6 production releases to date is not - sufficient to support the ideas discussed below in all cases. Please, see also the - concepts section. - - - - PECL/mysqlnd_ms can either use its own global transaction ID emulation or the - global transaction ID feature built-in to MySQL 5.6.5-m8 or later. From a developer - perspective the client-side and server-side approach offer the same features with - regards to service levels provided by PECL/mysqlnd_ms. Their differences - are discussed in the concepts section. - - - The quickstart first demonstrates the use of the client-side global transaction ID emulation - built-in to PECL/mysqlnd_ms before its show how to use the server-side counterpart. - The order ensures that the underlying idea is discussed first. - - - Idea and client-side emulation - - - In its most basic form a global transaction ID (GTID) is a counter in a table on the - master. The counter is incremented whenever a transaction is committed on the master. - Slaves replicate the table. The counter serves two purposes. In case of a - master failure, it helps the database administrator to identify the most recent slave - for promoting it to the new master. The most recent slave is the one with the - highest counter value. Applications can use the global transaction ID to search - for slaves which have replicated a certain write (identified by a global transaction ID) - already. - - - PECL/mysqlnd_ms can inject SQL for every committed transaction to increment a GTID counter. - The so created GTID is accessible by the application to identify an applications - write operation. This enables the plugin to deliver session consistency (read your writes) - service level by not only querying masters but also slaves which have replicated - the change already. Read load is taken away from the master. - - - Client-side global transaction ID emulation has some limitations. Please, - read the concepts section - carefully to fully understand the principles and ideas - behind it, before using in production environments. The background knowledge - is not required to continue with the quickstart. - - - First, create a counter table on your master server and insert a record into it. - The plugin does not assist creating the table. - Database administrators must make sure it exists. Depending on the error - reporting mode, the plugin will silently ignore the lack of the table or bail out. - - - - Create counter table on master - - - - - - - In the plugins configuration file set the SQL to update the - global transaction ID table using on_commit - from the global_transaction_id_injection - section. Make sure the table name used for the UPDATE - statement is fully qualified. In the example, - test.trx is used to refer to table trx - in the schema (database) test. Use the table that was created in - the previous step. It is important to set the fully qualified table name - because the connection on which the injection is done may use a different - default database. Make sure the user that opens the connection - is allowed to execute the UPDATE. - - - Enable reporting of errors that may occur when mysqlnd_ms does global - transaction ID injection. - - - - Plugin config: SQL for client-side GTID injection - - - - - - - - Transparent global transaction ID injection - -query("DROP TABLE IF EXISTS test")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* auto commit mode, transaction on master, GTID must be incremented */ -if (!$mysqli->query("CREATE TABLE test(id INT)")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* auto commit mode, transaction on master, GTID must be incremented */ -if (!$mysqli->query("INSERT INTO test(id) VALUES (1)")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* auto commit mode, read on slave, no increment */ -if (!($res = $mysqli->query("SELECT id FROM test"))) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -var_dump($res->fetch_assoc()); -?> -]]> - - &example.outputs; - - - string(1) "1" -} -]]> - - - - - The example runs three statements in auto commit mode on the master, causing - three transactions on the master. For every such statement, the plugin will - inject the configured UPDATE transparently before executing - the users SQL statement. When the script ends the global - transaction ID counter on the master has been incremented by three. - - - The fourth SQL statement executed in the example, a SELECT, - does not trigger an increment. Only transactions (writes) executed on a master - shall increment the GTID counter. - - - SQL for global transaction ID: efficient solution wanted! - - The SQL used for the client-side global transaction ID emulation is inefficient. - It is optimized for clearity not for performance. Do not use it for production - environments. Please, help finding an efficient solution for inclusion in the manual. - We appreciate your input. - - - - - Plugin config: SQL for fetching GTID - - - - - - - - Obtaining GTID after injection - -query("DROP TABLE IF EXISTS test")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -printf("GTID after transaction %s\n", mysqlnd_ms_get_last_gtid($mysqli)); - -/* auto commit mode, transaction on master, GTID must be incremented */ -if (!$mysqli->query("CREATE TABLE test(id INT)")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -printf("GTID after transaction %s\n", mysqlnd_ms_get_last_gtid($mysqli)); -?> -]]> - - &example.outputs; - - - - - - - Applications can ask PECL mysqlnd_ms for a global transaction ID which - belongs to the last write operation performed by the application. - The function mysqlnd_ms_get_last_gtid returns the - GTID obtained when executing the SQL statement from - the fetch_last_gtid entry of the - global_transaction_id_injection section from - the plugins configuration file. The function may be called - after the GTID has been incremented. - - - Applications are adviced not to run the SQL - statement themselves as this bares the risk of accidentally causing an implicit - GTID increment. Also, if the function is used, it is easy to migrate - an application from one SQL statement for fetching a transaction ID to another, - for example, if any MySQL server ever features built-in global transaction ID support. - - - The quickstart shows a SQL statement which will return a GTID equal or greater - to that created for the previous statement. It is exactly the GTID created - for the previous statement if no other clients have incremented the GTID in the - time span between the statement execution and the SELECT - to fetch the GTID. Otherwise, it is greater. - - - - Plugin config: Checking for a certain GTID - -= #GTID", - "report_error":true - } - } -} -]]> - - - - - - Session consistency service level and GTID combined - -query("DROP TABLE IF EXISTS test") - || !$mysqli->query("CREATE TABLE test(id INT)") - || !$mysqli->query("INSERT INTO test(id) VALUES (1)") -) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* GTID as an identifier for the last write */ -$gtid = mysqlnd_ms_get_last_gtid($mysqli); - -/* Session consistency (read your writes): try to read from slaves not only master */ -if (false == mysqlnd_ms_set_qos($mysqli, MYSQLND_MS_QOS_CONSISTENCY_SESSION, MYSQLND_MS_QOS_OPTION_GTID, $gtid)) { - die(sprintf("[006] [%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Either run on master or a slave which has replicated the INSERT */ -if (!($res = $mysqli->query("SELECT id FROM test"))) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -var_dump($res->fetch_assoc()); -?> -]]> - - - - - A GTID returned from mysqlnd_ms_get_last_gtid - can be used as an option for the session consistency service level. - Session consistency delivers read your writes. Session consistency can - be requested by calling - mysqlnd_ms_set_qos. - In the example, the plugin will execute the SELECT - statement either on the master or on a slave which has replicated - the previous INSERT already. - - - PECL mysqlnd_ms will transparently check every configured slave if - it has replicated the INSERT by checking the slaves - GTID table. The check is done running the SQL set with the - check_for_gtid option from the - global_transaction_id_injection section of - the plugins configuration file. Please note, that this is a slow and - expensive procedure. Applications should try to use it sparsely and only - if read load on the master becomes to high otherwise. - - - Use of the server-side global transaction ID feature - - - Insufficient server support in MySQL 5.6 - - The plugin has been developed against a pre-production version of MySQL 5.6. - It turns out that all released production versions of MySQL 5.6 do not provide - clients with enough information to enforce session consistency based on GTIDs. - Please, read the concepts section - for details. - - - - Starting with MySQL 5.6.5-m8 the MySQL Replication system features server-side - global transaction IDs. Transaction identifiers are automatically generated and - maintained by the server. Users do not need to take care of maintaining them. - There is no need to setup any tables in advance, or for setting - on_commit. A client-side emulation is no longer needed. - - - Clients can continue to use global transaction identifier to achieve - session consistency when reading from MySQL Replication slaves in some cases but not all! - The algorithm works as described above. Different SQL statements must be configured for - fetch_last_gtid and check_for_gtid. - The statements are given below. Please note, MySQL 5.6.5-m8 is a development - version. Details of the server implementation may change in the future and require - adoption of the SQL statements shown. - - - Using the following configuration any of the above described functionality can - be used together with the server-side global transaction ID feature. - mysqlnd_ms_get_last_gtid and mysqlnd_ms_set_qos - continue to work as described above. The only difference is that the server - does not use a simple sequence number but a string containing of a server identifier - and a sequence number. Thus, users cannot easily derive an order from GTIDs returned - by mysqlnd_ms_get_last_gtid. - - - - Plugin config: using MySQL 5.6.5-m8 built-in GTID feature - - - - - -
-
- Cache integration - - Version requirement, dependencies and status - - Please, find more about version requirements, extension load order dependencies and the current status - in the concepts section! - - - - Databases clusters can deliver different levels of consistency. As of - PECL/mysqlnd_ms 1.2.0 it is possible to advice the plugin to consider only - cluster nodes that can deliver the consistency level requested. For example, - if using asynchronous MySQL Replication with its cluster-wide eventual - consistency, it is possible to request session consistency (read your writes) - at any time using mysqlnd_ms_set_quos. Please, see also the - service level and consistency - introduction. - - - - Recap: quality of service to request read your writes - -/* Request session consistency: read your writes */ -if (!mysqlnd_ms_set_qos($mysqli, MYSQLND_MS_QOS_CONSISTENCY_SESSION)) - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); - - - - - Assuming PECL/mysqlnd has been explicitly told to deliver no consistency level - higher than eventual consistency, it is possible to replace a database node - read access with a client-side cache using time-to-live (TTL) as its invalidation - strategy. Both the database node and the cache may or may not serve - current data as this is what eventual consistency defines. - - - Replacing a database node read access with a local cache access can improve - overall performance and lower the database load. If the cache entry is every - reused by other clients than the one creating the cache entry, - a database access is saved and thus database load is lowered. Furthermore, - system performance can become better if computation and delivery - of a database query is slower than a local cache access. - - - - Plugin config: no special entries for caching - - - - - - - - Caching a slave request - -query("DROP TABLE IF EXISTS test") - || !$mysqli->query("CREATE TABLE test(id INT)") - || !$mysqli->query("INSERT INTO test(id) VALUES (1)") -) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Explicitly allow eventual consistency and caching (TTL <= 60 seconds) */ -if (false == mysqlnd_ms_set_qos($mysqli, MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL, MYSQLND_MS_QOS_OPTION_CACHE, 60)) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* To make this example work, we must wait for a slave to catch up. Brute force style. */ -$attempts = 0; -do { - /* check if slave has the table */ - if ($res = $mysqli->query("SELECT id FROM test")) { - break; - } else if ($mysqli->errno) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); - } - /* wait for slave to catch up */ - usleep(200000); -} while ($attempts++ < 10); - -/* Query has been run on a slave, result is in the cache */ -assert($res); -var_dump($res->fetch_assoc()); - -/* Served from cache */ -$res = $mysqli->query("SELECT id FROM test"); -?> -]]> - - - - - The example shows how to use the cache feature. First, you have to set - the quality of service to eventual consistency and explicitly allow for caching. - This is done by calling mysqlnd_ms_set_qos. - Then, the result set of every read-only statement is cached for upto that - many seconds as allowed with mysqlnd_ms_set_qos. - - - The actual TTL is lower or equal to the value set - with mysqlnd_ms_set_qos. The value passed to the - function sets the maximum age (seconds) of the data delivered. To calculate - the actual TTL value the replication lag on a slave is checked and subtracted - from the given value. If, for example, the maximum age is set to 60 seconds and - the slave reports a lag of 10 seconds the resulting TTL is 50 seconds. - The TTL is calculated individually for every cached query. - - - - Read your writes and caching combined - -query("DROP TABLE IF EXISTS test") - || !$mysqli->query("CREATE TABLE test(id INT)") - || !$mysqli->query("INSERT INTO test(id) VALUES (1)") -) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Explicitly allow eventual consistency and caching (TTL <= 60 seconds) */ -if (false == mysqlnd_ms_set_qos($mysqli, MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL, MYSQLND_MS_QOS_OPTION_CACHE, 60)) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* To make this example work, we must wait for a slave to catch up. Brute force style. */ -$attempts = 0; -do { - /* check if slave has the table */ - if ($res = $mysqli->query("SELECT id FROM test")) { - break; - } else if ($mysqli->errno) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); - } - /* wait for slave to catch up */ - usleep(200000); -} while ($attempts++ < 10); - -assert($res); - -/* Query has been run on a slave, result is in the cache */ -var_dump($res->fetch_assoc()); - -/* Served from cache */ -if (!($res = $mysqli->query("SELECT id FROM test"))) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -var_dump($res->fetch_assoc()); - -/* Update on master */ -if (!$mysqli->query("UPDATE test SET id = 2")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Read your writes */ -if (false == mysqlnd_ms_set_qos($mysqli, MYSQLND_MS_QOS_CONSISTENCY_SESSION)) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Fetch latest data */ -if (!($res = $mysqli->query("SELECT id FROM test"))) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -var_dump($res->fetch_assoc()); -?> -]]> - - - - - The quality of service can be changed at any time to avoid further cache usage. - If needed, you can switch to read your writes (session consistency). In that case, - the cache will not be used and fresh data is read. - -
-
- Failover - - By default, the plugin does not attempt to fail over if connecting to a host - fails. This prevents pitfalls related to - connection state. - It is recommended to manually handle connection errors in a way similar to a failed - transaction. You should catch the error, rebuild the connection state and rerun your - query as shown below. - - - If connection state is no issue to you, you can alternatively enable automatic - and silent failover. Depending on the configuration, the automatic and silent failover - will either attempt to fail over to the master before issuing and error or, try to - connect to other slaves, given the query allowes for it, before attempting to connect - to a master. Because automatic failover is - not fool-proof, it is not discussed in the quickstart. Instead, details are given - in the concepts section below. - - - - Manual failover, automatic optional - - - - - - - - Manual failover - -query($sql))) { - /* plugin specific: check for connection error */ - switch ($link->errno) { - case 2002: - case 2003: - case 2005: - printf("Connection error - trying next slave!\n"); - /* load balancer will pick next slave */ - $res = $link->query($sql); - break; - default: - /* no connection error, failover is unlikely to help */ - die(sprintf("SQL error: [%d] %s", $link->errno, $link->error)); - break; - } -} -if ($res) { - var_dump($res->fetch_assoc()); -} -?> -]]> - - - -
-
- Partitioning and Sharding - - Database clustering is done for various reasons. Clusters can improve availability, - fault tolerance, and increase performance by applying a divide and conquer approach - as work is distributed over many machines. Clustering is sometimes combined with - partitioning and sharding to further break up a large complex task into - smaller, more manageable units. - - - The mysqlnd_ms plugin aims to support a wide variety of MySQL database clusters. Some flavors of - MySQL database clusters have built-in methods for partitioning and sharding, - which could be transparent to use. The plugin supports the two most - common approaches: MySQL Replication table filtering, and Sharding - (application based partitioning). - - - MySQL Replication supports partitioning as filters that allow you to - create slaves that replicate all or specific databases of the master, or tables. - It is then in the responsibility of the application - to choose a slave according to the filter rules. You can either use the - mysqlnd_ms node_groups - filter to manually support this, or use the experimental table filter. - - - Manual partitioning or sharding is supported through the - node grouping filter, and SQL hints as of 1.5.0. The node_groups filter - lets you assign a symbolic name to a group of master and slave servers. - In the example, the master master_0 and slave_0 - form a group with the name Partition_A. It is entirely - up to you to decide what makes up a group. For example, you may use node - groups for sharding, and use the group names to address shards - like Shard_A_Range_0_100. - - - - Cluster node groups - - - - - - - - Manual partitioning using SQL hints - -query($sql))) { - printf("[%d] %s", $mysqli->errno, $mysqli->error); - return false; - } - $row = $res->fetch_assoc(); - printf("%d - %s - %s\n", $row['_thread'], $row['_hint'], $sql); - return true; -} - -$mysqli = new mysqli("myapp", "user", "password", "database"); -if (!$mysqli) { - /* Of course, your error handling is nicer... */ - die(sprintf("[%d] %s\n", mysqli_connect_errno(), mysqli_connect_error())); -} - -/* All slaves allowed */ -select($mysqli, "slave_0"); -select($mysqli, "slave_1"); - -/* only servers of node group "Partition_A" allowed */ -select($mysqli, "slave_1", "/*Partition_A*/"); -select($mysqli, "slave_1", "/*Partition_A*/"); -?> -]]> - - - - - - - - By default, the plugin will use all configured master and slave servers for - query execution. But if a query begins with a SQL hint like - /*node_group*/, the plugin will only consider the servers - listed in the node_group for query execution. Thus, - SELECT queries prefixed with /*Partition_A*/ - will only be executed on slave_0. - - -
- - -
- MySQL Fabric - - Version requirement and status - - Work on supporting MySQL Fabric started in version 1.6. Please, - consider the support to be of pre-alpha quality. The manual may - not list all features or feature limitations. This is work in progress. - - - Sharding is the only use case supported by the plugin to date. - - - - MySQL Fabric concepts - - Please, check the MySQL reference manual for more information about MySQL Fabric - and how to set it up. The PHP manual assumes that you are familiar - with the basic concepts and ideas of MySQL Fabric. - - - - MySQL Fabric is a system for managing farms of MySQL servers to achive - High Availability and optionally support sharding. Technically, it is a - middleware to manage and monitor MySQL servers. - - - Clients query MySQL Fabric to obtain lists of MySQL servers, - their state and their roles. For example, clients can request a list of - slaves for a MySQL Replication group and whether they are ready to - handle SQL requests. Another example is a cluster of sharded MySQL servers - where the client seeks to know which shard to query for a given - table and shard key. If configured to use Fabric, the plugin uses XML RCP over HTTP - to obtain the list at runtime from a MySQL Fabric host. The XML remote - procedure call itself is done in the background and transparent from a - developers point of view. - - - Instead of listing MySQL servers directly in the plugins configuration file - it contains a list of one or more MySQL Fabric hosts - - - - Plugin config: Fabric hosts instead of MySQL servers - - - - - - - Users utilize the new functions - mysqlnd_ms_fabric_select_shard and - mysqlnd_ms_fabric_select_global to switch to - the set of servers responsible for a given shard key. Then, the - plugin picks an appropriate server for running queries on. - When doing so, the plugin takes care of additional - load balancing rules set. - - - The below example assumes that MySQL Fabric has been setup - to shard the table test.fabrictest using - the id column of the table as a shard key. - - - - Manual partitioning using SQL hints - -query("CREATE TABLE test.fabrictest(id INT NOT NULL PRIMARY KEY)")) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Switch connection to appropriate shard and insert record */ -mysqlnd_ms_fabric_select_shard($mysqli, "test.fabrictest", 10); -if (!($res = $mysqli->query("INSERT INTO fabrictest(id) VALUES (10)"))) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} - -/* Try to read newly inserted record */ -mysqlnd_ms_fabric_select_shard($mysqli, "test.fabrictest", 10); -if (!($res = $mysqli->query("SELECT id FROM test WHERE id = 10"))) { - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); -} -?> -]]> - - - - - The example creates the sharded table, inserts a record and reads - the record thereafter. All SQL data definition language (DDL) - operations on a sharded table must be applied to the so called global server group. - Prior to creating or altering a sharded table, - mysqlnd_ms_fabric_select_global is called - to switch the given connection to the corresponding servers of the global - group. Data manipulation (DML) SQL statements must be sent to the shards - directly. The - mysqlnd_ms_fabric_select_shard switches a - connection to shards handling a certain shard key. - - - -
-
- diff --git a/reference/mysqlnd_ms/reference.xml b/reference/mysqlnd_ms/reference.xml deleted file mode 100644 index 3b444a72c4..0000000000 --- a/reference/mysqlnd_ms/reference.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Mysqlnd_ms &Functions; - - &reference.mysqlnd-ms.entities.functions; - - - - diff --git a/reference/mysqlnd_ms/setup.xml b/reference/mysqlnd_ms/setup.xml deleted file mode 100644 index e59d2a63ae..0000000000 --- a/reference/mysqlnd_ms/setup.xml +++ /dev/null @@ -1,3776 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - - PHP 5.3.6 or newer. - Some advanced functionality requires PHP 5.4.0 or newer. - - - The mysqlnd_ms replication and load balancing - plugin supports all PHP applications and all available PHP MySQL extensions - (mysqli, - mysql, - PDO_MYSQL). - The PHP MySQL extension must be configured to use - mysqlnd in order to be able - to use the mysqlnd_ms plugin for - mysqlnd. - -
- - &reference.mysqlnd-ms.configure; - &reference.mysqlnd-ms.ini; - -
- Plugin configuration file (>=1.1.x) - - - The following documentation applies to PECL/mysqlnd_ms >= 1.1.0-beta. - It is not valid for prior versions. For documentation covering earlier - versions, see the configuration documentation - for mysqlnd_ms 1.0.x and below. - - -
- Introduction - - - - Changelog: Feature was added in PECL/mysqlnd_ms 1.1.0-beta - - The below description applies to PECL/mysqlnd_ms >= 1.1.0-beta. - It is not valid for prior versions. - - - - - The plugin uses its own configuration file. The configuration file - holds information about the MySQL replication master server, - the MySQL replication slave servers, the server pick (load balancing) policy, - the failover strategy, and the use of lazy connections. - - - The plugin loads its configuration file at the beginning of a web request. - It is then cached in memory and used for the duration of the web request. - This way, there is no need to restart PHP after deploying the configuration - file. Configuration file changes will become active almost instantly. - - - The PHP configuration directive - mysqlnd_ms.config_file - is used to set the plugins configuration file. Please note, that - the PHP configuration directive may not be evaluated for every web request. - Therefore, changing the plugins configuration file name or location may - require a PHP restart. However, no restart is required to read changes if - an already existing plugin configuration file is updated. - - - Using and parsing JSON is efficient, and using JSON - makes it easier to express hierarchical data structures than the standard - php.ini format. - - - - Converting a PHP array (hash) into JSON format - - Or alternatively, a developer may be more familiar with the PHP array - syntax, and prefer it. This example demonstrates how a developer might convert a - PHP array to JSON. - - - array( - "master" => array( - "master_0" => array( - "host" => "localhost", - "socket" => "/tmp/mysql.sock", - ), - ), - "slave" => array(), - ), -); - -file_put_contents("mysqlnd_ms.ini", json_encode($config, JSON_PRETTY_PRINT)); -printf("mysqlnd_ms.ini file created...\n"); -printf("Dumping file contents...\n"); -printf("%s\n", str_repeat("-", 80)); -echo file_get_contents("mysqlnd_ms.ini"); -printf("\n%s\n", str_repeat("-", 80)); -?> -]]> - - &example.outputs; - - - - - - - A plugin configuration file consists of one or more sections. Sections - are represented by the top-level object properties of the - object encoded in the JSON file. Sections could also - be called configuration names. - - - Applications reference sections by their name. Applications use section names - as the host (server) parameter to the various connect methods of the - mysqli, - mysql and - PDO_MYSQL extensions. Upon connect, - the mysqlnd plugin compares the hostname - with all of the section names from the plugin configuration file. If the hostname and - section name match, then the plugin will load the settings for that section. - - - - Using section names example - - - - - -]]> - - - - - Section names are strings. It is valid to use a section name such as - 192.168.2.1, 127.0.0.1 or - localhost. If, for example, an application - connects to localhost and a plugin - configuration section localhost exists, the - semantics of the connect operation are changed. The application will - no longer only use the MySQL server running on the host - localhost, but the plugin will start to load balance - MySQL queries following the rules from the localhost - configuration section. This way you can load balance queries from - an application without changing the applications source code. - Please keep in mind, that such a configuration may not contribute - to overall readability of your applications source code. Using section names - that can be mixed up with host names should be seen as a last resort. - - - Each configuration section contains, at a minimum, a list of master servers - and a list of slave servers. The master list is configured with the keyword - master, while the slave list is configured with the - slave keyword. Failing to provide a slave list will result - in a fatal E_ERROR level error, although a slave list - may be empty. It is possible to allow no slaves. However, this is only recommended - with synchronous clusters, please see also - supported clusters. - The main part of the documentation focusses on the use - of asynchronous MySQL replication clusters. - - - The master and slave server lists can be optionally indexed by symbolic - names for the servers they describe. Alternatively, an array of descriptions - for slave and master servers may be used. - - - - List of anonymous slaves - - - - - - - An anonymous server list is encoded by the JSON array type. - Optionally, symbolic names may be used for indexing the slave or master servers - of a server list, and done so using the JSON object type. - - - - Master list using symbolic names - - - - - - - It is recommended to index the server lists with symbolic server names. - The alias names will be shown in error messages. - - - The order of servers is preserved and taken into account by mysqlnd_ms. - If, for example, you configure round robin load balancing strategy, the - first SELECT statement will be executed on the - slave that appears first in the slave server list. - - - A configured server can be described with the host, - port, socket, db, - user, password and connect_flags. - It is mandatory to set the database server host using the host - keyword. All other settings are optional. - - - - Keywords to configure a server - - - - - - - If a setting is omitted, the plugin will use the value provided by the user - API call used to open a connection. Please, see the - using section names example above. - - - The configuration file format has been changed in version 1.1.0-beta to allow for - chained filters. Filters are responsible for filtering the configured list of - servers to identify a server for execution of a given statement. - Filters are configured with the filter keyword. Filters - are executed by mysqlnd_ms in the order of their appearance. - Defining filters is optional. A configuration section in the plugins - configuration file does not need to have a filters entry. - - - Filters replace the - pick[] - setting from prior versions. The new random and - roundrobin provide the same functionality. - - - - New <literal>roundrobin</literal> filter, old functionality - - - - - - - The function - mysqlnd_ms_set_user_pick_server - has been removed. Setting a callback is now done with the user - filter. Some filters accept parameters. The user filter - requires and accepts a mandatory callback parameter - to set the callback previously set through the function mysqlnd_ms_set_user_pick_server. - - The <literal>user</literal> filter replaces <function>mysqlnd_ms_set_user_pick_server</function> - - - - - - - The validity of the configuration file is checked both when reading the - configuration file and later when establishing a connection. The configuration - file is read during PHP request startup. At this early stage a PHP extension - may not display error messages properly. In the worst case, no error - is shown and a connection attempt fails without an adequate error message. - This problem has been cured in version 1.5.0. - - - - Common error message in case of configuration file issues (upto version 1.5.0) - - -]]> - - &example.outputs; - - - - - - - Since version 1.5.0 startup errors are additionally buffered and emitted when - a connection attempt is made. Use the configuration directive - mysqlnd_ms.force_config_usage - to set the error type used to display buffered errors. By default an error - of type E_WARNING will be emitted. - - - - Improved configuration file validation since 1.5.0 - - -]]> - - &example.outputs; - - - - - - - It can be useful to set mysqlnd_ms.force_config_usage = 1 - when debugging potential configuration file errors. This will not only turn the - type of buffered startup errors into E_RECOVERABLE_ERROR but also - help detecting misspelled section names. - - - - Possibly more precise error due to <literal>mysqlnd_ms.force_config_usage=1</literal> - - - - - -]]> - -&example.outputs; - - - - - - -
- -
- Configuration Directives - - - Here is a short explanation of the configuration directives that can be used. - - - - - - master - array or object - - - - List of MySQL replication master servers. The list of either - of the JSON type array to declare an anonymous list - of servers or of the JSON type object. Please, - see above - for examples. - - - Setting at least one master server is mandatory. The plugin will issue an - error of type E_ERROR if the user has failed to - provide a master server list for a configuration section. - The fatal error may read - (mysqlnd_ms) Section [master] doesn't exist for host - [name_of_a_config_section] in %s on line %d. - - - A server is described with - the host, port, - socket, db, - user, password and - connect_flags. It is mandatory to - provide at a value for host. If any of the - other values is not given, it will be taken from the user - API connect call, please, see also: - using section names example. - - - Table of server configuration keywords. - - - - - - - - - Keyword - Description - Version - - - - - - host - - - - Database server host. This is a mandatory setting. - Failing to provide, will cause an error of type E_RECOVERABLE_ERROR - when the plugin tries to connect to the server. The error message may - read (mysqlnd_ms) Cannot find [host] in - [%s] section in config in %s on line %d. - - - Since 1.1.0. - - - - port - - - - Database server TCP/IP port. - - - Since 1.1.0. - - - - socket - - - - Database server Unix domain socket. - - - Since 1.1.0. - - - - db - - - - Database (schemata). - - - Since 1.1.0. - - - - user - - - - MySQL database user. - - - Since 1.1.0. - - - - password - - - - MySQL database user password. - - - Since 1.1.0. - - - - connect_flags - - - - Connection flags. - - - Since 1.1.0. - - - - - - The plugin supports using only one master server. An experimental - setting exists to enable multi-master support. The details are - not documented. The setting is meant for development only. - - - - - - slave - array or object - - - - List of one or more MySQL replication slave servers. The syntax is - identical to setting master servers, please, see - master - above for details. - - - The plugin supports using one or more slave servers. - - - Setting a list of slave servers is mandatory. The plugin will report - an error of the type E_ERROR if slave - is not given for a configuration section. The fatal error message may read - (mysqlnd_ms) Section [slave] doesn't exist for host [%s] in %s on line %d. - Note, that it is valid to use an empty slave server list. - The error has been introduced to prevent accidentally setting no slaves by - forgetting about the slave setting. - A master-only setup is still possible using an empty slave server list. - - - If an empty slave list is configured and an attempt is made to - execute a statement on a slave the plugin may emit a warning like - mysqlnd_ms) Couldn't find the appropriate slave connection. - 0 slaves to choose from. upon statement execution. - It is possible that another warning follows such as - (mysqlnd_ms) No connection selected by the last filter. - - - - - - global_transaction_id_injection - array or object - - - - Global transaction identifier configuration related to both - the use of the server built-in global transaction ID feature and - the client-side emulation. - - - - - - - - - Keyword - Description - Version - - - - - - fetch_last_gtid - - - - SQL statement for accessing the latest global transaction identifier. - The SQL statement is run if the plugin needs to know the most recent - global transaction identifier. This can be the case, for example, when checking - MySQL Replication slave status. - Also used with mysqlnd_ms_get_last_gtid. - - - Since 1.2.0. - - - - check_for_gtid - - - - SQL statement for checking if a replica has replicated - all transactions up to and including ones searched for. The - SQL statement is run when searching for replicas which can offer - a higher level of consistency than eventual consistency. - The statement must contain a placeholder #GTID - which is to be replaced with the global transaction identifier searched - for by the plugin. Please, check the - quickstart for examples. - - - Since 1.2.0. - - - - report_errors - - - - Whether to emit an error of type warning if an issue occurs while - executing any of the configured SQL statements. - - - Since 1.2.0. - - - - on_commit - - - - Client-side global transaction ID emulation only. SQL statement - to run when a transaction finished to update the global transaction - identifier sequence number on the master. Please, see the - quickstart for examples. - - - Since 1.2.0. - - - - wait_for_gtid_timeout - - - - Instructs the plugin to wait up to wait_for_gtid_timeout - seconds for a slave to catch up when searching for slaves that can - deliver session consistency. The setting limits the time spend for - polling the slave status. If polling the status takes very long, the total - clock time spend waiting may exceed wait_for_gtid_timeout. - The plugin calls sleep(1) to sleep one second between - each two polls. - - - The setting can be used both with the plugins client-side emulation - and the server-side global transaction identifier feature of MySQL 5.6. - - - Waiting for a slave to replicate a certain GTID needed for session - consistency also means throttling the client. By throttling the - client the write load on the master is reduced indirectly. A - primary copy based replication system, such as MySQL Replication, - is given more time to reach a consistent state. This can be desired, - for example, to increase the number of data copies for - high availability considerations or to prevent the master from being - overloaded. - - - Since 1.4.0. - - - - - - - - - fabric - object - - - - MySQL Fabric related settings. If the plugin is used together with MySQL - Fabric, then the plugins configuration file no longer contains lists of MySQL servers. - Instead, the plugin will ask MySQL Fabric which list of servers to use to - perform a certain task. - - - A minimum plugin configuration for use with MySQL Fabric contains a list - of one or more MySQL Fabric hosts that the plugin can query. If more - than one MySQL Fabric host is configured, the plugin will use a roundrobin - strategy to choose among them. Other strategies are currently not available. - - - - Minimum pluging configuration for use with MySQL Fabric - - - - - - - Each MySQL Fabric host is described using a JSON object with the following - members. - - - - - - - - - Keyword - Description - Version - - - - - - host - - - - Host name of the MySQL Fabric host. - - - Since 1.6.0. - - - - port - - - - The TCP/IP port on which the MySQL Fabric host listens - for remote procedure calls sent by clients such as - the plugin. - - - Since 1.6.0. - - - - - - The plugin is using PHP streams to communicate with MySQL Fabric - through XML RPC over HTTP. By default no timeouts are set - for the network communication. Thus, the plugin defaults to PHP - stream default timeouts. Those defaults are out of control of - the plugin itself. - - - An optional timeout value can be set to overrule the PHP streams - default timeout setting. Setting the timeout in the plugins - configuration file has the same effect as - setting a timeout for a PHP user space HTTP connection established - through PHP streams. - - - The plugins Fabric timeout value unit is seconds. The allowed value - range is from 0 to 65535. The setting exists since version 1.6. - - - - Optional timeout for communication with Fabric - - - - - - - Transaction stickiness - and MySQL Fabric logic can collide. The stickiness option disables switching - between servers for the duration of a transaction. When using Fabric and - sharding the user may (erroneously) start a local transaction on one share and - then attempt to switch to a different shard using either - mysqlnd_ms_fabric_select_shard or - mysqlnd_ms_fabric_select_global. In this case, the - plugin will not reject the request to switch servers in the middle of a transaction - but allow the user to switch to another server regardless of the transaction - stickiness setting used. It is clearly a user error to write such code. - - - If transaction stickiness is enabled and you would like to get an error of type - warning when calling mysqlnd_ms_fabric_select_shard or - mysqlnd_ms_fabric_select_global, - set the boolean flag trx_warn_server_list_changes. - - - - Warnings about the violation of transaction boundaries - - - - -begin_transaction(); -@$link->query("DROP TABLE IF EXISTS test"); -/* - Switching servers/shards is a mistake due to open - local transaction! -*/ -mysqlnd_ms_select_global($link, 1); -?> -]]> - - &example.outputs; - - - - - - - Please, consider the feature experimental. Changes to syntax and semantics may happen. - - - - - - filters - object - - - - List of filters. A filter is responsible to filter the list of available - servers for executing a given statement. Filters can be chained. - The random and roundrobin filter - replace the - pick[] - directive used in prior version to select a load balancing policy. - The user filter replaces the - mysqlnd_ms_set_user_pick_server function. - - - Filters may accept parameters to refine their actions. - - - If no load balancing policy is set, the plugin will default to - random_once. The random_once - policy picks a random slave server when running the first read-only - statement. The slave server will be used for all read-only - statements until the PHP script execution ends. No load balancing - policy is set and thus, defaulting takes place, - if neither the random nor the - roundrobin are part of a configuration section. - - - If a filter chain is configured so that a filter which output no - more than once server is used as input for a filter which should be given - more than one server as input, the plugin may emit a warning upon - opening a connection. The warning may read: (mysqlnd_ms) Error while creating - filter '%s' . Non-multi filter '%s' already created. - Stopping in %s on line %d. Furthermore, an error of - the error code 2000, the sql state HY000 - and an error message similar to the warning may be set on the connection - handle. - - - - Invalid filter sequence - - - - -query("SELECT 1 FROM DUAL"); -?> -]]> - - &example.outputs; - - - - - - - - - - Filter: random - object - - - - The random filter features the random and random once - load balancing policies, set through the - pick[] - directive in older versions. - - - The random policy will pick a random server whenever - a read-only statement is to be executed. The random once strategy - picks a random slave server once and continues using the slave for the - rest of the PHP web request. Random once is a default, - if load balancing is not configured through a filter. - - - If the random filter is not given any arguments, it - stands for random load balancing policy. - - - - Random load balancing with <literal>random</literal> filter - - - - - - - Optionally, the sticky argument can be passed to the - filter. If the parameter sticky is set to the string - 1, the filter follows the random once - load balancing strategy. - - - - Random once load balancing with <literal>random</literal> filter - - - - - - - Both the random and roundrobin - filters support setting a priority, a weight for a server, since - PECL/mysqlnd_ms 1.4.0. If the weight argument is - passed to the filter, it must assign a weight for all servers. Servers - must be given an alias name in the slave respectively - master server lists. The alias must be used - to reference servers for assigning a priority with weight. - - - - Referencing error - - - - - - - Using a wrong alias name with weight may result in - an error similar to the shown above. - - - If weight is omitted, the default weight of - all servers is one. - - - - Assigning a <literal>weight</literal> for load balancing - - - - - - - At the average a server assigned a weight of two will be selected twice - as often as a server assigned a weight of one. Different weights can be - assigned to reflect differently sized machines, to prefer co-located slaves - which have a low network latency or, to configure a standby failover server. - In the latter case, you may want to assign the standby server a very low - weight in relation to the other servers. For example, given the - configuration above slave3 will get only some eight - percent of the requests in the average. As long as slave1 - and slave2 are running, it will be used sparsely, - similar to a standby failover server. Upon failure of slave1 - and slave2, the usage of slave3 - increases. Please, check the notes on failover before using - weight this way. - - - Valid weight values range from 1 to 65535. - - - Unknown arguments are ignored by the filter. No warning or error is given. - - - The filter expects one or more servers as input. Outputs one server. - A filter sequence such as - random, roundrobin may - cause a warning and an error message to be set on the connection - handle when executing a statement. - - - List of filter arguments. - - - - - - - - - Keyword - Description - Version - - - - - - sticky - - - - Enables or disabled random once load - balancing policy. See above. - - - Since 1.2.0. - - - - weight - - - - Assigns a load balancing weight/priority to - a server. Please, see above for a description. - - - Since 1.4.0. - - - - - - - - - Filter: roundrobin - object - - - - If using the roundrobin filter, the plugin - iterates over the list of configured slave servers to pick a server - for statement execution. If the plugin reaches the end of the list, - it wraps around to the beginning of the list and picks the first - configured slave server. - - - - <literal>roundrobin</literal> filter - - - - - - - Expects one or more servers as input. Outputs one server. - A filter sequence such as - roundrobin, random may - cause a warning and an error message to be set on the connection - handle when executing a statement. - - - List of filter arguments. - - - - - - - - - Keyword - Description - Version - - - - - - weight - - - - Assigns a load balancing weight/priority to - a server. Please, find a description - above. - - - Since 1.4.0. - - - - - - - - - Filter: user - object - - - - The user replaces - mysqlnd_ms_set_user_pick_server function, - which was removed in 1.1.0-beta. The filter sets a callback for user-defined - read/write splitting and server selection. - - - The plugins built-in read/write query split mechanism decisions can be - overwritten in two ways. The easiest way is to prepend a query string - with the SQL hints MYSQLND_MS_MASTER_SWITCH, - MYSQLND_MS_SLAVE_SWITCH or - MYSQLND_MS_LAST_USED_SWITCH. Using SQL hints one can - control, for example, whether a query shall be send to the MySQL replication - master server or one of the slave servers. By help of SQL hints it is - not possible to pick a certain slave server for query execution. - - - Full control on server selection can be gained using a callback function. - Use of a callback is recommended to expert users only because the callback - has to cover all cases otherwise handled by the plugin. - - - The plugin will invoke the callback function for selecting a server from the - lists of configured master and slave servers. The callback function - inspects the query to run and picks a server for query execution by returning - the hosts URI, as found in the master and slave list. - - - If the lazy connections are enabled and the callback chooses a slave server for - which no connection has been established so far and establishing the connection - to the slave fails, the plugin will return an error upon the next action - on the failed connection, for example, when running a query. It is the - responsibility of the application developer to handle the error. For example, - the application can re-run the query to trigger a new server selection and - callback invocation. If so, the callback must make sure to select - a different slave, or check slave availability, before returning to - the plugin to prevent an endless loop. - - - - Setting a callback - - - - - - - The callback is supposed to return a host to run the query on. - The host URI is to be taken from the master and slave connection lists - passed to the callback function. If callback returns a value neither - found in the master nor in the slave connection lists the plugin - will emit an error of the type E_RECOVERABLE_ERROR - The error may read like - (mysqlnd_ms) User filter callback has returned an unknown server. - The server 'server that is not in master or slave list' can neither be found - in the master list nor in the slave list. - If the application catches the error to ignore it, follow up errors - may be set on the connection handle, for example, - (mysqlnd_ms) No connection selected by the last filter with - the error code 2000 and the sqlstate HY000. - Furthermore a warning may be emitted. - - - Referencing a non-existing function as a callback will result - in any error of the type E_RECOVERABLE_ERROR whenever - the plugin tries to callback function. The error message may reads like: - (mysqlnd_ms) Specified callback (pick_server) is - not a valid callback. If the application catches the error to - ignore it, follow up errors may be set on the connection handle, for example, - (mysqlnd_ms) Specified callback (pick_server) is - not a valid callback with the error code 2000 - and the sqlstate HY000. Furthermore a warning - may be emitted. - - - The following parameters are passed from the plugin to the callback. - - - - - - - - - Parameter - Description - Version - - - - - - connected_host - - - - URI of the currently connected database server. - - - Since 1.1.0. - - - - query - - - - Query string of the statement for which a server needs - to be picked. - - - Since 1.1.0. - - - - masters - - - - List of master servers to choose from. Note, that the list of master - servers may not be identical to the list of configured master - servers if the filter is not the first in the filter chain. - Previously run filters may have reduced the master - list already. - - - Since 1.1.0. - - - - slaves - - - - List of slave servers to choose from. Note, that the list of slave - servers may not be identical to the list of configured slave - servers if the filter is not the first in the filter chain. - Previously run filters may have reduced the slave - list already. - - - Since 1.1.0. - - - - last_used_connection - - - - URI of the server of the connection used to execute the previous - statement on. - - - Since 1.1.0. - - - - in_transaction - - - - Boolean flag indicating whether the statement is - part of an open transaction. If autocommit mode is turned - off, this will be set to &true;. Otherwise - it is set to &false;. - - - Transaction detection is based on monitoring the - mysqlnd library call set_autocommit. - Monitoring is not possible before PHP 5.4.0. Please, see - connection pooling and switching - concepts discussion for further details. - - - Since 1.1.0. - - - - - - - Using a callback - - - - -query("SELECT 1 FROM DUAL"))) - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -else - $res->close(); - -if (!($res = $mysqli->query("SELECT 2 FROM DUAL"))) - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -else - $res->close(); - - -if (!($res = $mysqli->query("SELECT * FROM table_on_slave_a_only"))) - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); -else - $res->close(); - -$mysqli->close(); -?> -]]> - - &example.outputs; - - - - - - - - - - Filter: user_multi - object - - - - The user_multi differs from the user - only in one aspect. Otherwise, their syntax is identical. - The user filter must pick - and return exactly one node for statement execution. A filter chain - usually ends with a filter that emits only one node. The filter chain - shall reduce the list of candidates for statement execution down to - one. This, only one node left, is the case after the user - filter has been run. - - - The user_multi filter is a multi filter. It returns a - list of slave and a list of master servers. This list needs further filtering - to identify exactly one node for statement execution. A multi filter is typically - placed at the top of the filter chain. The quality_of_service - filter is another example of a multi filter. - - - The return value of the callback set for user_multi must - be an array with two elements. The first element holds a list of selected master - servers. The second element contains a list of selected slave servers. The - lists shall contain the keys of the slave and master servers as found in - the slave and master lists passed to the callback. The below example returns - random master and slave lists extracted from the functions input. - - - - Returning random masters and slaves - - $value) { - if (mt_rand(0, 2) > 1) - $picked_masters[] = $key; - } - $picked_slaves = array() - foreach ($slaves as $key => $value) { - if (mt_rand(0, 2) > 1) - $picked_slaves[] = $key; - } - return array($picked_masters, $picked_slaves); -} -?> -]]> - - - - - The plugin will issue an - error of type E_RECOVERABLE if the callback fails to return - a server list. The error may read (mysqlnd_ms) User multi - filter callback has not returned a list of servers to use. - The callback must return an array in %s on line %d. In case the - server list is not empty but has invalid servers key/ids in it, an error - of type E_RECOVERABLE will the thrown with an - error message like (mysqlnd_ms) User multi filter callback - has returned an invalid list of servers to use. - Server id is negative in %s on line %d, or similar. - - - Whether an error is emitted in case of an empty slave or master list - depends on the configuration. If an empty master list is returned - for a write operation, it is likely that the plugin will emit a - warning that may read (mysqlnd_ms) Couldn't find the appropriate - master connection. 0 masters to choose from. Something is wrong in %s on line %d. - Typically a follow up error of type E_ERROR will happen. - In case of a read operation and an empty slave list the behavior depends - on the fail over configuration. If fail over to master is enabled, no - error should appear. If fail over to master is deactivated the plugin will - emit a warning that may read (mysqlnd_ms) Couldn't find the appropriate - slave connection. 0 slaves to choose from. Something is wrong in %s on line %d. - - - - - - - Filter: node_groups - object - - - - The node_groups filter lets you group cluster nodes - and query selected groups, for example, to support data partitioning. - Data partitioning can be required for manual sharding, primary copy based - clusters running multiple masters, or to avoid hot spots in update everywhere - clusters that have no built-in partitioning. The filter is a multi filter - which returns zero, one or multiple of its input servers. Thus, it - must be followed by other filters to reduce the number of candidates - down to one for statement execution. - - - - - - - - - Keyword - Description - Version - - - - - - user defined node group name - - - - One or more node groups must be defined. A node group can have an - arbitrary user defined name. The name is used in combination with - a SQL hint to restrict query execution to the nodes listed for the - node group. To run a query on any of the servers of a node group, - the query must begin with the SQL hint - /*user defined node group name*/. - Please note, no white space is allowed around - user defined node group name. Because - user defined node group name is used as-is - as part of a SQL hint, you should choose the name that is compliant - with the SQL language. - - - Each node group entry must contain a list of master - servers. Additional slave servers are allowed. - Failing to provide a list of master for a node group - name_of_group may cause an - error of type E_RECOVERABLE_ERROR like - (mysqlnd_ms) No masters configured in node group 'name_of_group' for 'node_groups' filter. - - - The list of master and slave servers must reference corresponding - entries in the - global master - respectively slave - server list. Referencing an unknown server in either of the both server - lists may cause an E_RECOVERABLE_ERROR error like - (mysqlnd_ms) Unknown master 'server_alias_name' (section 'name_of_group') in 'node_groups' filter configuration. - - - - Manual partitioning - - - - - - - Please note, if a filter chain - generates an empty slave list and the PHP configuration directive - mysqlnd_ms.multi_master=0 is used, the plugin may - emit a warning. - - - Since 1.5.0. - - - - - - - - - - Filter: quality_of_service - object - - - - The quality_of_service identifies cluster nodes - capable of delivering a certain quality of service. It is a multi filter - which returns zero, one or multiple of its input servers. Thus, it - must be followed by other filters to reduce the number of candidates - down to one for statement execution. - - - The quality_of_service filter has been introduced in 1.2.0-alpha. - In the 1.2 series the filters focus is on the consistency aspect of - service quality. Different types of clusters offer different - default data consistencies. For example, an asynchronous MySQL - replication slave offers eventual consistency. The slave may not - be able to deliver requested data because it has not replicated the write, - it may serve stale database because its lagging behind or it may serve - current information. Often, this is acceptable. In some cases - higher consistency levels are needed for the application to work correct. - In those cases, the quality_of_service can filter out cluster nodes - which cannot deliver the necessary quality of service. - - - The quality_of_service filter can be replaced or created - at runtime. A successful call to - mysqlnd_ms_set_qos - removes all existing qos filter entries from the - filter list and installs a new one at the very beginning. All settings - that can be made through - mysqlnd_ms_set_qos - can also be in the plugins configuration file. However, use of the function - is by far the most common use case. Instead of setting session consistency and - strong consistency service levels in the plugins configuration file it is - recommended to define only masters and no slaves. Both service levels will - force the use of masters only. Using an empty slave list shortens the - configuration file, thus improving readability. The only service level for which - there is a case of defining in the plugins configuration file is the combination - of eventual consistency and maximum slave lag. - - - - - - - - - Keyword - Description - Version - - - - - - eventual_consistency - - - - Request eventual consistency. Allows the use of all - master and slave servers. Data returned may or may not be current. - - - Eventual consistency accepts an optional age - parameter. If age is given the plugin considers - only slaves for reading for which MySQL replication reports - a slave lag less or equal to age. - The replication lag is measure using SHOW SLAVE STATUS. - If the plugin fails to fetch the replication lag, the slave tested - is skipped. Implementation details and tips are given in the - quality of service concepts section. - - - Please note, if a filter chain - generates an empty slave list and the PHP configuration directive - mysqlnd_ms.multi_master=0 is used, the plugin may - emit a warning. - - - - Global limit on slave lag - - - - - - - Since 1.2.0. - - - - session_consistency - - - - Request session consistency (read your writes). Allows use of all masters - and all slaves which are in sync with the master. - If no further parameters are given slaves are filtered out - as there is no reliable way to test if a slave has caught up - to the master or is lagging behind. Please note, if a filter chain - generates an empty slave list and the PHP configuration directive - mysqlnd_ms.multi_master=0 is used, the plugin may - emit a warning. - - - Session consistency temporarily requested using - mysqlnd_ms_set_qos is a valuable alternative - to using master_on_write. - master_on_write is likely to send more statements - to the master than needed. The application may be able to continue - operation at a lower consistency level after it has done - some critical reads. - - - Since 1.1.0. - - - - strong_consistency - - - - Request strong consistency. Only masters will be used. - - - Since 1.2.0. - - - - - - - - - - failover - Up to and including 1.3.x: string. - Since 1.4.0: object. - - - - Failover policy. Supported policies: - disabled (default), master, - loop_before_master (Since 1.4.0). - - - If no failover policy is set, the plugin will not do any - automatic failover (failover=disabled). Whenever - the plugin fails to connect a server it will emit a warning and - set the connections error code and message. Thereafter it is up to - the application to handle the error and, for example, resent the - last statement to trigger the selection of another server. - - - Please note, the automatic failover logic is applied when opening - connections only. Once a connection has been opened no automatic attempts - are made to reopen it in case of an error. If, for example, the server - a connection is connected to is shut down and the user attempts to - run a statement on the connection, no automatic failover - will be tried. Instead, an error will be reported. - - - If using failover=master the plugin will implicitly - failover to a master, if available. Please check the - concepts documentation to learn about potential - pitfalls and risks of using failover=master. - - - - Optional master failover when failing to connect to slave (PECL/mysqlnd_ms < 1.4.0) - - - - - - - Since PECL/mysqlnd_ms 1.4.0 the failover configuration keyword refers to an - object. - - - - New syntax since 1.4.0 - - - - - - - - - - - - - Keyword - Description - Version - - - - - - strategy - - - - Failover policy. Possible values: - disabled (default), master, - loop_before_master - - - A value of disabled disables automatic failover. - - - Setting master instructs the plugin to try - to connect to a master in case of a slave connection error. If the - master connection attempt fails, the plugin exists the failover - loop and returns an error to the user. - - - If using loop_before_master and a slave request - is made, the plugin tries to connect to other slaves before failing - over to a master. If multiple master are given and multi master is enabled, - the plugin also loops over the list of masters and attempts to connect - before returning an error to the user. - - - Since 1.4.0. - - - - remember_failed - - - - Remember failures for the duration of a web request. Default: - false. - - - If set to true the plugin will remember failed - hosts and skip the hosts in all future load balancing made for - the duration of the current web request. - - - - Since 1.4.0. The feature is only available together - with the random and roundrobin - load balancing filter. Use of the setting is recommended. - - - - - max_retries - - - - Maximum number of connection attempts before skipping host. - Default: 0 (no limit). - - - The setting is used to prevent hosts from being dropped of the - host list upon the first failure. If set to n > 0, - the plugin will keep the node in the node list even after a failed - connection attempt. The node will not be removed immediately from the slave respectively - master lists after the first connection failure but instead be tried to - connect to up to n times in future load balancing rounds - before being removed. - - - - Since 1.4.0. The feature is only available together - with the random and roundrobin - load balancing filter. - - - - - - - Setting failover to any other value but - disabled, master or - loop_before_master - will not emit any warning or error. - - - - - - - lazy_connections - bool - - - - Controls the use of lazy connections. Lazy connections - are connections which are not opened before the client sends the first - connection. Lazy connections are a default. - - - It is strongly recommended to use lazy connections. - Lazy connections help to keep the number of open connections low. - If you disable lazy connections and, for example, configure one MySQL - replication master server and two MySQL replication slaves, the - plugin will open three connections upon the first call to a - connect function although the application might use the master - connection only. - - - Lazy connections bare a risk if you make heavy use of actions - which change the state of a connection. The plugin does not dispatch - all state changing actions to all connections from the connection pool. - The few dispatched actions are applied to already opened connections - only. Lazy connections opened in the future are not affected. - Only some settings are "remembered" and applied when lazy - connections are opened. - - - - Disabling lazy connection - - - - - - - Please, see also server_charset to overcome potential - problems with string escaping and servers using different default - charsets. - - - - - - - server_charset - string - - - - The setting has been introduced in 1.4.0. It is recommended to set it - if using lazy connections. - - - The server_charset setting serves two purposes. It - acts as a fallback charset to be used for string escaping done before - a connection has been established and it helps to avoid escaping pitfalls - in heterogeneous environments which servers using different default charsets. - - - String escaping takes a connections charset into account. String escaping - is not possible before a connection has been opened and the connections - charset is known. The use of lazy connections delays the actual opening - of connections until a statement is send. - - - An application using lazy connections may attempt to escape a string - before sending a statement. In fact, this should be a common case as - the statement string may contain the string that is to be escaped. - However, due to the lazy connection feature no connection has been opened - yet and escaping fails. The plugin may report an error of the type - E_WARNING and a message like (mysqlnd_ms) - string escaping doesn't work without established connection. - Possible solution is to add server_charset to your configuration - to inform you of the pitfall. - - - Setting server_charset makes the plugin use - the given charset for string escaping done on lazy connection handles - before establishing a network connection to MySQL. Furthermore, the - plugin will enforce the use of the charset when the connection is - established. - - - Enforcing the use of the configured charset used for escaping is done - to prevent tapping into the pitfall of using a different charset for - escaping than used later for the connection. This has the additional - benefit of removing the need to align the charset configuration of all - servers used. No matter what the default charset on any of the servers is, - the plugin will set the configured one as a default. - - - The plugin does not stop the user from changing the charset at any time - using the set_charset call or corresponding SQL statements. - Please, note that the use of SQL is not recommended as it cannot be monitored - by the plugin. The user can, for example, change the charset on a - lazy connection handle after escaping a string and before the actual connection - is opened. The charset set by the user will be used for any subsequent escaping - before the connection is established. The connection will be established - using the configured charset, no matter what the server charset is or - what the user has set before. Once a connection has been opened, - set_charset is of no meaning anymore. - - - - String escaping on a lazy connection handle - - - - -real_escape("this will be escaped using the server_charset setting - utf8mb4"); -$mysqli->set_charset("latin1"); -$mysqli->real_escape("this will be escaped using latin1"); -/* server_charset implicitly set - utf8mb4 connection */ -$mysqli->query("SELECT 'This connection will be set to server_charset upon establishing' AS _msg FROM DUAL"); -/* latin1 used from now on */ -$mysqli->set_charset("latin1"); -?> -]]> - - - - - - - - - master_on_write - bool - - - - If set, the plugin will use the master server only after the - first statement has been executed on the master. Applications - can still send statements to the slaves using SQL hints to - overrule the automatic decision. - - - The setting may help with replication lag. If an application runs - an INSERT the plugin will, by default, use the - master to execute all following statements, including - SELECT statements. This helps to avoid problems - with reads from slaves which have not replicated the - INSERT yet. - - - - Master on write for consistent reads - - - - - - - Please, note the quality_of_service filter introduced - in version 1.2.0-alpha. It gives finer control, for example, for achieving read-your-writes - and, it offers additional functionality introducing - service levels. - - - All transaction stickiness settings, - including trx_stickiness=on, are overruled by master_on_write=1. - - - - - - - trx_stickiness - string - - - - Transaction stickiness policy. Supported policies: - disabled (default), master. - - - The setting requires 5.4.0 or newer. If used with PHP older than 5.4.0, - the plugin will emit a warning like - (mysqlnd_ms) trx_stickiness strategy is not supported before PHP 5.3.99. - - - If no transaction stickiness policy is set or, - if setting trx_stickiness=disabled, - the plugin is not transaction aware. Thus, the plugin may load balance - connections and switch connections in the middle of a transaction. - The plugin is not transaction safe. SQL hints must be used - avoid connection switches during a transaction. - - - As of PHP 5.4.0 the mysqlnd library allows the plugin to monitor - the autocommit mode set by calls to the - libraries set_autocommit() function. - If setting set_stickiness=master and - autocommit gets disabled by a PHP MySQL extension - invoking the mysqlnd library internal - function call set_autocommit(), the plugin is made - aware of the begin of a transaction. Then, the plugin stops load balancing - and directs all statements to the master server until - autocommit is enabled. Thus, no SQL hints are required. - - - An example of a PHP MySQL API function calling the mysqlnd - library internal function call set_autocommit() is - mysqli_autocommit. - - - Although setting trx_stickiness=master, the plugin - cannot be made aware of autocommit mode changes caused - by SQL statements such as SET AUTOCOMMIT=0 or BEGIN. - - - As of PHP 5.5.0, the mysqlnd library features additional C API calls to - control transactions. The level of control matches the one offered by SQL - statements. The mysqli API has been modified to use - these calls. Since version 1.5.0, PECL/mysqlnd_ms can monitor not only - mysqli_autocommit, but also mysqli_begin, - mysqli_commit and mysqli_rollback to - detect transaction boundaries and stop load balancing for the duration of - a transaction. - - - - Using master to execute transactions - - - - - - - Since version 1.5.0 automatic and silent failover is disabled for the - duration of a transaction. If the boundaries of a transaction have been - properly detected, transaction stickiness is enabled and a server fails, - the plugin will not attempt to fail over to the next server, if any, regardless - of the failover policy configured. The user must handle the error - manually. Depending on the configuration, the plugin may emit - an error of type E_WARNING reading like - (mysqlnd_ms) Automatic failover is not permitted in the middle of a transaction. - This error may then be overwritten by follow up errors such as - (mysqlnd_ms) No connection selected by the last filter. - Those errors will be generated by the failing query function. - - - - No automatic failover, error handling pitfall - -autocommit(false); - -/* assumption: server fails */ -if (!($res = $mysqli->query("SELECT 'Assume this query fails' AS _msg FROM DUAL"))) { - /* handle failure of transaction, plugin internal state is still in_trx = 1 */ - printf("[%d] %s", $mysqli->errno, $mysqli->error); - /* - If using autocommit() based transaction detection it is a - MUST to call autocommit(true). Otherwise the plugin assumes - the current transaction continues and connection - changes remain forbidden. - */ - $mysqli->autocommit(true); - /* Likewise, you'll want to start a new transaction */ - $mysqli->autocommit(false); -} -/* latin1 used from now on */ -$mysqli->set_charset("latin1"); -?> -]]> - - - - - If a server fails in the middle of a transaction the - plugin continues to refuse to switch connections until the - current transaction has been finished. Recall - that the plugin monitors API calls to detect transaction - boundaries. Thus, you have to, for example, enable - auto commit mode to end the current transaction before - the plugin continues load balancing and switches the server. - Likewise, you will want to start a new transaction - immediately thereafter and disable auto commit mode again. - - - Not handling failed queries and not ending a failed transaction - using API calls may cause all following commands emit errors - such as Commands out of sync; you can't run this command now. - Thus, it is important to handle all errors. - - - - - - - transient_error - object - - - - The setting has been introduced in 1.6.0. - - - A database cluster node may reply a transient error to a client. The client - can then repeat the operation on the same node, fail over to a different node - or abort the operation. Per definition is it safe for a client to - retry the same operation on the same node before giving up. - - - PECL/mysqlnd_ms can perform the retry - loop on behalf of the application. - By configuring transient_error the plugin can be - instructed to repeat operations failing with a certain error code for - a certain maximum number of times with a pause between the retries. - If the transient error disappears during loop execution, it is - hidden from the application. Otherwise, the error is - forwarded to the application by the end of the loop. - - - - Retry loop for transient errors - - - - - - - - - - - - - Keyword - Description - Version - - - - - - mysql_error_codes - - - - List of transient error codes. You may add any MySQL error code - to the list. It is possible to consider any error as transient - not only 1297 - (HY000 (ER_GET_TEMPORARY_ERRMSG), - Message: Got temporary error %d '%s' from %s). - Before adding other codes but 1297 to the list, - make sure your cluster supports a new attempt without impacting - the state of your application. - - - Since 1.6.0. - - - - max_retries - - - - How often to retry an operation which - fails with a transient error before forwarding the - failure to the user. - - - Default: 1 - - - Since 1.6.0. - - - - usleep_retry - - - - Milliseconds to sleep between transient error retries. - The value is passed to the C function usleep, - hence the name. - - - Default: 100 - - - Since 1.6.0. - - - - - - - - - - xa - object - - - - The setting has been introduced in 1.6.0. - - - - Experimental - - The feature is currently under development. There may be issues and/or - feature limitations. Do not use in production environments. - - - - - - state_store - - - - record_participant_credentials - - - Whether to store the username and password of a global transaction - participant in the participants table. If disabled, the garbage - collection will use the default username and password when connecting - to the participants. Unless you are using a different username and - password for each of your MySQL servers, you can use the default - and avoid storing the sensible information in state store. - - - Please note, username and password are stored in clear text when using - the MySQL state store, which is the only one available. It is in your - responsibility to protect this sensible information. - - - Default: false - - - - - participant_localhost_ip - - - During XA garbage collection the plugin may find a participant server - for which the host localhost - has been recorded. If the garbage collection takes place on another host - but the host that has written the participant record to the state store, - the host name localhost now resolves to a different - host. Therefore, when recording a participant servers host name - in the state store, a value of localhost must - be replaced with the actual IP address of localhost. - - - Setting participant_localhost_ip should be considered - only if using localhost cannot be avoided. - From a garbage collection point of view only, it is preferrable not to - configure any socket connection but to provide an IP address and port - for a node. - - - - - mysql - - - The MySQL state store is the only state store available. - - - - global_trx_table - - - Name of the MySQL table used to store the state of an ongoing or aborted - global transaction. Use the below SQL statement to create the table. - Make sure to edit the table name to match your configuration. - - - Default: mysqlnd_ms_xa_trx - - - - SQL definition for the MySQL state store transaction table - - - - - - - - - participant_table - - - Name of the MySQL table used to store participants of an ongoing or aborted - global transaction. Use the below SQL statement to create the table. - Make sure to edit the table name to match your configuration. - - - Storing credentials can be enabled and disabled using - record_participant_credentials - - - Default: mysqlnd_ms_xa_participants - - - SQL definition for the MySQL state store transaction table - - - - - - - - garbage_collection_table - - - Name of the MySQL table used to track and synchronize garbage collection runs. - Use the below SQL statement to create the table. - Make sure to edit the table name to match your configuration. - - - Default: mysqlnd_ms_xa_gc - - - SQL definition for the MySQL state store garbage collection table - - - - - - - - host - - - Host name of the MySQL server. - - - - - user - - - Name of the user used to connect to the MySQL server. - - - - - password - - - Password for the MySQL server user. - - - - - db - - - Database that holds the garbage collection tables. - Please note, you have to create the garbage collection - tables prior to using the plugin. The tables will not be - created implicitly during runtime but garbage collection - will fail if the tables to not exist. - - - - - port - - - Port of the MySQL server. - - - - - socket - - - Unix domain socket of the MySQL server. Please note, - if you have multiple PHP servers each of them will - try to carry out garbage collection and need to be able - to connect to the state store. In this case, you may - prefer configuring an IP address and a port for - the MySQL state store server to ensure all PHP servers - can reach it. - - - - - - - - - - - rollback_on_close - - - Whether to automatically rollback an open global transaction when - a connection is closed. If enabled, it mimics the default behaviour - of local transactions. Should a client disconnect, the server rolls - back any open and unfinished transactions. - - - Default: true - - - - - garbage_collection - - - - max_retries - - - Maximum number of garbage collection runs before giving up. - Allowed values are from 0 to 100. - A setting of 0 means no limit, unless - the state store enforces a limit. Should the state store enforce a limit, - it can be supposed to be significantly higher than 100. - Available since 1.6.0. - - - Please note, it is important to end failed XA - transactions within reasonable time to make participating servers - free resources bound to the transaction. The built-in garbage - collection is not expected to fail for a long period as - long as crashed servers become available again quickly. - Still, a situation may arise where a human is required to - act because the built-in garbage collection stopped or failed. - In this case, you may first want to check if the transaction still - cannot be fixed by forcing mysqlnd_ms_xa_gc - to ignore the setting, prior to handling it manually. - - - Default: 5 - - - - - probability - - - Garbage collection probability. - Allowed values are from 0 to 1000. - A setting of 0 disables automatic background - garbage collection. Despite a setting of 0 it is - still possible to trigger garbage collection by calling - mysqlnd_ms_gc. - Available since 1.6.0. - - - The automatic garbage collection of stalled XA transaction is only - available if a state store have been configured. The state store - is responsible to keep track of XA transactions. Based on its recordings - it can find blocked XA transactions where the client has crashed, - connect to the participants and rollback the unfinished transactions. - - - The garbage collection is triggered as part of PHP's request shutdown - procedure at the end of a web request. That is after your PHP script - has finished working. Do decide whether to run the garbage collection - a random value between 0 and 1000 - is computed. If the probability value is higher - or equal to the random value, the state stores garbage collection routines - are invoked. - - - Default: 5 - - - - - max_transactions_per_run - - - Maximum number of unfinished XA transactions considered - by the garbage collection during one run. - Allowed values are from 1 to 32768. - Available since 1.6.0. - - - Cleaning up an unfinished XA transaction takes considerable - amounts of time and resources. The garbage collection routine - may have to connect to several participants of a failed global - transaction to issue the SQL commands for rolling back - the unfinished tranaction. - - - Default: 100 - - - - - - - - - - - -
- -
- Plugin configuration file (<= 1.0.x) - - - The below description applies to PECL/mysqlnd_ms < 1.1.0-beta. - It is not valid for later versions. - - - - The plugin is using its own configuration file. The configuration file - holds information on the MySQL replication master server, - the MySQL replication slave servers, the server pick (load balancing) policy, - the failover strategy and the use of lazy connections. - - - The PHP configuration directive - mysqlnd_ms.ini_file - is used to set the plugins configuration file. - - - The configuration file mimics standard the php.ini format. - It consists of one or more sections. Every section defines its own unit - of settings. There is no global section for setting defaults. - - - Applications reference sections by their name. Applications use section names - as the host (server) parameter to the various connect methods of the - mysqli, - mysql and - PDO_MYSQL extensions. Upon connect - the mysqlnd plugin compares the hostname - with all section names from the plugin configuration file. If hostname and - section name match, the plugin will load the sections settings. - - - - Using section names example - - - - - -]]> - - - - - Section names are strings. It is valid to use a section name such as - 192.168.2.1, 127.0.0.1 or - localhost. If, for example, an application - connects to localhost and a plugin - configuration section [localhost] exists, the - semantics of the connect operation are changed. The application will - no longer only use the MySQL server running on the host - localhost but the plugin will start to load balance - MySQL queries following the rules from the [localhost] - configuration section. This way you can load balance queries from - an application without changing the applications source code. - - - The master[], slave[] - and pick[] configuration directives use a list-like syntax. - Configuration directives supporting list-like syntax may appear multiple - times in a configuration section. The plugin maintains the order in - which entries appear when interpreting them. For example, - the below example shows two slave[] configuration - directives in the configuration section [myapp]. - If doing round-robin load balancing for read-only queries, the plugin - will send the first read-only query to the MySQL server - mysql_slave_1 because it is the first in the list. - The second read-only query will be send to the MySQL server - mysql_slave_2 because it is the second in the list. - Configuration directives supporting list-like syntax result are ordered - from top to bottom in accordance to their appearance within a configuration - section. - - - - List-like syntax - - - - - - - Here is a short explanation of the configuration directives that can be used. - - - - - - master[] - string - - - - URI of a MySQL replication master server. The URI follows the syntax - hostname[:port|unix_domain_socket]. - - - The plugin supports using only one master server. - - - Setting a master server is mandatory. The plugin will report a - warning upon connect if the user has failed to provide a master - server for a configuration section. - The warning may read - (mysqlnd_ms) Cannot find master section in config. - Furthermore the plugin may set an error code for the connection handle such as - HY000/2000 (CR_UNKNOWN_ERROR). The corresponding error - message depends on your language settings. - - - - - - slave[] - string - - - - URI of one or more MySQL replication slave servers. The URI follows the syntax - hostname[:port|unix_domain_socket]. - - - The plugin supports using one or more slave servers. - - - Setting a slave server is mandatory. The plugin will report a - warning upon connect if the user has failed to provide at least one slave - server for a configuration section. The warning may read - (mysqlnd_ms) Cannot find slaves section in config. - Furthermore the plugin may set an error code for the connection handle such as - HY000/2000 (CR_UNKNOWN_ERROR). The corresponding error - message depends on your language settings. - - - - - - pick[] - string - - - - Load balancing (server picking) policy. Supported policies: - random, random_once (default), - roundrobin, user. - - - If no load balancing policy is set, the plugin will default to - random_once. The random_once - policy picks a random slave server when running the first read-only - statement. The slave server will be used for all read-only - statements until the PHP script execution ends. - - - The random policy will pick a random server whenever - a read-only statement is to be executed. - - - If using - roundrobin the plugin iterates over the list of - configured slave servers to pick a server for statement execution. - If the plugin reaches the end of the list, it wraps around to the beginning - of the list and picks the first configured slave server. - - - Setting more than one load balancing policy for a configuration - section makes only sense in conjunction with user - and mysqlnd_ms_set_user_pick_server. If the - user defined callback fails to pick a server, the plugin falls - back to the second configured load balancing policy. - - - - - - failover - string - - - - Failover policy. Supported policies: - disabled (default), master. - - - If no failover policy is set, the plugin will not do any - automatic failover (failover=disabled). Whenever - the plugin fails to connect a server it will emit a warning and - set the connections error code and message. Thereafter it is up to - the application to handle the error and, for example, resent the - last statement to trigger the selection of another server. - - - If using failover=master the plugin will implicitly - failover to a slave, if available. Please check the - concepts documentation to learn about potential - pitfalls and risks of using failover=master. - - - - - - lazy_connections - bool - - - - Controls the use of lazy connections. Lazy connections - are connections which are not opened before the client sends the first - connection. - - - It is strongly recommended to use lazy connections. - Lazy connections help to keep the number of open connections low. - If you disable lazy connections and, for example, configure one MySQL - replication master server and two MySQL replication slaves, the - plugin will open three connections upon the first call to a - connect function although the application might use the master - connection only. - - - Lazy connections bare a risk if you make heavy use of actions - which change the state of a connection. The plugin does not dispatch - all state changing actions to all connections from the connection pool. - The few dispatched actions are applied to already opened connections - only. Lazy connections opened in the future are not affected. - If, for example, the connection character set is changed using a - PHP MySQL API call, the plugin will change the character set of all - currently opened connection. It will not remember the character set - change to apply it on lazy connections opened in the future. As a - result the internal connection pool would hold connections using - different character sets. This is not desired. Remember that character - sets are taken into account for escaping. - - - - - - master_on_write - bool - - - - If set, the plugin will use the master server only after the - first statement has been executed on the master. Applications - can still send statements to the slaves using SQL hints to - overrule the automatic decision. - - - The setting may help with replication lag. If an application runs - an INSERT the plugin will, by default, use the - master to execute all following statements, including - SELECT statements. This helps to avoid problems - with reads from slaves which have not replicated the - INSERT yet. - - - - - - trx_stickiness - string - - - - Transaction stickiness policy. Supported policies: - disabled (default), master. - - - Experimental feature. - - - The setting requires 5.4.0 or newer. If used with PHP older than 5.4.0, - the plugin will emit a warning like - (mysqlnd_ms) trx_stickiness strategy is not supported before PHP 5.3.99. - - - If no transaction stickiness policy is set or, - if setting trx_stickiness=disabled, - the plugin is not transaction aware. Thus, the plugin may load balance - connections and switch connections in the middle of a transaction. - The plugin is not transaction safe. SQL hints must be used - avoid connection switches during a transaction. - - - As of PHP 5.4.0 the mysqlnd library allows the plugin to monitor - the autocommit mode set by calls to the - libraries trx_autocommit() function. - If setting trx_stickiness=master and - autocommit gets disabled by a PHP MySQL extension - invoking the mysqlnd library internal - function call trx_autocommit(), the plugin is made - aware of the begin of a transaction. Then, the plugin stops load balancing - and directs all statements to the master server until - autocommit is enabled. Thus, no SQL hints are required. - - - An example of a PHP MySQL API function calling the mysqlnd - library internal function call trx_autocommit() is - mysqli_autocommit. - - - Although setting trx_stickiness=master, the plugin - cannot be made aware of autocommit mode changes caused - by SQL statements such as SET AUTOCOMMIT=0. - - - - - -
- -
- Testing - - - The section applies to mysqlnd_ms 1.1.0 or newer, not the 1.0 series. - - - - The PECL/mysqlnd_ms test suite is in the tests/ - directory of the source distribution. The test suite consists of standard - phpt tests, which are described on the PHP Quality Assurance Teams website. - - - Running the tests requires setting up one to four MySQL servers. Some tests don't - connect to MySQL at all. Others require one server for testing. Some require - two distinct servers. In some cases two servers are used to emulate a - replication setup. In other cases a master and a slave of an existing MySQL replication - setup are required for testing. The tests will try to detect how many servers - and what kind of servers are given. If the required servers are not found, the - test will be skipped automatically. - - - Before running the tests, edit tests/config.inc to - configure the MySQL servers to be used for testing. - - - The most basic configuration is as follows. - - - - - - MYSQL_TEST_HOST, MYSQL_TEST_PORT and - MYSQL_TEST_SOCKET define the hostname, - TCP/IP port and Unix domain socket of the default database server. - MYSQL_TEST_USER and MYSQL_TEST_PASSWD - contain the user and password needed to connect to the database/schema - configured with MYSQL_TEST_DB. All configured - servers must have the same database user configured to give access to - the test database. - - - Using host, host:port or host:/path/to/socket - syntax one can set an alternate host, host and port or host and socket for any - of the servers. - - - - -
- -
- Debugging and Tracing - - The mysqlnd debug log can be used to debug and trace the actitivities of - PECL/mysqlnd_ms. As a mysqlnd PECL/mysqlnd_ms adds trace information to the - mysqlnd library debug file. Please, see the - mysqlnd.debug - PHP configuration directive documentation for a detailed description - on how to configure the debug log. - - - Configuration setting example to activate the debug log: - - - - - - This feature is only available with a debug build of PHP. Works - on Microsoft Windows if using a debug build of PHP and PHP was - built using Microsoft Visual C version 9 and above. - - - - - The debug log shows mysqlnd library and PECL/mysqlnd_ms plugin function calls, - similar to a trace log. Mysqlnd library calls are usually prefixed with - mysqlnd_. PECL/mysqlnd internal calls begin with - mysqlnd_ms. - - - Example excerpt from the debug log (connect): - -mysqlnd_connect -| info : host=myapp user=root db=test port=3306 flags=131072 -| >mysqlnd_ms::connect -| | >mysqlnd_ms_config_json_section_exists -| | | info : section=[myapp] len=[5] -| | | >mysqlnd_ms_config_json_sub_section_exists -| | | | info : section=[myapp] len=[5] -| | | | info : ret=1 -| | | - - - - The debug log is not only useful for plugin developers but also to find the - cause of user errors. For example, if your application does not do proper - error handling and fails to record error messages, checking the debug - and trace log may help finding the cause. Use of the debug log - to debug application issues should be considered only if no other - option is available. Writing the debug log to disk is a slow - operation and may have negative impact on the application - performance. - - - Example excerpt from the debug log (connection failure): - -error_info.error_no = 1045 -| | | | | mysqlnd_conn::free_contents -| | | | | | >mysqlnd_net::free_contents -| | | | | | mysqlnd_error_list_pdtor -| | | | | | - - - - The trace log can also be used to verify correct behaviour - of PECL/mysqlnd_ms itself, for example, to check which server has been - selected for query execution and why. - - - Example excerpt from the debug log (plugin decision): - -mysqlnd_ms::query -| info : query=DROP TABLE IF EXISTS test -| >_mysqlnd_plugin_get_plugin_connection_data -| | info : plugin_id=5 -| <_mysqlnd_plugin_get_plugin_connection_data -| >mysqlnd_ms_pick_server_ex -| | info : conn_data=0x7fb6a7d3e5a0 *conn_data=0x7fb6a7d410d0 -| | >mysqlnd_ms_select_servers_all -| | mysqlnd_ms_choose_connection_rr -| | | >mysqlnd_ms_query_is_select -[...] -| | | mysqlnd_ms_advanced_connect -| | | | >mysqlnd_conn::connect -| | | | | info : host=localhost user=root db=test port=3306 flags=131072 persistent=0 state=0 -]]> - - - - In this case the statement DROP TABLE IF EXISTS test has been - executed. Note that the statement string is shown in the log file. You may want - to take measures to restrict access to the log for security considerations. - - - The statement has been load balanced using round robin policy, - as you can easily guess from the functions name >mysqlnd_ms_choose_connection_rr. - It has been sent to a master server running on - host=localhost user=root db=test port=3306 flags=131072 persistent=0 state=0. - -
- -
- Monitoring - - Plugin activity can be monitored using the mysqlnd trace log, - mysqlnd statistics, mysqlnd_ms plugin statistics and external PHP debugging tools. - Use of the trace log should be limited to debugging. It is recommended - to use the plugins statistics for monitoring. - - - Writing a trace log is a slow operation. If using an external PHP debugging tool, - please refer to the vendors manual about its performance impact and the - type of information collected. In many cases, external debugging tools will - provide call stacks. Often, a call stack or a trace log is more difficult to interpret - than the statistics provided by the plugin. - - - Plugin statistics tell how often which kind of cluster node has been used (slave or master), - why the node was used, if lazy connections have been used and if global transaction - ID injection has been performed. The monitoring information provided enables - user to verify plugin decisions and to plan their cluster resources based on usage pattern. - The function mysqlnd_ms_get_stats - is used to access the statistics. Please, see the functions description for a list - of available statistics. - - - Statistics are collected on a per PHP process basis. Their scope is a PHP process. - Depending on the PHP deployment model a process may serve one or multiple web requests. - If using CGI model, a PHP process serves one web request. If using FastCGI or - pre-fork web server models, a PHP process usually serves multiple web requests. - The same is the case with a threaded web server. Please, note that threads running - in parallel can update the statistics in parallel. Thus, if using a threaded PHP - deployment model, statistics can be changed by more than one script at a time. A - script cannot rely on the fact that it sees only its own changes to statistics. - - - - Verify plugin activity in a non-threaded deployment model - - - - -query("SELECT 'Read request' FROM DUAL")) { - var_dump($res->fetch_all()); -} -$stats_after = mysqlnd_ms_get_stats(); -if ($stats_after['use_slave'] <= $stats_before['use_slave']) { - echo "According to the statistics the read request has not been run on a slave!"; -} -?> -]]> - - - - - Statistics are aggregated for all plugin activities and all connections handled by - the plugin. It is not possible to tell how much a certain connection handle has - contributed to the overall statistics. - - - Utilizing PHPs register_shutdown_function function or the - auto_append_file PHP configuration directive it is - easily possible to dump statistics into, for example, a log file when a script - finishes. Instead of using a log file it is also possible to send the statistics - to an external monitoring tool for recording and display. - - - - Recording statistics during shutdown - - - - - -]]> - - - -
-
- -
- - diff --git a/reference/mysqlnd_ms/versions.xml b/reference/mysqlnd_ms/versions.xml deleted file mode 100644 index b8a1fb25a4..0000000000 --- a/reference/mysqlnd_ms/versions.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/reference/mysqlnd_mux/book.xml b/reference/mysqlnd_mux/book.xml deleted file mode 100644 index dbd0a42ffb..0000000000 --- a/reference/mysqlnd_mux/book.xml +++ /dev/null @@ -1,176 +0,0 @@ - - - - - Mysqlnd connection multiplexing plugin - mysqlnd_mux - - - &reftitle.intro; - - The mysqlnd multiplexing plugin (mysqlnd_mux) - multiplexes MySQL connections established by all PHP MySQL extensions - that use the MySQL native driver (mysqlnd) - for PHP. - - - The MySQL native driver for PHP features an internal C API for plugins, - such as the connection multiplexing plugin, which can extend the functionality of - mysqlnd. See the mysqlnd for additional details - about its benefits over the MySQL Client Library libmysqlclient. - - - Mysqlnd plugins like mysqlnd_mux operate, for the most part, - transparently from a user perspective. The connection multiplexing - plugin supports all PHP applications, and all MySQL PHP extensions. - It does not change existing APIs. Therefore, it can easily be used with - existing PHP applications. - - - - This is a proof-of-concept. All features are at an early stage. Not all - kinds of queries are handled by the plugin yet. Thus, it cannot be used - in a drop-in fashion at the moment. - - - Please, do not use this version in production environments. - - -
- Key Features - - The key features of mysqlnd_mux are as follows: - - - - - - Transparent and therefore easy to use: - - - - - - Supports all of the PHP MySQL extensions. - - - - - Little to no application changes are required, dependent on the required usage scenario. - - - - - - - - - Reduces server load and connection establishment latency: - - - - - - Opens less connections to the MySQL server. - - - - - Less connections to MySQL mean less work for the MySQL server. - In a client-server environment scaling the server is often more - difficult than scaling the client. Multiplexing helps with - horizontal scale-out (scale-by-client). - - - - - Pooling saves connection time. - - - - - Multiplexed connection: multiple user handles share the - same network connection. Once opened, - a network connection is cached and shared among - multiple user handles. There is a 1:n relationship between - internal network connection and user connection handles. - - - - - Persistent connection: a network connection is kept open - at the end of the web request, if the PHP deployment model allows. - Thus, subsequently web requests can reuse a - previously opened connection. Like other resources, network - connections are bound to the scope of a process. Thus, they can - be reused for all web requests served by a process. - - - - - - - - -
- -
- Limitations - - The proof-of-concept does not support unbuffered queries, prepared - statements, and asynchronous queries. - - - The connection pool is using a combination of the transport method and - hostname as keys. As a consequence, two connections to the same - host using the same transport method (TCP/IP, Unix socket, Windows named pipe) - will be linked to the same pooled connection even if username and - password differ. Be aware of the possible security implications. - - - The proof-of-concept is transaction agnostic. It does not know about SQL - transactions. - - - - Applications must be aware of the consequences of connection sharing connections. - - -
- -
- About the name mysqlnd_mux - - The shortcut mysqlnd_mux - stands for mysqlnd connection multiplexing plugin. - -
-
- - &reference.mysqlnd-mux.concepts; - &reference.mysqlnd-mux.setup; - &reference.mysqlnd-mux.constants; - &reference.mysqlnd-mux.changes; - -
- - diff --git a/reference/mysqlnd_mux/changes.xml b/reference/mysqlnd_mux/changes.xml deleted file mode 100644 index 9e09b27a65..0000000000 --- a/reference/mysqlnd_mux/changes.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - Change History - - This change history is a high level summary of selected changes - that may impact applications and/or break backwards compatibility. - - - See also the CHANGES file in the source distribution - for a complete list of changes. - - -
- PECL/mysqlnd_mux 1.0 series - - 1.0.0-pre-alpha - - - - Release date: no package released, initial check-in 09/2012 - - - - - Motto/theme: Proof of concept - - - - - - Initial check-in. Essentially a demo of the - mysqlnd plugin API. - - - - This is the current development series. All - features are at an early stage. Changes may happen at any time without - prior notice. Please, do not use this version in production environments. - - - The documentation may not reflect all changes yet. - - -
- -
- - diff --git a/reference/mysqlnd_mux/concepts.xml b/reference/mysqlnd_mux/concepts.xml deleted file mode 100644 index e2a28a5225..0000000000 --- a/reference/mysqlnd_mux/concepts.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - Concepts - - This explains the architecture and related concepts for this plugin. - Reading and understanding these concepts is required to successfully - use this plugin. - - -
- Architecture - - The mysqlnd connection multiplexing plugin is implemented as a PHP extension. - It is written in C and operates under the hood of PHP. During the - startup of the PHP interpreter, in the module initialization phase of the - PHP engine, it gets registered as a - mysqlnd plugin to replace specific - mysqlnd C methods. - - - The mysqlnd library uses PHP streams to communicate with the MySQL - server. PHP streams are accessed by the mysqlnd library through its net module. - The mysqlnd connection multiplexing plugin proxies methods of the mysqlnd - library net module to control opening and closing of network streams. - - - Upon opening a user connection to MySQL using the appropriate connection - functions of either mysqli, - PDO_MYSQL or - ext/mysql, the plugin will search its - connection pool for an open network connection. If the pool - contains a network connection to the host specified by the connect function - using the transport method requested (TCP/IP, Unix domain socket, Windows named pipe), - the pooled connection is linked to the user handle. Otherwise, a new - network connection is opened, put into the poolm and associated with the - user connection handle. This way, multiple user handles can be linked - to the same network connection. - -
- -
- Connection pool - - The plugins connection pool is created when PHP initializes its modules - (MINIT) and free'd when PHP shuts down the modules - (MSHUTDOWN). This is the same as for persistent MySQL connections. - - - Depending on the deployment model, the pool is used for the duration of one - or multiple web requests. Network connections are bound to the lifespan - of an operating system level process. If the PHP process serves multiple - web requests as it is the case for Fast-CGI or threaded web server deployments, - then the pooled connections can be reused over multiple connections. - Because multiplexing means sharing connections, it can even happen with a - threaded deployment that two threads or two distinct web requests are - linked to one pooled network connections. - - - A pooled connection is explicitly closed once the last reference to it - is released. An implicit close happens when PHP shuts down its modules. - -
- -
- Sharing connections - - The PHP mysqlnd connection multiplexing plugin changes the relationship - between a users connection handle and the underlying MySQL connection. - Without the plugin, every MySQL connection belongs to exactly one - user connection at a time. The multiplexing plugin changes. - A MySQL connection is shared among multiple user handles. - There no one-to-one relation if using the plugin. - - - Sharing pooled connections has an impact on the connection state. - State changing operations from multiple user handles pointing to one - MySQL connection are not isolated from each other. If, for example, - a session variable is set through one user connection handle, - the session variable becomes visible to all other user handles that - reference the same underlying MySQL connection. - - - This is similar in concept to connection state related phenomens - described for the PHP mysqlnd replication and load balancing plugin. - Please, check the - PECL/mysqlnd_ms documentation for - more details on the state of a connection. - - - The proof-of-concept takes no measures to isolate multiplexed - connections from each other. - -
- -
- - \ No newline at end of file diff --git a/reference/mysqlnd_mux/configure.xml b/reference/mysqlnd_mux/configure.xml deleted file mode 100644 index c128e99acb..0000000000 --- a/reference/mysqlnd_mux/configure.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - -
- &reftitle.install; - - - &pecl.info; - &url.pecl.package;mysqlnd_mux - - -
- - - diff --git a/reference/mysqlnd_mux/constants.xml b/reference/mysqlnd_mux/constants.xml deleted file mode 100644 index 1ac7ac39cb..0000000000 --- a/reference/mysqlnd_mux/constants.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - &reftitle.constants; - &extension.constants; - - - Other - - - The plugins version number can be obtained using - MYSQLND_MUX_VERSION or - MYSQLND_MUX_VERSION_ID. - MYSQLND_MUX_VERSION - is the string representation of the numerical version number - MYSQLND_MUX_VERSION_ID, which is an integer such as 10000. - Developers can calculate the version number as follows. - - - - - - - Version (part) - Example - - - - - Major*10000 - 1*10000 = 10000 - - - Minor*100 - 0*100 = 0 - - - Patch - 0 = 0 - - - MYSQLND_MUX_VERSION_ID - 10000 - - - - - - - - - - MYSQLND_MUX_VERSION - (string) - - - - Plugin version string, for example, 1.0.0-prototype. - - - - - - MYSQLND_MUX_VERSION_ID - (int) - - - - Plugin version number, for example, 10000. - - - - - - - - - diff --git a/reference/mysqlnd_mux/ini.xml b/reference/mysqlnd_mux/ini.xml deleted file mode 100644 index 38e9a89180..0000000000 --- a/reference/mysqlnd_mux/ini.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - -
- &reftitle.runtime; - &extension.runtime; - - - Mysqlnd_mux &ConfigureOptions; - - - - &Name; - &Default; - &Changeable; - &Changelog; - - - - - mysqlnd_mux.enable - 0 - PHP_INI_SYSTEM - - - - -
-
- - &ini.descriptions.title; - - - - - - - mysqlnd_mux.enable - int - - - - Enables or disables the plugin. If disabled, the extension will not plug - into - mysqlnd to proxy internal - mysqlnd C API calls. - - - - - - -
- - diff --git a/reference/mysqlnd_mux/setup.xml b/reference/mysqlnd_mux/setup.xml deleted file mode 100644 index 367e6e7de4..0000000000 --- a/reference/mysqlnd_mux/setup.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - - PHP 5.5.0 or newer. - Some advanced functionality requires PHP 5.5.0 or newer. - - - The mysqlnd_mux replication and load balancing - plugin supports all PHP applications and all available PHP MySQL extensions - (mysqli, - mysql, - PDO_MYSQL). - The PHP MySQL extension must be configured to use - mysqlnd in order to be able - to use the mysqlnd_mux plugin for - mysqlnd. - -
- - &reference.mysqlnd-mux.configure; - &reference.mysqlnd-mux.ini; - -
- - diff --git a/reference/mysqlnd_qc/book.xml b/reference/mysqlnd_qc/book.xml deleted file mode 100644 index bc1b331729..0000000000 --- a/reference/mysqlnd_qc/book.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - Mysqlnd query result cache plugin - mysqlnd_qc - - - &reftitle.intro; - - The mysqlnd query result cache plugin adds easy to use client-side query - caching to all PHP MySQL extensions using - mysqlnd. - - - As of version PHP 5.3.3 the MySQL native driver for PHP ( - mysqlnd) - features an internal plugin C API. C plugins, such as the query cache - plugin, can extend the functionality of - mysqlnd. - - - Mysqlnd plugins such as the query cache plugin operate transparent - from a user perspective. The cache plugin supports all PHP applications - and all PHP MySQL extensions ( - mysqli, - mysql, - PDO_MYSQL). - It does not change existing APIs. - - - No significant application changes are required to cache a query. - The cache has two operation modes. It will either cache all - queries (not recommended) or only those queries marked with a - certain SQL hint (recommended). - - -
- Key Features - - - - - Transparent and therefore easy to use - - - - - - supports all PHP MySQL extensions - - - - - no API changes - - - - - very little application changes required - - - - - - - - - Flexible invalidation strategy - - - - - - Time-to-Live (TTL) - - - - - user-defined - - - - - - - - - Storage with different scope and life-span - - - - - - Default (Hash, process memory) - - - - - APC - - - - - MEMCACHE - - - - - sqlite - - - - - user-defined - - - - - - - - - Built-in slam defense to prevent cache stampeding. - - - - -
- -
- Limitations - - The current 1.0.1 release of PECL mysqlnd_qc does - not support PHP 5.4. Version 1.1.0-alpha lifts this limitation. - - - Prepared statements and unbuffered queries are fully supported. - Thus, the plugin is capable of caching all statements issued - with mysqli or PDO_MySQL, which are - the only two PHP MySQL APIs to offer prepared statement support. - -
- -
- On the name - - The shortcut mysqlnd_qc - stands for mysqlnd query cache plugin. The name - was chosen for a quick-and-dirty proof-of-concept. In the beginning - the developers did not expect to continue using the code base. - Sometimes PECL/mysqlnd_qc has also been called - client-side query result set cache. - -
- -
- - - &reference.mysqlnd-qc.quickstart; - &reference.mysqlnd-qc.setup; - &reference.mysqlnd-qc.constants; - &reference.mysqlnd-qc.reference; - &reference.mysqlnd-qc.changes; - -
- - diff --git a/reference/mysqlnd_qc/changes.xml b/reference/mysqlnd_qc/changes.xml deleted file mode 100644 index e029ce37fb..0000000000 --- a/reference/mysqlnd_qc/changes.xml +++ /dev/null @@ -1,292 +0,0 @@ - - - - - Change History - - This change history is a high level summary of selected changes - that may impact applications and/or break backwards compatibility. - - - See also the CHANGES file in the source distribution - for a complete list of changes. - - -
- PECL/mysqlnd_qc 1.2 series - - 1.2.0 - alpha - - - - Release date: 03/2013 - - - - - Motto/theme: PHP 5.5 compatibility - - - - - - Feature changes - - - - Update build for PHP 5.5 (Credits: Remi Collet) - - - - - APC storage handler update - - - - Fix build for APC 3.1.13-beta and trunk - - - - - - - - Introduced - MYSQLND_QC_VERSION and - MYSQLND_QC_VERSION_ID. - - - - -
- -
- PECL/mysqlnd_qc 1.1 series - - 1.1.0 - stable - - - - Release date: 04/2012 - - - - - Motto/theme: PHP 5.4 compatibility, schema pattern based caching and mysqlnd_ms support - - - - - - 1.1.0 - beta - - - - Release date: 04/2012 - - - - - Motto/theme: PHP 5.4 compatibility, schema pattern based caching and mysqlnd_ms support - - - - - - 1.1.0 - alpha - - - - Release date: 04/2012 - - - - - Motto/theme: PHP 5.4 compatibility, schema pattern based caching and mysqlnd_ms support - - - - - - Feature changes - - - - APC storage handler update - - - - Fix build for APC 3.1.9+ - - - - - Note: Use of the APC storage handler is currently - not recommended due to stability issues of APC itself. - - - - - - - - New PHP configuration directives - - - - - mysqlnd_qc.collect_statistics_log_file. Aggregated - cache statistics log file written after every 10th request served by the - PHP process. - - - - - - mysqlnd_qc.ignore_sql_comments. - Control whether SQL comments are ignored for cache key hash generation. - - - - - - - - New constants and SQL hints - - - - - MYSQLND_QC_SERVER_ID_SWITCH allows grouping of cache entries from - different physical connections. This is needed by PECL/mysqlnd_ms. - - - - - - MYSQLND_QC_CONDITION_META_SCHEMA_PATTERN - to be used with mysqlnd_qc_set_cache_condition. - - - - - - - - New function mysqlnd_qc_set_cache_condition - for built-in schema pattern based caching. Likely to support a wider - range of conditions in the future. - - - - - Report valid_until timestamp for cache entries - of the default handler through mysqlnd_qc_get_cache_info. - - - - - Include charset number for cache entry hashing. This should prevent serving result - sets which have the wrong charset. - - - API change: get_hash_key expects new "charsetnr" (int) parameter after "port". - - - - - API change: changing is_select() signature from bool is_select() to - mixed is_select(). Mixed can be either boolean or - array(long ttl, string server_id). This is needed by PECL/mysqlnd_ms. - - - - - - Other - - - - Support acting as a cache backend for - PECL/mysqlnd_ms 1.3.0-beta or later - to transparently replace MySQL Replication slave reads with cache accesses, - if the user explicitly allows. - - - - - - Bug fixes - - - - Fixed Bug #59959 (config.m4, wrong library - 64bit memcached handler builds) (Credits: Remi Collet) - - - - -
- -
- PECL/mysqlnd_qc 1.0 series - - 1.0.1-stable - - - - Release date: 12/2010 - - - - - Motto/theme: Prepared statement support - - - - - - Added support for Prepared statements and unbuffered queries. - - - 1.0.0-beta - - - - Release date: 07/2010 - - - - - Motto/theme: TTL-based cache with various storage options (Memcache, APC, SQLite, user-defined) - - - - - - Initial public release of the transparent TTL-based query result cache. - Flexible storage of cached results. Various storage media supported. - -
- -
- - diff --git a/reference/mysqlnd_qc/configure.xml b/reference/mysqlnd_qc/configure.xml deleted file mode 100644 index b45aafc395..0000000000 --- a/reference/mysqlnd_qc/configure.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - -
- &reftitle.install; - - &pecl.moved; - - - - &pecl.info; - &url.pecl.package;mysqlnd_qc - - - - &pecl.windows.download; - - -
- - - diff --git a/reference/mysqlnd_qc/constants.xml b/reference/mysqlnd_qc/constants.xml deleted file mode 100644 index d037b938b1..0000000000 --- a/reference/mysqlnd_qc/constants.xml +++ /dev/null @@ -1,268 +0,0 @@ - - - - - &reftitle.constants; - &extension.constants; - - SQL hint related - - - - Using SQL hint constants - - The query cache is controlled by SQL hints. SQL hints are used to enable and - disable caching. SQL hints can be used to set the - TTL of a query. - - - The SQL hints recognized by the query cache can be manually changed at - compile time. This makes it possible to use - mysqlnd_qc in environments in which the default - SQL hints are already taken and interpreted by other systems. Therefore - it is recommended to use the SQL hint string constants instead of - manually adding the default SQL hints to the query string. - - - -]]> - - &examples.outputs; - - - - - - - - - - - - MYSQLND_QC_ENABLE_SWITCH - (string) - - - - SQL hint used to enable caching of a query. - - - - - - MYSQLND_QC_DISABLE_SWITCH - (string) - - - - SQL hint used to disable caching of a query if - mysqlnd_qc.cache_by_default = 1. - - - - - - MYSQLND_QC_TTL_SWITCH - (string) - - - - SQL hint used to set the TTL of a result set. - - - - - - MYSQLND_QC_SERVER_ID_SWITCH - (string) - - - - This SQL hint should not be used in general. - - - It is needed by PECL/mysqlnd_ms - to group cache entries for one statement - but originating from different physical connections. If the - hint is used connection settings such as user, hostname and charset - are not considered for generating a cache key of a query. - Instead the given value and the query string are used as input - to the hashing function that generates the key. - - - PECL/mysqlnd_ms may, if instructed, cache results from - MySQL Replication slaves. Because it can hold many connections - to the slave the cache key shall not be formed from the user, - hostname or other settings that may vary for the various slave - connections. Instead, PECL/mysqlnd_ms provides an identifier - which refers to the group of slave connections that shall be enabled - to share cache entries no matter which physical slave connection was - to generate the cache entry. - - - Use of this feature outside of PECL/mysqlnd_ms is not recommended. - - - - - - - mysqlnd_qc_set_cache_condition related - - - - Example <function>mysqlnd_qc_set_cache_condition</function> usage - - The function mysqlnd_qc_set_cache_condition allows setting conditions - for automatic caching of statements which don't begin with the SQL hints - necessary to manually enable caching. - - -query("SELECT id, title FROM news"); - -$pdo_mysql = new PDO("mysql:host=host;dbname=db_example;port=port", "user", "password"); -/* not cached: no SQL hint, no pattern match */ -$pdo_mysql->query("SELECT id, title FROM latest_news"); -/* cached: TTL 1 second, pattern match */ -$pdo_mysql->query("SELECT id, title FROM news"); -?> -]]> - - - - - - - - MYSQLND_QC_CONDITION_META_SCHEMA_PATTERN - (int) - - - - Used as a parameter of mysqlnd_qc_set_cache_condition - to set conditions for schema based automatic caching. - - - - - - - Other - - - The plugin version number can be obtained using either - MYSQLND_QC_VERSION, which is the string representation - of the numerical version number, or MYSQLND_QC_VERSION_ID, - which is an integer such as 10000. Developers can calculate the version number - as follows. - - - - - - - Version (part) - Example - - - - - Major*10000 - 1*10000 = 10000 - - - Minor*100 - 0*100 = 0 - - - Patch - 0 = 0 - - - MYSQLND_QC_VERSION_ID - 10000 - - - - - - - - - - MYSQLND_QC_VERSION - (string) - - - - Plugin version string, for example, 1.0.0-prototype. - - - - - - - - - - MYSQLND_QC_VERSION_ID - (int) - - - - Plugin version number, for example, 10000. - - - - - - - - diff --git a/reference/mysqlnd_qc/functions/mysqlnd-qc-clear-cache.xml b/reference/mysqlnd_qc/functions/mysqlnd-qc-clear-cache.xml deleted file mode 100644 index 0e75b00d72..0000000000 --- a/reference/mysqlnd_qc/functions/mysqlnd-qc-clear-cache.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - mysqlnd_qc_clear_cache - Flush all cache contents - - - - &reftitle.description; - - bool - mysqlnd_qc_clear_cache - - - - Flush all cache contents. - - - Flushing the cache is a storage handler responsibility. - All built-in storage handler but the - memcache storage - handler support flushing the cache. The - memcache - storage handler cannot flush its cache contents. - - - User-defined storage handler may or may not support the operation. - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - &return.success; - - - A return value of - &false; - indicates that flushing all cache contents has - failed or the operation is not supported by - the active storage handler. Applications must - not expect that calling the function will always - flush the cache. - - - - - - - diff --git a/reference/mysqlnd_qc/functions/mysqlnd-qc-get-available-handlers.xml b/reference/mysqlnd_qc/functions/mysqlnd-qc-get-available-handlers.xml deleted file mode 100644 index 12ce1fe996..0000000000 --- a/reference/mysqlnd_qc/functions/mysqlnd-qc-get-available-handlers.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - mysqlnd_qc_get_available_handlers - Returns a list of available storage handler - - - - &reftitle.description; - - array - mysqlnd_qc_get_available_handlers - - - - Which storage are available depends on the compile time - configuration of the query cache plugin. The - default storage handler is always available. - All other storage handler must be enabled explicitly when building the - extension. - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns an array of available built-in storage handler. - For each storage handler the version number and version string - is given. - - - - - &reftitle.examples; - - <function>mysqlnd_qc_get_available_handlers</function> example - - -]]> - - &examples.outputs; - - - array(2) { - ["version"]=> - string(5) "1.0.0" - ["version_number"]=> - int(100000) - } - ["user"]=> - array(2) { - ["version"]=> - string(5) "1.0.0" - ["version_number"]=> - int(100000) - } - ["APC"]=> - array(2) { - ["version"]=> - string(5) "1.0.0" - ["version_number"]=> - int(100000) - } - ["MEMCACHE"]=> - array(2) { - ["version"]=> - string(5) "1.0.0" - ["version_number"]=> - int(100000) - } - ["sqlite"]=> - array(2) { - ["version"]=> - string(5) "1.0.0" - ["version_number"]=> - int(100000) - } -} -]]> - - - - - - - &reftitle.seealso; - - - - Installation - - - mysqlnd_qc_set_storage_handler - - - - - - - - diff --git a/reference/mysqlnd_qc/functions/mysqlnd-qc-get-cache-info.xml b/reference/mysqlnd_qc/functions/mysqlnd-qc-get-cache-info.xml deleted file mode 100644 index 5d59dbaa95..0000000000 --- a/reference/mysqlnd_qc/functions/mysqlnd-qc-get-cache-info.xml +++ /dev/null @@ -1,551 +0,0 @@ - - - - - - mysqlnd_qc_get_cache_info - Returns information on the current handler, the number of cache entries and cache entries, if available - - - - &reftitle.description; - - array - mysqlnd_qc_get_cache_info - - - - - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns information on the current handler, the number of cache entries and - cache entries, if available. If and what data will be returned for the cache - entries is subject to the active storage handler. - Storage handler are free to return any data. Storage handler are - recommended to return at least the data provided by the default handler, - if technically possible. - - - The scope of the information is the PHP process. Depending on the PHP deployment - model a process may serve one or more web requests. - - - Values are aggregated for all cache activities on a per storage handler basis. - It is not possible to tell how much queries originating from - mysqli, PDO_MySQL or - mysql.API calls have contributed to the aggregated data values. Use - mysqlnd_qc_get_core_stats - to get timing data aggregated for all storage handlers. - - - Array of cache information - - - - - - handler - string - - - - The active storage handler. - - - All storage handler. Since 1.0.0. - - - - - - handler_version - string - - - - The version of the active storage handler. - - - All storage handler. Since 1.0.0. - - - - - - num_entries - int - - - - The number of cache entries. The value depends on the storage handler in use. - - - The default, APC and SQLite storage handler provide the actual - number of cache entries. - - - The MEMCACHE storage handler always returns 0. - MEMCACHE does not support counting the number of cache entries. - - - If a user defined handler is used, the number of - entries of the data property is reported. - - - Since 1.0.0. - - - - - - data - array - - - - The version of the active storage handler. - - - Additional storage handler dependent data on the cache entries. - Storage handler are requested to provide similar and comparable - information. A user defined storage handler is free to return any data. - - - Since 1.0.0. - - - The following information is provided by the default storage handler - for the data property. - - - The data - property holds a hash. The hash is indexed by the internal - cache entry identifier of the storage handler. The cache entry identifier - is human-readable and contains the query string leading to the cache entry. - Please, see also the example below. The following data is given for - every cache entry. - - - - - - statistics - array - - - - Statistics of the cache entry. - - - Since 1.0.0. - - - - - - - - - Property - Description - Version - - - - - - rows - - - Number of rows of the cached result set. - - Since 1.0.0. - - - - stored_size - - - The size of the cached result set in bytes. This is the size - of the payload. The value is not suited for calculating the - total memory consumption of all cache entries including the - administrative overhead of the cache entries. - - Since 1.0.0. - - - - cache_hits - - - How often the cached entry has been returned. - - Since 1.0.0. - - - - run_time - - - Run time of the statement to which the cache entry belongs. - This is the run time of the uncached statement. It is the time - between sending the statement to MySQL receiving a reply from MySQL. - Run time saved by using the query cache plugin can be calculated - like this: cache_hits * ((run_time - avg_run_time) + (store_time - avg_store_time)). - - Since 1.0.0. - - - - store_time - - - Store time of the statements result set to which the cache entry belongs. - This is the time it took to fetch and store the results of the uncached - statement. - - Since 1.0.0. - - - - min_run_time - - - Minimum run time of the cached statement. How long it took - to find the statement in the cache. - - Since 1.0.0. - - - - min_store_time - - - Minimum store time of the cached statement. The time taken - for fetching the cached result set from the storage medium and - decoding - - Since 1.0.0. - - - - avg_run_time - - - Average run time of the cached statement. - - Since 1.0.0. - - - - avg_store_time - - - Average store time of the cached statement. - - Since 1.0.0. - - - - max_run_time - - - Average run time of the cached statement. - - Since 1.0.0. - - - - max_store_time - - - Average store time of the cached statement. - - Since 1.0.0. - - - - valid_until - - - Timestamp when the cache entry expires. - - Since 1.1.0. - - - - - - - - - metadata - array - - - - Metadata of the cache entry. - This is the metadata provided by MySQL together with the - result set of the statement in question. Different versions - of the MySQL server may return different metadata. Unlike with - some of the PHP MySQL extensions no attempt is made to hide - MySQL server version dependencies and version details from the - caller. Please, refer to the MySQL C API documentation that - belongs to the MySQL server in use for further details. - - - The metadata list contains one entry for every column. - - - Since 1.0.0. - - - - - - - - - Property - Description - Version - - - - - - name - - - The field name. Depending on the MySQL version this - may be the fields alias name. - - Since 1.0.0. - - - - org_name - - - The field name. - - Since 1.0.0. - - - - table - - - The table name. If an alias name was used for the table, this - usually holds the alias name. - - Since 1.0.0. - - - - org_table - - - The table name. - - Since 1.0.0. - - - - db - - - The database/schema name. - - Since 1.0.0. - - - - max_length - - - The maximum width of the field. Details may vary by MySQL server version. - - Since 1.0.0. - - - - length - - - The width of the field. Details may vary by MySQL server version. - - Since 1.0.0. - - - - type - - - The data type of the field. Details may vary by the MySQL server in use. - This is the MySQL C API type constants value. It is recommended - to use type constants provided by the mysqli extension - to test for its meaning. You should not test for certain type values - by comparing with certain numbers. - - Since 1.0.0. - - - - - - - - - - The APC storage handler returns the same information - for the data property but no metadata. - The metadata of a cache entry is set to NULL. - - - The MEMCACHE storage handler does not fill the data property. - Statistics are not available on a per cache entry basis with the MEMCACHE storage - handler. - - - A user defined storage handler is free to provide any data. - - - - - - - - - &reftitle.examples; - - <function>mysqlnd_qc_get_cache_info</function> example - - The example shows the output from the built-in default storage handler. - Other storage handler may report different data. - - -query("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/SELECT id FROM test"); - -/* Display cache information */ -var_dump(mysqlnd_qc_get_cache_info()); -?> -]]> - - &examples.outputs; - - - int(1) - ["handler"]=> - string(7) "default" - ["handler_version"]=> - string(5) "1.0.0" - ["data"]=> - array(1) { - ["Localhost via UNIX socket 3306 user schema|/*qc=on*/SELECT id FROM test"]=> - array(2) { - ["statistics"]=> - array(11) { - ["rows"]=> - int(6) - ["stored_size"]=> - int(101) - ["cache_hits"]=> - int(0) - ["run_time"]=> - int(471) - ["store_time"]=> - int(27) - ["min_run_time"]=> - int(0) - ["max_run_time"]=> - int(0) - ["min_store_time"]=> - int(0) - ["max_store_time"]=> - int(0) - ["avg_run_time"]=> - int(0) - ["avg_store_time"]=> - int(0) - } - ["metadata"]=> - array(1) { - [0]=> - array(8) { - ["name"]=> - string(2) "id" - ["orig_name"]=> - string(2) "id" - ["table"]=> - string(4) "test" - ["orig_table"]=> - string(4) "test" - ["db"]=> - string(4) "schema" - ["max_length"]=> - int(1) - ["length"]=> - int(11) - ["type"]=> - int(3) - } - } - } - } -} - -]]> - - - - - - &reftitle.seealso; - - - - mysqlnd_qc_get_core_stats - - - - - - - - diff --git a/reference/mysqlnd_qc/functions/mysqlnd-qc-get-core-stats.xml b/reference/mysqlnd_qc/functions/mysqlnd-qc-get-core-stats.xml deleted file mode 100644 index 997505761d..0000000000 --- a/reference/mysqlnd_qc/functions/mysqlnd-qc-get-core-stats.xml +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - mysqlnd_qc_get_core_stats - Statistics collected by the core of the query cache - - - - &reftitle.description; - - array - mysqlnd_qc_get_core_stats - - - - Returns an array of statistics collected by the core of the cache plugin. - The same data fields will be reported for any storage handler because the - data is collected by the core. - - - The - PHP configuration setting - mysqlnd_qc.collect_statistics - controls the collection of statistics. The collection of statistics - is disabled by default for performance reasons. - Disabling the collection of statistics will also disable the collection - of time related statistics. - - - The - PHP configuration setting - mysqlnd_qc.collect_time_statistics controls the - collection of time related statistics. - - - The scope of the core statistics is the - PHP process. - Depending on your deployment model a - PHP process may handle one or multiple requests. - - - Statistics are aggregated for all cache entries and all storage handler. - It is not possible - to tell how much queries originating from - mysqli, - PDO_MySQL or - mysql API calls have - contributed to the aggregated data values. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Array of core statistics - - - - - - - - - Statistic - Description - Version - - - - - - cache_hit - - - Statement is considered cacheable and cached data has been reused. - Statement is considered cacheable and a cache miss happened but - the statement got cached by someone else while we process it and thus - we can fetch the result from the refreshed cache. - - Since 1.0.0. - - - - cache_miss - - - Statement is considered cacheable... - - - - ... and has been added to the cache - - - - - ... but the - PHP - configuration directive setting of - mysqlnd_qc.cache_no_table = 1 has prevented caching. - - - - - ... but an unbuffered result set is requested. - - - - - ... but a buffered result set was empty. - - - - - Since 1.0.0. - - - - cache_put - - - Statement is considered cacheable and has been added to the cache. - Take care when calculating derived statistics. Storage handler - with a storage life time beyond process scope may report - cache_put = 0 together with - cache_hit > 0, if another process has filled - the cache. You may want to use - num_entries from - mysqlnd_qc_get_cache_info if the handler - supports it ( - default, - APC). - - Since 1.0.0. - - - - query_should_cache - - - Statement is considered cacheable based on query string analysis. - The statement may or may not be added to the cache. See also - cache_put. - - Since 1.0.0. - - - - query_should_not_cache - - - Statement is considered not cacheable based on query string analysis. - - Since 1.0.0. - - - - query_not_cached - - - Statement is considered not cacheable or it is - considered cachable but the storage handler has not returned a - hash key for it. - - Since 1.0.0. - - - - query_could_cache - - - Statement is considered cacheable... - - - - ... and statement has been run without errors - - - - - ... and meta data shows at least one column in the result set - - - - The statement may or may not be in the cache already. - It may or may not be added to the cache later on. - - Since 1.0.0. - - - - query_found_in_cache - - - Statement is considered cacheable and we have found it in the cache - but we have not replayed the cached data yet and we have not send - the result set to the client yet. This is not considered - a cache hit because the client might not fetch the result or - the cached data may be faulty. - - Since 1.0.0. - - - - query_uncached_other - - - Statement is considered cacheable and it may or may not be in - the cache already but either replaying cached data has failed, - no result set is available or some other error has happened. - - - - - query_uncached_no_table - - - Statement has not been cached because the result set has at least - one column which has no table name in its meta data. An example of - such a query is - SELECT SLEEP(1). To cache those - statements you have to change default value of the PHP configuration directive - mysqlnd_qc.cache_no_table and set - mysqlnd_qc.cache_no_table = 1. Often, it is not - desired to cache such statements. - - Since 1.0.0. - - - - query_uncached_use_result - - - Statement would have been cached if a buffered result set - had been used. The situation is also considered as a cache miss and - cache_miss will be incremented as well. - - Since 1.0.0. - - - - query_aggr_run_time_cache_hit - - - Aggregated run time (ms) of all cached queries. - Cached queries are those which have incremented - cache_hit. - - Since 1.0.0. - - - - query_aggr_run_time_cache_put - - - Aggregated run time (ms) of all uncached queries that - have been put into the cache. See also - cache_put. - - Since 1.0.0. - - - - query_aggr_run_time_total - - - Aggregated run time (ms) of all uncached and cached queries - that have been inspected and executed by the query cache. - - Since 1.0.0. - - - - query_aggr_store_time_cache_hit - - - Aggregated store time (ms) of all cached queries. - Cached queries are those which have incremented - cache_hit. - - Since 1.0.0. - - - - query_aggr_store_time_cache_put - - - Aggregated store time ( - ms) of all uncached queries that - have been put into the cache. See also - cache_put. - - Since 1.0.0. - - - - query_aggr_store_time_total - - - Aggregated store time (ms) of all uncached and cached queries - that have been inspected and executed by the query cache. - - Since 1.0.0. - - - - receive_bytes_recorded - - - Recorded incoming network traffic ( - bytes) send from MySQL to PHP. - The traffic may or may not have been added to the cache. The - traffic is the total for all queries regardless if cached or not. - - Since 1.0.0. - - - - receive_bytes_replayed - - - Network traffic replayed during cache. This is the total amount of - incoming traffic saved because of the usage of the query cache plugin. - - Since 1.0.0. - - - - send_bytes_recorded - - - Recorded outgoing network traffic ( - bytes) send from MySQL to PHP. - The traffic may or may not have been added to the cache. The - traffic is the total for all queries regardless if cached or not. - - Since 1.0.0. - - - - send_bytes_replayed - - - Network traffic replayed during cache. This is the total amount of - outgoing traffic saved because of the usage of the query cache plugin. - - Since 1.0.0. - - - - slam_stale_refresh - - - Number of cache misses which triggered serving stale data until - the client causing the cache miss has refreshed the cache entry. - - Since 1.0.0. - - - - slam_stale_hit - - - Number of cache hits while a stale cache entry gets refreshed. - - Since 1.0.0. - - - - - - - - - &reftitle.examples; - - <function>mysqlnd_qc_get_core_stats</function> example - -query("/*qc=on*/SELECT id FROM test"); -/* Cache hit */ -$mysqli->query("/*qc=on*/SELECT id FROM test"); - -/* Display core statistics */ -var_dump(mysqlnd_qc_get_core_stats()); -?> -]]> - - &examples.outputs; - - - string(1) "1" - ["cache_miss"]=> - string(1) "1" - ["cache_put"]=> - string(1) "1" - ["query_should_cache"]=> - string(1) "2" - ["query_should_not_cache"]=> - string(1) "0" - ["query_not_cached"]=> - string(1) "0" - ["query_could_cache"]=> - string(1) "2" - ["query_found_in_cache"]=> - string(1) "1" - ["query_uncached_other"]=> - string(1) "0" - ["query_uncached_no_table"]=> - string(1) "0" - ["query_uncached_no_result"]=> - string(1) "0" - ["query_uncached_use_result"]=> - string(1) "0" - ["query_aggr_run_time_cache_hit"]=> - string(1) "4" - ["query_aggr_run_time_cache_put"]=> - string(3) "395" - ["query_aggr_run_time_total"]=> - string(3) "399" - ["query_aggr_store_time_cache_hit"]=> - string(1) "2" - ["query_aggr_store_time_cache_put"]=> - string(1) "8" - ["query_aggr_store_time_total"]=> - string(2) "10" - ["receive_bytes_recorded"]=> - string(2) "65" - ["receive_bytes_replayed"]=> - string(2) "65" - ["send_bytes_recorded"]=> - string(2) "29" - ["send_bytes_replayed"]=> - string(2) "29" - ["slam_stale_refresh"]=> - string(1) "0" - ["slam_stale_hit"]=> - string(1) "0" - ["request_counter"]=> - int(1) - ["process_hash"]=> - int(3547549858) -} - -]]> - - - - - - - &reftitle.seealso; - - - - Runtime configuration - - - mysqlnd_qc.collect_statistics - - - mysqlnd_qc.time_statistics - - - mysqlnd_qc_get_cache_info - - - - - - - - diff --git a/reference/mysqlnd_qc/functions/mysqlnd-qc-get-normalized-query-trace-log.xml b/reference/mysqlnd_qc/functions/mysqlnd-qc-get-normalized-query-trace-log.xml deleted file mode 100644 index 204cd6d945..0000000000 --- a/reference/mysqlnd_qc/functions/mysqlnd-qc-get-normalized-query-trace-log.xml +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - mysqlnd_qc_get_normalized_query_trace_log - Returns a normalized query trace log for each query inspected by the query cache - - - - &reftitle.description; - - array - mysqlnd_qc_get_normalized_query_trace_log - - - - Returns a normalized query trace log for each query inspected by the query cache. - The collection of the trace log is disabled by default. To collect - the trace log you have to set the PHP configuration directive - mysqlnd_qc.collect_normalized_query_trace to - 1 - - - Entries in the trace log are grouped by the normalized query statement. - The normalized query statement is the query statement with all statement - parameter values being replaced with a question mark. For example, the two - statements SELECT id FROM test WHERE id = 1 and - SELECT id FROM test WHERE id = 2 are normalized as - SELECT id FROM test WHERE id = ?. Whenever a statement - is inspected by the query cache which matches the normalized statement pattern, - its statistics are grouped by the normalized statement string. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - An array of query log. Every list entry contains - the normalized query stringand further detail information. - - - - - - - - - Key - Description - - - - - - query - - - Normalized statement string. - - - - - occurences - - - How many statements have matched the normalized statement - string in addition to the one which has created the log entry. - The value is zero if a statement has been normalized, its normalized - representation has been added to the log but no further queries inspected - by PECL/mysqlnd_qc have the same normalized statement string. - - - - - eligible_for_caching - - - Whether the statement could be cached. An statement eligible for - caching has not necessarily been cached. It not possible to tell - for sure if or how many cached statement have contributed to the - aggregated normalized statement log entry. However, comparing - the minimum and average run time one can make an educated guess. - - - - - avg_run_time - - - The average run time of all queries contributing to the - query log entry. The run time is the time between sending the - query statement to MySQL and receiving an answer from MySQL. - - - - - avg_store_time - - - The average store time of all queries contributing to the - query log entry. The store time is the time needed to fetch - a statements result set from the server to the client and, - storing it on the client. - - - - - min_run_time - - - The minimum run time of all queries contributing to the - query log entry. - - - - - min_store_time - - - The minimum store time of all queries contributing to the - query log entry. - - - - - max_run_time - - - The maximum run time of all queries contributing to the - query log entry. - - - - - max_store_time - - - The maximum store time of all queries contributing to the - query log entry. - - - - - - - - - - &reftitle.examples; - - <function>mysqlnd_qc_get_normalized_query_trace_log</function> example - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2)"); - -/* not cached */ -$res = $mysqli->query("SELECT id FROM test WHERE id = 1"); -var_dump($res->fetch_assoc()); -$res->free(); - -/* cache put */ -$res = $mysqli->query("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT id FROM test WHERE id = 2"); -var_dump($res->fetch_assoc()); -$res->free(); - -/* cache hit */ -$res = $mysqli->query("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT id FROM test WHERE id = 2"); -var_dump($res->fetch_assoc()); -$res->free(); - -var_dump(mysqlnd_qc_get_normalized_query_trace_log()); -?> -]]> - - &examples.outputs; - - - string(1) "1" -} -array(1) { - ["id"]=> - string(1) "2" -} -array(1) { - ["id"]=> - string(1) "2" -} -array(4) { - [0]=> - array(9) { - ["query"]=> - string(25) "DROP TABLE IF EXISTS test" - ["occurences"]=> - int(0) - ["eligible_for_caching"]=> - bool(false) - ["avg_run_time"]=> - int(0) - ["min_run_time"]=> - int(0) - ["max_run_time"]=> - int(0) - ["avg_store_time"]=> - int(0) - ["min_store_time"]=> - int(0) - ["max_store_time"]=> - int(0) - } - [1]=> - array(9) { - ["query"]=> - string(27) "CREATE TABLE test (id INT )" - ["occurences"]=> - int(0) - ["eligible_for_caching"]=> - bool(false) - ["avg_run_time"]=> - int(0) - ["min_run_time"]=> - int(0) - ["max_run_time"]=> - int(0) - ["avg_store_time"]=> - int(0) - ["min_store_time"]=> - int(0) - ["max_store_time"]=> - int(0) - } - [2]=> - array(9) { - ["query"]=> - string(40) "INSERT INTO test (id ) VALUES (? ), (? )" - ["occurences"]=> - int(0) - ["eligible_for_caching"]=> - bool(false) - ["avg_run_time"]=> - int(0) - ["min_run_time"]=> - int(0) - ["max_run_time"]=> - int(0) - ["avg_store_time"]=> - int(0) - ["min_store_time"]=> - int(0) - ["max_store_time"]=> - int(0) - } - [3]=> - array(9) { - ["query"]=> - string(31) "SELECT id FROM test WHERE id =?" - ["occurences"]=> - int(2) - ["eligible_for_caching"]=> - bool(true) - ["avg_run_time"]=> - int(159) - ["min_run_time"]=> - int(12) - ["max_run_time"]=> - int(307) - ["avg_store_time"]=> - int(10) - ["min_store_time"]=> - int(8) - ["max_store_time"]=> - int(13) - } -} -]]> - - - - - - - &reftitle.seealso; - - - - Runtime configuration - - - mysqlnd_qc.collect_normalized_query_trace - - - mysqlnd_qc.time_statistics - - - mysqlnd_qc_get_query_trace_log - - - - - - - - diff --git a/reference/mysqlnd_qc/functions/mysqlnd-qc-get-query-trace-log.xml b/reference/mysqlnd_qc/functions/mysqlnd-qc-get-query-trace-log.xml deleted file mode 100644 index 14d656d85b..0000000000 --- a/reference/mysqlnd_qc/functions/mysqlnd-qc-get-query-trace-log.xml +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - mysqlnd_qc_get_query_trace_log - Returns a backtrace for each query inspected by the query cache - - - - &reftitle.description; - - array - mysqlnd_qc_get_query_trace_log - - - - Returns a backtrace for each query inspected by the query cache. - The collection of the backtrace is disabled by default. To collect - the backtrace you have to set the PHP configuration directive - mysqlnd_qc.collect_query_trace to - 1 - - - The maximum depth of the backtrace is limited to the depth set - with the PHP configuration directive - mysqlnd_qc.query_trace_bt_depth. - - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - An array of query backtrace. Every list entry contains - the query string, a backtrace and further detail information. - - - - - - - - - Key - Description - - - - - - query - - - Query string. - - - - - origin - - - Code backtrace. - - - - - run_time - - - Query run time in milliseconds. The collection of - all times and the necessary - gettimeofday - system calls can be disabled by setting the PHP configuration - directive - mysqlnd_qc.time_statistics to - 0 - - - - - store_time - - - Query result set store time in milliseconds. The collection of - all times and the necessary - gettimeofday - system calls can be disabled by setting the PHP configuration - directive - mysqlnd_qc.time_statistics to - 0 - - - - - eligible_for_caching - - - &true; if query is cacheable otherwise - &false;. - - - - - no_table - - - &true; if the query has generated a result - set and at least one column from the result set has no table - name set in its metadata. This is usually the case with - queries which one probably do not want to cache such as - SELECT SLEEP(1). By default any such query - will not be added to the cache. See also PHP configuration directive - mysqlnd_qc.cache_no_table. - - - - - was_added - - - &true; if the query result has been put into - the cache, otherwise - &false;. - - - - - was_already_in_cache - - - &true; if the query result would have been - added to the cache if it was not already in the cache (cache hit). - Otherwise - &false;. - - - - - - - - - - - &reftitle.examples; - - <function>mysqlnd_qc_get_query_trace_log</function> example - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2)"); - -/* not cached */ -$res = $mysqli->query("SELECT id FROM test WHERE id = 1"); -var_dump($res->fetch_assoc()); -$res->free(); - -/* cache put */ -$res = $mysqli->query("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT id FROM test WHERE id = 2"); -var_dump($res->fetch_assoc()); -$res->free(); - -/* cache hit */ -$res = $mysqli->query("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT id FROM test WHERE id = 2"); -var_dump($res->fetch_assoc()); -$res->free(); - -var_dump(mysqlnd_qc_get_query_trace_log()); -?> -]]> - - &examples.outputs; - - - string(1) "1" -} -array(1) { - ["id"]=> - string(1) "2" -} -array(1) { - ["id"]=> - string(1) "2" -} -array(6) { - [0]=> - array(8) { - ["query"]=> - string(25) "DROP TABLE IF EXISTS test" - ["origin"]=> - string(102) "#0 qc.php(4): mysqli->query('DROP TABLE IF E...') -#1 {main}" - ["run_time"]=> - int(0) - ["store_time"]=> - int(0) - ["eligible_for_caching"]=> - bool(false) - ["no_table"]=> - bool(false) - ["was_added"]=> - bool(false) - ["was_already_in_cache"]=> - bool(false) - } - [1]=> - array(8) { - ["query"]=> - string(25) "CREATE TABLE test(id INT)" - ["origin"]=> - string(102) "#0 qc.php(5): mysqli->query('CREATE TABLE te...') -#1 {main}" - ["run_time"]=> - int(0) - ["store_time"]=> - int(0) - ["eligible_for_caching"]=> - bool(false) - ["no_table"]=> - bool(false) - ["was_added"]=> - bool(false) - ["was_already_in_cache"]=> - bool(false) - } - [2]=> - array(8) { - ["query"]=> - string(36) "INSERT INTO test(id) VALUES (1), (2)" - ["origin"]=> - string(102) "#0 qc.php(6): mysqli->query('INSERT INTO tes...') -#1 {main}" - ["run_time"]=> - int(0) - ["store_time"]=> - int(0) - ["eligible_for_caching"]=> - bool(false) - ["no_table"]=> - bool(false) - ["was_added"]=> - bool(false) - ["was_already_in_cache"]=> - bool(false) - } - [3]=> - array(8) { - ["query"]=> - string(32) "SELECT id FROM test WHERE id = 1" - ["origin"]=> - string(102) "#0 qc.php(9): mysqli->query('SELECT id FROM ...') -#1 {main}" - ["run_time"]=> - int(0) - ["store_time"]=> - int(25) - ["eligible_for_caching"]=> - bool(false) - ["no_table"]=> - bool(false) - ["was_added"]=> - bool(false) - ["was_already_in_cache"]=> - bool(false) - } - [4]=> - array(8) { - ["query"]=> - string(41) "/*qc=on*/SELECT id FROM test WHERE id = 2" - ["origin"]=> - string(103) "#0 qc.php(14): mysqli->query('/*qc=on*/SELECT...') -#1 {main}" - ["run_time"]=> - int(311) - ["store_time"]=> - int(13) - ["eligible_for_caching"]=> - bool(true) - ["no_table"]=> - bool(false) - ["was_added"]=> - bool(true) - ["was_already_in_cache"]=> - bool(false) - } - [5]=> - array(8) { - ["query"]=> - string(41) "/*qc=on*/SELECT id FROM test WHERE id = 2" - ["origin"]=> - string(103) "#0 qc.php(19): mysqli->query('/*qc=on*/SELECT...') -#1 {main}" - ["run_time"]=> - int(13) - ["store_time"]=> - int(8) - ["eligible_for_caching"]=> - bool(true) - ["no_table"]=> - bool(false) - ["was_added"]=> - bool(false) - ["was_already_in_cache"]=> - bool(true) - } -} -]]> - - - - - - - &reftitle.seealso; - - - - Runtime configuration - - - mysqlnd_qc.collect_query_trace - - - mysqlnd_qc.query_trace_bt_depth - - - mysqlnd_qc.time_statistics - - - mysqlnd_qc.cache_no_table - - - mysqlnd_qc_get_normalized_query_trace_log - - - - - - - - diff --git a/reference/mysqlnd_qc/functions/mysqlnd-qc-set-cache-condition.xml b/reference/mysqlnd_qc/functions/mysqlnd-qc-set-cache-condition.xml deleted file mode 100644 index 3bccea835a..0000000000 --- a/reference/mysqlnd_qc/functions/mysqlnd-qc-set-cache-condition.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - mysqlnd_qc_set_cache_condition - Set conditions for automatic caching - - - - &reftitle.description; - - bool - mysqlnd_qc_set_cache_condition - - int - condition_type - - - mixed - condition - - - mixed - condition_option - - - - Sets a condition for automatic caching of statements which do not contain - the necessary SQL hints to enable caching of them. - - - - - &reftitle.parameters; - - - - condition_type - - - - Type of the condition. The only allowed value is - MYSQLND_QC_CONDITION_META_SCHEMA_PATTERN. - - - - - - condition - - - - Parameter for the condition set with condition_type. - Parameter type and structure depend on condition_type - - - If condition_type equals - MYSQLND_QC_CONDITION_META_SCHEMA_PATTERN - condition must be a string. The string sets a pattern. - Statements are cached if table and database meta data entry of their result sets - match the pattern. The pattern is checked for a match with the - db and org_table meta data entries - provided by the underlying MySQL client server library. Please, check - the MySQL Reference manual for details about the two entries. The - db and org_table values are - concatenated with a dot (.) before matched - against condition. Pattern matching supports - the wildcards % and _. - The wildcard % will match one or many arbitrary - characters. _ will match one arbitrary character. - The escape symbol is backslash. - - - - - - condition_option - - - - Option for condition. Type and structure depend - on condition_type. - - - If condition_type equals - MYSQLND_QC_CONDITION_META_SCHEMA_PATTERN - condition_options is the TTL to be used. - - - - - - - - &reftitle.examples; - - <function>mysqlnd_qc_set_cache_condition</function> example - -query("SELECT id, title FROM news"); - -$pdo_mysql = new PDO("mysql:host=host;dbname=db_example;port=port", "user", "password"); -/* not cached: no SQL hint, no pattern match */ -$pdo_mysql->query("SELECT id, title FROM latest_news"); -/* cached: TTL 1 second, pattern match */ -$pdo_mysql->query("SELECT id, title FROM news"); -?> -]]> - - - - - - &reftitle.returnvalues; - - Returns TRUE on success or FALSE on FAILURE. - - - - - &reftitle.seealso; - - - - Quickstart: pattern based caching - - - - - - - - diff --git a/reference/mysqlnd_qc/functions/mysqlnd-qc-set-is-select.xml b/reference/mysqlnd_qc/functions/mysqlnd-qc-set-is-select.xml deleted file mode 100644 index 05abe97392..0000000000 --- a/reference/mysqlnd_qc/functions/mysqlnd-qc-set-is-select.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - mysqlnd_qc_set_is_select - Installs a callback which decides whether a statement is cached - - - - &reftitle.description; - - mixed - mysqlnd_qc_set_is_select - - string - callback - - - - Installs a callback which decides whether a statement is cached. - - - There are several ways of hinting PELC/mysqlnd_qc to cache a query. - By default, PECL/mysqlnd_qc attempts to cache a if caching of all statements - is enabled or the query string begins with a certain SQL hint. - The plugin internally calls a function named is_select() - to find out. This internal function can be replaced with a user-defined callback. - Then, the user-defined callback is responsible to decide whether the plugin - attempts to cache a statement. Because the internal function is replaced - with the callback, the callback gains full control. The callback is free - to ignore the configuration setting mysqlnd_qc.cache_by_default - and SQL hints. - - - The callback is invoked for every statement inspected by the plugin. - It is given the statements string as a parameter. The callback returns - &false; if the statement shall not be cached. It returns &true; to - make the plugin attempt to cache the statements result set, if any. - A so-created cache entry is given the default TTL set with the - PHP configuration directive mysqlnd_qc.ttl. - If a different TTL shall be used, the callback returns a numeric - value to be used as the TTL. - - - The internal is_select function is part of the internal - cache storage handler interface. Thus, a user-defined storage handler - offers the same capabilities. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - <function>mysqlnd_qc_set_is_select</function> example - - true, - /* 3 - use TTL = 3 seconds */ - "@SELECT\s+.*\s+FROM\s+news@ismU" => 3 - ); - /* check if query does match pattern */ - foreach ($patterns as $pattern => $ttl) { - if (preg_match($pattern, $query)) { - printf("is_select(%45s): cache\n", $query); - return $ttl; - } - } - printf("is_select(%45s): do not cache\n", $query); - return false; -} -mysqlnd_qc_set_is_select("is_select"); - -/* Connect, create and populate test table */ -$mysqli = new mysqli("host", "user", "password", "schema"); -$mysqli->query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2), (3)"); - -/* cache put */ -$mysqli->query("SELECT id FROM test WHERE id = 1"); -/* cache hit */ -$mysqli->query("SELECT id FROM test WHERE id = 1"); -/* cache put */ -$mysqli->query("SELECT * FROM test"); -?> -]]> - - &examples.outputs; - - - - - - - - &reftitle.seealso; - - - - Runtime configuration - - - mysqlnd_qc.ttl - - - mysqlnd_qc.cache_by_default - - - mysqlnd_qc_set_user_handlers - - - - - - - - diff --git a/reference/mysqlnd_qc/functions/mysqlnd-qc-set-storage-handler.xml b/reference/mysqlnd_qc/functions/mysqlnd-qc-set-storage-handler.xml deleted file mode 100644 index 341fe4fb3c..0000000000 --- a/reference/mysqlnd_qc/functions/mysqlnd-qc-set-storage-handler.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - mysqlnd_qc_set_storage_handler - Change current storage handler - - - - &reftitle.description; - - bool - mysqlnd_qc_set_storage_handler - - string - handler - - - - Sets the storage handler used by the query cache. A list of available - storage handler can be obtained from - mysqlnd_qc_get_available_handlers. - Which storage are available depends on the compile time - configuration of the query cache plugin. The - default storage handler is always available. - All other storage handler must be enabled explicitly when building the - extension. - - - - - - &reftitle.parameters; - - - - handler - - - - Handler can be of type string representing the name of a - built-in storage handler or an object of type - mysqlnd_qc_handler_default. - The names of the built-in storage handler are - default, - APC, - MEMCACHE, - sqlite. - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - If changing the storage handler fails a catchable fatal error will - be thrown. The query cache cannot operate if the previous storage - handler has been shutdown but no new storage handler has been installed. - - - - - &reftitle.examples; - - <function>mysqlnd_qc_set_storage_handler</function> example - - The example shows the output from the built-in default storage handler. - Other storage handler may report different data. - - - -]]> - - &examples.outputs; - - - - - - - - - &reftitle.seealso; - - - - Installation - - - mysqlnd_qc_get_available_handlers - - - - - - - - - diff --git a/reference/mysqlnd_qc/functions/mysqlnd-qc-set-user-handlers.xml b/reference/mysqlnd_qc/functions/mysqlnd-qc-set-user-handlers.xml deleted file mode 100644 index 59f4b2af2e..0000000000 --- a/reference/mysqlnd_qc/functions/mysqlnd-qc-set-user-handlers.xml +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - mysqlnd_qc_set_user_handlers - Sets the callback functions for a user-defined procedural storage handler - - - - &reftitle.description; - - bool - mysqlnd_qc_set_user_handlers - - string - get_hash - - - string - find_query_in_cache - - - string - return_to_cache - - - string - add_query_to_cache_if_not_exists - - - string - query_is_select - - - string - update_query_run_time_stats - - - string - get_stats - - - string - clear_cache - - - - Sets the callback functions for a user-defined procedural storage handler. - - - - - - - - &reftitle.parameters; - - - - get_hash - - - - Name of the user function implementing the storage handler - get_hash functionality. - - - - - - find_query_in_cache - - - - Name of the user function implementing the storage handler - find_in_cache functionality. - - - - - - return_to_cache - - - - Name of the user function implementing the storage handler - return_to_cache functionality. - - - - - - add_query_to_cache_if_not_exists - - - - Name of the user function implementing the storage handler - add_query_to_cache_if_not_exists functionality. - - - - - - query_is_select - - - - Name of the user function implementing the storage handler - query_is_select functionality. - - - - - - update_query_run_time_stats - - - - Name of the user function implementing the storage handler - update_query_run_time_stats functionality. - - - - - - get_stats - - - - Name of the user function implementing the storage handler - get_stats functionality. - - - - - - clear_cache - - - - Name of the user function implementing the storage handler - clear_cache functionality. - - - - - - - - &reftitle.returnvalues; - - Returns TRUE on success or FALSE on FAILURE. - - - - - &reftitle.seealso; - - - - Procedural user-defined storage handler example - - - - - - - - diff --git a/reference/mysqlnd_qc/ini.xml b/reference/mysqlnd_qc/ini.xml deleted file mode 100644 index 3a14ce54a8..0000000000 --- a/reference/mysqlnd_qc/ini.xml +++ /dev/null @@ -1,443 +0,0 @@ - - - -
- &reftitle.runtime; - &extension.runtime; - - - mysqlnd_qc &ConfigureOptions; - - - - &Name; - &Default; - &Changeable; - &Changelog; - - - - - mysqlnd_qc.enable_qc - 1 - PHP_INI_SYSTEM - - - - - mysqlnd_qc.ttl - 30 - PHP_INI_ALL - - - - - mysqlnd_qc.cache_by_default - 0 - PHP_INI_ALL - - - - - mysqlnd_qc.cache_no_table - 0 - PHP_INI_ALL - - - - - mysqlnd_qc.use_request_time - 0 - PHP_INI_ALL - - - - - mysqlnd_qc.time_statistics - 1 - PHP_INI_ALL - - - - - mysqlnd_qc.collect_statistics - 0 - PHP_INI_ALL - - - - - mysqlnd_qc.collect_statistics_log_file - /tmp/mysqlnd_qc.stats - PHP_INI_SYSTEM - - - - - mysqlnd_qc.collect_query_trace - 0 - PHP_INI_SYSTEM - - - - - mysqlnd_qc.query_trace_bt_depth - 3 - PHP_INI_SYSTEM - - - - - mysqlnd_qc.collect_normalized_query_trace - 0 - PHP_INI_SYSTEM - - - - - mysqlnd_qc.ignore_sql_comments - 1 - PHP_INI_ALL - - - - - mysqlnd_qc.slam_defense - 0 - PHP_INI_SYSTEM - - - - - mysqlnd_qc.slam_defense_ttl - 30 - PHP_INI_SYSTEM - - - - - mysqlnd_qc.std_data_copy - 0 - PHP_INI_SYSTEM - - - - - mysqlnd_qc.apc_prefix - qc_ - PHP_INI_ALL - - - - - mysqlnd_qc.memc_server - 127.0.0.1 - PHP_INI_ALL - - - - - mysqlnd_qc.memc_port - 11211 - PHP_INI_ALL - - - - - mysqlnd_qc.sqlite_data_file - :memory: - PHP_INI_ALL - - - - - -
-
- - &ini.descriptions.title; - - - - - - mysqlnd_qc.enable_qc - int - - - - Enables or disables the plugin. If disabled the extension will not plug - into - mysqlnd to proxy internal - mysqlnd C API calls. - - - - - - mysqlnd_qc.ttl - int - - - - Default Time-to-Live (TTL) for cache entries in seconds. - - - - - - mysqlnd_qc.cache_by_default - int - - - - Cache all queries regardless if they begin with the SQL hint that - enables caching of a query or not. Storage handler cannot overrule - the setting. It is evaluated by the core of the plugin. - - - - - - mysqlnd_qc.cache_no_table - int - - - - Whether to cache queries with no table name in any of columns meta data - of their result set, for example, - SELECT SLEEP(1), SELECT NOW(), - SELECT SUBSTRING(). - - - - - - mysqlnd_qc.use_request_time - int - - - - Use PHP global request time to avoid - gettimeofday() system calls? - If using - APC storage handler - it should be set to the value of - apc.use_request_time, if not - warnings will be generated. - - - - - - mysqlnd_qc.time_statistics - int - - - - Collect run time and store time statistics using - gettimeofday() system call? Data will be - collected only if you also set - mysqlnd_qc.collect_statistics = 1, - - - - - - mysqlnd_qc.collect_statistics - int - - - - Collect statistics for - mysqlnd_qc_get_core_stats? - Does not influence storage handler statistics! Handler statistics - can be an integral part of the handler internal storage format. - Therefore, collection of some handler statistics cannot be disabled. - - - - - - mysqlnd_qc.collect_statistics-log-file - int - - - - If mysqlnd_qc.collect_statistics and - mysqlnd_qc.collect_statistics_log_file - are set, the plugin will dump statistics into the specified - log file at every 10th web request during PHP request shutdown. - The log file needs to be writable by the web server user. - - - Since 1.1.0. - - - - - - mysqlnd_qc.collect_query_trace - int - - - - Collect query back traces? - - - - - - mysqlnd_qc.query_trace_bt_depth - int - - - - Maximum depth/level of a query code backtrace. - - - - - - mysqlnd_qc.ignore_sql_comments - int - - - - Whether to remove SQL comments from a query string before - hashing it to generate a cache key. Disable if you do not want - two statemts such as SELECT /*my_source_ip=123*/ id FROM test - and SELECT /*my_source_ip=456*/ id FROM test to refer - to the same cache entry. - - - Since 1.1.0. - - - - - - mysqlnd_qc.slam_defense - int - - - - Activates handler based slam defense (cache stampeding protection) if available. - Supported by - Default and - APC storage handler - - - - - - mysqlnd_qc.slam_defense_ttl - int - - - - TTL for stale cache entries which are - served while another client updates the entries. Supported by - APC storage handler. - - - - - - mysqlnd_qc.collect_normalized_query_trace - int - - - - Collect aggregated normalized query traces? The setting - has no effect by default. You compile the extension - using the define - NORM_QUERY_TRACE_LOG to make use of the setting. - - - - - - mysqlnd_qc.std_data_copy - int - - - - Default storage handler: copy cached wire data? - EXPERIMENTAL – use default setting! - - - - - - mysqlnd_qc.apc_prefix - string - - - - The - APC storage handler stores data in the - APC user cache. The setting sets a prefix to be - used for cache entries. - - - - - - mysqlnd_qc.memc_server - string - - - - MEMCACHE storage handler: memcache server host. - - - - - - mysqlnd_qc.memc_port - int - - - - MEMCACHE storage handler: memcached server port. - - - - - - mysqlnd_qc.sqlite_data_file - string - - - - sqlite storage handler: data file. Any setting - but :memory: may be of little practical value. - - - - - - -
- - diff --git a/reference/mysqlnd_qc/quickstart.xml b/reference/mysqlnd_qc/quickstart.xml deleted file mode 100644 index ffb9e589be..0000000000 --- a/reference/mysqlnd_qc/quickstart.xml +++ /dev/null @@ -1,1732 +0,0 @@ - - - - - Quickstart and Examples - - The mysqlnd query cache plugin is easy to use. - This quickstart will demo typical use-cases, and provide practical advice on getting - started. - - - It is strongly recommended to read the reference sections in addition to the - quickstart. It is safe to begin with the quickstart. - However, before using the plugin in mission critical - environments we urge you to read additionally the background information from the - reference sections. - - - Most of the examples use the mysqli extension - because it is the most feature complete PHP MySQL extension. However, the plugin - can be used with any PHP MySQL extension that is using the - mysqlnd library. - - -
- Architecture and Concepts - - The query cache plugin is implemented as a PHP extension. - It is written in C and operates under the hood of PHP. During the - startup of the PHP interpreter, it gets registered as a - mysqlnd plugin to replace selected - mysqlnd C methods. Hereby, it can change the behaviour of any - PHP MySQL extension (mysqli, - PDO_MYSQL, - mysql) compiled to use the - mysqlnd library without changing the extensions API. This makes - the plugin compatible with each and every PHP MySQL application. - Because existing APIs are not changed, it is almost transparent - to use. Please, see the - mysqlnd plugin API description - for a discussion of the advantages of the plugin architecture and - a comparison with proxy based solutions. - - - Transparent to use - - - At PHP run time PECL/mysqlnd_qc can proxy queries send from PHP - (mysqlnd) to the MySQL server. - It then inspects the statement string to find whether it shall cache - its results. If so, result set is cached using a storage handler and - further executions of the statement are served from the cache for - a user-defined period. The Time to Live (TTL) of the cache entry - can either be set globally or on a per statement basis. - - - A statement is either cached if the plugin is instructed to cache all - statements globally using a or, if the query string starts with the SQL hint - (/*qc=on*/). The plugin is capable of caching any - query issued by calling appropriate API calls of any of the existing - PHP MySQL extensions. - - - Flexible storage: various storage handler - - - Various storage handler are supported to offer different scopes for cache - entries. Different scopes allow for different degrees in sharing cache - entries among clients. - - - - - - default (built-in): process memory, scope: process, one or more web requests depending on PHP deployment model used - - - - - APC: shared memory, scope: single server, multiple web requests - - - - - SQLite: memory or file, scope: single server, multiple web requests - - - - - MEMCACHE: main memory, scope: single or multiple server, multiple web requests - - - - - user (built-in): user-defined - any, scope: user-defined - any - - - - - - Support for the APC, SQLite and - MEMCACHE storage handler has to be enabled at compile time. The - default and user handler are built-in. It is possible - to switch between compiled-in storage handlers on a per query basis at run time. - However, it is recommended to pick one storage handler and use it for all cache entries. - - - Built-in slam defense to avoid overloading - - - To avoid overload situations the cache plugin has a built-in slam defense mechanism. - If a popular cache entries expires many clients using the cache entries will try - to refresh the cache entry. For the duration of the refresh many clients may - access the database server concurrently. In the worst case, the database server - becomes overloaded and it takes more and more time to refresh the cache entry, which - in turn lets more and more clients try to refresh the cache entry. To prevent - this from happening the plugin has a slam defense mechanism. If slam defense is - enabled and the plugin detects an expired cache entry it extends the life time - of the cache entry before it refreshes the cache entry. This way other concurrent - accesses to the expired cache entry are still served from the cache for a certain - time. The other concurrent accesses to not trigger a concurrent refresh. Ideally, - the cache entry gets refreshed by the client which extended the cache entries lifespan - before other clients try to refresh the cache and potentially cause an overload - situation. - - - Unique approach to caching - - - PECL/mysqlnd_qc has a unique approach to caching result sets that is superior - to application based cache solutions. Application based solutions first fetch - a result set into PHP variables. Then, the PHP variables are serialized for - storage in a persistent cache, and then unserialized when fetching. The mysqlnd - query cache stores the raw wire protocol data sent from MySQL to PHP in its cache - and replays it, if still valid, on a cache hit. This way, it saves an extra - serialization step for a cache put that all application based solutions have to - do. It can store the raw wire protocol data in the cache without having to - serialize into a PHP variable first and deserializing the PHP variable for storing - in the cache again. - -
- -
- Setup - - The plugin is implemented as a PHP extension. See also the - installation instructions to - install the - PECL/mysqlnd_qc extension. - - - Compile or configure the PHP MySQL extension (mysqli, - PDO_MYSQL, - mysql) that you plan to use with support - for the mysqlnd library. PECL/mysqlnd_qc - is a plugin for the mysqlnd library. To use the plugin with any of the existing PHP - MySQL extensions (APIs), the extension has to use the mysqlnd library. - - - Then, load the extension into PHP and activate the plugin in the PHP configuration - file using the PHP configuration directive named - mysqlnd_qc.enable_qc. - - - - Enabling the plugin (php.ini) - - - - - -
- -
- Caching queries - - There are four ways to trigger caching of a query. - - - Use of SQL hints on a per query basis - - - - User supplied callbacks to decide on a per query basis, for example, using mysqlnd_qc_is_select - - - - - mysqlnd_set_cache_condition for rule based automatic per query decisions - - - - - mysqlnd_qc.cache_by_default = 1 - to cache all queries blindly - - - - - - Use of SQL hints and - mysqlnd_qc.cache_by_default = 1 - are explained below. Please, refer to the function reference on - mysqlnd_qc_is_select for a description of using a callback and, - mysqlnd_qc_set_cache_condition on how to set rules for automatic - caching. - - - A SQL hint is a SQL standards compliant - comment. As a SQL comment it is ignored by the database. A statement is considered - eligible for caching if it either begins with the SQL hint enabling caching - or it is a SELECT statement. - - - An individual query which shall be cached must begin with the SQL hint - /*qc=on*/. It is recommended to use the PHP constant - MYSQLND_QC_ENABLE_SWITCH - instead of using the string value. - - - - - - not eligible for caching and not cached: INSERT INTO test(id) VALUES (1) - - - - - not eligible for caching and not cached: SHOW ENGINES - - - - - eligible for caching but uncached: SELECT id FROM test - - - - - eligible for caching and cached: /*qc=on*/SELECT id FROM test - - - - - - The examples SELECT statement string is prefixed with the - MYSQLND_QC_ENABLE_SWITCH - SQL hint to enable caching of the statement. The SQL hint must be given at - the very beginning of the statement string to enable caching. - - - - Using the <literal>MYSQLND_QC_ENABLE_SWITCH</literal> SQL hint - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2)"); - -/* Will be cached because of the SQL hint */ -$start = microtime(true); -$res = $mysqli->query("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT id FROM test WHERE id = 1"); - -var_dump($res->fetch_assoc()); -$res->free(); - -printf("Total time uncached query: %.6fs\n", microtime(true) - $start); - -/* Cache hit */ -$start = microtime(true); -$res = $mysqli->query("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT id FROM test WHERE id = 1"); - -var_dump($res->fetch_assoc()); -$res->free(); - -printf("Total time cached query: %.6fs\n", microtime(true) - $start); -?> -]]> - - &examples.outputs.similar; - - - string(1) "1" -} -Total time uncached query: 0.000740s -array(1) { - ["id"]=> - string(1) "1" -} -Total time cached query: 0.000098s -]]> - - - - - If nothing else is configured, as it is the case in the quickstart example, - the plugin will use the built-in default storage handler. - The default storage handler uses process memory to hold a cache entry. - Depending on the PHP deployment model, a PHP process may serve one or more - web requests. Please, consult the web server manual for details. - Details make no difference for the examples given in the quickstart. - - - The query cache plugin will cache all queries regardless if - the query string begins with the SQL hint which enables caching or not, - if the PHP configuration directive - mysqlnd_qc.cache_by_default - is set to 1. The setting - mysqlnd_qc.cache_by_default - is evaluated by the core of the query cache plugins. - Neither the built-in nor user-defined storage handler can overrule the setting. - - - The SQL hint /*qc=off*/ can be used to disable caching - of individual queries if - mysqlnd_qc.cache_by_default = 1 - It is recommended to use the PHP constant - MYSQLND_QC_DISABLE_SWITCH - instead of using the string value. - - - - Using the <literal>MYSQLND_QC_DISABLE_SWITCH</literal> SQL hint - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2)"); - -/* Will be cached although no SQL hint is present because of mysqlnd_qc.cache_by_default = 1*/ -$res = $mysqli->query("SELECT id FROM test WHERE id = 1"); -var_dump($res->fetch_assoc()); -$res->free(); - -$mysqli->query("DELETE FROM test WHERE id = 1"); - -/* Cache hit - no automatic invalidation and still valid! */ -$res = $mysqli->query("SELECT id FROM test WHERE id = 1"); -var_dump($res->fetch_assoc()); -$res->free(); - -/* Cache miss - query must not be cached because of the SQL hint */ -$res = $mysqli->query("/*" . MYSQLND_QC_DISABLE_SWITCH . "*/SELECT id FROM test WHERE id = 1"); -var_dump($res->fetch_assoc()); -$res->free(); -?> -]]> - - &examples.outputs; - - - string(1) "1" -} -array(1) { - ["id"]=> - string(1) "1" -} -NULL -]]> - - - - - PECL/mysqlnd_qc forbids caching of statements for which at least one - column from the statements result set shows no table name in its meta data by default. - This is usually the case for columns originating from SQL functions such as - NOW() or LAST_INSERT_ID(). The policy - aims to prevent pitfalls if caching by default is used. - - - - Example showing which type of statements are not cached - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1)"); - -for ($i = 0; $i < 3; $i++) { - - $start = microtime(true); - - /* Note: statement will not be cached because of NOW() use */ - $res = $mysqli->query("SELECT id, NOW() AS _time FROM test"); - $row = $res->fetch_assoc(); - - /* dump results */ - var_dump($row); - - printf("Total time: %.6fs\n", microtime(true) - $start); - - /* pause one second */ - sleep(1); -} -?> -]]> - - &examples.outputs.similar; - - - string(1) "1" - ["_time"]=> - string(19) "2012-01-11 15:43:10" -} -Total time: 0.000540s -array(2) { - ["id"]=> - string(1) "1" - ["_time"]=> - string(19) "2012-01-11 15:43:11" -} -Total time: 0.000555s -array(2) { - ["id"]=> - string(1) "1" - ["_time"]=> - string(19) "2012-01-11 15:43:12" -} -Total time: 0.000549s -]]> - - - - - It is possible to enable caching for all statements including those - which has columns in their result set for which MySQL reports no table, such as - the statement from the example. Set - mysqlnd_qc.cache_no_table = 1 - to enable caching of such statements. Please, note the difference in the - measured times for the above and below examples. - - - - Enabling caching for all statements using the <literal>mysqlnd_qc.cache_no_table</literal> ini setting - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1)"); - -for ($i = 0; $i < 3; $i++) { - - $start = microtime(true); - - /* Note: statement will not be cached because of NOW() use */ - $res = $mysqli->query("SELECT id, NOW() AS _time FROM test"); - $row = $res->fetch_assoc(); - - /* dump results */ - var_dump($row); - - printf("Total time: %.6fs\n", microtime(true) - $start); - - /* pause one second */ - sleep(1); -} -?> -]]> - - &examples.outputs.similar; - - - string(1) "1" - ["_time"]=> - string(19) "2012-01-11 15:47:45" -} -Total time: 0.000546s -array(2) { - ["id"]=> - string(1) "1" - ["_time"]=> - string(19) "2012-01-11 15:47:45" -} -Total time: 0.000187s -array(2) { - ["id"]=> - string(1) "1" - ["_time"]=> - string(19) "2012-01-11 15:47:45" -} -Total time: 0.000167s -]]> - - - - - - Although mysqlnd_qc.cache_no_table = 1 - has been created for use with - mysqlnd_qc.cache_by_default = 1 - it is bound it. The plugin will evaluate the - mysqlnd_qc.cache_no_table - whenever a query is to be cached, no matter whether caching has been enabled using a - SQL hint or any other measure. - - -
- -
- Setting the TTL - - The default invalidation strategy of the query cache plugin is Time to Live - (TTL). The built-in storage handlers will use the default - TTL defined by the PHP configuration value - mysqlnd_qc.ttl - unless the query string contains a hint for setting a different - TTL. The TTL is specified in seconds. - By default cache entries expire after 30 seconds - - - The example sets mysqlnd_qc.ttl=3 to cache - statements for three seconds by default. Every second it updates - a database table record to hold the current time and executes - a SELECT statement to fetch the record from the - database. The SELECT statement is cached for - three seconds because it is prefixed with the SQL hint enabling - caching. The output verifies that the query results are taken - from the cache for the duration of three seconds before they - are refreshed. - - - - Setting the TTL with the <literal>mysqlnd_qc.ttl</literal> ini setting - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id VARCHAR(255))"); - -for ($i = 0; $i < 7; $i++) { - - /* update DB row */ - if (!$mysqli->query("DELETE FROM test") || - !$mysqli->query("INSERT INTO test(id) VALUES (NOW())")) - /* Of course, a real-life script should do better error handling */ - die(sprintf("[%d] %s\n", $mysqli->errno, $mysqli->error)); - - /* select latest row but cache results */ - $query = "/*" . MYSQLND_QC_ENABLE_SWITCH . "*/"; - $query .= "SELECT id AS _time FROM test"; - if (!($res = $mysqli->query($query)) || - !($row = $res->fetch_assoc())) - { - printf("[%d] %s\n", $mysqli->errno, $mysqli->error); - } - $res->free(); - printf("Wall time %s - DB row time %s\n", date("H:i:s"), $row['_time']); - - /* pause one second */ - sleep(1); -} -?> -]]> - - &examples.outputs.similar; - - - - - - - As can be seen from the example, any TTL based cache - can serve stale data. Cache entries are not automatically invalidated, - if underlying data changes. Applications using the default - TTL invalidation strategy must be able to work correctly - with stale data. - - - A user-defined cache storage handler can implement any invalidation strategy - to work around this limitation. - - - The default TTL can be overruled using the SQL hint - /*qc_tt=seconds*/. The SQL hint must be appear immediately - after the SQL hint which enables caching. It is recommended to use the PHP constant - MYSQLND_QC_TTL_SWITCH - instead of using the string value. - - - - Setting TTL with SQL hints - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2)"); - -printf("Default TTL\t: %d seconds\n", ini_get("mysqlnd_qc.ttl")); - -/* Will be cached for 2 seconds */ -$sql = sprintf("/*%s*//*%s%d*/SELECT id FROM test WHERE id = 1", MYSQLND_QC_ENABLE_SWITCH, MYSQLND_QC_TTL_SWITCH, 2); -$res = $mysqli->query($sql); - -var_dump($res->fetch_assoc()); -$res->free(); - -$mysqli->query("DELETE FROM test WHERE id = 1"); -sleep(1); - -/* Cache hit - no automatic invalidation and still valid! */ -$res = $mysqli->query($sql); -var_dump($res->fetch_assoc()); -$res->free(); - -sleep(2); - -/* Cache miss - cache entry has expired */ -$res = $mysqli->query($sql); -var_dump($res->fetch_assoc()); -$res->free(); - -printf("Script runtime\t: %d seconds\n", microtime(true) - $start); -?> -]]> - - &examples.outputs.similar; - - - string(1) "1" -} -array(1) { - ["id"]=> - string(1) "1" -} -NULL -Script runtime : 3 seconds -]]> - - - -
- -
- Pattern based caching - - An application has three options for telling PECL/mysqlnd_qc whether a particular - statement shall be used. The most basic approach is to cache all statements by - setting - mysqlnd_qc.cache_by_default = 1. This approach is often of little - practical value. But it enables users to make a quick estimation about - the maximum performance gains from caching. An application designed to - use a cache may be able to prefix selected statements with the appropriate SQL - hints. However, altering an applications source code may not always be possible - or desired, for example, to avoid problems with software updates. Therefore, - PECL/mysqlnd_qc allows setting a callback which decides if a query is to be - cached. - - - The callback is installed with the mysqlnd_qc_set_is_select - function. The callback is given the statement string of every statement - inspected by the plugin. Then, the callback can decide whether to cache - the function. The callback is supposed to return &false; - if the statement shall not be cached. A return value of &true; - makes the plugin try to add the statement into the cache. The cache entry - will be given the default TTL ( - mysqlnd_qc.ttl). If the callback returns - a numerical value it is used as the TTL instead of the global default. - - - - Setting a callback with <function>mysqlnd_qc_set_is_select</function> - - - - - true, - /* 3 - use TTL = 3 seconds */ - "@SELECT\s+.*\s+FROM\s+news@ismU" => 3 - ); - - /* check if query does match pattern */ - foreach ($patterns as $pattern => $ttl) { - if (preg_match($pattern, $query)) { - printf("is_select(%45s): cache\n", $query); - return $ttl; - } - } - printf("is_select(%45s): do not cache\n", $query); - return false; -} -/* install callback */ -mysqlnd_qc_set_is_select("is_select"); - -/* Connect, create and populate test table */ -$mysqli = new mysqli("host", "user", "password", "schema", "port", "socket"); -$mysqli->query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2), (3)"); - -/* cache put */ -$mysqli->query("SELECT id FROM test WHERE id = 1"); -/* cache hit */ -$mysqli->query("SELECT id FROM test WHERE id = 1"); -/* cache put */ -$mysqli->query("SELECT * FROM test"); - -$stats = mysqlnd_qc_get_core_stats(); -printf("Cache put: %d\n", $stats['cache_put']); -printf("Cache hit: %d\n", $stats['cache_hit']); -?> -]]> - - &examples.outputs.similar; - - - - - - - The examples callback tests if a statement string matches a pattern. - If this is the case, it either returns &true; to cache - the statement using the global default TTL or an alternative TTL. - - - To minimize application changes the callback can put into and registered - in an auto prepend file. - -
- -
- Slam defense - - A badly designed cache can do more harm than good. In the worst case a cache - can increase database server load instead of minimizing it. An overload situation - can occur if a highly shared cache entry expires (cache stampeding). - - - Cache entries are shared and reused to a different degree depending on - the storage used. The default storage handler stores cache entries in process memory. - Thus, a cache entry can be reused for the life-span of a process. Other PHP - processes cannot access it. If Memcache is used, a cache entry can be shared - among multiple PHP processes and even among multiple machines, depending on the - set up being used. - - - If a highly shared cache entry stored, for example, in Memcache expires, many - clients gets a cache miss. Many client requests can no longer be served from - the cache but try to run the underlying query on the database server. Until - the cache entry is refreshed, more and more clients contact the database server. - In the worst case, a total lost of service is the result. - - - The overload can be avoided using a storage handler which limits the reuse of cache - entries to few clients. Then, at the average, its likely that only a limited number - of clients will try to refresh a cache entry concurrently. - - - Additionally, the built-in slam defense mechanism can and should be used. If - slam defense is activated an expired cache entry is given an extended life time. - The first client getting a cache miss for the expired cache entry tries to - refresh the cache entry within the extended life time. All other clients requesting - the cache entry are temporarily served from the cache although the original - TTL of the cache entry has expired. The other clients will - not experience a cache miss before the extended life time is over. - - - - Enabling the slam defense mechanism - - - - - - - The slam defense mechanism is enabled with the PHP configuration directive - mysqlnd_qc.slam_defense. - The extended life time of a cache entry is set with - mysqlnd_qc.slam_defense_ttl. - - - The function - mysqlnd_qc_get_core_stats returns an array of - statistics. The statistics slam_stale_refresh and - slam_stale_hit are incremented if slam defense takes place. - - - It is not possible to give a one-fits-all recommendation on the slam defense - configuration. Users are advised to monitor and test their setup and derive - settings accordingly. - -
- -
- Finding cache candidates - - A statement should be considered for caching if it is executed often and has - a long run time. Cache candidates are found by creating a list of statements - sorted by the product of the number of executions multiplied by the - statements run time. The function - mysqlnd_qc_get_query_trace_log - returns a query log which help with the task. - - - Collecting a query trace is a slow operation. Thus, it is disabled by default. - The PHP configuration directive - mysqlnd_qc.collect_query_trace - is used to enable it. The functions trace contains one entry for every - query issued before the function is called. - - - - Collecting a query trace - - - - -query("SELECT 1 AS _one FROM DUAL"); - $res->free(); -} - -/* dump trace */ -var_dump(mysqlnd_qc_get_query_trace_log()); -?> -]]> - - &examples.outputs; - - - array(8) { - ["query"]=> - string(26) "SELECT 1 AS _one FROM DUAL" - ["origin"]=> - string(102) "#0 qc.php(7): mysqli->query('SELECT 1 AS _on...') -#1 {main}" - ["run_time"]=> - int(0) - ["store_time"]=> - int(25) - ["eligible_for_caching"]=> - bool(false) - ["no_table"]=> - bool(false) - ["was_added"]=> - bool(false) - ["was_already_in_cache"]=> - bool(false) - } - [1]=> - array(8) { - ["query"]=> - string(26) "SELECT 1 AS _one FROM DUAL" - ["origin"]=> - string(102) "#0 qc.php(7): mysqli->query('SELECT 1 AS _on...') -#1 {main}" - ["run_time"]=> - int(0) - ["store_time"]=> - int(8) - ["eligible_for_caching"]=> - bool(false) - ["no_table"]=> - bool(false) - ["was_added"]=> - bool(false) - ["was_already_in_cache"]=> - bool(false) - } -} -]]> - - - - - Assorted information is given in the trace. Among them - timings and the origin of the query call. The origin property - holds a code backtrace to identify the source of the query. - The depth of the backtrace can be limited with - the PHP configuration directive - mysqlnd_qc.query_trace_bt_depth. - The default depth is 3. - - - - Setting the backtrace depth with the <literal>mysqlnd_qc.query_trace_bt_depth</literal> ini setting - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2), (3)"); - -/* dummy queries to fill the query trace */ -for ($i = 0; $i < 3; $i++) { - $res = $mysqli->query("SELECT id FROM test WHERE id = " . $mysqli->real_escape_string($i)); - $res->free(); -} - -$trace = mysqlnd_qc_get_query_trace_log(); -$summary = array(); -foreach ($trace as $entry) { - if (!isset($summary[$entry['query']])) { - $summary[$entry['query']] = array( - "executions" => 1, - "time" => $entry['run_time'] + $entry['store_time'], - ); - } else { - $summary[$entry['query']]['executions']++; - $summary[$entry['query']]['time'] += $entry['run_time'] + $entry['store_time']; - } -} - -foreach ($summary as $query => $details) { - printf("%45s: %5dms (%dx)\n", - $query, $details['time'], $details['executions']); -} -?> -]]> - - &examples.outputs.similar; - - - - - -
- -
- Measuring cache efficiency - - PECL/mysqlnd_qc offers three ways to measure the cache efficiency. - The function - mysqlnd_qc_get_normalized_query_trace_log - returns statistics aggregated by the normalized query string, - mysqlnd_qc_get_cache_info - gives storage handler specific information which includes a list - of all cached items, depending on the storage handler. Additionally, the - core of PECL/mysqlnd_qc collects high-level summary statistics aggregated - per PHP process. The high-level statistics are returned by - mysqlnd_qc_get_core_stats. - - - The functions - mysqlnd_qc_get_normalized_query_trace_log - and - mysqlnd_qc_get_core_stats - will not collect data unless data collection has been - enabled through their corresponding PHP configuration directives. Data collection - is disabled by default for performance considerations. It is configurable with the - mysqlnd_qc.time_statistics - option, which determines if timing information should be collected. - Collection of time statistics is enabled by default - but only performed if data collection as such has been enabled. - Recording time statistics causes extra system calls. In most cases, - the benefit of the monitoring outweighs any potential performance penalty of - the additional system calls. - - - - Collecting statistics data with the <literal>mysqlnd_qc.time_statistics</literal> ini setting - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2), (3)"); - -/* dummy queries */ -for ($i = 1; $i <= 4; $i++) { - $query = sprintf("/*%s*/SELECT id FROM test WHERE id = %d", MYSQLND_QC_ENABLE_SWITCH, $i % 2); - $res = $mysqli->query($query); - - $res->free(); -} - -var_dump(mysqlnd_qc_get_core_stats()); -?> -]]> - - &examples.outputs.similar; - - - string(1) "2" - ["cache_miss"]=> - string(1) "2" - ["cache_put"]=> - string(1) "2" - ["query_should_cache"]=> - string(1) "4" - ["query_should_not_cache"]=> - string(1) "3" - ["query_not_cached"]=> - string(1) "3" - ["query_could_cache"]=> - string(1) "4" - ["query_found_in_cache"]=> - string(1) "2" - ["query_uncached_other"]=> - string(1) "0" - ["query_uncached_no_table"]=> - string(1) "0" - ["query_uncached_no_result"]=> - string(1) "0" - ["query_uncached_use_result"]=> - string(1) "0" - ["query_aggr_run_time_cache_hit"]=> - string(2) "28" - ["query_aggr_run_time_cache_put"]=> - string(3) "900" - ["query_aggr_run_time_total"]=> - string(3) "928" - ["query_aggr_store_time_cache_hit"]=> - string(2) "14" - ["query_aggr_store_time_cache_put"]=> - string(2) "40" - ["query_aggr_store_time_total"]=> - string(2) "54" - ["receive_bytes_recorded"]=> - string(3) "136" - ["receive_bytes_replayed"]=> - string(3) "136" - ["send_bytes_recorded"]=> - string(2) "84" - ["send_bytes_replayed"]=> - string(2) "84" - ["slam_stale_refresh"]=> - string(1) "0" - ["slam_stale_hit"]=> - string(1) "0" - ["request_counter"]=> - int(1) - ["process_hash"]=> - int(1929695233) -} -]]> - - - - - For a quick overview, call - mysqlnd_qc_get_core_stats. It delivers - cache usage, cache timing and traffic related statistics. Values are aggregated - on a per process basis for all queries issued by any PHP MySQL API call. - - - Some storage handler, such as the default handler, can report cache entries, - statistics related to the entries and meta data for the underlying query through the - mysqlnd_qc_get_cache_info - function. Please note, that the information returned depends - on the storage handler. Values are aggregated on a per process basis. - - - - Example <function>mysqlnd_qc_get_cache_info</function> usage - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2), (3)"); - -/* dummy queries to fill the query trace */ -for ($i = 1; $i <= 4; $i++) { - $query = sprintf("/*%s*/SELECT id FROM test WHERE id = %d", MYSQLND_QC_ENABLE_SWITCH, $i % 2); - $res = $mysqli->query($query); - - $res->free(); -} - -var_dump(mysqlnd_qc_get_cache_info()); -?> -]]> - - &examples.outputs.similar; - - - int(2) - ["handler"]=> - string(7) "default" - ["handler_version"]=> - string(5) "1.0.0" - ["data"]=> - array(2) { - ["Localhost via UNIX socket -3306 -root -test|/*qc=on*/SELECT id FROM test WHERE id = 1"]=> - array(2) { - ["statistics"]=> - array(11) { - ["rows"]=> - int(1) - ["stored_size"]=> - int(71) - ["cache_hits"]=> - int(1) - ["run_time"]=> - int(391) - ["store_time"]=> - int(27) - ["min_run_time"]=> - int(16) - ["max_run_time"]=> - int(16) - ["min_store_time"]=> - int(8) - ["max_store_time"]=> - int(8) - ["avg_run_time"]=> - int(8) - ["avg_store_time"]=> - int(4) - } - ["metadata"]=> - array(1) { - [0]=> - array(8) { - ["name"]=> - string(2) "id" - ["orig_name"]=> - string(2) "id" - ["table"]=> - string(4) "test" - ["orig_table"]=> - string(4) "test" - ["db"]=> - string(4) "test" - ["max_length"]=> - int(1) - ["length"]=> - int(11) - ["type"]=> - int(3) - } - } - } - ["Localhost via UNIX socket -3306 -root -test|/*qc=on*/SELECT id FROM test WHERE id = 0"]=> - array(2) { - ["statistics"]=> - array(11) { - ["rows"]=> - int(0) - ["stored_size"]=> - int(65) - ["cache_hits"]=> - int(1) - ["run_time"]=> - int(299) - ["store_time"]=> - int(13) - ["min_run_time"]=> - int(11) - ["max_run_time"]=> - int(11) - ["min_store_time"]=> - int(6) - ["max_store_time"]=> - int(6) - ["avg_run_time"]=> - int(5) - ["avg_store_time"]=> - int(3) - } - ["metadata"]=> - array(1) { - [0]=> - array(8) { - ["name"]=> - string(2) "id" - ["orig_name"]=> - string(2) "id" - ["table"]=> - string(4) "test" - ["orig_table"]=> - string(4) "test" - ["db"]=> - string(4) "test" - ["max_length"]=> - int(0) - ["length"]=> - int(11) - ["type"]=> - int(3) - } - } - } - } -} -]]> - - - - - It is possible to further break down the granularity of statistics - to the level of the normalized statement string. - The normalized statement string is the statements string with all parameters - replaced with question marks. For example, the two statements - SELECT id FROM test WHERE id = 0 and - SELECT id FROM test WHERE id = 1 are normalized into - SELECT id FROM test WHERE id = ?. Their both - statistics are aggregated into one entry for - SELECT id FROM test WHERE id = ?. - - - - Example <function>mysqlnd_qc_get_normalized_query_trace_log</function> usage - - - - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2), (3)"); - -/* dummy queries to fill the query trace */ -for ($i = 1; $i <= 4; $i++) { - $query = sprintf("/*%s*/SELECT id FROM test WHERE id = %d", MYSQLND_QC_ENABLE_SWITCH, $i % 2); - $res = $mysqli->query($query); - - $res->free(); -} - -var_dump(mysqlnd_qc_get_normalized_query_trace_log()); -?> -]]> - - &examples.outputs.similar; - - - array(9) { - ["query"]=> - string(25) "DROP TABLE IF EXISTS test" - ["occurences"]=> - int(0) - ["eligible_for_caching"]=> - bool(false) - ["avg_run_time"]=> - int(0) - ["min_run_time"]=> - int(0) - ["max_run_time"]=> - int(0) - ["avg_store_time"]=> - int(0) - ["min_store_time"]=> - int(0) - ["max_store_time"]=> - int(0) - } - [1]=> - array(9) { - ["query"]=> - string(27) "CREATE TABLE test (id INT )" - ["occurences"]=> - int(0) - ["eligible_for_caching"]=> - bool(false) - ["avg_run_time"]=> - int(0) - ["min_run_time"]=> - int(0) - ["max_run_time"]=> - int(0) - ["avg_store_time"]=> - int(0) - ["min_store_time"]=> - int(0) - ["max_store_time"]=> - int(0) - } - [2]=> - array(9) { - ["query"]=> - string(46) "INSERT INTO test (id ) VALUES (? ), (? ), (? )" - ["occurences"]=> - int(0) - ["eligible_for_caching"]=> - bool(false) - ["avg_run_time"]=> - int(0) - ["min_run_time"]=> - int(0) - ["max_run_time"]=> - int(0) - ["avg_store_time"]=> - int(0) - ["min_store_time"]=> - int(0) - ["max_store_time"]=> - int(0) - } - [3]=> - array(9) { - ["query"]=> - string(31) "SELECT id FROM test WHERE id =?" - ["occurences"]=> - int(4) - ["eligible_for_caching"]=> - bool(true) - ["avg_run_time"]=> - int(179) - ["min_run_time"]=> - int(11) - ["max_run_time"]=> - int(393) - ["avg_store_time"]=> - int(12) - ["min_store_time"]=> - int(7) - ["max_store_time"]=> - int(25) - } -} -]]> - - - - - The source distribution of PECL/mysqlnd_qc contains a directory - web/ in which web based monitoring - scripts can be found which give an example how to write a cache monitor. - Please, follow the instructions given in the source. - - - Since PECL/mysqlnd_qc 1.1.0 it is possible to write statistics into a - log file. Please, see - mysqlnd_qc.collect_statistics_log_file. - -
- -
- Beyond TTL: user-defined storage - - The query cache plugin supports the use of user-defined storage handler. - User-defined storage handler can use arbitrarily complex invalidation - algorithms and support arbitrary storage media. - - - All user-defined storage handlers have to provide a certain interface. - The functions of the user-defined storage handler will be called by the - core of the cache plugin. The necessary interface consists of seven - public functions. Both procedural and object oriented user-defined storage - handler must implement the same set of functions. - - - - Using a user-defined storage handler - - $data, - "row_count" => $row_count, - "valid_until" => time() + $ttl, - "hits" => 0, - "run_time" => $run_time, - "store_time" => $store_time, - "cached_run_times" => array(), - "cached_store_times" => array(), - ); - - return TRUE; -} - -function query_is_select($query) { - printf("\t%s('%s'): ", __FUNCTION__, $query); - - $ret = FALSE; - if (stristr($query, "SELECT") !== FALSE) { - /* cache for 5 seconds */ - $ret = 5; - } - - printf("%s\n", (FALSE === $ret) ? "FALSE" : $ret); - return $ret; -} - -function update_query_run_time_stats($key, $run_time, $store_time) { - global $__cache; - printf("\t%s(%d)\n", __FUNCTION__, func_num_args()); - - if (isset($__cache[$key])) { - $__cache[$key]['hits']++; - $__cache[$key]["cached_run_times"][] = $run_time; - $__cache[$key]["cached_store_times"][] = $store_time; - } -} - -function get_stats($key = NULL) { - global $__cache; - printf("\t%s(%d)\n", __FUNCTION__, func_num_args()); - - if ($key && isset($__cache[$key])) { - $stats = $__cache[$key]; - } else { - $stats = array(); - foreach ($__cache as $key => $details) { - $stats[$key] = array( - 'hits' => $details['hits'], - 'bytes' => strlen($details['data']), - 'uncached_run_time' => $details['run_time'], - 'cached_run_time' => (count($details['cached_run_times'])) - ? array_sum($details['cached_run_times']) / count($details['cached_run_times']) - : 0, - ); - } - } - - return $stats; -} - -function clear_cache() { - global $__cache; - printf("\t%s(%d)\n", __FUNCTION__, func_num_args()); - - $__cache = array(); - return TRUE; -} - -/* Install procedural user-defined storage handler */ -if (!mysqlnd_qc_set_user_handlers("get_hash", "find_query_in_cache", - "return_to_cache", "add_query_to_cache_if_not_exists", - "query_is_select", "update_query_run_time_stats", "get_stats", "clear_cache")) { - - printf("Failed to install user-defined storage handler\n"); -} - - -/* Connect, create and populate test table */ -$mysqli = new mysqli("host", "user", "password", "schema", "port", "socket"); -$mysqli->query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1), (2)"); - -printf("\nCache put/cache miss\n"); - -$res = $mysqli->query("SELECT id FROM test WHERE id = 1"); -var_dump($res->fetch_assoc()); -$res->free(); - -/* Delete record to verify we get our data from the cache */ -$mysqli->query("DELETE FROM test WHERE id = 1"); - -printf("\nCache hit\n"); - -$res = $mysqli->query("SELECT id FROM test WHERE id = 1"); -var_dump($res->fetch_assoc()); -$res->free(); - -printf("\nDisplay cache statistics\n"); -var_dump(mysqlnd_qc_get_cache_info()); - -printf("\nFlushing cache, cache put/cache miss"); -var_dump(mysqlnd_qc_clear_cache()); - -$res = $mysqli->query("SELECT id FROM test WHERE id = 1"); -var_dump($res->fetch_assoc()); -$res->free(); -?> -]]> - - &examples.outputs.similar; - - - string(1) "1" -} - query_is_select('DELETE FROM test WHERE id = 1'): FALSE - -Cache hit - query_is_select('SELECT id FROM test WHERE id = 1'): 5 - get_hash(5) - find_query_in_cache(1) - return_to_cache(1) - update_query_run_time_stats(3) -array(1) { - ["id"]=> - string(1) "1" -} - -Display cache statistics - get_stats(0) -array(4) { - ["num_entries"]=> - int(1) - ["handler"]=> - string(4) "user" - ["handler_version"]=> - string(5) "1.0.0" - ["data"]=> - array(1) { - ["18683c177dc89bb352b29965d112fdaa"]=> - array(4) { - ["hits"]=> - int(1) - ["bytes"]=> - int(71) - ["uncached_run_time"]=> - int(398) - ["cached_run_time"]=> - int(4) - } - } -} - -Flushing cache, cache put/cache miss clear_cache(0) -bool(true) - query_is_select('SELECT id FROM test WHERE id = 1'): 5 - get_hash(5) - find_query_in_cache(1) - add_query_to_cache_if_not_exists(6) -NULL - -]]> - - - -
-
- - diff --git a/reference/mysqlnd_qc/reference.xml b/reference/mysqlnd_qc/reference.xml deleted file mode 100644 index 559f8e9554..0000000000 --- a/reference/mysqlnd_qc/reference.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - mysqlnd_qc &Functions; - - &reference.mysqlnd-qc.entities.functions; - - - - diff --git a/reference/mysqlnd_qc/setup.xml b/reference/mysqlnd_qc/setup.xml deleted file mode 100644 index 897945f995..0000000000 --- a/reference/mysqlnd_qc/setup.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - - PHP 5.3.3 or a newer version of PHP. - - - PECL/mysqlnd_qc is a mysqlnd plugin. It plugs into the mysqlnd library. - To use you this plugin with a PHP MySQL extension, the extension (mysqli, - mysql, or PDO_MYSQL) - must enable the mysqlnd library. - - - For using - MEMCACHE storage handler: - Use libmemcache 0.38 or newer. - PECL/mysqlnd_qc 1.2 has been tested with libmemcache 1.4.0. - - - For using - sqlite storage handler: - Use the sqlite3 extension that - bundled with PHP. - -
- - &reference.mysqlnd-qc.configure; - &reference.mysqlnd-qc.ini; - -
- - diff --git a/reference/mysqlnd_qc/versions.xml b/reference/mysqlnd_qc/versions.xml deleted file mode 100644 index d2fede2565..0000000000 --- a/reference/mysqlnd_qc/versions.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/reference/mysqlnd_uh/book.xml b/reference/mysqlnd_uh/book.xml deleted file mode 100644 index cf43ea2fd4..0000000000 --- a/reference/mysqlnd_uh/book.xml +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Mysqlnd user handler plugin - mysqlnd_uh - - - &reftitle.intro; - - The mysqlnd user handler plugin (mysqlnd_uh) - allows users to set hooks for most internal calls of the - MySQL native driver for PHP - (mysqlnd). - Mysqlnd and its plugins, including PECL/mysqlnd_uh, operate on a layer - beneath the PHP MySQL extensions. A mysqlnd plugin can be considered - as a proxy between the PHP MySQL extensions and the MySQL server - as part of the PHP executable on the client-side. Because the plugins - operates on their own layer below the PHP MySQL extensions, - they can monitor and change application actions without requiring - application changes. If the - PHP MySQL extensions (mysqli, - mysql, - PDO_MYSQL) are compiled to - use mysqlnd this can be used for: - - - - Monitoring - - - - - - Queries executed by any of the PHP MySQL extensions - - - - - Prepared statements executing by any of the PHP MySQL extensions - - - - - - - - Auditing - - - - - - Detection of database usage - - - - - SQL injection protection using black and white lists - - - - - - - - Assorted - - - - - - Load Balancing connections - - - - - - - - - The MySQL native driver for PHP (mysqlnd) - features an internal plugin C API. C plugins, such as the mysqlnd - user handler plugin, can extend the functionality of - mysqlnd. PECL/mysqlnd_uh - makes parts of the internal plugin C API available to the - PHP user for plugin development with PHP. - - - Status - - The mysqlnd user handler plugin is in alpha status. - Take appropriate care before using it in production environments. - - - -
- Security considerations - - PECL/mysqlnd_uh gives users access to MySQL user names, MySQL password - used by any of the PHP MySQL extensions to connect to MySQL. - It allows monitoring of all queries and prepared statements exposing - the statement string to the user. Therefore, the extension should be - installed with care. The PHP_INI_SYSTEM configuration setting - mysqlnd_uh.enable - can be used to prevent users from hooking mysqlnd calls. - - - Code obfuscators and similar technologies are not suitable to prevent - monitoring of mysqlnd library activities if PECL/mysqlnd_uh is made - available and the user can install a proxy, for example, - using auto_prepend_file. - -
- -
- Documentation note - - Many of the mysqlnd_uh functions are briefly described because - the mysqli extension is - a thin abstraction layer on top of the MySQL C API that - the mysqlnd library provides. Therefore, - the corresponding mysqli documentation - (along with the MySQL reference manual) can be consulted - to receive more information about a particular function. - -
- -
- On the name - - The shortcut mysqlnd_uh stands for - mysqlnd user handler, and has been the name - since early development. - -
-
- - &reference.mysqlnd-uh.quickstart; - &reference.mysqlnd-uh.setup; - &reference.mysqlnd-uh.constants; - &reference.mysqlnd-uh.mysqlnduhconnection; - &reference.mysqlnd-uh.mysqlnduhpreparedstatement; - &reference.mysqlnd-uh.reference; - &reference.mysqlnd-uh.changes; - -
- - diff --git a/reference/mysqlnd_uh/changes.xml b/reference/mysqlnd_uh/changes.xml deleted file mode 100644 index 8e83f8b471..0000000000 --- a/reference/mysqlnd_uh/changes.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - Change History - - The Change History lists major changes users need to be aware if upgrading - from one version to another. It is a high level summary of selected changes - that may impact applications or might even break backwards compatibility. - See also the CHANGES file contained in the source - for additional changelog information. The commit history is also available. - - -
- PECL/mysqlnd_uh 1.0 series - - 1.0.1-alpha - - - - Release date: TBD - - - - - Motto/theme: bug fix release - - - - - - Feature changes - - - - Support of PHP 5.4.0 or later. - - - - - BC break: MysqlndUhConnection::changeUser requires - additional passwd_len parameter. - - - - - BC break: MYSQLND_UH_VERSION_STR renamed to MYSQLND_UH_VERSION. - MYSQLND_UH_VERSION renamed to MYSQLND_UH_VERSION_ID. - - - - - BC break: mysqlnd_uh.enabled configuration setting renamed to mysqlnd_uh.enable. - - - - - - 1.0.0-alpha - - - - Release date: 08/2010 - - - - - Motto/theme: Initial release - - - - -
- -
- - diff --git a/reference/mysqlnd_uh/configure.xml b/reference/mysqlnd_uh/configure.xml deleted file mode 100644 index 2aa4e4d374..0000000000 --- a/reference/mysqlnd_uh/configure.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - -
- &reftitle.install; - - - &pecl.info; - &url.pecl.package;mysqlnd-uh - - - PECL/mysqlnd_uh is currently not available on Windows. - The source code of the extension makes use of C99 - constructs not allowed with PHP Windows builds. - - - -
- - - diff --git a/reference/mysqlnd_uh/constants.xml b/reference/mysqlnd_uh/constants.xml deleted file mode 100644 index 58d17e3fe5..0000000000 --- a/reference/mysqlnd_uh/constants.xml +++ /dev/null @@ -1,1095 +0,0 @@ - - - - - &reftitle.constants; - &extension.constants; - - Most of the constants refer to details of the MySQL Client Server Protocol. - Please, refer to the MySQL reference manual to learn about their meaning. - To avoid content duplication, only short descriptions are given. - - - MysqlndUhConnection::simpleCommand related - - - The following constants can be used to detect what command is to be send - through MysqlndUhConnection::simpleCommand. - - - - - - MYSQLND_UH_MYSQLND_COM_SLEEP - (int) - - - - MySQL Client Server protocol command: COM_SLEEP. - - - - - - MYSQLND_UH_MYSQLND_COM_QUIT - (int) - - - - MySQL Client Server protocol command: COM_QUIT. - - - - - - MYSQLND_UH_MYSQLND_COM_INIT_DB - (int) - - - - MySQL Client Server protocol command: COM_INIT_DB. - - - - - - MYSQLND_UH_MYSQLND_COM_QUERY - (int) - - - - MySQL Client Server protocol command: COM_QUERY. - - - - - - MYSQLND_UH_MYSQLND_COM_FIELD_LIST - (int) - - - - MySQL Client Server protocol command: COM_FIELD_LIST. - - - - - - MYSQLND_UH_MYSQLND_COM_CREATE_DB - (int) - - - - MySQL Client Server protocol command: COM_CREATE_DB. - - - - - - MYSQLND_UH_MYSQLND_COM_DROP_DB - (int) - - - - MySQL Client Server protocol command: COM_DROP_DB. - - - - - - MYSQLND_UH_MYSQLND_COM_REFRESH - (int) - - - - MySQL Client Server protocol command: COM_REFRESH. - - - - - - MYSQLND_UH_MYSQLND_COM_SHUTDOWN - (int) - - - - MySQL Client Server protocol command: COM_SHUTDOWN. - - - - - - MYSQLND_UH_MYSQLND_COM_STATISTICS - (int) - - - - MySQL Client Server protocol command: COM_STATISTICS. - - - - - - MYSQLND_UH_MYSQLND_COM_PROCESS_INFO - (int) - - - - MySQL Client Server protocol command: COM_PROCESS_INFO. - - - - - - MYSQLND_UH_MYSQLND_COM_CONNECT - (int) - - - - MySQL Client Server protocol command: COM_CONNECT. - - - - - - MYSQLND_UH_MYSQLND_COM_PROCESS_KILL - (int) - - - - MySQL Client Server protocol command: COM_PROCESS_KILL. - - - - - - MYSQLND_UH_MYSQLND_COM_DEBUG - (int) - - - - MySQL Client Server protocol command: COM_DEBUG. - - - - - - MYSQLND_UH_MYSQLND_COM_PING - (int) - - - - MySQL Client Server protocol command: COM_PING. - - - - - - MYSQLND_UH_MYSQLND_COM_TIME - (int) - - - - MySQL Client Server protocol command: COM_TIME. - - - - - - MYSQLND_UH_MYSQLND_COM_DELAYED_INSERT - (int) - - - - MySQL Client Server protocol command: COM_DELAYED_INSERT. - - - - - - MYSQLND_UH_MYSQLND_COM_CHANGE_USER - (int) - - - - MySQL Client Server protocol command: COM_CHANGE_USER. - - - - - - MYSQLND_UH_MYSQLND_COM_BINLOG_DUMP - (int) - - - - MySQL Client Server protocol command: COM_BINLOG_DUMP. - - - - - - MYSQLND_UH_MYSQLND_COM_TABLE_DUMP - (int) - - - - MySQL Client Server protocol command: COM_TABLE_DUMP. - - - - - - MYSQLND_UH_MYSQLND_COM_CONNECT_OUT - (int) - - - - MySQL Client Server protocol command: COM_CONNECT_OUT. - - - - - - MYSQLND_UH_MYSQLND_COM_REGISTER_SLAVED - (int) - - - - MySQL Client Server protocol command: COM_REGISTER_SLAVED. - - - - - - MYSQLND_UH_MYSQLND_COM_STMT_PREPARE - (int) - - - - MySQL Client Server protocol command: COM_STMT_PREPARE. - - - - - - MYSQLND_UH_MYSQLND_COM_STMT_EXECUTE - (int) - - - - MySQL Client Server protocol command: COM_STMT_EXECUTE. - - - - - - MYSQLND_UH_MYSQLND_COM_STMT_SEND_LONG_DATA - (int) - - - - MySQL Client Server protocol command: COM_STMT_SEND_LONG_DATA. - - - - - - MYSQLND_UH_MYSQLND_COM_STMT_CLOSE - (int) - - - - MySQL Client Server protocol command: COM_STMT_CLOSE. - - - - - - MYSQLND_UH_MYSQLND_COM_STMT_RESET - (int) - - - - MySQL Client Server protocol command: COM_STMT_RESET. - - - - - - MYSQLND_UH_MYSQLND_COM_SET_OPTION - (int) - - - - MySQL Client Server protocol command: COM_SET_OPTION. - - - - - - MYSQLND_UH_MYSQLND_COM_STMT_FETCH - (int) - - - - MySQL Client Server protocol command: COM_STMT_FETCH. - - - - - - MYSQLND_UH_MYSQLND_COM_DAEMON - (int) - - - - MySQL Client Server protocol command: COM_DAEMON. - - - - - - MYSQLND_UH_MYSQLND_COM_END - (int) - - - - MySQL Client Server protocol command: COM_END. - - - - - - - The following constants can be used to analyze the ok_packet - argument of MysqlndUhConnection::simpleCommand. - - - - - - MYSQLND_UH_MYSQLND_PROT_GREET_PACKET - (int) - - - - MySQL Client Server protocol packet: greeting. - - - - - - MYSQLND_UH_MYSQLND_PROT_AUTH_PACKET - (int) - - - - MySQL Client Server protocol packet: authentication. - - - - - - MYSQLND_UH_MYSQLND_PROT_OK_PACKET - (int) - - - - MySQL Client Server protocol packet: OK. - - - - - - MYSQLND_UH_MYSQLND_PROT_EOF_PACKET - (int) - - - - MySQL Client Server protocol packet: EOF. - - - - - - MYSQLND_UH_MYSQLND_PROT_CMD_PACKET - (int) - - - - MySQL Client Server protocol packet: command. - - - - - - MYSQLND_UH_MYSQLND_PROT_RSET_HEADER_PACKET - (int) - - - - MySQL Client Server protocol packet: result set header. - - - - - - MYSQLND_UH_MYSQLND_PROT_RSET_FLD_PACKET - (int) - - - - MySQL Client Server protocol packet: resultset field. - - - - - - MYSQLND_UH_MYSQLND_PROT_ROW_PACKET - (int) - - - - MySQL Client Server protocol packet: row. - - - - - - MYSQLND_UH_MYSQLND_PROT_STATS_PACKET - (int) - - - - MySQL Client Server protocol packet: stats. - - - - - - MYSQLND_UH_MYSQLND_PREPARE_RESP_PACKET - (int) - - - - MySQL Client Server protocol packet: prepare response. - - - - - - MYSQLND_UH_MYSQLND_CHG_USER_RESP_PACKET - (int) - - - - MySQL Client Server protocol packet: change user response. - - - - - - MYSQLND_UH_MYSQLND_PROT_LAST - (int) - - - - No practical meaning. Last entry marker of internal C data structure list. - - - - - - - - MysqlndUhConnection::close related - - - The following constants can be used to detect why a connection has been - closed through MysqlndUhConnection::close(). - - - - - - MYSQLND_UH_MYSQLND_CLOSE_EXPLICIT - (int) - - - - User has called mysqlnd to close the connection. - - - - - - MYSQLND_UH_MYSQLND_CLOSE_IMPLICIT - (int) - - - - Implicitly closed, for example, during garbage connection. - - - - - - MYSQLND_UH_MYSQLND_CLOSE_DISCONNECTED - (int) - - - - Connection error. - - - - - - MYSQLND_UH_MYSQLND_CLOSE_LAST - (int) - - - - No practical meaning. Last entry marker of internal C data structure list. - - - - - - - - MysqlndUhConnection::setServerOption() related - - - The following constants can be used to detect which option is set through - MysqlndUhConnection::setServerOption(). - - - - - - MYSQLND_UH_SERVER_OPTION_MULTI_STATEMENTS_ON - (int) - - - - Option: enables multi statement support. - - - - - - MYSQLND_UH_SERVER_OPTION_MULTI_STATEMENTS_OFF - (int) - - - - Option: disables multi statement support. - - - - - - - - MysqlndUhConnection::setClientOption related - - - The following constants can be used to detect which option is set through - MysqlndUhConnection::setClientOption. - - - - - - MYSQLND_UH_MYSQLND_OPTION_OPT_CONNECT_TIMEOUT - (int) - - - - Option: connection timeout. - - - - - - MYSQLND_UH_MYSQLND_OPTION_OPT_COMPRESS - (int) - - - - Option: whether the MySQL compressed protocol is to be used. - - - - - - MYSQLND_UH_MYSQLND_OPTION_OPT_NAMED_PIPE - (int) - - - - Option: named pipe to use for connection (Windows). - - - - - - MYSQLND_UH_MYSQLND_OPTION_INIT_COMMAND - (int) - - - - Option: init command to execute upon connect. - - - - - - MYSQLND_UH_MYSQLND_READ_DEFAULT_FILE - (int) - - - - Option: MySQL server default file to read upon connect. - - - - - - MYSQLND_UH_MYSQLND_READ_DEFAULT_GROUP - (int) - - - - Option: MySQL server default file group to read upon connect. - - - - - - MYSQLND_UH_MYSQLND_SET_CHARSET_DIR - (int) - - - - Option: charset description files directory. - - - - - - MYSQLND_UH_MYSQLND_SET_CHARSET_NAME - (int) - - - - Option: charset name. - - - - - - MYSQLND_UH_MYSQLND_OPT_LOCAL_INFILE - (int) - - - - Option: Whether to allow LOAD DATA LOCAL INFILE use. - - - - - - MYSQLND_UH_MYSQLND_OPT_PROTOCOL - (int) - - - - Option: supported protocol version. - - - - - - MYSQLND_UH_MYSQLND_SHARED_MEMORY_BASE_NAME - (int) - - - - Option: shared memory base name for shared memory connections. - - - - - - MYSQLND_UH_MYSQLND_OPT_READ_TIMEOUT - (int) - - - - Option: connection read timeout. - - - - - - MYSQLND_UH_MYSQLND_OPT_WRITE_TIMEOUT - (int) - - - - Option: connection write timeout. - - - - - - MYSQLND_UH_MYSQLND_OPT_USE_RESULT - (int) - - - - Option: unbuffered result sets. - - - - - - MYSQLND_UH_MYSQLND_OPT_USE_REMOTE_CONNECTION - (int) - - - - Embedded server related. - - - - - - MYSQLND_UH_MYSQLND_OPT_USE_EMBEDDED_CONNECTION - (int) - - - - Embedded server related. - - - - - - MYSQLND_UH_MYSQLND_OPT_GUESS_CONNECTION - (int) - - - - TODO - - - - - - MYSQLND_UH_MYSQLND_SET_CLIENT_IP - (int) - - - - TODO - - - - - - MYSQLND_UH_MYSQLND_SECURE_AUTH - (int) - - - - TODO - - - - - - MYSQLND_UH_MYSQLND_REPORT_DATA_TRUNCATION - (int) - - - - Option: Whether to report data truncation. - - - - - - MYSQLND_UH_MYSQLND_OPT_RECONNECT - (int) - - - - Option: Whether to reconnect automatically. - - - - - - MYSQLND_UH_MYSQLND_OPT_SSL_VERIFY_SERVER_CERT - (int) - - - - Option: TODO - - - - - - MYSQLND_UH_MYSQLND_OPT_NET_CMD_BUFFER_SIZE - (int) - - - - Option: mysqlnd network buffer size for commands. - - - - - - MYSQLND_UH_MYSQLND_OPT_NET_READ_BUFFER_SIZE - (int) - - - - Option: mysqlnd network buffer size for reading from the server. - - - - - - MYSQLND_UH_MYSQLND_OPT_SSL_KEY - (int) - - - - Option: SSL key. - - - - - - MYSQLND_UH_MYSQLND_OPT_SSL_CERT - (int) - - - - Option: SSL certificate. - - - - - - MYSQLND_UH_MYSQLND_OPT_SSL_CA - (int) - - - - Option: SSL CA. - - - - - - MYSQLND_UH_MYSQLND_OPT_SSL_CAPATH - (int) - - - - Option: Path to SSL CA. - - - - - - MYSQLND_UH_MYSQLND_OPT_SSL_CIPHER - (int) - - - - Option: SSL cipher. - - - - - - MYSQLND_UH_MYSQLND_OPT_SSL_PASSPHRASE - (int) - - - - Option: SSL passphrase. - - - - - - MYSQLND_UH_SERVER_OPTION_PLUGIN_DIR - (int) - - - - Option: server plugin directory. - - - - - - MYSQLND_UH_SERVER_OPTION_DEFAULT_AUTH - (int) - - - - Option: default authentication method. - - - - - - MYSQLND_UH_SERVER_OPTION_SET_CLIENT_IP - (int) - - - - TODO - - - - - - MYSQLND_UH_MYSQLND_OPT_MAX_ALLOWED_PACKET - (int) - - - - Option: maximum allowed packet size. Available as of PHP 5.4.0. - - - - - - MYSQLND_UH_MYSQLND_OPT_AUTH_PROTOCOL - (int) - - - - Option: TODO. Available as of PHP 5.4.0. - - - - - - MYSQLND_UH_MYSQLND_OPT_INT_AND_FLOAT_NATIVE - (int) - - - - Option: make mysqlnd return integer and float columns as long even - when using the MySQL Client Server text protocol. Only - available with a custom build of mysqlnd. - - - - - - - - Other - - - The plugins version number can be obtained using - MYSQLND_UH_VERSION or - MYSQLND_UH_VERSION_ID. - MYSQLND_UH_VERSION - is the string representation of the numerical version number - MYSQLND_UH_VERSION_ID, which is an integer such as 10000. - Developers can calculate the version number as follows. - - - - - - - Version (part) - Example - - - - - Major*10000 - 1*10000 = 10000 - - - Minor*100 - 0*100 = 0 - - - Patch - 0 = 0 - - - MYSQLND_UH_VERSION_ID - 10000 - - - - - - - - - - MYSQLND_UH_VERSION - (string) - - - - Plugin version string, for example, 1.0.0-alpha. - - - - - - MYSQLND_UH_VERSION_ID - (int) - - - - Plugin version number, for example, 10000. - - - - - - - - - diff --git a/reference/mysqlnd_uh/functions/mysqlnd-uh-convert-to-mysqlnd.xml b/reference/mysqlnd_uh/functions/mysqlnd-uh-convert-to-mysqlnd.xml deleted file mode 100644 index 67450519bd..0000000000 --- a/reference/mysqlnd_uh/functions/mysqlnd-uh-convert-to-mysqlnd.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - mysqlnd_uh_convert_to_mysqlnd - Converts a MySQL connection handle into a mysqlnd connection handle - - - - &reftitle.description; - - resource - mysqlnd_uh_convert_to_mysqlnd - mysqlimysql_connection - - - Converts a MySQL connection handle into a mysqlnd connection handle. - After conversion you can execute mysqlnd library calls on the connection handle. - This can be used to access mysqlnd functionality not made available - through user space API calls. - - - The function can be disabled with - mysqlnd_uh.enable. - If mysqlnd_uh.enable - is set to &false; the function will not install the proxy and - always return &true;. Additionally, an error of the - type E_WARNING may be emitted. The error message may - read like PHP Warning: mysqlnd_uh_convert_to_mysqlnd(): (Mysqlnd User Handler) - The plugin has been disabled by setting the configuration parameter mysqlnd_uh.enable = false. - You are not allowed to call this function [...]. - - - - - &reftitle.parameters; - - - MySQL connection handle - - - A MySQL connection handle of type mysql, mysqli or PDO_MySQL. - - - - - - - - &reftitle.returnvalues; - - A mysqlnd connection handle. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.4.0 - - The mysql_connection parameter can now be of type - mysql, PDO_MySQL, or mysqli. - Before, only the mysqli type was allowed. - - - - - - - - - - &reftitle.examples; - - - <function>mysqlnd_uh_convert_to_mysqlnd</function> example - -getThreadId($mysqlnd)); - -/* Use SQL to fetch connection thread id */ -var_dump($mysql_connection->query("SELECT CONNECTION_ID()")->fetchAll()); -?> -]]> - - &example.outputs; - - - array(2) { - ["CONNECTION_ID()"]=> - string(5) "27054" - [0]=> - string(5) "27054" - } -} -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh.enable - - - - - - - - diff --git a/reference/mysqlnd_uh/functions/mysqlnd-uh-set-connection-proxy.xml b/reference/mysqlnd_uh/functions/mysqlnd-uh-set-connection-proxy.xml deleted file mode 100644 index 1e0f1bdc34..0000000000 --- a/reference/mysqlnd_uh/functions/mysqlnd-uh-set-connection-proxy.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - mysqlnd_uh_set_connection_proxy - Installs a proxy for mysqlnd connections - - - - &reftitle.description; - - boolmysqlnd_uh_set_connection_proxy - MysqlndUhConnectionconnection_proxy - mysqlimysqli_connection - - - Installs a proxy object to hook mysqlnd's connection objects methods. - Once installed, the proxy will be used for all MySQL connections - opened with mysqli, - mysql or - PDO_MYSQL, assuming that the listed - extensions are compiled to use the mysqlnd - library. - - - The function can be disabled with - mysqlnd_uh.enable. - If mysqlnd_uh.enable - is set to &false; the function will not install the proxy and - always return &true;. Additionally, an error of the - type E_WARNING may be emitted. The error message may - read like PHP Warning: mysqlnd_uh_set_connection_proxy(): (Mysqlnd User Handler) - The plugin has been disabled by setting the configuration parameter mysqlnd_uh.enable = false. - The proxy has not been installed [...]. - - - - - &reftitle.parameters; - - - connection_proxy - - - A proxy object of type MysqlndUhConnection. - - - - - mysqli_connection - - - Object of type mysqli. - If given, the proxy will be set for this particular connection only. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>mysqlnd_uh_set_connection_proxy</function> example - -query("SELECT 'No proxy installed, yet'"); - -class proxy extends MysqlndUhConnection { - public function query($res, $query) { - printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true)); - $ret = parent::query($res, $query); - printf("%s returns %s\n", __METHOD__, var_export($ret, true)); - return $ret; - } -} -mysqlnd_uh_set_connection_proxy(new proxy()); - -$mysqli->query("SELECT 'mysqlnd rocks!'"); - -$mysql = mysql_connect("localhost", "root", "", "test"); -mysql_query("SELECT 'Ahoy Andrey!'", $mysql); - -$pdo = new PDO("mysql:host=localhost;dbname=test", "root", ""); -$pdo->query("SELECT 'Moin Johannes!'"); -?> -]]> - - &example.outputs; - - NULL, - 1 => 'SELECT \'mysqlnd rocks!\'', -)) -proxy::query returns true -proxy::query(array ( - 0 => NULL, - 1 => 'SELECT \'Ahoy Andrey!\'', -)) -proxy::query returns true -proxy::query(array ( - 0 => NULL, - 1 => 'SELECT \'Moin Johannes!\'', -)) -proxy::query returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_statement_proxy - - - mysqlnd_uh.enable - - - - - - - - diff --git a/reference/mysqlnd_uh/functions/mysqlnd-uh-set-statement-proxy.xml b/reference/mysqlnd_uh/functions/mysqlnd-uh-set-statement-proxy.xml deleted file mode 100644 index c132ae558a..0000000000 --- a/reference/mysqlnd_uh/functions/mysqlnd-uh-set-statement-proxy.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - mysqlnd_uh_set_statement_proxy - Installs a proxy for mysqlnd statements - - - - &reftitle.description; - - boolmysqlnd_uh_set_statement_proxy - MysqlndUhStatementstatement_proxy - - - Installs a proxy for mysqlnd statements. - The proxy object will be used for all mysqlnd prepared - statement objects, regardless which PHP MySQL extension - (mysqli, - mysql, - PDO_MYSQL) - has created them as long as the extension is compiled - to use the mysqlnd - library. - - - The function can be disabled with - mysqlnd_uh.enable. - If mysqlnd_uh.enable - is set to &false; the function will not install the proxy and - always return &true;. Additionally, an error of the - type E_WARNING may be emitted. The error message may - read like PHP Warning: mysqlnd_uh_set_statement_proxy(): (Mysqlnd User Handler) - The plugin has been disabled by setting the configuration parameter mysqlnd_uh.enable = false. - The proxy has not been installed [...]. - - - - - - &reftitle.parameters; - - - statement_proxy - - - The mysqlnd statement proxy object of type MysqlndUhStatement - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqlnd_uh.enable - - - - - - - - - diff --git a/reference/mysqlnd_uh/ini.xml b/reference/mysqlnd_uh/ini.xml deleted file mode 100644 index 5f09cab4c7..0000000000 --- a/reference/mysqlnd_uh/ini.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - -
- &reftitle.runtime; - &extension.runtime; - - - Mysqlnd_uh &ConfigureOptions; - - - - &Name; - &Default; - &Changeable; - &Changelog; - - - - - mysqlnd_uh.enable - 1 - PHP_INI_SYSTEM - - - - mysqlnd_uh.report_wrong_types - 1 - PHP_INI_ALL - - - - -
-
- - &ini.descriptions.title; - - - - - - mysqlnd_uh.enable - int - - - - Enables or disables the plugin. If set to disabled, the extension will not - allow users to plug into - mysqlnd to hook - mysqlnd calls. - - - - - - mysqlnd_uh.report_wrong_types - int - - - - Whether to report wrong return value types of user hooks as - E_WARNING level errors. This is recommended - for detecting errors. - - - - - - -
- - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/changeuser.xml b/reference/mysqlnd_uh/mysqlnduhconnection/changeuser.xml deleted file mode 100644 index 63b34b8bdd..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/changeuser.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - MysqlndUhConnection::changeUser - Changes the user of the specified mysqlnd database connection - - - - &reftitle.description; - - public boolMysqlndUhConnection::changeUser - mysqlnd_connectionconnection - stringuser - stringpassword - stringdatabase - boolsilent - intpasswd_len - - - Changes the user of the specified mysqlnd database connection - - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - user - - - The MySQL user name. - - - - - password - - - The MySQL password. - - - - - database - - - The MySQL database to change to. - - - - - silent - - - Controls if mysqlnd is allowed to emit errors or not. - - - - - passwd_len - - - Length of the MySQL password. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::changeUser</function> example - -change_user("root", "bar", "test")); -?> -]]> - - &example.outputs; - - NULL, - 1 => 'root', - 2 => 'bar', - 3 => 'test', - 4 => false, - 5 => 3, -)) -proxy::changeUser returns false -bool(false) - -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_change_user - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/charsetname.xml b/reference/mysqlnd_uh/mysqlnduhconnection/charsetname.xml deleted file mode 100644 index c1bad58bd4..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/charsetname.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - MysqlndUhConnection::charsetName - Returns the default character set for the database connection - - - - &reftitle.description; - - public stringMysqlndUhConnection::charsetName - mysqlnd_connectionconnection - - - Returns the default character set for the database connection. - - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - The default character set. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::charsetName</function> example - - -]]> - - &example.outputs; - - NULL, -)) -proxy::charsetName returns 'latin1' -string(6) "latin1" -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_character_set_name - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/close.xml b/reference/mysqlnd_uh/mysqlnduhconnection/close.xml deleted file mode 100644 index 797d896fdf..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/close.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - MysqlndUhConnection::close - Closes a previously opened database connection - - - - &reftitle.description; - - public boolMysqlndUhConnection::close - mysqlnd_connectionconnection - intclose_type - - - Closes a previously opened database connection. - - - - Failing to call the parent implementation may cause memory leaks or - crash PHP. This is not considered a bug. Please, keep in mind that - the mysqlnd library functions have never been designed - to be exposed to the user space. - - - - - - &reftitle.parameters; - - - connection - - - The connection to be closed. Do not modify! - - - - - close_type - - - Why the connection is to be closed. The value - of close_type is one of - MYSQLND_UH_MYSQLND_CLOSE_EXPLICIT, - MYSQLND_UH_MYSQLND_CLOSE_IMPLICIT, - MYSQLND_UH_MYSQLND_CLOSE_DISCONNECTED or - MYSQLND_UH_MYSQLND_CLOSE_LAST. The - latter should never be seen, unless the default - behaviour of the mysqlnd library - has been changed by a plugin. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::close</function> example - - "MYSQLND_UH_MYSQLND_CLOSE_DISCONNECTED", - MYSQLND_UH_MYSQLND_CLOSE_EXPLICIT => "MYSQLND_UH_MYSQLND_CLOSE_EXPLICIT", - MYSQLND_UH_MYSQLND_CLOSE_IMPLICIT => "MYSQLND_UH_MYSQLND_CLOSE_IMPLICIT", - MYSQLND_UH_MYSQLND_CLOSE_LAST => "MYSQLND_UH_MYSQLND_CLOSE_IMPLICIT" - ); - return (isset($mapping[$close_type])) ? $mapping[$close_type] : 'unknown'; -} - -class proxy extends MysqlndUhConnection { - public function close($res, $close_type) { - printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true)); - printf("close_type = %s\n", close_type_to_string($close_type)); - /* WARNING: you must call the parent */ - $ret = parent::close($res, $close_type); - printf("%s returns %s\n", __METHOD__, var_export($ret, true)); - return $ret; - } -} -mysqlnd_uh_set_connection_proxy(new proxy()); - -$mysqli = new mysqli("localhost", "root", "", "test"); -$mysqli->close(); -?> -]]> - - &example.outputs; - - NULL, - 1 => 0, -)) -close_type = MYSQLND_UH_MYSQLND_CLOSE_EXPLICIT -proxy::close returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_close - - - mysql_close - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/connect.xml b/reference/mysqlnd_uh/mysqlnduhconnection/connect.xml deleted file mode 100644 index 5e2b3961ee..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/connect.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - MysqlndUhConnection::connect - Open a new connection to the MySQL server - - - - &reftitle.description; - - public boolMysqlndUhConnection::connect - mysqlnd_connectionconnection - stringhost - stringuse" - stringpassword - stringdatabase - intport - stringsocket - intmysql_flags - - - Open a new connection to the MySQL server. - - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - host - - - Can be either a host name or an IP address. Passing the NULL value or - the string "localhost" to this parameter, - the local host is assumed. When possible, pipes will be used - instead of the TCP/IP protocol. - - - - - user - - - The MySQL user name. - - - - - password - - - If not provided or &null;, - the MySQL server will attempt to authenticate - the user against those user records which have no password only. - This allows one username to be used with different permissions - (depending on if a password as provided or not). - - - - - database - - - If provided will specify the default database to be used when performing queries. - - - - - port - - - Specifies the port number to attempt to connect to the MySQL server. - - - - - socket - - - Specifies the socket or named pipe that should be used. - If &null;, mysqlnd will default to - /tmp/mysql.sock. - - - - - mysql_flags - - - Connection options. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::connect</function> example - - -]]> - - &example.outputs; - - NULL, - 1 => 'localhost', - 2 => 'root', - 3 => '', - 4 => 'test', - 5 => 3306, - 6 => NULL, - 7 => 131072, -)) -proxy::connect returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_connect - - - mysql_connect - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/endpsession.xml b/reference/mysqlnd_uh/mysqlnduhconnection/endpsession.xml deleted file mode 100644 index 1126be2ddc..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/endpsession.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - MysqlndUhConnection::endPSession - End a persistent connection - - - - &reftitle.description; - - public boolMysqlndUhConnection::endPSession - mysqlnd_connectionconnection - - - End a persistent connection - - - &warn.undocumented.func; - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::endPSession</function> example - -close(); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::endPSession returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/escapestring.xml b/reference/mysqlnd_uh/mysqlnduhconnection/escapestring.xml deleted file mode 100644 index ce38061718..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/escapestring.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - MysqlndUhConnection::escapeString - - Escapes special characters in a string for use in an SQL statement, - taking into account the current charset of the connection - - - - - &reftitle.description; - - public stringMysqlndUhConnection::escapeString - mysqlnd_connectionconnection - stringescape_string - - - Escapes special characters in a string for use in an SQL statement, - taking into account the current charset of the connection. - - - - - &reftitle.parameters; - - - MYSQLND_UH_RES_MYSQLND_NAME - - - Mysqlnd connection handle. Do not modify! - - - - - escape_string - - - The string to be escaped. - - - - - - - - &reftitle.returnvalues; - - The escaped string. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::escapeString</function> example - -set_charset("latin1"); -$mysqli->real_escape_string("test0'test"); -?> -]]> - - &example.outputs; - - NULL, - 1 => 'test0\'test', -)) -proxy::escapeString returns 'test0\\\'test' -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_real_escape_string - - - mysql_real_escape_string - - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getaffectedrows.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getaffectedrows.xml deleted file mode 100644 index 0f5102a1c8..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getaffectedrows.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - MysqlndUhConnection::getAffectedRows - Gets the number of affected rows in a previous MySQL operation - - - - &reftitle.description; - - public intMysqlndUhConnection::getAffectedRows - mysqlnd_connectionconnection - - - Gets the number of affected rows in a previous MySQL operation. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Number of affected rows. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getAffectedRows</function> example - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT)"); -$mysqli->query("INSERT INTO test(id) VALUES (1)"); -var_dump($mysqli->affected_rows); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getAffectedRows returns 1 -int(1) -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_affected_rows - - - mysql_affected_rows - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/geterrornumber.xml b/reference/mysqlnd_uh/mysqlnduhconnection/geterrornumber.xml deleted file mode 100644 index b8db793995..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/geterrornumber.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - MysqlndUhConnection::getErrorNumber - Returns the error code for the most recent function call - - - - &reftitle.description; - - public intMysqlndUhConnection::getErrorNumber - mysqlnd_connectionconnection - - - Returns the error code for the most recent function call. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Error code for the most recent function call. - - - - - &reftitle.examples; - - MysqlndUhConnection::getErrorNumber is not only executed - after the invocation of a user space API call which maps directly to it but also - called internally. - - - - <function>MysqlndUhConnection::getErrorNumber</function> example - -query("PLEASE_LET_THIS_BE_INVALID_SQL"); -printf("errno...\n"); -var_dump($mysqli->errno); -printf("close...\n"); -$mysqli->close(); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getErrorNumber returns 0 -query... -errno... -proxy::getErrorNumber(array ( - 0 => NULL, -)) -proxy::getErrorNumber returns 1064 -int(1064) -close... -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - MysqlndUhConnection::getErrorString - - - mysqli_errno - - - mysql_errno - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/geterrorstring.xml b/reference/mysqlnd_uh/mysqlnduhconnection/geterrorstring.xml deleted file mode 100644 index 2174505d00..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/geterrorstring.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - MysqlndUhConnection::getErrorString - Returns a string description of the last error - - - - &reftitle.description; - - public stringMysqlndUhConnection::getErrorString - mysqlnd_connectionconnection - - - Returns a string description of the last error. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Error string for the most recent function call. - - - - - &reftitle.examples; - - MysqlndUhConnection::getErrorString is not only executed - after the invocation of a user space API call which maps directly to it but also - called internally. - - - - <function>MysqlndUhConnection::getErrorString</function> example - -query("WILL_I_EVER_LEARN_SQL?"); -printf("errno...\n"); -var_dump($mysqli->error); -printf("close...\n"); -$mysqli->close(); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getErrorString returns '' -query... -errno... -proxy::getErrorString(array ( - 0 => NULL, -)) -proxy::getErrorString returns 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'WILL_I_EVER_LEARN_SQL?\' at line 1' -string(168) "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WILL_I_EVER_LEARN_SQL?' at line 1" -close... -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - MysqlndUhConnection::getErrorNumber - - - mysqli_error - - - mysql_error - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getfieldcount.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getfieldcount.xml deleted file mode 100644 index 0649312acf..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getfieldcount.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - MysqlndUhConnection::getFieldCount - Returns the number of columns for the most recent query - - - - &reftitle.description; - - public intMysqlndUhConnection::getFieldCount - mysqlnd_connectionconnection - - - Returns the number of columns for the most recent query. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Number of columns. - - - - - &reftitle.examples; - - MysqlndUhConnection::getFieldCount is not only executed - after the invocation of a user space API call which maps directly to it but also - called internally. - - - - <function>MysqlndUhConnection::getFieldCount</function> example - -query("WILL_I_EVER_LEARN_SQL?"); -var_dump($mysqli->field_count); -$mysqli->query("SELECT 1, 2, 3 FROM DUAL"); -var_dump($mysqli->field_count); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getFieldCount returns 0 -int(0) -proxy::getFieldCount(array ( - 0 => NULL, -)) -proxy::getFieldCount returns 3 -proxy::getFieldCount(array ( - 0 => NULL, -)) -proxy::getFieldCount returns 3 -int(3) -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_field_count - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/gethostinformation.xml b/reference/mysqlnd_uh/mysqlnduhconnection/gethostinformation.xml deleted file mode 100644 index b36cbdfc1d..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/gethostinformation.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - MysqlndUhConnection::getHostInformation - Returns a string representing the type of connection used - - - - &reftitle.description; - - public stringMysqlndUhConnection::getHostInformation - mysqlnd_connectionconnection - - - Returns a string representing the type of connection used. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Connection description. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getHostInformation</function> example - -host_info); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getHostInformation returns 'Localhost via UNIX socket' -string(25) "Localhost via UNIX socket" -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_get_host_info - - - mysql_get_host_info - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getlastinsertid.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getlastinsertid.xml deleted file mode 100644 index 82f59edf0f..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getlastinsertid.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - MysqlndUhConnection::getLastInsertId - Returns the auto generated id used in the last query - - - - &reftitle.description; - - public intMysqlndUhConnection::getLastInsertId - mysqlnd_connectionconnection - - - Returns the auto generated id used in the last query. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Last insert id. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getLastInsertId</function> example - -query("DROP TABLE IF EXISTS test"); -$mysqli->query("CREATE TABLE test(id INT AUTO_INCREMENT PRIMARY KEY, col VARCHAR(255))"); -$mysqli->query("INSERT INTO test(col) VALUES ('a')"); -var_dump($mysqli->insert_id); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getLastInsertId returns 1 -int(1) -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_insert_id - - - mysql_insert_id - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getlastmessage.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getlastmessage.xml deleted file mode 100644 index 14a7328f45..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getlastmessage.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - MysqlndUhConnection::getLastMessage - Retrieves information about the most recently executed query - - - - &reftitle.description; - - public voidMysqlndUhConnection::getLastMessage - mysqlnd_connectionconnection - - - Retrieves information about the most recently executed query. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Last message. Trying to return a string longer than 511 bytes - will cause an error of the type E_WARNING and - result in the string being truncated. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getLastMessage</function> example - -info); -$mysqli->query("DROP TABLE IF EXISTS test"); -var_dump($mysqli->info); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getLastMessage returns '' -string(0) "" -proxy::getLastMessage(array ( - 0 => NULL, -)) -proxy::getLastMessage returns '' -string(0) "" -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_info - - - mysql_info - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getprotocolinformation.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getprotocolinformation.xml deleted file mode 100644 index f8accb264b..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getprotocolinformation.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - MysqlndUhConnection::getProtocolInformation - Returns the version of the MySQL protocol used - - - - &reftitle.description; - - public stringMysqlndUhConnection::getProtocolInformation - mysqlnd_connectionconnection - - - Returns the version of the MySQL protocol used. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - The protocol version. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getProtocolInformation</function> example - -protocol_version); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getProtocolInformation returns 10 -int(10) -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_get_proto_info - - - mysql_get_proto_info - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getserverinformation.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getserverinformation.xml deleted file mode 100644 index 8a1e3f77cf..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getserverinformation.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - MysqlndUhConnection::getServerInformation - Returns the version of the MySQL server - - - - &reftitle.description; - - public stringMysqlndUhConnection::getServerInformation - mysqlnd_connectionconnection - - - Returns the version of the MySQL server. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - The server version. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getServerInformation</function> example - -server_info); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getServerInformation returns '5.1.45-debug-log' -string(16) "5.1.45-debug-log" -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_get_server_info - - - mysql_get_server_info - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getserverstatistics.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getserverstatistics.xml deleted file mode 100644 index 4fb5fed520..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getserverstatistics.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - MysqlndUhConnection::getServerStatistics - Gets the current system status - - - - &reftitle.description; - - public stringMysqlndUhConnection::getServerStatistics - mysqlnd_connectionconnection - - - Gets the current system status. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - The system status message. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getServerStatistics</function> example - - -]]> - - &example.outputs; - - NULL, -)) -proxy::getServerStatistics returns 'Uptime: 2059995 Threads: 1 Questions: 126157 Slow queries: 0 Opens: 6377 Flush tables: 1 Open tables: 18 Queries per second avg: 0.61' -string(140) "Uptime: 2059995 Threads: 1 Questions: 126157 Slow queries: 0 Opens: 6377 Flush tables: 1 Open tables: 18 Queries per second avg: 0.61" -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_stat - - - mysql_stat - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getserverversion.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getserverversion.xml deleted file mode 100644 index abc44406a6..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getserverversion.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - MysqlndUhConnection::getServerVersion - Returns the version of the MySQL server as an integer - - - - &reftitle.description; - - public intMysqlndUhConnection::getServerVersion - mysqlnd_connectionconnection - - - Returns the version of the MySQL server as an integer. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - The MySQL version. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getServerVersion</function> example - -server_version); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getServerVersion returns 50145 -int(50145) -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_get_server_version - - - mysql_get_server_version - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getsqlstate.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getsqlstate.xml deleted file mode 100644 index 12b591d73b..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getsqlstate.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - MysqlndUhConnection::getSqlstate - Returns the SQLSTATE error from previous MySQL operation - - - - &reftitle.description; - - public stringMysqlndUhConnection::getSqlstate - mysqlnd_connectionconnection - - - Returns the SQLSTATE error from previous MySQL operation. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - The SQLSTATE code. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getSqlstate</function> example - -sqlstate); -$mysqli->query("AN_INVALID_REQUEST_TO_PROVOKE_AN_ERROR"); -var_dump($mysqli->sqlstate); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getSqlstate returns '00000' -string(5) "00000" -proxy::getSqlstate(array ( - 0 => NULL, -)) -proxy::getSqlstate returns '42000' -string(5) "42000" -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_sql_state - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getstatistics.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getstatistics.xml deleted file mode 100644 index d0c214515b..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getstatistics.xml +++ /dev/null @@ -1,600 +0,0 @@ - - - - - - MysqlndUhConnection::getStatistics - Returns statistics about the client connection - - - - &reftitle.description; - - public arrayMysqlndUhConnection::getStatistics - mysqlnd_connectionconnection - - - Returns statistics about the client connection. - - - &warn.undocumented.func; - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Connection statistics collected by mysqlnd. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getStatistics</function> example - -get_connection_stats()); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getStatistics returns array ( - 'bytes_sent' => '73', - 'bytes_received' => '77', - 'packets_sent' => '2', - 'packets_received' => '2', - 'protocol_overhead_in' => '8', - 'protocol_overhead_out' => '8', - 'bytes_received_ok_packet' => '0', - 'bytes_received_eof_packet' => '0', - 'bytes_received_rset_header_packet' => '0', - 'bytes_received_rset_field_meta_packet' => '0', - 'bytes_received_rset_row_packet' => '0', - 'bytes_received_prepare_response_packet' => '0', - 'bytes_received_change_user_packet' => '0', - 'packets_sent_command' => '0', - 'packets_received_ok' => '0', - 'packets_received_eof' => '0', - 'packets_received_rset_header' => '0', - 'packets_received_rset_field_meta' => '0', - 'packets_received_rset_row' => '0', - 'packets_received_prepare_response' => '0', - 'packets_received_change_user' => '0', - 'result_set_queries' => '0', - 'non_result_set_queries' => '0', - 'no_index_used' => '0', - 'bad_index_used' => '0', - 'slow_queries' => '0', - 'buffered_sets' => '0', - 'unbuffered_sets' => '0', - 'ps_buffered_sets' => '0', - 'ps_unbuffered_sets' => '0', - 'flushed_normal_sets' => '0', - 'flushed_ps_sets' => '0', - 'ps_prepared_never_executed' => '0', - 'ps_prepared_once_executed' => '0', - 'rows_fetched_from_server_normal' => '0', - 'rows_fetched_from_server_ps' => '0', - 'rows_buffered_from_client_normal' => '0', - 'rows_buffered_from_client_ps' => '0', - 'rows_fetched_from_client_normal_buffered' => '0', - 'rows_fetched_from_client_normal_unbuffered' => '0', - 'rows_fetched_from_client_ps_buffered' => '0', - 'rows_fetched_from_client_ps_unbuffered' => '0', - 'rows_fetched_from_client_ps_cursor' => '0', - 'rows_affected_normal' => '0', - 'rows_affected_ps' => '0', - 'rows_skipped_normal' => '0', - 'rows_skipped_ps' => '0', - 'copy_on_write_saved' => '0', - 'copy_on_write_performed' => '0', - 'command_buffer_too_small' => '0', - 'connect_success' => '1', - 'connect_failure' => '0', - 'connection_reused' => '0', - 'reconnect' => '0', - 'pconnect_success' => '0', - 'active_connections' => '1', - 'active_persistent_connections' => '0', - 'explicit_close' => '0', - 'implicit_close' => '0', - 'disconnect_close' => '0', - 'in_middle_of_command_close' => '0', - 'explicit_free_result' => '0', - 'implicit_free_result' => '0', - 'explicit_stmt_close' => '0', - 'implicit_stmt_close' => '0', - 'mem_emalloc_count' => '0', - 'mem_emalloc_amount' => '0', - 'mem_ecalloc_count' => '0', - 'mem_ecalloc_amount' => '0', - 'mem_erealloc_count' => '0', - 'mem_erealloc_amount' => '0', - 'mem_efree_count' => '0', - 'mem_efree_amount' => '0', - 'mem_malloc_count' => '0', - 'mem_malloc_amount' => '0', - 'mem_calloc_count' => '0', - 'mem_calloc_amount' => '0', - 'mem_realloc_count' => '0', - 'mem_realloc_amount' => '0', - 'mem_free_count' => '0', - 'mem_free_amount' => '0', - 'mem_estrndup_count' => '0', - 'mem_strndup_count' => '0', - 'mem_estndup_count' => '0', - 'mem_strdup_count' => '0', - 'proto_text_fetched_null' => '0', - 'proto_text_fetched_bit' => '0', - 'proto_text_fetched_tinyint' => '0', - 'proto_text_fetched_short' => '0', - 'proto_text_fetched_int24' => '0', - 'proto_text_fetched_int' => '0', - 'proto_text_fetched_bigint' => '0', - 'proto_text_fetched_decimal' => '0', - 'proto_text_fetched_float' => '0', - 'proto_text_fetched_double' => '0', - 'proto_text_fetched_date' => '0', - 'proto_text_fetched_year' => '0', - 'proto_text_fetched_time' => '0', - 'proto_text_fetched_datetime' => '0', - 'proto_text_fetched_timestamp' => '0', - 'proto_text_fetched_string' => '0', - 'proto_text_fetched_blob' => '0', - 'proto_text_fetched_enum' => '0', - 'proto_text_fetched_set' => '0', - 'proto_text_fetched_geometry' => '0', - 'proto_text_fetched_other' => '0', - 'proto_binary_fetched_null' => '0', - 'proto_binary_fetched_bit' => '0', - 'proto_binary_fetched_tinyint' => '0', - 'proto_binary_fetched_short' => '0', - 'proto_binary_fetched_int24' => '0', - 'proto_binary_fetched_int' => '0', - 'proto_binary_fetched_bigint' => '0', - 'proto_binary_fetched_decimal' => '0', - 'proto_binary_fetched_float' => '0', - 'proto_binary_fetched_double' => '0', - 'proto_binary_fetched_date' => '0', - 'proto_binary_fetched_year' => '0', - 'proto_binary_fetched_time' => '0', - 'proto_binary_fetched_datetime' => '0', - 'proto_binary_fetched_timestamp' => '0', - 'proto_binary_fetched_string' => '0', - 'proto_binary_fetched_blob' => '0', - 'proto_binary_fetched_enum' => '0', - 'proto_binary_fetched_set' => '0', - 'proto_binary_fetched_geometry' => '0', - 'proto_binary_fetched_other' => '0', - 'init_command_executed_count' => '0', - 'init_command_failed_count' => '0', - 'com_quit' => '0', - 'com_init_db' => '0', - 'com_query' => '0', - 'com_field_list' => '0', - 'com_create_db' => '0', - 'com_drop_db' => '0', - 'com_refresh' => '0', - 'com_shutdown' => '0', - 'com_statistics' => '0', - 'com_process_info' => '0', - 'com_connect' => '0', - 'com_process_kill' => '0', - 'com_debug' => '0', - 'com_ping' => '0', - 'com_time' => '0', - 'com_delayed_insert' => '0', - 'com_change_user' => '0', - 'com_binlog_dump' => '0', - 'com_table_dump' => '0', - 'com_connect_out' => '0', - 'com_register_slave' => '0', - 'com_stmt_prepare' => '0', - 'com_stmt_execute' => '0', - 'com_stmt_send_long_data' => '0', - 'com_stmt_close' => '0', - 'com_stmt_reset' => '0', - 'com_stmt_set_option' => '0', - 'com_stmt_fetch' => '0', - 'com_deamon' => '0', - 'bytes_received_real_data_normal' => '0', - 'bytes_received_real_data_ps' => '0', -) -array(160) { - ["bytes_sent"]=> - string(2) "73" - ["bytes_received"]=> - string(2) "77" - ["packets_sent"]=> - string(1) "2" - ["packets_received"]=> - string(1) "2" - ["protocol_overhead_in"]=> - string(1) "8" - ["protocol_overhead_out"]=> - string(1) "8" - ["bytes_received_ok_packet"]=> - string(1) "0" - ["bytes_received_eof_packet"]=> - string(1) "0" - ["bytes_received_rset_header_packet"]=> - string(1) "0" - ["bytes_received_rset_field_meta_packet"]=> - string(1) "0" - ["bytes_received_rset_row_packet"]=> - string(1) "0" - ["bytes_received_prepare_response_packet"]=> - string(1) "0" - ["bytes_received_change_user_packet"]=> - string(1) "0" - ["packets_sent_command"]=> - string(1) "0" - ["packets_received_ok"]=> - string(1) "0" - ["packets_received_eof"]=> - string(1) "0" - ["packets_received_rset_header"]=> - string(1) "0" - ["packets_received_rset_field_meta"]=> - string(1) "0" - ["packets_received_rset_row"]=> - string(1) "0" - ["packets_received_prepare_response"]=> - string(1) "0" - ["packets_received_change_user"]=> - string(1) "0" - ["result_set_queries"]=> - string(1) "0" - ["non_result_set_queries"]=> - string(1) "0" - ["no_index_used"]=> - string(1) "0" - ["bad_index_used"]=> - string(1) "0" - ["slow_queries"]=> - string(1) "0" - ["buffered_sets"]=> - string(1) "0" - ["unbuffered_sets"]=> - string(1) "0" - ["ps_buffered_sets"]=> - string(1) "0" - ["ps_unbuffered_sets"]=> - string(1) "0" - ["flushed_normal_sets"]=> - string(1) "0" - ["flushed_ps_sets"]=> - string(1) "0" - ["ps_prepared_never_executed"]=> - string(1) "0" - ["ps_prepared_once_executed"]=> - string(1) "0" - ["rows_fetched_from_server_normal"]=> - string(1) "0" - ["rows_fetched_from_server_ps"]=> - string(1) "0" - ["rows_buffered_from_client_normal"]=> - string(1) "0" - ["rows_buffered_from_client_ps"]=> - string(1) "0" - ["rows_fetched_from_client_normal_buffered"]=> - string(1) "0" - ["rows_fetched_from_client_normal_unbuffered"]=> - string(1) "0" - ["rows_fetched_from_client_ps_buffered"]=> - string(1) "0" - ["rows_fetched_from_client_ps_unbuffered"]=> - string(1) "0" - ["rows_fetched_from_client_ps_cursor"]=> - string(1) "0" - ["rows_affected_normal"]=> - string(1) "0" - ["rows_affected_ps"]=> - string(1) "0" - ["rows_skipped_normal"]=> - string(1) "0" - ["rows_skipped_ps"]=> - string(1) "0" - ["copy_on_write_saved"]=> - string(1) "0" - ["copy_on_write_performed"]=> - string(1) "0" - ["command_buffer_too_small"]=> - string(1) "0" - ["connect_success"]=> - string(1) "1" - ["connect_failure"]=> - string(1) "0" - ["connection_reused"]=> - string(1) "0" - ["reconnect"]=> - string(1) "0" - ["pconnect_success"]=> - string(1) "0" - ["active_connections"]=> - string(1) "1" - ["active_persistent_connections"]=> - string(1) "0" - ["explicit_close"]=> - string(1) "0" - ["implicit_close"]=> - string(1) "0" - ["disconnect_close"]=> - string(1) "0" - ["in_middle_of_command_close"]=> - string(1) "0" - ["explicit_free_result"]=> - string(1) "0" - ["implicit_free_result"]=> - string(1) "0" - ["explicit_stmt_close"]=> - string(1) "0" - ["implicit_stmt_close"]=> - string(1) "0" - ["mem_emalloc_count"]=> - string(1) "0" - ["mem_emalloc_amount"]=> - string(1) "0" - ["mem_ecalloc_count"]=> - string(1) "0" - ["mem_ecalloc_amount"]=> - string(1) "0" - ["mem_erealloc_count"]=> - string(1) "0" - ["mem_erealloc_amount"]=> - string(1) "0" - ["mem_efree_count"]=> - string(1) "0" - ["mem_efree_amount"]=> - string(1) "0" - ["mem_malloc_count"]=> - string(1) "0" - ["mem_malloc_amount"]=> - string(1) "0" - ["mem_calloc_count"]=> - string(1) "0" - ["mem_calloc_amount"]=> - string(1) "0" - ["mem_realloc_count"]=> - string(1) "0" - ["mem_realloc_amount"]=> - string(1) "0" - ["mem_free_count"]=> - string(1) "0" - ["mem_free_amount"]=> - string(1) "0" - ["mem_estrndup_count"]=> - string(1) "0" - ["mem_strndup_count"]=> - string(1) "0" - ["mem_estndup_count"]=> - string(1) "0" - ["mem_strdup_count"]=> - string(1) "0" - ["proto_text_fetched_null"]=> - string(1) "0" - ["proto_text_fetched_bit"]=> - string(1) "0" - ["proto_text_fetched_tinyint"]=> - string(1) "0" - ["proto_text_fetched_short"]=> - string(1) "0" - ["proto_text_fetched_int24"]=> - string(1) "0" - ["proto_text_fetched_int"]=> - string(1) "0" - ["proto_text_fetched_bigint"]=> - string(1) "0" - ["proto_text_fetched_decimal"]=> - string(1) "0" - ["proto_text_fetched_float"]=> - string(1) "0" - ["proto_text_fetched_double"]=> - string(1) "0" - ["proto_text_fetched_date"]=> - string(1) "0" - ["proto_text_fetched_year"]=> - string(1) "0" - ["proto_text_fetched_time"]=> - string(1) "0" - ["proto_text_fetched_datetime"]=> - string(1) "0" - ["proto_text_fetched_timestamp"]=> - string(1) "0" - ["proto_text_fetched_string"]=> - string(1) "0" - ["proto_text_fetched_blob"]=> - string(1) "0" - ["proto_text_fetched_enum"]=> - string(1) "0" - ["proto_text_fetched_set"]=> - string(1) "0" - ["proto_text_fetched_geometry"]=> - string(1) "0" - ["proto_text_fetched_other"]=> - string(1) "0" - ["proto_binary_fetched_null"]=> - string(1) "0" - ["proto_binary_fetched_bit"]=> - string(1) "0" - ["proto_binary_fetched_tinyint"]=> - string(1) "0" - ["proto_binary_fetched_short"]=> - string(1) "0" - ["proto_binary_fetched_int24"]=> - string(1) "0" - ["proto_binary_fetched_int"]=> - string(1) "0" - ["proto_binary_fetched_bigint"]=> - string(1) "0" - ["proto_binary_fetched_decimal"]=> - string(1) "0" - ["proto_binary_fetched_float"]=> - string(1) "0" - ["proto_binary_fetched_double"]=> - string(1) "0" - ["proto_binary_fetched_date"]=> - string(1) "0" - ["proto_binary_fetched_year"]=> - string(1) "0" - ["proto_binary_fetched_time"]=> - string(1) "0" - ["proto_binary_fetched_datetime"]=> - string(1) "0" - ["proto_binary_fetched_timestamp"]=> - string(1) "0" - ["proto_binary_fetched_string"]=> - string(1) "0" - ["proto_binary_fetched_blob"]=> - string(1) "0" - ["proto_binary_fetched_enum"]=> - string(1) "0" - ["proto_binary_fetched_set"]=> - string(1) "0" - ["proto_binary_fetched_geometry"]=> - string(1) "0" - ["proto_binary_fetched_other"]=> - string(1) "0" - ["init_command_executed_count"]=> - string(1) "0" - ["init_command_failed_count"]=> - string(1) "0" - ["com_quit"]=> - string(1) "0" - ["com_init_db"]=> - string(1) "0" - ["com_query"]=> - string(1) "0" - ["com_field_list"]=> - string(1) "0" - ["com_create_db"]=> - string(1) "0" - ["com_drop_db"]=> - string(1) "0" - ["com_refresh"]=> - string(1) "0" - ["com_shutdown"]=> - string(1) "0" - ["com_statistics"]=> - string(1) "0" - ["com_process_info"]=> - string(1) "0" - ["com_connect"]=> - string(1) "0" - ["com_process_kill"]=> - string(1) "0" - ["com_debug"]=> - string(1) "0" - ["com_ping"]=> - string(1) "0" - ["com_time"]=> - string(1) "0" - ["com_delayed_insert"]=> - string(1) "0" - ["com_change_user"]=> - string(1) "0" - ["com_binlog_dump"]=> - string(1) "0" - ["com_table_dump"]=> - string(1) "0" - ["com_connect_out"]=> - string(1) "0" - ["com_register_slave"]=> - string(1) "0" - ["com_stmt_prepare"]=> - string(1) "0" - ["com_stmt_execute"]=> - string(1) "0" - ["com_stmt_send_long_data"]=> - string(1) "0" - ["com_stmt_close"]=> - string(1) "0" - ["com_stmt_reset"]=> - string(1) "0" - ["com_stmt_set_option"]=> - string(1) "0" - ["com_stmt_fetch"]=> - string(1) "0" - ["com_deamon"]=> - string(1) "0" - ["bytes_received_real_data_normal"]=> - string(1) "0" - ["bytes_received_real_data_ps"]=> - string(1) "0" -} -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_get_connection_stats - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getthreadid.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getthreadid.xml deleted file mode 100644 index 65f8561e8c..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getthreadid.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - MysqlndUhConnection::getThreadId - Returns the thread ID for the current connection - - - - &reftitle.description; - - public intMysqlndUhConnection::getThreadId - mysqlnd_connectionconnection - - - Returns the thread ID for the current connection. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Connection thread id. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getThreadId</function> example - -thread_id); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getThreadId returns 27646 -int(27646) -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_thread_id - - - mysql_thread_id - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/getwarningcount.xml b/reference/mysqlnd_uh/mysqlnduhconnection/getwarningcount.xml deleted file mode 100644 index 2e12111631..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/getwarningcount.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - MysqlndUhConnection::getWarningCount - Returns the number of warnings from the last query for the given link - - - - &reftitle.description; - - public intMysqlndUhConnection::getWarningCount - mysqlnd_connectionconnection - - - Returns the number of warnings from the last query for the given link. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Number of warnings. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::getWarningCount</function> example - -warning_count); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::getWarningCount returns 0 -int(0) -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_warning_count - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/init.xml b/reference/mysqlnd_uh/mysqlnduhconnection/init.xml deleted file mode 100644 index a3007605c1..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/init.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - MysqlndUhConnection::init - Initialize mysqlnd connection - - - - &reftitle.description; - - public boolMysqlndUhConnection::init - mysqlnd_connectionconnection - - - Initialize mysqlnd connection. This is an mysqlnd internal call to initialize - the connection object. - - - - Failing to call the parent implementation may cause memory leaks or - crash PHP. This is not considered a bug. Please, keep in mind that - the mysqlnd library functions have never been designed - to be exposed to the user space. - - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::init</function> example - - -]]> - - &example.outputs; - - NULL, -)) -proxy::init returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/killconnection.xml b/reference/mysqlnd_uh/mysqlnduhconnection/killconnection.xml deleted file mode 100644 index 523764bae5..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/killconnection.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - MysqlndUhConnection::killConnection - Asks the server to kill a MySQL thread - - - - &reftitle.description; - - public boolMysqlndUhConnection::killConnection - mysqlnd_connectionconnection - intpid - - - Asks the server to kill a MySQL thread. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - pid - - - Thread Id of the connection to be killed. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::kill</function> example - -kill($mysqli->thread_id); -?> -]]> - - &example.outputs; - - NULL, - 1 => 27650, -)) -proxy::killConnection returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_kill - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/listfields.xml b/reference/mysqlnd_uh/mysqlnduhconnection/listfields.xml deleted file mode 100644 index 6f0a5c05ef..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/listfields.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - MysqlndUhConnection::listFields - List MySQL table fields - - - - &reftitle.description; - - public arrayMysqlndUhConnection::listFields - mysqlnd_connectionconnection - stringtable - stringachtung_wild - - - List MySQL table fields. - - - &warn.undocumented.func; - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - table - - - The name of the table that's being queried. - - - - - pattern - - - Name pattern. - - - - - - - - &reftitle.returnvalues; - - - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::listFields</function> example - - -]]> - - &example.outputs; - - NULL, - 1 => 'test_a', - 2 => '', -)) -proxy::listFields returns NULL -num_rows = 0 -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysql_list_fields - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/listmethod.xml b/reference/mysqlnd_uh/mysqlnduhconnection/listmethod.xml deleted file mode 100644 index 278fc149a1..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/listmethod.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - MysqlndUhConnection::listMethod - Wrapper for assorted list commands - - - - &reftitle.description; - - public voidMysqlndUhConnection::listMethod - mysqlnd_connectionconnection - stringquery - stringachtung_wild - stringpar1 - - - Wrapper for assorted list commands. - - - &warn.undocumented.func; - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - query - - - SHOW command to be executed. - - - - - achtung_wild - - - - - - - - par1 - - - - - - - - - - - &reftitle.returnvalues; - - - - - - - &reftitle.returnvalues; - - TODO - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::listMethod</function> example - - -]]> - - &example.outputs; - - NULL, - 1 => 'SHOW DATABASES', - 2 => '', - 3 => '', -)) -proxy::listMethod returns NULL -num_rows = 6 -array(1) { - ["Database"]=> - string(18) "information_schema" -} -array(1) { - ["Database"]=> - string(5) "mysql" -} -array(1) { - ["Database"]=> - string(8) "oxid_new" -} -array(1) { - ["Database"]=> - string(7) "phptest" -} -array(1) { - ["Database"]=> - string(7) "pushphp" -} -array(1) { - ["Database"]=> - string(4) "test" -} -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysql_list_dbs - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/moreresults.xml b/reference/mysqlnd_uh/mysqlnduhconnection/moreresults.xml deleted file mode 100644 index bfc7dd7cab..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/moreresults.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - MysqlndUhConnection::moreResults - Check if there are any more query results from a multi query - - - - &reftitle.description; - - public boolMysqlndUhConnection::moreResults - mysqlnd_connectionconnection - - - Check if there are any more query results from a multi query. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::moreResults</function> example - -multi_query("SELECT 1 AS _one; SELECT 2 AS _two"); -do { - $res = $mysqli->store_result(); - var_dump($res->fetch_assoc()); - printf("%s\n", str_repeat("-", 40)); -} while ($mysqli->more_results() && $mysqli->next_result()); -?> -]]> - - &example.outputs; - - - string(1) "1" -} ----------------------------------------- -proxy::moreResults(array ( - 0 => NULL, -)) -proxy::moreResults returns true -proxy::moreResults(array ( - 0 => NULL, -)) -proxy::moreResults returns true -array(1) { - ["_two"]=> - string(1) "2" -} ----------------------------------------- -proxy::moreResults(array ( - 0 => NULL, -)) -proxy::moreResults returns false -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_more_results - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/nextresult.xml b/reference/mysqlnd_uh/mysqlnduhconnection/nextresult.xml deleted file mode 100644 index f974597666..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/nextresult.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - MysqlndUhConnection::nextResult - Prepare next result from multi_query - - - - &reftitle.description; - - public boolMysqlndUhConnection::nextResult - mysqlnd_connectionconnection - - - Prepare next result from multi_query. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::nextResult</function> example - -multi_query("SELECT 1 AS _one; SELECT 2 AS _two"); -do { - $res = $mysqli->store_result(); - var_dump($res->fetch_assoc()); - printf("%s\n", str_repeat("-", 40)); -} while ($mysqli->more_results() && $mysqli->next_result()); -?> -]]> - - &example.outputs; - - - string(1) "1" -} ----------------------------------------- -proxy::nextResult(array ( - 0 => NULL, -)) -proxy::nextResult returns true -array(1) { - ["_two"]=> - string(1) "2" -} ----------------------------------------- -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_next_result - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/ping.xml b/reference/mysqlnd_uh/mysqlnduhconnection/ping.xml deleted file mode 100644 index 63727b8168..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/ping.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - MysqlndUhConnection::ping - Pings a server connection, or tries to reconnect if the connection has gone down - - - - &reftitle.description; - - public boolMysqlndUhConnection::ping - mysqlnd_connectionconnection - - - Pings a server connection, or tries to reconnect if the connection has gone down. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::ping</function> example - -ping(); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::ping returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_ping - - - mysql_ping - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/query.xml b/reference/mysqlnd_uh/mysqlnduhconnection/query.xml deleted file mode 100644 index d57c0422a3..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/query.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - MysqlndUhConnection::query - Performs a query on the database - - - - &reftitle.description; - - public boolMysqlndUhConnection::query - mysqlnd_connectionconnection - stringquery - - - Performs a query on the database (COM_QUERY). - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - query - - - The query string. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::query</function> example - -query("SELECT 'Welcome mysqlnd_uh!' FROM DUAL"); -var_dump($res->fetch_assoc()); -?> -]]> - - &example.outputs; - - NULL, - 1 => 'SELECT \'Welcome mysqlnd_uh!\' FROM DUAL', -)) -proxy::query returns true -array(1) { - ["How about query rewriting?"]=> - string(26) "How about query rewriting?" -} -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_query - - - mysql_query - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/queryreadresultsetheader.xml b/reference/mysqlnd_uh/mysqlnduhconnection/queryreadresultsetheader.xml deleted file mode 100644 index 9f360e872f..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/queryreadresultsetheader.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - MysqlndUhConnection::queryReadResultsetHeader - Read a result set header - - - - &reftitle.description; - - public boolMysqlndUhConnection::queryReadResultsetHeader - mysqlnd_connectionconnection - mysqlnd_statementmysqlnd_stmt - - - Read a result set header. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - mysqlnd_stmt - - - Mysqlnd statement handle. Do not modify! - Set to &null;, if function - is not used in the context of a prepared statement. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::queryReadResultsetHeader</function> example - -query("SELECT 'Welcome mysqlnd_uh!' FROM DUAL"); -var_dump($res->fetch_assoc()); -?> -]]> - - &example.outputs; - - NULL, - 1 => NULL, -)) -proxy::queryReadResultsetHeader returns true -array(1) { - ["Welcome mysqlnd_uh!"]=> - string(19) "Welcome mysqlnd_uh!" -} -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/reapquery.xml b/reference/mysqlnd_uh/mysqlnduhconnection/reapquery.xml deleted file mode 100644 index aa2914625d..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/reapquery.xml +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - MysqlndUhConnection::reapQuery - Get result from async query - - - - &reftitle.description; - - public boolMysqlndUhConnection::reapQuery - mysqlnd_connectionconnection - - - Get result from async query. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::reapQuery</function> example - -query("SELECT 1 as 'one', SLEEP(1) AS _sleep FROM DUAL", MYSQLI_ASYNC | MYSQLI_USE_RESULT); -$conn2->query("SELECT 1.1 as 'one dot one' FROM DUAL", MYSQLI_ASYNC | MYSQLI_USE_RESULT); - -$links = array( - $conn1->thread_id => array('link' => $conn1, 'processed' => false), - $conn2->thread_id => array('link' => $conn2, 'processed' => false) -); - -$saved_errors = array(); -do { - $poll_links = $poll_errors = $poll_reject = array(); - foreach ($links as $thread_id => $link) { - if (!$link['processed']) { - $poll_links[] = $link['link']; - $poll_errors[] = $link['link']; - $poll_reject[] = $link['link']; - } - } - if (0 == count($poll_links)) - break; - - if (0 == ($num_ready = mysqli_poll($poll_links, $poll_errors, $poll_reject, 0, 200000))) - continue; - - if (!empty($poll_errors)) { - die(var_dump($poll_errors)); - } - - foreach ($poll_links as $link) { - $thread_id = mysqli_thread_id($link); - $links[$thread_id]['processed'] = true; - - if (is_object($res = mysqli_reap_async_query($link))) { - // result set object - while ($row = mysqli_fetch_assoc($res)) { - // eat up all results - var_dump($row); - } - mysqli_free_result($res); - } else { - // either there is no result (no SELECT) or there is an error - if (mysqli_errno($link) > 0) { - $saved_errors[$thread_id] = mysqli_errno($link); - printf("'%s' caused %d\n", $links[$thread_id]['query'], mysqli_errno($link)); - } - } - } -} while (true); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::reapQuery returns true -array(1) { - ["one dot one"]=> - string(3) "1.1" -} -proxy::reapQuery(array ( - 0 => NULL, -)) -proxy::reapQuery returns true -array(2) { - ["one"]=> - string(1) "1" - ["_sleep"]=> - string(1) "0" -} -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_real_async_query - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/refreshserver.xml b/reference/mysqlnd_uh/mysqlnduhconnection/refreshserver.xml deleted file mode 100644 index 6372cf09b2..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/refreshserver.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - MysqlndUhConnection::refreshServer - Flush or reset tables and caches - - - - &reftitle.description; - - public boolMysqlndUhConnection::refreshServer - mysqlnd_connectionconnection - intoptions - - - Flush or reset tables and caches. - - - &warn.undocumented.func; - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - options - - - What to refresh. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::refreshServer</function> example - - -]]> - - &example.outputs; - - NULL, - 1 => 1, -)) -proxy::refreshServer returns false -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/restartpsession.xml b/reference/mysqlnd_uh/mysqlnduhconnection/restartpsession.xml deleted file mode 100644 index 0234796f31..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/restartpsession.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - MysqlndUhConnection::restartPSession - Restart a persistent mysqlnd connection - - - - &reftitle.description; - - public boolMysqlndUhConnection::restartPSession - mysqlnd_connectionconnection - - - Restart a persistent mysqlnd connection. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::restartPSession</function> example - -ping(); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::restartPSession returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/selectdb.xml b/reference/mysqlnd_uh/mysqlnduhconnection/selectdb.xml deleted file mode 100644 index dbfb3d8b6b..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/selectdb.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - MysqlndUhConnection::selectDb - Selects the default database for database queries - - - - &reftitle.description; - - public boolMysqlndUhConnection::selectDb - mysqlnd_connectionconnection - stringdatabase - - - Selects the default database for database queries. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - database - - - The database name. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::selectDb</function> example - -select_db("mysql"); -?> -]]> - - &example.outputs; - - NULL, - 1 => 'mysql', -)) -proxy::selectDb returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_select_db - - - mysql_select_db - - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/sendclose.xml b/reference/mysqlnd_uh/mysqlnduhconnection/sendclose.xml deleted file mode 100644 index 853f5d930e..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/sendclose.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - MysqlndUhConnection::sendClose - Sends a close command to MySQL - - - - &reftitle.description; - - public boolMysqlndUhConnection::sendClose - mysqlnd_connectionconnection - - - Sends a close command to MySQL. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::sendClose</function> example - -close(); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::sendClose returns true -proxy::sendClose(array ( - 0 => NULL, -)) -proxy::sendClose returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/sendquery.xml b/reference/mysqlnd_uh/mysqlnduhconnection/sendquery.xml deleted file mode 100644 index 1a6bed765f..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/sendquery.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - MysqlndUhConnection::sendQuery - Sends a query to MySQL - - - - &reftitle.description; - - public boolMysqlndUhConnection::sendQuery - mysqlnd_connectionconnection - stringquery - - - Sends a query to MySQL. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - query - - - The query string. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::sendQuery</function> example - -query("SELECT 1"); -?> -]]> - - &example.outputs; - - NULL, - 1 => 'SELECT 1', -)) -proxy::sendQuery returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/serverdumpdebuginformation.xml b/reference/mysqlnd_uh/mysqlnduhconnection/serverdumpdebuginformation.xml deleted file mode 100644 index b8491435ad..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/serverdumpdebuginformation.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - MysqlndUhConnection::serverDumpDebugInformation - Dump debugging information into the log for the MySQL server - - - - &reftitle.description; - - public boolMysqlndUhConnection::serverDumpDebugInformation - mysqlnd_connectionconnection - - - Dump debugging information into the log for the MySQL server. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::serverDumpDebugInformation</function> example - -dump_debug_info(); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::serverDumpDebugInformation returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_dump_debug_info - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/setautocommit.xml b/reference/mysqlnd_uh/mysqlnduhconnection/setautocommit.xml deleted file mode 100644 index 794f94f170..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/setautocommit.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - MysqlndUhConnection::setAutocommit - Turns on or off auto-committing database modifications - - - - &reftitle.description; - - public boolMysqlndUhConnection::setAutocommit - mysqlnd_connectionconnection - intmode - - - Turns on or off auto-committing database modifications - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - mode - - - Whether to turn on auto-commit or not. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::setAutocommit</function> example - -autocommit(false); -$mysqli->autocommit(true); -?> -]]> - - &example.outputs; - - NULL, - 1 => 0, -)) -proxy::setAutocommit returns true -proxy::setAutocommit(array ( - 0 => NULL, - 1 => 1, -)) -proxy::setAutocommit returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_autocommit - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/setcharset.xml b/reference/mysqlnd_uh/mysqlnduhconnection/setcharset.xml deleted file mode 100644 index 4f8f05c328..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/setcharset.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - MysqlndUhConnection::setCharset - Sets the default client character set - - - - &reftitle.description; - - public boolMysqlndUhConnection::setCharset - mysqlnd_connectionconnection - stringcharset - - - Sets the default client character set. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - charset - - - The charset to be set as default. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::setCharset</function> example - -set_charset("latin1"); -?> -]]> - - &example.outputs; - - NULL, - 1 => 'latin1', -)) -proxy::setCharset returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_set_charset - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/setclientoption.xml b/reference/mysqlnd_uh/mysqlnduhconnection/setclientoption.xml deleted file mode 100644 index 9e93fdf4f0..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/setclientoption.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - MysqlndUhConnection::setClientOption - Sets a client option - - - - &reftitle.description; - - public boolMysqlndUhConnection::setClientOption - mysqlnd_connectionconnection - intoption - intvalue - - - Sets a client option. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - option - - - The option to be set. - - - - - value - - - Optional option value, if required. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::setClientOption</function> example - - "MYSQLND_UH_MYSQLND_OPTION_OPT_CONNECT_TIMEOUT", - MYSQLND_UH_MYSQLND_OPTION_OPT_COMPRESS => "MYSQLND_UH_MYSQLND_OPTION_OPT_COMPRESS", - MYSQLND_UH_MYSQLND_OPTION_OPT_NAMED_PIPE => "MYSQLND_UH_MYSQLND_OPTION_OPT_NAMED_PIPE", - MYSQLND_UH_MYSQLND_OPTION_INIT_COMMAND => "MYSQLND_UH_MYSQLND_OPTION_INIT_COMMAND", - MYSQLND_UH_MYSQLND_READ_DEFAULT_FILE => "MYSQLND_UH_MYSQLND_READ_DEFAULT_FILE", - MYSQLND_UH_MYSQLND_READ_DEFAULT_GROUP => "MYSQLND_UH_MYSQLND_READ_DEFAULT_GROUP", - MYSQLND_UH_MYSQLND_SET_CHARSET_DIR => "MYSQLND_UH_MYSQLND_SET_CHARSET_DIR", - MYSQLND_UH_MYSQLND_SET_CHARSET_NAME => "MYSQLND_UH_MYSQLND_SET_CHARSET_NAME", - MYSQLND_UH_MYSQLND_OPT_LOCAL_INFILE => "MYSQLND_UH_MYSQLND_OPT_LOCAL_INFILE", - MYSQLND_UH_MYSQLND_OPT_PROTOCOL => "MYSQLND_UH_MYSQLND_OPT_PROTOCOL", - MYSQLND_UH_MYSQLND_SHARED_MEMORY_BASE_NAME => "MYSQLND_UH_MYSQLND_SHARED_MEMORY_BASE_NAME", - MYSQLND_UH_MYSQLND_OPT_READ_TIMEOUT => "MYSQLND_UH_MYSQLND_OPT_READ_TIMEOUT", - MYSQLND_UH_MYSQLND_OPT_WRITE_TIMEOUT => "MYSQLND_UH_MYSQLND_OPT_WRITE_TIMEOUT", - MYSQLND_UH_MYSQLND_OPT_USE_RESULT => "MYSQLND_UH_MYSQLND_OPT_USE_RESULT", - MYSQLND_UH_MYSQLND_OPT_USE_REMOTE_CONNECTION => "MYSQLND_UH_MYSQLND_OPT_USE_REMOTE_CONNECTION", - MYSQLND_UH_MYSQLND_OPT_USE_EMBEDDED_CONNECTION => "MYSQLND_UH_MYSQLND_OPT_USE_EMBEDDED_CONNECTION", - MYSQLND_UH_MYSQLND_OPT_GUESS_CONNECTION => "MYSQLND_UH_MYSQLND_OPT_GUESS_CONNECTION", - MYSQLND_UH_MYSQLND_SET_CLIENT_IP => "MYSQLND_UH_MYSQLND_SET_CLIENT_IP", - MYSQLND_UH_MYSQLND_SECURE_AUTH => "MYSQLND_UH_MYSQLND_SECURE_AUTH", - MYSQLND_UH_MYSQLND_REPORT_DATA_TRUNCATION => "MYSQLND_UH_MYSQLND_REPORT_DATA_TRUNCATION", - MYSQLND_UH_MYSQLND_OPT_RECONNECT => "MYSQLND_UH_MYSQLND_OPT_RECONNECT", - MYSQLND_UH_MYSQLND_OPT_SSL_VERIFY_SERVER_CERT => "MYSQLND_UH_MYSQLND_OPT_SSL_VERIFY_SERVER_CERT", - MYSQLND_UH_MYSQLND_OPT_NET_CMD_BUFFER_SIZE => "MYSQLND_UH_MYSQLND_OPT_NET_CMD_BUFFER_SIZE", - MYSQLND_UH_MYSQLND_OPT_NET_READ_BUFFER_SIZE => "MYSQLND_UH_MYSQLND_OPT_NET_READ_BUFFER_SIZE", - MYSQLND_UH_MYSQLND_OPT_SSL_KEY => "MYSQLND_UH_MYSQLND_OPT_SSL_KEY", - MYSQLND_UH_MYSQLND_OPT_SSL_CERT => "MYSQLND_UH_MYSQLND_OPT_SSL_CERT", - MYSQLND_UH_MYSQLND_OPT_SSL_CA => "MYSQLND_UH_MYSQLND_OPT_SSL_CA", - MYSQLND_UH_MYSQLND_OPT_SSL_CAPATH => "MYSQLND_UH_MYSQLND_OPT_SSL_CAPATH", - MYSQLND_UH_MYSQLND_OPT_SSL_CIPHER => "MYSQLND_UH_MYSQLND_OPT_SSL_CIPHER", - MYSQLND_UH_MYSQLND_OPT_SSL_PASSPHRASE => "MYSQLND_UH_MYSQLND_OPT_SSL_PASSPHRASE", - MYSQLND_UH_SERVER_OPTION_PLUGIN_DIR => "MYSQLND_UH_SERVER_OPTION_PLUGIN_DIR", - MYSQLND_UH_SERVER_OPTION_DEFAULT_AUTH => "MYSQLND_UH_SERVER_OPTION_DEFAULT_AUTH", - MYSQLND_UH_SERVER_OPTION_SET_CLIENT_IP => "MYSQLND_UH_SERVER_OPTION_SET_CLIENT_IP" - ); - if (version_compare(PHP_VERSION, '5.3.99-dev', '>')) { - $mapping[MYSQLND_UH_MYSQLND_OPT_MAX_ALLOWED_PACKET] = "MYSQLND_UH_MYSQLND_OPT_MAX_ALLOWED_PACKET"; - $mapping[MYSQLND_UH_MYSQLND_OPT_AUTH_PROTOCOL] = "MYSQLND_UH_MYSQLND_OPT_AUTH_PROTOCOL"; - } - if (defined("MYSQLND_UH_MYSQLND_OPT_INT_AND_FLOAT_NATIVE")) { - /* special mysqlnd build */ - $mapping["MYSQLND_UH_MYSQLND_OPT_INT_AND_FLOAT_NATIVE"] = "MYSQLND_UH_MYSQLND_OPT_INT_AND_FLOAT_NATIVE"; - } - return (isset($mapping[$option])) ? $mapping[$option] : 'unknown'; -} - -class proxy extends MysqlndUhConnection { - public function setClientOption($res, $option, $value) { - printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true)); - printf("Option '%s' set to %s\n", client_option_to_string($option), var_export($value, true)); - $ret = parent::setClientOption($res, $option, $value); - printf("%s returns %s\n", __METHOD__, var_export($ret, true)); - return $ret; - } -} -mysqlnd_uh_set_connection_proxy(new proxy()); -$mysqli = new mysqli("localhost", "root", "", "test"); -?> -]]> - - &example.outputs; - - NULL, - 1 => 210, - 2 => 3221225472, -)) -Option 'MYSQLND_UH_MYSQLND_OPT_MAX_ALLOWED_PACKET' set to 3221225472 -proxy::setClientOption returns true -proxy::setClientOption(array ( - 0 => NULL, - 1 => 211, - 2 => 'mysql_native_password', -)) -Option 'MYSQLND_UH_MYSQLND_OPT_AUTH_PROTOCOL' set to 'mysql_native_password' -proxy::setClientOption returns true -proxy::setClientOption(array ( - 0 => NULL, - 1 => 8, - 2 => 1, -)) -Option 'MYSQLND_UH_MYSQLND_OPT_LOCAL_INFILE' set to 1 -proxy::setClientOption returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_real_connect - - - mysqli_options - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/setserveroption.xml b/reference/mysqlnd_uh/mysqlnduhconnection/setserveroption.xml deleted file mode 100644 index a362336b3f..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/setserveroption.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - MysqlndUhConnection::setServerOption - Sets a server option - - - - &reftitle.description; - - public voidMysqlndUhConnection::setServerOption - mysqlnd_connectionconnection - intoption - - - Sets a server option. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - option - - - The option to be set. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::setServerOption</function> example - -multi_query("SELECT 1; SELECT 2"); -?> -]]> - - &example.outputs; - - NULL, - 1 => 0, -)) -Option 'MYSQLND_UH_SERVER_OPTION_MULTI_STATEMENTS_ON' set -proxy::setServerOption returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_real_connect - - - mysqli_options - - - mysqli_multi_query - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/simplecommand.xml b/reference/mysqlnd_uh/mysqlnduhconnection/simplecommand.xml deleted file mode 100644 index 85ec7e76cd..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/simplecommand.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - MysqlndUhConnection::simpleCommand - Sends a basic COM_* command - - - - &reftitle.description; - - public boolMysqlndUhConnection::simpleCommand - mysqlnd_connectionconnection - intcommand - stringarg - intok_packet - boolsilent - boolignore_upsert_status - - - Sends a basic COM_* command to MySQL. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - command - - - The COM command to be send. - - - - - arg - - - Optional COM command arguments. - - - - - ok_packet - - - The OK packet type. - - - - - silent - - - Whether mysqlnd may emit errors. - - - - - ignore_upsert_status - - - Whether to ignore UPDATE/INSERT status. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::simpleCommand</function> example - - "MYSQLND_UH_MYSQLND_COM_SLEEP", - MYSQLND_UH_MYSQLND_COM_QUIT => "MYSQLND_UH_MYSQLND_COM_QUIT", - MYSQLND_UH_MYSQLND_COM_INIT_DB => "MYSQLND_UH_MYSQLND_COM_INIT_DB", - MYSQLND_UH_MYSQLND_COM_QUERY => "MYSQLND_UH_MYSQLND_COM_QUERY", - MYSQLND_UH_MYSQLND_COM_FIELD_LIST => "MYSQLND_UH_MYSQLND_COM_FIELD_LIST", - MYSQLND_UH_MYSQLND_COM_CREATE_DB => "MYSQLND_UH_MYSQLND_COM_CREATE_DB", - MYSQLND_UH_MYSQLND_COM_DROP_DB => "MYSQLND_UH_MYSQLND_COM_DROP_DB", - MYSQLND_UH_MYSQLND_COM_REFRESH => "MYSQLND_UH_MYSQLND_COM_REFRESH", - MYSQLND_UH_MYSQLND_COM_SHUTDOWN => "MYSQLND_UH_MYSQLND_COM_SHUTDOWN", - MYSQLND_UH_MYSQLND_COM_STATISTICS => "MYSQLND_UH_MYSQLND_COM_STATISTICS", - MYSQLND_UH_MYSQLND_COM_PROCESS_INFO => "MYSQLND_UH_MYSQLND_COM_PROCESS_INFO", - MYSQLND_UH_MYSQLND_COM_CONNECT => "MYSQLND_UH_MYSQLND_COM_CONNECT", - MYSQLND_UH_MYSQLND_COM_PROCESS_KILL => "MYSQLND_UH_MYSQLND_COM_PROCESS_KILL", - MYSQLND_UH_MYSQLND_COM_DEBUG => "MYSQLND_UH_MYSQLND_COM_DEBUG", - MYSQLND_UH_MYSQLND_COM_PING => "MYSQLND_UH_MYSQLND_COM_PING", - MYSQLND_UH_MYSQLND_COM_TIME => "MYSQLND_UH_MYSQLND_COM_TIME", - MYSQLND_UH_MYSQLND_COM_DELAYED_INSERT => "MYSQLND_UH_MYSQLND_COM_DELAYED_INSERT", - MYSQLND_UH_MYSQLND_COM_CHANGE_USER => "MYSQLND_UH_MYSQLND_COM_CHANGE_USER", - MYSQLND_UH_MYSQLND_COM_BINLOG_DUMP => "MYSQLND_UH_MYSQLND_COM_BINLOG_DUMP", - MYSQLND_UH_MYSQLND_COM_TABLE_DUMP => "MYSQLND_UH_MYSQLND_COM_TABLE_DUMP", - MYSQLND_UH_MYSQLND_COM_CONNECT_OUT => "MYSQLND_UH_MYSQLND_COM_CONNECT_OUT", - MYSQLND_UH_MYSQLND_COM_REGISTER_SLAVED => "MYSQLND_UH_MYSQLND_COM_REGISTER_SLAVED", - MYSQLND_UH_MYSQLND_COM_STMT_PREPARE => "MYSQLND_UH_MYSQLND_COM_STMT_PREPARE", - MYSQLND_UH_MYSQLND_COM_STMT_EXECUTE => "MYSQLND_UH_MYSQLND_COM_STMT_EXECUTE", - MYSQLND_UH_MYSQLND_COM_STMT_SEND_LONG_DATA => "MYSQLND_UH_MYSQLND_COM_STMT_SEND_LONG_DATA", - MYSQLND_UH_MYSQLND_COM_STMT_CLOSE => "MYSQLND_UH_MYSQLND_COM_STMT_CLOSE", - MYSQLND_UH_MYSQLND_COM_STMT_RESET => "MYSQLND_UH_MYSQLND_COM_STMT_RESET", - MYSQLND_UH_MYSQLND_COM_SET_OPTION => "MYSQLND_UH_MYSQLND_COM_SET_OPTION", - MYSQLND_UH_MYSQLND_COM_STMT_FETCH => "MYSQLND_UH_MYSQLND_COM_STMT_FETCH", - MYSQLND_UH_MYSQLND_COM_DAEMON => "MYSQLND_UH_MYSQLND_COM_DAEMON", - MYSQLND_UH_MYSQLND_COM_END => "MYSQLND_UH_MYSQLND_COM_END", - ); - return (isset($mapping[$command])) ? $mapping[$command] : 'unknown'; -} - -function ok_packet_2_string($ok_packet) { - $mapping = array( - MYSQLND_UH_MYSQLND_PROT_GREET_PACKET => "MYSQLND_UH_MYSQLND_PROT_GREET_PACKET", - MYSQLND_UH_MYSQLND_PROT_AUTH_PACKET => "MYSQLND_UH_MYSQLND_PROT_AUTH_PACKET", - MYSQLND_UH_MYSQLND_PROT_OK_PACKET => "MYSQLND_UH_MYSQLND_PROT_OK_PACKET", - MYSQLND_UH_MYSQLND_PROT_EOF_PACKET => "MYSQLND_UH_MYSQLND_PROT_EOF_PACKET", - MYSQLND_UH_MYSQLND_PROT_CMD_PACKET => "MYSQLND_UH_MYSQLND_PROT_CMD_PACKET", - MYSQLND_UH_MYSQLND_PROT_RSET_HEADER_PACKET => "MYSQLND_UH_MYSQLND_PROT_RSET_HEADER_PACKET", - MYSQLND_UH_MYSQLND_PROT_RSET_FLD_PACKET => "MYSQLND_UH_MYSQLND_PROT_RSET_FLD_PACKET", - MYSQLND_UH_MYSQLND_PROT_ROW_PACKET => "MYSQLND_UH_MYSQLND_PROT_ROW_PACKET", - MYSQLND_UH_MYSQLND_PROT_STATS_PACKET => "MYSQLND_UH_MYSQLND_PROT_STATS_PACKET", - MYSQLND_UH_MYSQLND_PREPARE_RESP_PACKET => "MYSQLND_UH_MYSQLND_PREPARE_RESP_PACKET", - MYSQLND_UH_MYSQLND_CHG_USER_RESP_PACKET => "MYSQLND_UH_MYSQLND_CHG_USER_RESP_PACKET", - MYSQLND_UH_MYSQLND_PROT_LAST => "MYSQLND_UH_MYSQLND_PROT_LAST", - ); - return (isset($mapping[$ok_packet])) ? $mapping[$ok_packet] : 'unknown'; -} - -class proxy extends MysqlndUhConnection { - public function simpleCommand($conn, $command, $arg, $ok_packet, $silent, $ignore_upsert_status) { - printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true)); - printf("Command '%s'\n", server_cmd_2_string($command)); - printf("OK packet '%s'\n", ok_packet_2_string($ok_packet)); - $ret = parent::simpleCommand($conn, $command, $arg, $ok_packet, $silent, $ignore_upsert_status); - printf("%s returns %s\n", __METHOD__, var_export($ret, true)); - return $ret; - } -} -mysqlnd_uh_set_connection_proxy(new proxy()); -$mysqli = new mysqli("localhost", "root", "", "test"); -$mysqli->query("SELECT 1"); -?> -]]> - - &example.outputs; - - NULL, - 1 => 3, - 2 => 'SELECT 1', - 3 => 13, - 4 => false, - 5 => false, -)) -Command 'MYSQLND_UH_MYSQLND_COM_QUERY' -OK packet 'MYSQLND_UH_MYSQLND_PROT_LAST' -proxy::simpleCommand returns true -:)proxy::simpleCommand(array ( - 0 => NULL, - 1 => 1, - 2 => '', - 3 => 13, - 4 => true, - 5 => true, -)) -Command 'MYSQLND_UH_MYSQLND_COM_QUIT' -OK packet 'MYSQLND_UH_MYSQLND_PROT_LAST' -proxy::simpleCommand returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/simplecommandhandleresponse.xml b/reference/mysqlnd_uh/mysqlnduhconnection/simplecommandhandleresponse.xml deleted file mode 100644 index 3ec32431dc..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/simplecommandhandleresponse.xml +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - MysqlndUhConnection::simpleCommandHandleResponse - Process a response for a basic COM_* command send to the client - - - - &reftitle.description; - - public boolMysqlndUhConnection::simpleCommandHandleResponse - mysqlnd_connectionconnection - intok_packet - boolsilent - intcommand - boolignore_upsert_status - - - Process a response for a basic COM_* command send to the client. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - ok_packet - - - The OK packet type. - - - - - silent - - - Whether mysqlnd may emit errors. - - - - - command - - - The COM command to process results from. - - - - - ignore_upsert_status - - - Whether to ignore UPDATE/INSERT status. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::simpleCommandHandleResponse</function> example - - "MYSQLND_UH_MYSQLND_COM_SLEEP", - MYSQLND_UH_MYSQLND_COM_QUIT => "MYSQLND_UH_MYSQLND_COM_QUIT", - MYSQLND_UH_MYSQLND_COM_INIT_DB => "MYSQLND_UH_MYSQLND_COM_INIT_DB", - MYSQLND_UH_MYSQLND_COM_QUERY => "MYSQLND_UH_MYSQLND_COM_QUERY", - MYSQLND_UH_MYSQLND_COM_FIELD_LIST => "MYSQLND_UH_MYSQLND_COM_FIELD_LIST", - MYSQLND_UH_MYSQLND_COM_CREATE_DB => "MYSQLND_UH_MYSQLND_COM_CREATE_DB", - MYSQLND_UH_MYSQLND_COM_DROP_DB => "MYSQLND_UH_MYSQLND_COM_DROP_DB", - MYSQLND_UH_MYSQLND_COM_REFRESH => "MYSQLND_UH_MYSQLND_COM_REFRESH", - MYSQLND_UH_MYSQLND_COM_SHUTDOWN => "MYSQLND_UH_MYSQLND_COM_SHUTDOWN", - MYSQLND_UH_MYSQLND_COM_STATISTICS => "MYSQLND_UH_MYSQLND_COM_STATISTICS", - MYSQLND_UH_MYSQLND_COM_PROCESS_INFO => "MYSQLND_UH_MYSQLND_COM_PROCESS_INFO", - MYSQLND_UH_MYSQLND_COM_CONNECT => "MYSQLND_UH_MYSQLND_COM_CONNECT", - MYSQLND_UH_MYSQLND_COM_PROCESS_KILL => "MYSQLND_UH_MYSQLND_COM_PROCESS_KILL", - MYSQLND_UH_MYSQLND_COM_DEBUG => "MYSQLND_UH_MYSQLND_COM_DEBUG", - MYSQLND_UH_MYSQLND_COM_PING => "MYSQLND_UH_MYSQLND_COM_PING", - MYSQLND_UH_MYSQLND_COM_TIME => "MYSQLND_UH_MYSQLND_COM_TIME", - MYSQLND_UH_MYSQLND_COM_DELAYED_INSERT => "MYSQLND_UH_MYSQLND_COM_DELAYED_INSERT", - MYSQLND_UH_MYSQLND_COM_CHANGE_USER => "MYSQLND_UH_MYSQLND_COM_CHANGE_USER", - MYSQLND_UH_MYSQLND_COM_BINLOG_DUMP => "MYSQLND_UH_MYSQLND_COM_BINLOG_DUMP", - MYSQLND_UH_MYSQLND_COM_TABLE_DUMP => "MYSQLND_UH_MYSQLND_COM_TABLE_DUMP", - MYSQLND_UH_MYSQLND_COM_CONNECT_OUT => "MYSQLND_UH_MYSQLND_COM_CONNECT_OUT", - MYSQLND_UH_MYSQLND_COM_REGISTER_SLAVED => "MYSQLND_UH_MYSQLND_COM_REGISTER_SLAVED", - MYSQLND_UH_MYSQLND_COM_STMT_PREPARE => "MYSQLND_UH_MYSQLND_COM_STMT_PREPARE", - MYSQLND_UH_MYSQLND_COM_STMT_EXECUTE => "MYSQLND_UH_MYSQLND_COM_STMT_EXECUTE", - MYSQLND_UH_MYSQLND_COM_STMT_SEND_LONG_DATA => "MYSQLND_UH_MYSQLND_COM_STMT_SEND_LONG_DATA", - MYSQLND_UH_MYSQLND_COM_STMT_CLOSE => "MYSQLND_UH_MYSQLND_COM_STMT_CLOSE", - MYSQLND_UH_MYSQLND_COM_STMT_RESET => "MYSQLND_UH_MYSQLND_COM_STMT_RESET", - MYSQLND_UH_MYSQLND_COM_SET_OPTION => "MYSQLND_UH_MYSQLND_COM_SET_OPTION", - MYSQLND_UH_MYSQLND_COM_STMT_FETCH => "MYSQLND_UH_MYSQLND_COM_STMT_FETCH", - MYSQLND_UH_MYSQLND_COM_DAEMON => "MYSQLND_UH_MYSQLND_COM_DAEMON", - MYSQLND_UH_MYSQLND_COM_END => "MYSQLND_UH_MYSQLND_COM_END", - ); - return (isset($mapping[$command])) ? $mapping[$command] : 'unknown'; -} - -function ok_packet_2_string($ok_packet) { - $mapping = array( - MYSQLND_UH_MYSQLND_PROT_GREET_PACKET => "MYSQLND_UH_MYSQLND_PROT_GREET_PACKET", - MYSQLND_UH_MYSQLND_PROT_AUTH_PACKET => "MYSQLND_UH_MYSQLND_PROT_AUTH_PACKET", - MYSQLND_UH_MYSQLND_PROT_OK_PACKET => "MYSQLND_UH_MYSQLND_PROT_OK_PACKET", - MYSQLND_UH_MYSQLND_PROT_EOF_PACKET => "MYSQLND_UH_MYSQLND_PROT_EOF_PACKET", - MYSQLND_UH_MYSQLND_PROT_CMD_PACKET => "MYSQLND_UH_MYSQLND_PROT_CMD_PACKET", - MYSQLND_UH_MYSQLND_PROT_RSET_HEADER_PACKET => "MYSQLND_UH_MYSQLND_PROT_RSET_HEADER_PACKET", - MYSQLND_UH_MYSQLND_PROT_RSET_FLD_PACKET => "MYSQLND_UH_MYSQLND_PROT_RSET_FLD_PACKET", - MYSQLND_UH_MYSQLND_PROT_ROW_PACKET => "MYSQLND_UH_MYSQLND_PROT_ROW_PACKET", - MYSQLND_UH_MYSQLND_PROT_STATS_PACKET => "MYSQLND_UH_MYSQLND_PROT_STATS_PACKET", - MYSQLND_UH_MYSQLND_PREPARE_RESP_PACKET => "MYSQLND_UH_MYSQLND_PREPARE_RESP_PACKET", - MYSQLND_UH_MYSQLND_CHG_USER_RESP_PACKET => "MYSQLND_UH_MYSQLND_CHG_USER_RESP_PACKET", - MYSQLND_UH_MYSQLND_PROT_LAST => "MYSQLND_UH_MYSQLND_PROT_LAST", - ); - return (isset($mapping[$ok_packet])) ? $mapping[$ok_packet] : 'unknown'; -} - -class proxy extends MysqlndUhConnection { - public function simpleCommandHandleResponse($conn, $ok_packet, $silent, $command, $ignore_upsert_status) { - printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true)); - printf("Command '%s'\n", server_cmd_2_string($command)); - printf("OK packet '%s'\n", ok_packet_2_string($ok_packet)); - $ret = parent::simpleCommandHandleResponse($conn, $ok_packet, $silent, $command, $ignore_upsert_status); - printf("%s returns %s\n", __METHOD__, var_export($ret, true)); - return $ret; - } -} -mysqlnd_uh_set_connection_proxy(new proxy()); -$mysql = mysql_connect("localhost", "root", ""); -mysql_query("SELECT 1 FROM DUAL", $mysql); -?> -]]> - - &example.outputs; - - NULL, - 1 => 5, - 2 => false, - 3 => 27, - 4 => true, -)) -Command 'MYSQLND_UH_MYSQLND_COM_SET_OPTION' -OK packet 'MYSQLND_UH_MYSQLND_PROT_EOF_PACKET' -proxy::simpleCommandHandleResponse returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/sslset.xml b/reference/mysqlnd_uh/mysqlnduhconnection/sslset.xml deleted file mode 100644 index 8e1b16f3d6..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/sslset.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - MysqlndUhConnection::sslSet - Used for establishing secure connections using SSL - - - - &reftitle.description; - - public boolMysqlndUhConnection::sslSet - mysqlnd_connectionconnection - stringkey - stringcert - stringca - stringcapath - stringcipher - - - Used for establishing secure connections using SSL. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - key - - - The path name to the key file. - - - - - cert - - - The path name to the certificate file. - - - - - ca - - - The path name to the certificate authority file. - - - - - capath - - - The pathname to a directory that contains trusted SSL CA certificates in PEM format. - - - - - cipher - - - A list of allowable ciphers to use for SSL encryption. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::sslSet</function> example - -ssl_set("key", "cert", "ca", "capath", "cipher"); -?> -]]> - - &example.outputs; - - NULL, - 1 => 'key', - 2 => 'cert', - 3 => 'ca', - 4 => 'capath', - 5 => 'cipher', -)) -proxy::sslSet returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_ssl_set - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/stmtinit.xml b/reference/mysqlnd_uh/mysqlnduhconnection/stmtinit.xml deleted file mode 100644 index 712c2841b3..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/stmtinit.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - MysqlndUhConnection::stmtInit - Initializes a statement and returns a resource for use with mysqli_statement::prepare - - - - &reftitle.description; - - public resourceMysqlndUhConnection::stmtInit - mysqlnd_connectionconnection - - - Initializes a statement and returns a resource for use with mysqli_statement::prepare. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Resource of type Mysqlnd Prepared Statement (internal only - you must not modify it!). - The documentation may also refer to such resources using the alias name - mysqlnd_prepared_statement. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::stmtInit</function> example - -prepare("SELECT 1 AS _one FROM DUAL"); -$stmt->execute(); -$one = NULL; -$stmt->bind_result($one); -$stmt->fetch(); -var_dump($one); -?> -]]> - - &example.outputs; - - NULL, -)) -resource(19) of type (Mysqlnd Connection) -proxy::stmtInit returns NULL -resource(246) of type (Mysqlnd Prepared Statement (internal only - you must not modify it!)) -int(1) -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_stmt_init - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/storeresult.xml b/reference/mysqlnd_uh/mysqlnduhconnection/storeresult.xml deleted file mode 100644 index 096e7d5c4a..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/storeresult.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - MysqlndUhConnection::storeResult - Transfers a result set from the last query - - - - &reftitle.description; - - public resourceMysqlndUhConnection::storeResult - mysqlnd_connectionconnection - - - Transfers a result set from the last query. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Resource of type Mysqlnd Resultset (internal only - you must not modify it!). - The documentation may also refer to such resources using the alias name - mysqlnd_resultset. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::storeResult</function> example - -query("SELECT 'Also called buffered result' AS _msg FROM DUAL"); -var_dump($res->fetch_assoc()); - -$mysqli->real_query("SELECT 'Good morning!' AS _msg FROM DUAL"); -$res = $mysqli->store_result(); -var_dump($res->fetch_assoc()); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::storeResult returns NULL -resource(475) of type (Mysqlnd Resultset (internal only - you must not modify it!)) -array(1) { - ["_msg"]=> - string(27) "Also called buffered result" -} -proxy::storeResult(array ( - 0 => NULL, -)) -proxy::storeResult returns NULL -resource(730) of type (Mysqlnd Resultset (internal only - you must not modify it!)) -array(1) { - ["_msg"]=> - string(13) "Good morning!" -} -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_store_result - - - mysqli_real_query - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/txcommit.xml b/reference/mysqlnd_uh/mysqlnduhconnection/txcommit.xml deleted file mode 100644 index a6cc565b0a..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/txcommit.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - MysqlndUhConnection::txCommit - Commits the current transaction - - - - &reftitle.description; - - public boolMysqlndUhConnection::txCommit - mysqlnd_connectionconnection - - - Commits the current transaction. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::txCommit</function> example - -commit(); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::txCommit returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_commit - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/txrollback.xml b/reference/mysqlnd_uh/mysqlnduhconnection/txrollback.xml deleted file mode 100644 index ea5ec30795..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/txrollback.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - MysqlndUhConnection::txRollback - Rolls back current transaction - - - - &reftitle.description; - - public boolMysqlndUhConnection::txRollback - mysqlnd_connectionconnection - - - Rolls back current transaction. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::txRollback</function> example - -rollback(); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::txRollback returns true -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_commit - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhconnection/useresult.xml b/reference/mysqlnd_uh/mysqlnduhconnection/useresult.xml deleted file mode 100644 index 51cc712b3b..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhconnection/useresult.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - MysqlndUhConnection::useResult - Initiate a result set retrieval - - - - &reftitle.description; - - public resourceMysqlndUhConnection::useResult - mysqlnd_connectionconnection - - - Initiate a result set retrieval. - - - - - &reftitle.parameters; - - - connection - - - Mysqlnd connection handle. Do not modify! - - - - - - - - &reftitle.returnvalues; - - Resource of type Mysqlnd Resultset (internal only - you must not modify it!). - The documentation may also refer to such resources using the alias name - mysqlnd_resultset. - - - - - &reftitle.examples; - - - <function>MysqlndUhConnection::useResult</function> example - -real_query("SELECT 'Good morning!' AS _msg FROM DUAL"); -$res = $mysqli->use_result(); -var_dump($res->fetch_assoc()); -?> -]]> - - &example.outputs; - - NULL, -)) -proxy::useResult returns NULL -resource(425) of type (Mysqlnd Resultset (internal only - you must not modify it!)) -array(1) { - ["_msg"]=> - string(13) "Good morning!" -} -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_connection_proxy - - - mysqli_use_result - - - mysqli_real_query - - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhpreparedstatement.xml b/reference/mysqlnd_uh/mysqlnduhpreparedstatement.xml deleted file mode 100644 index 2aa5e68da8..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhpreparedstatement.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - The MysqlndUhPreparedStatement class - MysqlndUhPreparedStatement - - - - -
- &reftitle.intro; - - - -
- - -
- &reftitle.classsynopsis; - - - - MysqlndUhPreparedStatement - - - - - MysqlndUhPreparedStatement - - - - - &Methods; - - - - -
- -
- - &reference.mysqlnd-uh.entities.mysqlnduhpreparedstatement; - -
- - diff --git a/reference/mysqlnd_uh/mysqlnduhpreparedstatement/execute.xml b/reference/mysqlnd_uh/mysqlnduhpreparedstatement/execute.xml deleted file mode 100644 index 66c9968b0a..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhpreparedstatement/execute.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - MysqlndUhPreparedStatement::execute - Executes a prepared Query - - - - &reftitle.description; - - public boolMysqlndUhPreparedStatement::execute - mysqlnd_prepared_statementstatement - - - Executes a prepared Query. - - - - - &reftitle.parameters; - - - statement - - - Mysqlnd prepared statement handle. Do not modify! - Resource of type Mysqlnd Prepared Statement (internal only - you must not modify it!). - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhPreparedStatement::execute</function> example - -prepare("SELECT 'Labskaus' AS _msg FROM DUAL"); -$stmt->execute(); -$msg = NULL; -$stmt->bind_result($msg); -$stmt->fetch(); -var_dump($msg); -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_statement_proxy - - - mysqli_stmt_execute - - - - - - - - - - diff --git a/reference/mysqlnd_uh/mysqlnduhpreparedstatement/prepare.xml b/reference/mysqlnd_uh/mysqlnduhpreparedstatement/prepare.xml deleted file mode 100644 index 4c0d24a47a..0000000000 --- a/reference/mysqlnd_uh/mysqlnduhpreparedstatement/prepare.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - MysqlndUhPreparedStatement::prepare - Prepare an SQL statement for execution - - - - &reftitle.description; - - public boolMysqlndUhPreparedStatement::prepare - mysqlnd_prepared_statementstatement - stringquery - - - Prepare an SQL statement for execution. - - - - - &reftitle.parameters; - - - statement - - - Mysqlnd prepared statement handle. Do not modify! - Resource of type Mysqlnd Prepared Statement (internal only - you must not modify it!). - - - - - query - - - The query to be prepared. - - - - - - - - &reftitle.returnvalues; - - Returns &true; on success. - Otherwise, returns &false; - - - - - &reftitle.examples; - - - <function>MysqlndUhPreparedStatement::prepare</function> example - -prepare("SELECT 'Labskaus' AS _msg FROM DUAL"); -$stmt->execute(); -$msg = NULL; -$stmt->bind_result($msg); -$stmt->fetch(); -var_dump($msg); -?> -]]> - - &example.outputs; - - NULL, - 1 => 'SELECT \'Labskaus\' AS _msg FROM DUAL', -)) -stmt_proxy::prepare returns true -bool(true) -string(46) "No more you-know-what-I-mean for lunch, please" -]]> - - - - - - - &reftitle.seealso; - - - - mysqlnd_uh_set_statement_proxy - - - mysqli_stmt_prepare - - - mysqli_prepare - - - - - - - - diff --git a/reference/mysqlnd_uh/quickstart.xml b/reference/mysqlnd_uh/quickstart.xml deleted file mode 100644 index 62acc5efcf..0000000000 --- a/reference/mysqlnd_uh/quickstart.xml +++ /dev/null @@ -1,424 +0,0 @@ - - - - Quickstart and Examples - - The mysqlnd user handler plugin can be understood as a client-side proxy - for all PHP MySQL extensions (mysqli, - mysql, - PDO_MYSQL), if they are compiled to - use the mysqlnd library. The - extensions use the mysqlnd library internally, at the C - level, to communicate with the MySQL server. PECL/mysqlnd_uh - allows it to hook many mysqlnd calls. Therefore, - most activities of the PHP MySQL extensions can be monitored. - - - Because monitoring happens at the level of the library, at a layer below the - application, it is possible to monitor applications without changing them. - - - On the C level, the mysqlnd library is structured in modules - or classes. The extension hooks almost all methods of the mysqlnd - internal connection class and exposes them through the - user space class MysqlndUhConnection. Some few methods of - the mysqlnd internal statement class are made available - to the PHP user with the class MysqlndUhPreparedStatement. - By subclassing the classes MysqlndUhConnection and - MysqlndUhPreparedStatement users get access to - mysqlnd internal function calls. - - - - The internal mysqlnd function calls are not designed - to be exposed to the PHP user. Manipulating their activities may - cause PHP to crash or leak memory. Often, this is not considered a bug. Please, - keep in mind that you are accessing C library functions through - PHP which are expected to take certain actions, which you may not be able to - emulate in user space. Therefore, it is strongly recommended to always call - the parent method implementation when subclassing MysqlndUhConnection - or MysqlndUhPreparedStatement. To prevent the worst - case, the extension performs some sanity checks. Please, see also the - Mysqlnd_uh &ConfigureOptions;. - - - - -
- Setup - - The plugin is implemented as a PHP extension. See the - installation instructions to - install the - PECL/mysqlnd_uh extension. - Then, load the extension into PHP and activate the plugin in the PHP configuration - file using the PHP configuration directive named - mysqlnd_uh.enable. - The below example shows the default settings of the extension. - - - - Enabling the plugin (php.ini) - - - - - -
- -
- How it works - - This describes the background and inner workings of the mysqlnd_uh - extension. - - - Two classes are provided by the extension: MysqlndUhConnection - and MysqlndUhPreparedStatement. MysqlndUhConnection lets - you access almost all methods of the mysqlnd - internal connection class. The latter exposes some selected - methods of the mysqlnd internal statement class. - For example, MysqlndUhConnection::connect maps to - the mysqlnd library C function - mysqlnd_conn__connect. - - - As a mysqlnd plugin, the PECL/mysqlnd_uh extension replaces mysqlnd - library C functions with its own functions. Whenever a - PHP MySQL extension compiled to use mysqlnd calls - a mysqlnd function, the functions installed by the plugin are executed - instead of the original mysqlnd ones. For example, - mysqli_connect invokes mysqlnd_conn__connect, - so the connect function installed by PECL/mysqlnd_uh will be called. - The functions installed by PECL/mysqlnd_uh are the methods of the built-in classes. - - - The built-in PHP classes and their methods do nothing but call their - mysqlnd C library counterparts, to behave exactly - like the original mysqlnd function they replace. - The code below illustrates in pseudo-code what the extension does. - - - - Pseudo-code: what a built-in class does - - - - - - - The build-in classes behave like a transparent proxy. It is possible for - you to replace the proxy with your own. This is done by subclassing - MysqlndUhConnection or - MysqlndUhPreparedStatement to extend the functionality - of the proxy, followed by registering a new proxy object. - Proxy objects are installed by - mysqlnd_uh_set_connection_proxy - and - mysqlnd_uh_set_statement_proxy. - - - - Installing a proxy - - -]]> - - &example.outputs; - - NULL, - 1 => 'localhost', - 2 => 'root', - 3 => '', - 4 => 'test', - 5 => 3306, - 6 => NULL, - 7 => 131072, -)) -proxy::connect returns true -]]> - - - -
- -
- Installing a proxy - - The extension provides two built-in classes: MysqlndUhConnection - and MysqlndUhPreparedStatement. The classes are used - for hooking mysqlnd library calls. Their methods correspond - to mysqlnd internal functions. By default they act like - a transparent proxy and do nothing but call their mysqlnd counterparts. - By subclassing the classes you can install your own proxy to monitor mysqlnd. - - - See also the How it works - guide to learn about the inner workings of this extension. - - - Connection proxies are objects of the type MysqlndUhConnection. - Connection proxy objects are installed by - mysqlnd_uh_set_connection_proxy. - If you install the built-in class MysqlndUhConnection - as a proxy, nothing happens. It behaves like a transparent proxy. - - - - Proxy registration, mysqlnd_uh.enable=1 - - -]]> - - - - - The PHP_INI_SYSTEM configuration setting - mysqlnd_uh.enable - controls whether a proxy may be set. If disabled, the extension - will throw errors of type E_WARNING - - - - Proxy installation disabled - - - - - -]]> - - &example.outputs; - - - - - - - To monitor mysqlnd, you have to write your own - proxy object subclassing MysqlndUhConnection. - Please, see the function reference for a the list of methods that - can be subclassed. Alternatively, you can use reflection to inspect - the built-in MysqlndUhConnection. - - - Create a new class proxy. Derive it from the - built-in class MysqlndUhConnection. - Replace the - MysqlndUhConnection::connect. - method. Print out the host parameter value passed to the method. - Make sure that you call the parent implementation of the connect - method. Failing to do so may give unexpected and undesired results, including - memory leaks and crashes. - - - Register your proxy and open three connections using the PHP MySQL - extensions mysqli, - mysql, - PDO_MYSQL. If the extensions have been - compiled to use the mysqlnd library, the - proxy::connect method will be called three times, once - for each connection opened. - - - - Connection proxy - - -]]> - - &example.outputs; - - - - - - - The use of prepared statement proxies follows the same pattern: create a - proxy object of the type MysqlndUhPreparedStatement - and install the proxy using - mysqlnd_uh_set_statement_proxy. - - - - Prepared statement proxy - -prepare("SELECT 'mysqlnd hacking made easy' AS _msg FROM DUAL"); -?> -]]> - - &example.outputs; - - - - - -
- -
- Basic query monitoring - - Basic monitoring of a query statement is easy with PECL/mysqlnd_uh. - Combined with debug_print_backtrace it can become a powerful - tool, for example, to find the origin of certain statement. This may - be desired when searching for slow queries but also after database - refactoring to find code still accessing deprecated databases or - tables. The latter may be a complicated matter to do otherwise, especially if - the application uses auto-generated queries. - - - - Basic Monitoring - -query("SELECT 1 AS _one FROM DUAL")->fetchAll(PDO::FETCH_ASSOC)); - -$mysqli = new mysqli("localhost", "root", "", "test"); -$mysqli->prepare("SELECT 1 AS _two FROM DUAL"); -?> -]]> - - &example.outputs; - -query(Resource id #19, SELECT 1 AS _one FROM DUAL) -#1 PDO->query(SELECT 1 AS _one FROM DUAL) called at [example.php:19] -array(1) { - [0]=> - array(1) { - ["_one"]=> - string(1) "1" - } -} -#0 stmt_proxy->prepare(Resource id #753, SELECT 1 AS _two FROM DUAL) -#1 mysqli->prepare(SELECT 1 AS _two FROM DUAL) called at [example.php:22] -]]> - - - - - For basic query monitoring you should install a connection and a prepared statement - proxy. The connection proxy should subclass MysqlndUhConnection::query. - All database queries not using native prepared statements will call this method. - In the example the query function is invoked by a PDO call. - By default, PDO_MySQL is using prepared statement emulation. - - - All native prepared statements are prepared with the prepare - method of mysqlnd exported through - MysqlndUhPreparedStatement::prepare. Subclass - MysqlndUhPreparedStatement and overwrite prepare - for native prepared statement monitoring. - -
- - -
- diff --git a/reference/mysqlnd_uh/reference.xml b/reference/mysqlnd_uh/reference.xml deleted file mode 100644 index 0f3ec4ce56..0000000000 --- a/reference/mysqlnd_uh/reference.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Mysqlnd_uh &Functions; - - &reference.mysqlnd-uh.entities.functions; - - - - diff --git a/reference/mysqlnd_uh/setup.xml b/reference/mysqlnd_uh/setup.xml deleted file mode 100644 index c1c3da73fe..0000000000 --- a/reference/mysqlnd_uh/setup.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - - PHP 5.3.3 or later. - It is recommended to use PHP 5.4.0 or later - to get access to the latest mysqlnd features. - - - The mysqlnd_uh user handler - plugin supports all PHP applications and all available PHP MySQL extensions - (mysqli, - mysql, - PDO_MYSQL). - The PHP MySQL extension must be configured to use - mysqlnd in order to be able - to use the mysqlnd_uh plugin for - mysqlnd. - - - The alpha versions makes use of some mysqli features. - You must enable mysqli to compile the plugin. - This requirement may be removed in the future. Note, that this requirement - does not restrict you to use the plugin only with mysqli. - You can use the plugin to monitor mysql, mysqli - and PDO_MYSQL. - -
- - &reference.mysqlnd-uh.configure; - &reference.mysqlnd-uh.ini; - -
- &reftitle.resources; - &no.resource; -
- -
- - diff --git a/reference/mysqlnd_uh/versions.xml b/reference/mysqlnd_uh/versions.xml deleted file mode 100644 index 80cc9c0d97..0000000000 --- a/reference/mysqlnd_uh/versions.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reference/ncurses/book.xml b/reference/ncurses/book.xml deleted file mode 100644 index e995e96aea..0000000000 --- a/reference/ncurses/book.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - Ncurses Terminal Screen Control - Ncurses - - - - &reftitle.intro; - - ncurses (new curses) is a free software emulation of curses in - System V Rel 4.0 (and above). It uses terminfo format, supports pads, - colors, multiple highlights, form characters and function key mapping. - Because of the interactive nature of this library, it will be of little - use for writing Web applications, but may be useful when writing scripts meant - using PHP from the command line. - - - The features available, such as colors, depend on the terminal that - you are using. Use functions such as ncurses_has_colors, - ncurses_can_change_color, and - ncurses_has_ic to check for individual capabilities. - - - - &pecl.moved-ver;5.3.0. - - - - ncurses is available for the following platforms: - - AIX - BeOS - BSD variants (FreeBSD, NetBSD, OpenBSD) - Cygwin - Digital Unix (aka OSF1) - GNU/Linux - HPUX - IRIX64 - macOS - OS/2 - QNX - SCO OpenServer - Solaris - Tru64 - - - - - - &reference.ncurses.setup; - &reference.ncurses.constants; - &reference.ncurses.reference; - - - - - diff --git a/reference/ncurses/configure.xml b/reference/ncurses/configure.xml deleted file mode 100644 index c9fd736dca..0000000000 --- a/reference/ncurses/configure.xml +++ /dev/null @@ -1,35 +0,0 @@ - - -
- &reftitle.install; - - &pecl.info; - &url.pecl.package;ncurses. - - - Wide character CRT screen handling (ncursesw) support - was added in version 1.0.1 of this PECL extension. - -
- - - diff --git a/reference/ncurses/constants.xml b/reference/ncurses/constants.xml deleted file mode 100644 index 58ec160a5c..0000000000 --- a/reference/ncurses/constants.xml +++ /dev/null @@ -1,505 +0,0 @@ - - - - &reftitle.constants; - &extension.constants; -
- Error codes - - On error ncurses functions return -1. - Some functions return 0 on success. See the relevant - pages in the documentation for actual return values. - -
-
- Colors - - ncurses color constants - - - - constant - meaning - - - - - NCURSES_COLOR_BLACK - no color (black) - - - NCURSES_COLOR_WHITE - white - - - NCURSES_COLOR_RED - red - supported when terminal is in color mode - - - NCURSES_COLOR_GREEN - green - supported when terminal is in color mode - - - NCURSES_COLOR_YELLOW - yellow - supported when terminal is in color mode - - - NCURSES_COLOR_BLUE - blue - supported when terminal is in color mode - - - NCURSES_COLOR_CYAN - cyan - supported when terminal is in color mode - - - NCURSES_COLOR_MAGENTA - magenta - supported when terminal is in color mode - - - -
-
-
- Keys - - ncurses key constants - - - - constant - meaning - - - - - NCURSES_KEY_F0 - NCURSES_KEY_F64 - function keys F1 - F64 - - - NCURSES_KEY_DOWN - down arrow - - - NCURSES_KEY_UP - up arrow - - - NCURSES_KEY_LEFT - left arrow - - - NCURSES_KEY_RIGHT - right arrow - - - NCURSES_KEY_HOME - home key (upward+left arrow) - - - NCURSES_KEY_BACKSPACE - backspace - - - NCURSES_KEY_DL - delete line - - - NCURSES_KEY_IL - insert line - - - NCURSES_KEY_DC - delete character - - - NCURSES_KEY_IC - insert char or enter insert mode - - - NCURSES_KEY_EIC - exit insert char mode - - - NCURSES_KEY_CLEAR - clear screen - - - NCURSES_KEY_EOS - clear to end of screen - - - NCURSES_KEY_EOL - clear to end of line - - - NCURSES_KEY_SF - scroll one line forward - - - NCURSES_KEY_SR - scroll one line backward - - - NCURSES_KEY_NPAGE - next page - - - NCURSES_KEY_PPAGE - previous page - - - NCURSES_KEY_STAB - set tab - - - NCURSES_KEY_CTAB - clear tab - - - NCURSES_KEY_CATAB - clear all tabs - - - NCURSES_KEY_SRESET - soft (partial) reset - - - NCURSES_KEY_RESET - reset or hard reset - - - NCURSES_KEY_PRINT - print - - - NCURSES_KEY_LL - lower left - - - NCURSES_KEY_A1 - upper left of keypad - - - NCURSES_KEY_A3 - upper right of keypad - - - NCURSES_KEY_B2 - center of keypad - - - NCURSES_KEY_C1 - lower left of keypad - - - NCURSES_KEY_C3 - lower right of keypad - - - NCURSES_KEY_BTAB - back tab - - - NCURSES_KEY_BEG - beginning - - - NCURSES_KEY_CANCEL - cancel - - - NCURSES_KEY_CLOSE - close - - - NCURSES_KEY_COMMAND - cmd (command) - - - NCURSES_KEY_COPY - copy - - - NCURSES_KEY_CREATE - create - - - NCURSES_KEY_END - end - - - NCURSES_KEY_EXIT - exit - - - NCURSES_KEY_FIND - find - - - NCURSES_KEY_HELP - help - - - NCURSES_KEY_MARK - mark - - - NCURSES_KEY_MESSAGE - message - - - NCURSES_KEY_MOVE - move - - - NCURSES_KEY_NEXT - next - - - NCURSES_KEY_OPEN - open - - - NCURSES_KEY_OPTIONS - options - - - NCURSES_KEY_PREVIOUS - previous - - - NCURSES_KEY_REDO - redo - - - NCURSES_KEY_REFERENCE - ref (reference) - - - NCURSES_KEY_REFRESH - refresh - - - NCURSES_KEY_REPLACE - replace - - - NCURSES_KEY_RESTART - restart - - - NCURSES_KEY_RESUME - resume - - - NCURSES_KEY_SAVE - save - - - NCURSES_KEY_SBEG - shiftet beg (beginning) - - - NCURSES_KEY_SCANCEL - shifted cancel - - - NCURSES_KEY_SCOMMAND - shifted command - - - NCURSES_KEY_SCOPY - shifted copy - - - NCURSES_KEY_SCREATE - shifted create - - - NCURSES_KEY_SDC - shifted delete char - - - NCURSES_KEY_SDL - shifted delete line - - - NCURSES_KEY_SELECT - select - - - NCURSES_KEY_SEND - shifted end - - - NCURSES_KEY_SEOL - shifted end of line - - - NCURSES_KEY_SEXIT - shifted exit - - - NCURSES_KEY_SFIND - shifted find - - - NCURSES_KEY_SHELP - shifted help - - - NCURSES_KEY_SHOME - shifted home - - - NCURSES_KEY_SIC - shifted input - - - NCURSES_KEY_SLEFT - shifted left arrow - - - NCURSES_KEY_SMESSAGE - shifted message - - - NCURSES_KEY_SMOVE - shifted move - - - NCURSES_KEY_SNEXT - shifted next - - - NCURSES_KEY_SOPTIONS - shifted options - - - NCURSES_KEY_SPREVIOUS - shifted previous - - - NCURSES_KEY_SPRINT - shifted print - - - NCURSES_KEY_SREDO - shifted redo - - - NCURSES_KEY_SREPLACE - shifted replace - - - NCURSES_KEY_SRIGHT - shifted right arrow - - - NCURSES_KEY_SRSUME - shifted resume - - - NCURSES_KEY_SSAVE - shifted save - - - NCURSES_KEY_SSUSPEND - shifted suspend - - - NCURSES_KEY_UNDO - undo - - - NCURSES_KEY_MOUSE - mouse event has occurred - - - NCURSES_KEY_MAX - maximum key value - - - -
-
-
- Mouse - - mouse constants - - - - Constant - meaning - - - - - NCURSES_BUTTON1_RELEASED - NCURSES_BUTTON4_RELEASED - button (1-4) released - - - NCURSES_BUTTON1_PRESSED - NCURSES_BUTTON4_PRESSED - button (1-4) pressed - - - NCURSES_BUTTON1_CLICKED - NCURSES_BUTTON4_CLICKED - button (1-4) clicked - - - NCURSES_BUTTON1_DOUBLE_CLICKED - - NCURSES_BUTTON4_DOUBLE_CLICKED - button (1-4) double clicked - - - NCURSES_BUTTON1_TRIPLE_CLICKED - - NCURSES_BUTTON4_TRIPLE_CLICKED - button (1-4) triple clicked - - - NCURSES_BUTTON_CTRL - ctrl pressed during click - - - NCURSES_BUTTON_SHIFT - shift pressed during click - - - NCURSES_BUTTON_ALT - alt pressed during click - - - NCURSES_ALL_MOUSE_EVENTS - report all mouse events - - - NCURSES_REPORT_MOUSE_POSITION - report mouse position - - - -
-
-
- - diff --git a/reference/ncurses/functions/ncurses-addch.xml b/reference/ncurses/functions/ncurses-addch.xml deleted file mode 100644 index 9be4571428..0000000000 --- a/reference/ncurses/functions/ncurses-addch.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_addch - Add character at current position and advance cursor - - - &reftitle.description; - - intncurses_addch - intch - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - ch - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-addchnstr.xml b/reference/ncurses/functions/ncurses-addchnstr.xml deleted file mode 100644 index 013ff8a7f5..0000000000 --- a/reference/ncurses/functions/ncurses-addchnstr.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_addchnstr - Add attributed string with specified length at current position - - - &reftitle.description; - - intncurses_addchnstr - strings - intn - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - s - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-addchstr.xml b/reference/ncurses/functions/ncurses-addchstr.xml deleted file mode 100644 index d96b4828fc..0000000000 --- a/reference/ncurses/functions/ncurses-addchstr.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_addchstr - Add attributed string at current position - - - &reftitle.description; - - intncurses_addchstr - strings - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - s - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-addnstr.xml b/reference/ncurses/functions/ncurses-addnstr.xml deleted file mode 100644 index 6220eb91c5..0000000000 --- a/reference/ncurses/functions/ncurses-addnstr.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_addnstr - Add string with specified length at current position - - - &reftitle.description; - - intncurses_addnstr - strings - intn - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - s - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-addstr.xml b/reference/ncurses/functions/ncurses-addstr.xml deleted file mode 100644 index fb1f36748e..0000000000 --- a/reference/ncurses/functions/ncurses-addstr.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_addstr - Output text at current position - - - &reftitle.description; - - intncurses_addstr - stringtext - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - text - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-assume-default-colors.xml b/reference/ncurses/functions/ncurses-assume-default-colors.xml deleted file mode 100644 index 3177580c91..0000000000 --- a/reference/ncurses/functions/ncurses-assume-default-colors.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_assume_default_colors - Define default colors for color 0 - - - &reftitle.description; - - intncurses_assume_default_colors - intfg - intbg - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - fg - - - - - - - bg - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-attroff.xml b/reference/ncurses/functions/ncurses-attroff.xml deleted file mode 100644 index 032e6c48d5..0000000000 --- a/reference/ncurses/functions/ncurses-attroff.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_attroff - Turn off the given attributes - - - &reftitle.description; - - intncurses_attroff - intattributes - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - attributes - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-attron.xml b/reference/ncurses/functions/ncurses-attron.xml deleted file mode 100644 index 1db50e20dc..0000000000 --- a/reference/ncurses/functions/ncurses-attron.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_attron - Turn on the given attributes - - - &reftitle.description; - - intncurses_attron - intattributes - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - attributes - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-attrset.xml b/reference/ncurses/functions/ncurses-attrset.xml deleted file mode 100644 index 443eeeeae6..0000000000 --- a/reference/ncurses/functions/ncurses-attrset.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_attrset - Set given attributes - - - &reftitle.description; - - intncurses_attrset - intattributes - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - attributes - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-baudrate.xml b/reference/ncurses/functions/ncurses-baudrate.xml deleted file mode 100644 index aa8cfba997..0000000000 --- a/reference/ncurses/functions/ncurses-baudrate.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_baudrate - Returns baudrate of terminal - - - &reftitle.description; - - intncurses_baudrate - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-beep.xml b/reference/ncurses/functions/ncurses-beep.xml deleted file mode 100644 index c8c30024f0..0000000000 --- a/reference/ncurses/functions/ncurses-beep.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - ncurses_beep - Let the terminal beep - - - &reftitle.description; - - intncurses_beep - - - &warn.experimental.func; - - ncurses_beep sends an audible alert (bell) - and if its not possible flashes the screen. - - - - &reftitle.seealso; - - - ncurses_flash - - - - - - diff --git a/reference/ncurses/functions/ncurses-bkgd.xml b/reference/ncurses/functions/ncurses-bkgd.xml deleted file mode 100644 index 892d999f2f..0000000000 --- a/reference/ncurses/functions/ncurses-bkgd.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_bkgd - Set background property for terminal screen - - - &reftitle.description; - - intncurses_bkgd - intattrchar - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - attrchar - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-bkgdset.xml b/reference/ncurses/functions/ncurses-bkgdset.xml deleted file mode 100644 index 16e33b8d4e..0000000000 --- a/reference/ncurses/functions/ncurses-bkgdset.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_bkgdset - Control screen background - - - &reftitle.description; - - voidncurses_bkgdset - intattrchar - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - attrchar - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-border.xml b/reference/ncurses/functions/ncurses-border.xml deleted file mode 100644 index f6fe9f0cbd..0000000000 --- a/reference/ncurses/functions/ncurses-border.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - ncurses_border - Draw a border around the screen using attributed characters - - - &reftitle.description; - - intncurses_border - intleft - intright - inttop - intbottom - inttl_corner - inttr_corner - intbl_corner - intbr_corner - - &warn.experimental.func; - - Draws the specified lines and corners around the main window. - - - Use ncurses_wborder for borders around subwindows! - - - - &reftitle.parameters; - - Every parameter expects 0 to draw a line or 1 to skip it. - - - left - - - - - - - right - - - - - - - top - - - - - - - bottom - - - - - - - tl_corner - - - Top left corner - - - - - tr_corner - - - Top right corner - - - - - bl_corner - - - Bottom left corner - - - - - br_corner - - - Bottom right corner - - - - - - - - &reftitle.seealso; - - - ncurses_wborder - - - - - - diff --git a/reference/ncurses/functions/ncurses-bottom-panel.xml b/reference/ncurses/functions/ncurses-bottom-panel.xml deleted file mode 100644 index 4200357c2c..0000000000 --- a/reference/ncurses/functions/ncurses-bottom-panel.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_bottom_panel - Moves a visible panel to the bottom of the stack - - - &reftitle.description; - - intncurses_bottom_panel - resourcepanel - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - panel - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-can-change-color.xml b/reference/ncurses/functions/ncurses-can-change-color.xml deleted file mode 100644 index a045fbef97..0000000000 --- a/reference/ncurses/functions/ncurses-can-change-color.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - ncurses_can_change_color - Checks if terminal color definitions can be changed - - - &reftitle.description; - - boolncurses_can_change_color - - - - Checks whether the terminal has color capabilities and whether the - programmer can change color definitions using - ncurses_init_color. ncurses must be initialized - using ncurses_init before calling this function. - - - - &reftitle.parameters; - &no.function.parameters; - - - &reftitle.returnvalues; - - Return &true; if the programmer can change color definitions, - &false; otherwise. - - - - &reftitle.seealso; - - - ncurses_has_colors - ncurses_init_color - ncurses_start_color - - - - - - diff --git a/reference/ncurses/functions/ncurses-cbreak.xml b/reference/ncurses/functions/ncurses-cbreak.xml deleted file mode 100644 index 1d95762230..0000000000 --- a/reference/ncurses/functions/ncurses-cbreak.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - ncurses_cbreak - Switch off input buffering - - - &reftitle.description; - - boolncurses_cbreak - - - &warn.experimental.func; - - Disables line buffering and character processing (interrupt and flow - control characters are unaffected), making characters typed by the user - immediately available to the program. - - - - &reftitle.returnvalues; - - Returns &true; or NCURSES_ERR if any error occurred. - - - - &reftitle.seealso; - - - ncurses_nocbreak - - - - - - diff --git a/reference/ncurses/functions/ncurses-clear.xml b/reference/ncurses/functions/ncurses-clear.xml deleted file mode 100644 index 6fdcc0395c..0000000000 --- a/reference/ncurses/functions/ncurses-clear.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_clear - Clear screen - - - &reftitle.description; - - boolncurses_clear - - - &warn.experimental.func; - - Clears the screen completely without setting blanks. - - - Note: ncurses_clear clears the screen without - setting blanks, which have the current background rendition. To - clear screen with blanks, use ncurses_erase. - - - - &reftitle.returnvalues; - - &return.success; - - - - &reftitle.seealso; - - - ncurses_erase - - - - - - diff --git a/reference/ncurses/functions/ncurses-clrtobot.xml b/reference/ncurses/functions/ncurses-clrtobot.xml deleted file mode 100644 index f8cae81a35..0000000000 --- a/reference/ncurses/functions/ncurses-clrtobot.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - ncurses_clrtobot - Clear screen from current position to bottom - - - &reftitle.description; - - boolncurses_clrtobot - - - &warn.experimental.func; - - Erases all lines from cursor to end of screen and creates blanks. Blanks - created by ncurses_clrtobot have the current - background rendition. - - - - &reftitle.returnvalues; - - &return.success; - - - - &reftitle.seealso; - - - ncurses_clear - ncurses_clrtoeol - - - - - - diff --git a/reference/ncurses/functions/ncurses-clrtoeol.xml b/reference/ncurses/functions/ncurses-clrtoeol.xml deleted file mode 100644 index 4c39b7afd0..0000000000 --- a/reference/ncurses/functions/ncurses-clrtoeol.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - ncurses_clrtoeol - Clear screen from current position to end of line - - - &reftitle.description; - - boolncurses_clrtoeol - - - &warn.experimental.func; - - Erases the current line from cursor position to the end. Blanks created by - ncurses_clrtoeol have the current background - rendition. - - - - &reftitle.returnvalues; - - &return.success; - - - - &reftitle.seealso; - - - ncurses_clear - ncurses_clrtobot - - - - - - diff --git a/reference/ncurses/functions/ncurses-color-content.xml b/reference/ncurses/functions/ncurses-color-content.xml deleted file mode 100644 index 0aed29928e..0000000000 --- a/reference/ncurses/functions/ncurses-color-content.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - ncurses_color_content - Retrieves RGB components of a color - - - &reftitle.description; - - intncurses_color_content - intcolor - intr - intg - intb - - - Retrieves the red, green, and blue components for the given color definition. - Terminal color capabilities must be initialized with - ncurses_start_color prior to calling this function. - - - - &reftitle.parameters; - - - - color - - - The number of the color to retrieve information for. May be one of the - pre-defined color constants. - - - - - r - - - A reference to which to return the red component of the color. The value - returned to the reference will be between 0 and 1000. - - - - - g - - - A reference to which to return the green component of the color. The value - returned to the reference will be between 0 and 1000. - - - - - b - - - A reference to which to return the blue component of the color. The value - returned to the reference will be between 0 and 1000. - - - - - - - - &reftitle.returnvalues; - - Returns -1 if the function was successful, and - 0 if ncurses or terminal color capabilities have not been - initialized. - - - - &reftitle.seealso; - - - ncurses_init_color - ncurses_start_color - - - - - - diff --git a/reference/ncurses/functions/ncurses-color-set.xml b/reference/ncurses/functions/ncurses-color-set.xml deleted file mode 100644 index f5a0236697..0000000000 --- a/reference/ncurses/functions/ncurses-color-set.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - ncurses_color_set - Set active foreground and background colors - - - &reftitle.description; - - intncurses_color_set - intpair - - - Sets the active foreground and background colors. Any characters written - after this function is invoked will have these colors. This function requires - terminal colors to be supported and initialized using - ncurses_start_color beforehand. - - - ncurses uses color pairs to specify both foreground and background colors. - Use ncurses_init_pair to define a color pair. - - - - &reftitle.parameters; - - - - pair - - - The color pair from which to get the foreground and background colors - to set as the active colors. - - - - - - - - &reftitle.returnvalues; - - Returns -1 on success, and 0 on failure. - - - - &reftitle.examples; - - - Writing a string with a specified color to the screen - - -]]> - - - - - - &reftitle.seealso; - - - ncurses_init_pair - ncurses_start_color - - - - - - diff --git a/reference/ncurses/functions/ncurses-curs-set.xml b/reference/ncurses/functions/ncurses-curs-set.xml deleted file mode 100644 index ff4fd5b141..0000000000 --- a/reference/ncurses/functions/ncurses-curs-set.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_curs_set - Set cursor state - - - &reftitle.description; - - intncurses_curs_set - intvisibility - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - visibility - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-def-prog-mode.xml b/reference/ncurses/functions/ncurses-def-prog-mode.xml deleted file mode 100644 index 8115b0b54f..0000000000 --- a/reference/ncurses/functions/ncurses-def-prog-mode.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_def_prog_mode - Saves terminals (program) mode - - - &reftitle.description; - - boolncurses_def_prog_mode - - - &warn.experimental.func; - - Saves the current terminal modes for program (in curses) for use by - ncurses_reset_prog_mode. - - - - &reftitle.returnvalues; - - Returns &false; on success, otherwise &true;. - - - - &reftitle.seealso; - - - ncurses_reset_prog_mode - - - - - - diff --git a/reference/ncurses/functions/ncurses-def-shell-mode.xml b/reference/ncurses/functions/ncurses-def-shell-mode.xml deleted file mode 100644 index 95efffdfd5..0000000000 --- a/reference/ncurses/functions/ncurses-def-shell-mode.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_def_shell_mode - Saves terminals (shell) mode - - - &reftitle.description; - - boolncurses_def_shell_mode - - - &warn.experimental.func; - - Saves the current terminal modes for shell (not in curses) for use by - ncurses_reset_shell_mode. - - - - &reftitle.returnvalues; - - Returns &false; on success, &true; otherwise. - - - - &reftitle.seealso; - - - ncurses_reset_shell_mode - - - - - - diff --git a/reference/ncurses/functions/ncurses-define-key.xml b/reference/ncurses/functions/ncurses-define-key.xml deleted file mode 100644 index 5d5f9205b6..0000000000 --- a/reference/ncurses/functions/ncurses-define-key.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_define_key - Define a keycode - - - &reftitle.description; - - intncurses_define_key - stringdefinition - intkeycode - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - definition - - - - - - - keycode - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-del-panel.xml b/reference/ncurses/functions/ncurses-del-panel.xml deleted file mode 100644 index 9e18d8241f..0000000000 --- a/reference/ncurses/functions/ncurses-del-panel.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_del_panel - Remove panel from the stack and delete it (but not the associated window) - - - &reftitle.description; - - boolncurses_del_panel - resourcepanel - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - panel - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-delay-output.xml b/reference/ncurses/functions/ncurses-delay-output.xml deleted file mode 100644 index f766c86ff9..0000000000 --- a/reference/ncurses/functions/ncurses-delay-output.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_delay_output - Delay output on terminal using padding characters - - - &reftitle.description; - - intncurses_delay_output - intmilliseconds - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - milliseconds - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-delch.xml b/reference/ncurses/functions/ncurses-delch.xml deleted file mode 100644 index 06fc775900..0000000000 --- a/reference/ncurses/functions/ncurses-delch.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - ncurses_delch - Delete character at current position, move rest of line left - - - &reftitle.description; - - boolncurses_delch - - - &warn.experimental.func; - - Deletes the character under the cursor. All characters to the right of the - cursor on the same line are moved to the left one position and the last - character on the line is filled with a blank. The cursor position does not - change. - - - - &reftitle.returnvalues; - - Returns &false; on success, &true; otherwise. - - - - &reftitle.seealso; - - - ncurses_deleteln - - - - - - diff --git a/reference/ncurses/functions/ncurses-deleteln.xml b/reference/ncurses/functions/ncurses-deleteln.xml deleted file mode 100644 index 7fbd7e2a31..0000000000 --- a/reference/ncurses/functions/ncurses-deleteln.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - ncurses_deleteln - Delete line at current position, move rest of screen up - - - &reftitle.description; - - boolncurses_deleteln - - - &warn.experimental.func; - - Deletes the current line under cursor position. All lines below the current - line are moved up one line. The bottom line of window is cleared. Cursor - position does not change. - - - - &reftitle.returnvalues; - - Returns &false; on success, otherwise &true;. - - - - &reftitle.seealso; - - - ncurses_delch - - - - - - diff --git a/reference/ncurses/functions/ncurses-delwin.xml b/reference/ncurses/functions/ncurses-delwin.xml deleted file mode 100644 index 20e94e970c..0000000000 --- a/reference/ncurses/functions/ncurses-delwin.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_delwin - Delete a ncurses window - - - &reftitle.description; - - boolncurses_delwin - resourcewindow - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-doupdate.xml b/reference/ncurses/functions/ncurses-doupdate.xml deleted file mode 100644 index fbff094821..0000000000 --- a/reference/ncurses/functions/ncurses-doupdate.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - ncurses_doupdate - Write all prepared refreshes to terminal - - - &reftitle.description; - - boolncurses_doupdate - - - &warn.experimental.func; - - Compares the virtual screen to the physical screen and updates the - physical screen. This way is more effective than using multiple refresh - calls. - - - - &reftitle.returnvalues; - - &return.success; - - - - - diff --git a/reference/ncurses/functions/ncurses-echo.xml b/reference/ncurses/functions/ncurses-echo.xml deleted file mode 100644 index 1cf6c93f6f..0000000000 --- a/reference/ncurses/functions/ncurses-echo.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_echo - Activate keyboard input echo - - - &reftitle.description; - - boolncurses_echo - - - &warn.experimental.func; - - Enables echo mode. All characters typed by user are echoed by - ncurses_getch. - - - - &reftitle.returnvalues; - - Returns &false; on success, &true; if any error occurred. - - - - &reftitle.seealso; - - - ncurses_noecho to disable echo mode - - - - - - diff --git a/reference/ncurses/functions/ncurses-echochar.xml b/reference/ncurses/functions/ncurses-echochar.xml deleted file mode 100644 index e167fd4bbf..0000000000 --- a/reference/ncurses/functions/ncurses-echochar.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_echochar - Single character output including refresh - - - &reftitle.description; - - intncurses_echochar - intcharacter - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - character - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-end.xml b/reference/ncurses/functions/ncurses-end.xml deleted file mode 100644 index 60f9a284a7..0000000000 --- a/reference/ncurses/functions/ncurses-end.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_end - Stop using ncurses, clean up the screen - - - &reftitle.description; - - intncurses_end - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-erase.xml b/reference/ncurses/functions/ncurses-erase.xml deleted file mode 100644 index 94659cee93..0000000000 --- a/reference/ncurses/functions/ncurses-erase.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_erase - Erase terminal screen - - - &reftitle.description; - - boolncurses_erase - - - &warn.experimental.func; - - Fills the terminal screen with blanks. - - - Created blanks have the current background rendition, set by - ncurses_bkgd. - - - - &reftitle.returnvalues; - - &return.success; - - - - &reftitle.seealso; - - - ncurses_bkgd - ncurses_clear - - - - - - diff --git a/reference/ncurses/functions/ncurses-erasechar.xml b/reference/ncurses/functions/ncurses-erasechar.xml deleted file mode 100644 index a7824bd528..0000000000 --- a/reference/ncurses/functions/ncurses-erasechar.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - ncurses_erasechar - Returns current erase character - - - &reftitle.description; - - stringncurses_erasechar - - - &warn.experimental.func; - - Returns the current erase character. - - - - &reftitle.returnvalues; - - The current erase char, as a string. - - - - &reftitle.seealso; - - - ncurses_killchar - - - - - - diff --git a/reference/ncurses/functions/ncurses-filter.xml b/reference/ncurses/functions/ncurses-filter.xml deleted file mode 100644 index 46183c2058..0000000000 --- a/reference/ncurses/functions/ncurses-filter.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_filter - Set LINES for iniscr() and newterm() to 1 - - - &reftitle.description; - - voidncurses_filter - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-flash.xml b/reference/ncurses/functions/ncurses-flash.xml deleted file mode 100644 index 06942e295e..0000000000 --- a/reference/ncurses/functions/ncurses-flash.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_flash - Flash terminal screen (visual bell) - - - &reftitle.description; - - boolncurses_flash - - - &warn.experimental.func; - - Flashes the screen, and if its not possible, sends an audible alert - (bell). - - - - &reftitle.returnvalues; - - Returns &false; on success, otherwise &true;. - - - - &reftitle.seealso; - - - ncurses_beep - - - - - - diff --git a/reference/ncurses/functions/ncurses-flushinp.xml b/reference/ncurses/functions/ncurses-flushinp.xml deleted file mode 100644 index 2c76760d8d..0000000000 --- a/reference/ncurses/functions/ncurses-flushinp.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - ncurses_flushinp - Flush keyboard input buffer - - - &reftitle.description; - - boolncurses_flushinp - - - &warn.experimental.func; - - Throws away any typeahead that has been typed and has not yet been read by - your program. - - - - &reftitle.returnvalues; - - Returns &false; on success, otherwise &true;. - - - - - diff --git a/reference/ncurses/functions/ncurses-getch.xml b/reference/ncurses/functions/ncurses-getch.xml deleted file mode 100644 index eee832e11b..0000000000 --- a/reference/ncurses/functions/ncurses-getch.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_getch - Read a character from keyboard - - - &reftitle.description; - - intncurses_getch - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-getmaxyx.xml b/reference/ncurses/functions/ncurses-getmaxyx.xml deleted file mode 100644 index e6dcda6499..0000000000 --- a/reference/ncurses/functions/ncurses-getmaxyx.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - ncurses_getmaxyx - Returns the size of a window - - - &reftitle.description; - - voidncurses_getmaxyx - resourcewindow - inty - intx - - &warn.experimental.func; - - Gets the horizontal and vertical size of the given - window into the given variables. - - - Variables must be passed as reference, so they are updated when the user - changes the terminal size. - - - - &reftitle.parameters; - - - - window - - - The measured window - - - - - y - - - This will be set to the window height - - - - - x - - - This will be set to the window width - - - - - - - - &reftitle.returnvalues; - - &return.void; - - - - - diff --git a/reference/ncurses/functions/ncurses-getmouse.xml b/reference/ncurses/functions/ncurses-getmouse.xml deleted file mode 100644 index 28f16ad973..0000000000 --- a/reference/ncurses/functions/ncurses-getmouse.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - ncurses_getmouse - Reads mouse event - - - &reftitle.description; - - boolncurses_getmouse - arraymevent - - &warn.experimental.func; - - ncurses_getmouse reads mouse event out of - queue. - - - - &reftitle.parameters; - - - - mevent - - - Event options will be delivered in this parameter which has to be an - array, passed by reference (see example below). - - - On success an associative array with following keys will be delivered: - - - - "id" : Id to distinguish multiple devices - - - - - "x" : screen relative x-position in character cells - - - - - "y" : screen relative y-position in character cells - - - - - "z" : currently not supported - - - - - "mmask" : Mouse action - - - - - - - - - - - &reftitle.returnvalues; - - Returns &false; if a mouse event is actually visible in the given window, - otherwise returns &true;. - - - - &reftitle.examples; - - - <function>ncurses_getmouse</function> example - - -]]> - - - - - - &reftitle.seealso; - - - ncurses_ungetmouse - - - - - - diff --git a/reference/ncurses/functions/ncurses-getyx.xml b/reference/ncurses/functions/ncurses-getyx.xml deleted file mode 100644 index 25e53b90fd..0000000000 --- a/reference/ncurses/functions/ncurses-getyx.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - ncurses_getyx - Returns the current cursor position for a window - - - &reftitle.description; - - voidncurses_getyx - resourcewindow - inty - intx - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - y - - - - - - - x - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-halfdelay.xml b/reference/ncurses/functions/ncurses-halfdelay.xml deleted file mode 100644 index 691d37cc69..0000000000 --- a/reference/ncurses/functions/ncurses-halfdelay.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_halfdelay - Put terminal into halfdelay mode - - - &reftitle.description; - - intncurses_halfdelay - inttenth - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - tenth - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-has-colors.xml b/reference/ncurses/functions/ncurses-has-colors.xml deleted file mode 100644 index fd943ad519..0000000000 --- a/reference/ncurses/functions/ncurses-has-colors.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - ncurses_has_colors - Checks if terminal has color capabilities - - - &reftitle.description; - - boolncurses_has_colors - - - - Checks whether the terminal has color capabilities. This function can be - used to write terminal-independent programs. ncurses must be initialized - using ncurses_init before calling this function. - - - - &reftitle.parameters; - &no.function.parameters; - - - &reftitle.returnvalues; - - Return &true; if the terminal has color capabilities, &false; otherwise. - - - - &reftitle.examples; - - - Writing a string with a specified color to the screen - - -]]> - - - - - - &reftitle.seealso; - - - ncurses_can_change_color - ncurses_start_color - - - - - - diff --git a/reference/ncurses/functions/ncurses-has-ic.xml b/reference/ncurses/functions/ncurses-has-ic.xml deleted file mode 100644 index 07127bf575..0000000000 --- a/reference/ncurses/functions/ncurses-has-ic.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_has_ic - Check for insert- and delete-capabilities - - - &reftitle.description; - - boolncurses_has_ic - - - &warn.experimental.func; - - Checks whether the terminal has insert and delete capabilities. - - - - &reftitle.returnvalues; - - Returns &true; if the terminal has insert/delete-capabilities, &false; - otherwise. - - - - &reftitle.seealso; - - - ncurses_has_il - - - - - - diff --git a/reference/ncurses/functions/ncurses-has-il.xml b/reference/ncurses/functions/ncurses-has-il.xml deleted file mode 100644 index f45b8f9eaf..0000000000 --- a/reference/ncurses/functions/ncurses-has-il.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_has_il - Check for line insert- and delete-capabilities - - - &reftitle.description; - - boolncurses_has_il - - - &warn.experimental.func; - - Checks whether the terminal has insert- and delete-line-capabilities. - - - - &reftitle.returnvalues; - - Returns &true; if the terminal has insert/delete-line capabilities, - &false; otherwise. - - - - &reftitle.seealso; - - - ncurses_has_ic - - - - - - diff --git a/reference/ncurses/functions/ncurses-has-key.xml b/reference/ncurses/functions/ncurses-has-key.xml deleted file mode 100644 index 6af52875cb..0000000000 --- a/reference/ncurses/functions/ncurses-has-key.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_has_key - Check for presence of a function key on terminal keyboard - - - &reftitle.description; - - intncurses_has_key - intkeycode - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - keycode - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-hide-panel.xml b/reference/ncurses/functions/ncurses-hide-panel.xml deleted file mode 100644 index 07f178750e..0000000000 --- a/reference/ncurses/functions/ncurses-hide-panel.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - ncurses_hide_panel - Remove panel from the stack, making it invisible - - - &reftitle.description; - - intncurses_hide_panel - resourcepanel - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - panel - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-hline.xml b/reference/ncurses/functions/ncurses-hline.xml deleted file mode 100644 index f823e26316..0000000000 --- a/reference/ncurses/functions/ncurses-hline.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_hline - Draw a horizontal line at current position using an attributed character and max. n characters long - - - &reftitle.description; - - intncurses_hline - intcharattr - intn - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - charattr - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-inch.xml b/reference/ncurses/functions/ncurses-inch.xml deleted file mode 100644 index 0298867839..0000000000 --- a/reference/ncurses/functions/ncurses-inch.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - ncurses_inch - Get character and attribute at current position - - - &reftitle.description; - - stringncurses_inch - - - &warn.experimental.func; - - Returns the character from the current position. - - - - &reftitle.returnvalues; - - Returns the character, as a string. - - - - - diff --git a/reference/ncurses/functions/ncurses-init-color.xml b/reference/ncurses/functions/ncurses-init-color.xml deleted file mode 100644 index 38de94ee53..0000000000 --- a/reference/ncurses/functions/ncurses-init-color.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - ncurses_init_color - Define a terminal color - - - &reftitle.description; - - intncurses_init_color - intcolor - intr - intg - intb - - - Defines or redefines the given color. When this function is called, all - occurrences of the given color on the screen, if any, immediately change - to the new definition. - - - Color capabilities must be supported by the terminal and initialized using - ncurses_start_color prior to calling this function. - In addition, the terminal must have color changing capabilities; use - ncurses_can_change_color to check for this. - - - - &reftitle.parameters; - - - - color - - - The identification number of the color to redefine. It may be one of - the default color constants. - - - - - r - - - A color value, between 0 and 1000, for the red component. - - - - - g - - - A color value, between 0 and 1000, for the green component. - - - - - b - - - A color value, between 0 and 1000, for the blue component. - - - - - - - - &reftitle.returnvalues; - - Returns -1 if the function was successful, - and 0 if ncurses or terminal - color capabilities have not been initialized or the terminal does not - have color changing capabilities. - - - - &reftitle.seealso; - - - ncurses_color_content - ncurses_start_color - - - - - - diff --git a/reference/ncurses/functions/ncurses-init-pair.xml b/reference/ncurses/functions/ncurses-init-pair.xml deleted file mode 100644 index f683ef218d..0000000000 --- a/reference/ncurses/functions/ncurses-init-pair.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - ncurses_init_pair - Define a color pair - - - &reftitle.description; - - intncurses_init_pair - intpair - intfg - intbg - - - Defines or redefines the given color pair to have the given foreground - and background colors. If the color pair was previously initialized, - the screen is refreshed and all occurrences of it are changed to reflect - the new definition. - - - Color capabilities must be initialized using - ncurses_start_color before calling this function. - The first color pair (color pair 0) is assumed to - be white on black by default, but can be changed using - ncurses_assume_default_colors. - - - - &reftitle.parameters; - - - - pair - - - The number of the color pair to define. - - - - - fg - - - The foreground color for the color pair. May be one of the - pre-defined colors - or one defined by ncurses_init_color if - the terminal has color changing capabilities. - - - - - bg - - - The background color for the color pair. May be one of the - pre-defined colors - or one defined by ncurses_init_color if - the terminal has color changing capabilities. - - - - - - - - &reftitle.returnvalues; - - Returns -1 if the function was successful, and - 0 if ncurses or color support were not initialized. - - - - &reftitle.notes; - - Note that color changing capabilities are not required for - defining color pairs of pre-existing colors, but only for changing - definitions (red, green, and blue components) - of colors themselves per ncurses_init_color. - - - - &reftitle.examples; - - - Writing a string with a specified color to the screen - - -]]> - - - - - - &reftitle.seealso; - - - ncurses_pair_content - ncurses_start_color - - - - - - diff --git a/reference/ncurses/functions/ncurses-init.xml b/reference/ncurses/functions/ncurses-init.xml deleted file mode 100644 index 503960328d..0000000000 --- a/reference/ncurses/functions/ncurses-init.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - ncurses_init - Initialize ncurses - - - &reftitle.description; - - voidncurses_init - - - - Initializes the ncurses interface. This function must be used before - any other ncurses function call. - - - Note that ncurses_end must be called before - exiting from the program, or the terminal will not - be restored to its proper non-visual mode. - - - - &reftitle.parameters; - &no.function.parameters; - - - &reftitle.returnvalues; - - &return.void; - - - - &reftitle.seealso; - - - ncurses_end - - - - - - diff --git a/reference/ncurses/functions/ncurses-insch.xml b/reference/ncurses/functions/ncurses-insch.xml deleted file mode 100644 index f679aa2896..0000000000 --- a/reference/ncurses/functions/ncurses-insch.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_insch - Insert character moving rest of line including character at current position - - - &reftitle.description; - - intncurses_insch - intcharacter - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - character - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-insdelln.xml b/reference/ncurses/functions/ncurses-insdelln.xml deleted file mode 100644 index 48ffb0d875..0000000000 --- a/reference/ncurses/functions/ncurses-insdelln.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_insdelln - Insert lines before current line scrolling down (negative numbers delete and scroll up) - - - &reftitle.description; - - intncurses_insdelln - intcount - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - count - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-insertln.xml b/reference/ncurses/functions/ncurses-insertln.xml deleted file mode 100644 index 302333c239..0000000000 --- a/reference/ncurses/functions/ncurses-insertln.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - ncurses_insertln - Insert a line, move rest of screen down - - - &reftitle.description; - - intncurses_insertln - - - &warn.experimental.func; - - Inserts a new line above the current line. The bottom line will be lost. - - - - - diff --git a/reference/ncurses/functions/ncurses-insstr.xml b/reference/ncurses/functions/ncurses-insstr.xml deleted file mode 100644 index 3af464c6ee..0000000000 --- a/reference/ncurses/functions/ncurses-insstr.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_insstr - Insert string at current position, moving rest of line right - - - &reftitle.description; - - intncurses_insstr - stringtext - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - text - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-instr.xml b/reference/ncurses/functions/ncurses-instr.xml deleted file mode 100644 index 96797e165d..0000000000 --- a/reference/ncurses/functions/ncurses-instr.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - ncurses_instr - Reads string from terminal screen - - - &reftitle.description; - - intncurses_instr - stringbuffer - - &warn.experimental.func; - - Reads a string from the terminal screen and returns the number of - characters read from the current character position until end of line. - - - - &reftitle.parameters; - - - - buffer - - - The characters. Attributes will be stripped. - - - - - - - - &reftitle.returnvalues; - - Returns the number of characters. - - - - - diff --git a/reference/ncurses/functions/ncurses-isendwin.xml b/reference/ncurses/functions/ncurses-isendwin.xml deleted file mode 100644 index f95b0f4a0d..0000000000 --- a/reference/ncurses/functions/ncurses-isendwin.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - ncurses_isendwin - Ncurses is in endwin mode, normal screen output may be performed - - - &reftitle.description; - - boolncurses_isendwin - - - &warn.experimental.func; - - Checks if ncurses is in endwin mode. - - - - &reftitle.returnvalues; - - Returns &true;, if ncurses_end has been called - without any subsequent calls to ncurses_wrefresh, - &false; otherwise. - - - - &reftitle.seealso; - - - ncurses_end - ncurses_wrefresh - - - - - - diff --git a/reference/ncurses/functions/ncurses-keyok.xml b/reference/ncurses/functions/ncurses-keyok.xml deleted file mode 100644 index 50513f4179..0000000000 --- a/reference/ncurses/functions/ncurses-keyok.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_keyok - Enable or disable a keycode - - - &reftitle.description; - - intncurses_keyok - intkeycode - boolenable - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - keycode - - - - - - - enable - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-keypad.xml b/reference/ncurses/functions/ncurses-keypad.xml deleted file mode 100644 index 5d47e6a46a..0000000000 --- a/reference/ncurses/functions/ncurses-keypad.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_keypad - Turns keypad on or off - - - &reftitle.description; - - intncurses_keypad - resourcewindow - boolbf - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - bf - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-killchar.xml b/reference/ncurses/functions/ncurses-killchar.xml deleted file mode 100644 index 64ddbd28a9..0000000000 --- a/reference/ncurses/functions/ncurses-killchar.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - ncurses_killchar - Returns current line kill character - - - &reftitle.description; - - stringncurses_killchar - - - &warn.experimental.func; - - Returns the current line kill character. - - - - &reftitle.returnvalues; - - Returns the kill character, as a string. - - - - &reftitle.seealso; - - - ncurses_erasechar - - - - - - diff --git a/reference/ncurses/functions/ncurses-longname.xml b/reference/ncurses/functions/ncurses-longname.xml deleted file mode 100644 index a7b245abf0..0000000000 --- a/reference/ncurses/functions/ncurses-longname.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_longname - Returns terminals description - - - &reftitle.description; - - stringncurses_longname - - - &warn.experimental.func; - - Returns a verbose description of the terminal. - - - - &reftitle.returnvalues; - - Returns the description, as a string truncated to 128 characters. - On errors, returns &null;. - - - - &reftitle.seealso; - - - ncurses_termname - - - - - - diff --git a/reference/ncurses/functions/ncurses-meta.xml b/reference/ncurses/functions/ncurses-meta.xml deleted file mode 100644 index d375ef172f..0000000000 --- a/reference/ncurses/functions/ncurses-meta.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_meta - Enables/Disable 8-bit meta key information - - - &reftitle.description; - - intncurses_meta - resourcewindow - bool8bit - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - 8bit - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mouse-trafo.xml b/reference/ncurses/functions/ncurses-mouse-trafo.xml deleted file mode 100644 index ffcfdcf2ce..0000000000 --- a/reference/ncurses/functions/ncurses-mouse-trafo.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - ncurses_mouse_trafo - Transforms coordinates - - - &reftitle.description; - - boolncurses_mouse_trafo - inty - intx - booltoscreen - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - toscreen - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mouseinterval.xml b/reference/ncurses/functions/ncurses-mouseinterval.xml deleted file mode 100644 index d7172fbdc8..0000000000 --- a/reference/ncurses/functions/ncurses-mouseinterval.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_mouseinterval - Set timeout for mouse button clicks - - - &reftitle.description; - - intncurses_mouseinterval - intmilliseconds - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - milliseconds - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mousemask.xml b/reference/ncurses/functions/ncurses-mousemask.xml deleted file mode 100644 index d4fc704684..0000000000 --- a/reference/ncurses/functions/ncurses-mousemask.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - ncurses_mousemask - Sets mouse options - - - &reftitle.description; - - intncurses_mousemask - intnewmask - intoldmask - - &warn.experimental.func; - - Sets mouse events to be reported. By default no mouse events will be - reported. - - - Mouse events are represented by NCURSES_KEY_MOUSE in the - ncurses_wgetch input stream. To read the event data - and pop the event of queue, call ncurses_getmouse. - - - - &reftitle.parameters; - - - - newmask - - - Mouse mask options can be set with the following predefined constants: - - NCURSES_BUTTON1_PRESSED - NCURSES_BUTTON1_RELEASED - NCURSES_BUTTON1_CLICKED - NCURSES_BUTTON1_DOUBLE_CLICKED - NCURSES_BUTTON1_TRIPLE_CLICKED - NCURSES_BUTTON2_PRESSED - NCURSES_BUTTON2_RELEASED - NCURSES_BUTTON2_CLICKED - NCURSES_BUTTON2_DOUBLE_CLICKED - NCURSES_BUTTON2_TRIPLE_CLICKED - NCURSES_BUTTON3_PRESSED - NCURSES_BUTTON3_RELEASED - NCURSES_BUTTON3_CLICKED - NCURSES_BUTTON3_DOUBLE_CLICKED - NCURSES_BUTTON3_TRIPLE_CLICKED - NCURSES_BUTTON4_PRESSED - NCURSES_BUTTON4_RELEASED - NCURSES_BUTTON4_CLICKED - NCURSES_BUTTON4_DOUBLE_CLICKED - NCURSES_BUTTON4_TRIPLE_CLICKED - NCURSES_BUTTON_SHIFT> - NCURSES_BUTTON_CTRL - NCURSES_BUTTON_ALT - NCURSES_ALL_MOUSE_EVENTS - NCURSES_REPORT_MOUSE_POSITION - - - - As a side effect, setting a zero mousemask in - newmask turns off the mouse - pointer. Setting a non zero value turns mouse pointer on. - - - - - oldmask - - - This will be set to the previous value of the mouse event mask. - - - - - - - - &reftitle.returnvalues; - - Returns the mask of reportable events. On complete failure, it returns - 0. - - - - &reftitle.examples; - - - <function>ncurses_mousemask</function> example - - -]]> - - - - - - &reftitle.seealso; - - - ncurses_getch - ncurses_getmouse - ncurses_ungetmouse - - - - - - diff --git a/reference/ncurses/functions/ncurses-move-panel.xml b/reference/ncurses/functions/ncurses-move-panel.xml deleted file mode 100644 index 3d8f9515b0..0000000000 --- a/reference/ncurses/functions/ncurses-move-panel.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - ncurses_move_panel - Moves a panel so that its upper-left corner is at [startx, starty] - - - &reftitle.description; - - intncurses_move_panel - resourcepanel - intstartx - intstarty - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - panel - - - - - - - startx - - - - - - - starty - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-move.xml b/reference/ncurses/functions/ncurses-move.xml deleted file mode 100644 index 041db7898a..0000000000 --- a/reference/ncurses/functions/ncurses-move.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_move - Move output position - - - &reftitle.description; - - intncurses_move - inty - intx - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvaddch.xml b/reference/ncurses/functions/ncurses-mvaddch.xml deleted file mode 100644 index 86bc1ec41d..0000000000 --- a/reference/ncurses/functions/ncurses-mvaddch.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - ncurses_mvaddch - Move current position and add character - - - &reftitle.description; - - intncurses_mvaddch - inty - intx - intc - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - c - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvaddchnstr.xml b/reference/ncurses/functions/ncurses-mvaddchnstr.xml deleted file mode 100644 index 3c39ec30b0..0000000000 --- a/reference/ncurses/functions/ncurses-mvaddchnstr.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - ncurses_mvaddchnstr - Move position and add attributed string with specified length - - - &reftitle.description; - - intncurses_mvaddchnstr - inty - intx - strings - intn - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - s - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvaddchstr.xml b/reference/ncurses/functions/ncurses-mvaddchstr.xml deleted file mode 100644 index b8c2d2cb3e..0000000000 --- a/reference/ncurses/functions/ncurses-mvaddchstr.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - ncurses_mvaddchstr - Move position and add attributed string - - - &reftitle.description; - - intncurses_mvaddchstr - inty - intx - strings - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - s - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvaddnstr.xml b/reference/ncurses/functions/ncurses-mvaddnstr.xml deleted file mode 100644 index 4039cce6c3..0000000000 --- a/reference/ncurses/functions/ncurses-mvaddnstr.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - ncurses_mvaddnstr - Move position and add string with specified length - - - &reftitle.description; - - intncurses_mvaddnstr - inty - intx - strings - intn - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - s - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvaddstr.xml b/reference/ncurses/functions/ncurses-mvaddstr.xml deleted file mode 100644 index 5a94c10e05..0000000000 --- a/reference/ncurses/functions/ncurses-mvaddstr.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - ncurses_mvaddstr - Move position and add string - - - &reftitle.description; - - intncurses_mvaddstr - inty - intx - strings - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - s - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvcur.xml b/reference/ncurses/functions/ncurses-mvcur.xml deleted file mode 100644 index d80ddec677..0000000000 --- a/reference/ncurses/functions/ncurses-mvcur.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - ncurses_mvcur - Move cursor immediately - - - &reftitle.description; - - intncurses_mvcur - intold_y - intold_x - intnew_y - intnew_x - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - old_y - - - - - - - old_x - - - - - - - new_y - - - - - - - new_x - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvdelch.xml b/reference/ncurses/functions/ncurses-mvdelch.xml deleted file mode 100644 index b8330e9423..0000000000 --- a/reference/ncurses/functions/ncurses-mvdelch.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_mvdelch - Move position and delete character, shift rest of line left - - - &reftitle.description; - - intncurses_mvdelch - inty - intx - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvgetch.xml b/reference/ncurses/functions/ncurses-mvgetch.xml deleted file mode 100644 index 97561eba3c..0000000000 --- a/reference/ncurses/functions/ncurses-mvgetch.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_mvgetch - Move position and get character at new position - - - &reftitle.description; - - intncurses_mvgetch - inty - intx - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvhline.xml b/reference/ncurses/functions/ncurses-mvhline.xml deleted file mode 100644 index 4c6c001d5d..0000000000 --- a/reference/ncurses/functions/ncurses-mvhline.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - ncurses_mvhline - Set new position and draw a horizontal line using an attributed character and max. n characters long - - - &reftitle.description; - - intncurses_mvhline - inty - intx - intattrchar - intn - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - attrchar - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvinch.xml b/reference/ncurses/functions/ncurses-mvinch.xml deleted file mode 100644 index 7ba22e920b..0000000000 --- a/reference/ncurses/functions/ncurses-mvinch.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_mvinch - Move position and get attributed character at new position - - - &reftitle.description; - - intncurses_mvinch - inty - intx - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvvline.xml b/reference/ncurses/functions/ncurses-mvvline.xml deleted file mode 100644 index 761ca6a17c..0000000000 --- a/reference/ncurses/functions/ncurses-mvvline.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - ncurses_mvvline - Set new position and draw a vertical line using an attributed character and max. n characters long - - - &reftitle.description; - - intncurses_mvvline - inty - intx - intattrchar - intn - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - y - - - - - - - x - - - - - - - attrchar - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-mvwaddstr.xml b/reference/ncurses/functions/ncurses-mvwaddstr.xml deleted file mode 100644 index 30e183939a..0000000000 --- a/reference/ncurses/functions/ncurses-mvwaddstr.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - ncurses_mvwaddstr - Add string at new position in window - - - &reftitle.description; - - intncurses_mvwaddstr - resourcewindow - inty - intx - stringtext - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - y - - - - - - - x - - - - - - - text - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-napms.xml b/reference/ncurses/functions/ncurses-napms.xml deleted file mode 100644 index 6c1e88257c..0000000000 --- a/reference/ncurses/functions/ncurses-napms.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_napms - Sleep - - - &reftitle.description; - - intncurses_napms - intmilliseconds - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - milliseconds - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-new-panel.xml b/reference/ncurses/functions/ncurses-new-panel.xml deleted file mode 100644 index 53098fec83..0000000000 --- a/reference/ncurses/functions/ncurses-new-panel.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_new_panel - Create a new panel and associate it with window - - - &reftitle.description; - - resourcencurses_new_panel - resourcewindow - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-newpad.xml b/reference/ncurses/functions/ncurses-newpad.xml deleted file mode 100644 index 9791fb4ea3..0000000000 --- a/reference/ncurses/functions/ncurses-newpad.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_newpad - Creates a new pad (window) - - - &reftitle.description; - - resourcencurses_newpad - introws - intcols - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - rows - - - - - - - cols - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-newwin.xml b/reference/ncurses/functions/ncurses-newwin.xml deleted file mode 100644 index 9b440c5cba..0000000000 --- a/reference/ncurses/functions/ncurses-newwin.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - ncurses_newwin - Create a new window - - - &reftitle.description; - - resourcencurses_newwin - introws - intcols - inty - intx - - &warn.experimental.func; - - Creates a new window to draw elements in. - - - When creating additional windows, remember to use - ncurses_getmaxyx to check for available space, as - terminal size is individual and may vary. - - - - &reftitle.parameters; - - - - rows - - - Number of rows - - - - - cols - - - Number of columns - - - - - y - - - y-coordinate of the origin - - - - - x - - - x-coordinate of the origin - - - - - - - - &reftitle.returnvalues; - - Returns a resource ID for the new window. - - - - - diff --git a/reference/ncurses/functions/ncurses-nl.xml b/reference/ncurses/functions/ncurses-nl.xml deleted file mode 100644 index 3291b9f59b..0000000000 --- a/reference/ncurses/functions/ncurses-nl.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_nl - Translate newline and carriage return / line feed - - - &reftitle.description; - - boolncurses_nl - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-nocbreak.xml b/reference/ncurses/functions/ncurses-nocbreak.xml deleted file mode 100644 index d0d5a15318..0000000000 --- a/reference/ncurses/functions/ncurses-nocbreak.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - ncurses_nocbreak - Switch terminal to cooked mode - - - &reftitle.description; - - boolncurses_nocbreak - - - &warn.experimental.func; - - Returns terminal to normal (cooked) mode. Initially the terminal may or - may not be in cbreak mode as the mode is inherited. Therefore a program - should call ncurses_cbreak and - ncurses_nocbreak explicitly. - - - - &reftitle.returnvalues; - - Returns &true; if any error occurred, otherwise &false;. - - - - &reftitle.seealso; - - - ncurses_cbreak - - - - - - diff --git a/reference/ncurses/functions/ncurses-noecho.xml b/reference/ncurses/functions/ncurses-noecho.xml deleted file mode 100644 index 6c34a74a08..0000000000 --- a/reference/ncurses/functions/ncurses-noecho.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_noecho - Switch off keyboard input echo - - - &reftitle.description; - - boolncurses_noecho - - - &warn.experimental.func; - - Prevents echoing of user typed characters. - - - - &reftitle.returnvalues; - - Returns &true; if any error occurred, &false; otherwise. - - - - &reftitle.seealso; - - - ncurses_echo - ncurses_getch - - - - - - diff --git a/reference/ncurses/functions/ncurses-nonl.xml b/reference/ncurses/functions/ncurses-nonl.xml deleted file mode 100644 index 8b0a14072b..0000000000 --- a/reference/ncurses/functions/ncurses-nonl.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_nonl - Do not translate newline and carriage return / line feed - - - &reftitle.description; - - boolncurses_nonl - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-noqiflush.xml b/reference/ncurses/functions/ncurses-noqiflush.xml deleted file mode 100644 index 14a7fd0d32..0000000000 --- a/reference/ncurses/functions/ncurses-noqiflush.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_noqiflush - Do not flush on signal characters - - - &reftitle.description; - - voidncurses_noqiflush - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-noraw.xml b/reference/ncurses/functions/ncurses-noraw.xml deleted file mode 100644 index d11bd40385..0000000000 --- a/reference/ncurses/functions/ncurses-noraw.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_noraw - Switch terminal out of raw mode - - - &reftitle.description; - - boolncurses_noraw - - - &warn.experimental.func; - - Switches the terminal out of raw mode. Raw mode is similar to cbreak mode, - in that characters typed are immediately passed through to the user - program. The difference is that in raw mode, the interrupt, quit, - suspend and flow control characters are all passed through uninterpreted, - instead of generating a signal. - - - - &reftitle.returnvalues; - - Returns &true; if any error occurred, otherwise &false;. - - - - &reftitle.seealso; - - - ncurses_raw - ncurses_cbreak - ncurses_nocbreak - - - - - - diff --git a/reference/ncurses/functions/ncurses-pair-content.xml b/reference/ncurses/functions/ncurses-pair-content.xml deleted file mode 100644 index f7c0bcb402..0000000000 --- a/reference/ncurses/functions/ncurses-pair-content.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - ncurses_pair_content - Retrieves foreground and background colors of a color pair - - - &reftitle.description; - - intncurses_pair_content - intpair - intf - intb - - - Retrieves the foreground and background colors that constitute the given - color pair. Terminal color capabilities must be initialized with - ncurses_start_color prior to calling this function. - - - - &reftitle.parameters; - - - - pair - - - The number of the color pair to retrieve information for. - - - - - f - - - A reference to which to return the foreground color of the color - pair. The information returned will be a color number referring to - one of the - pre-defined colors or a - color defined previously by - ncurses_init_color if the terminal supports - color changing. - - - - - b - - - A reference to which to return the background color of the color - pair. The information returned will be a color number referring to - one of the - pre-defined colors or a - color defined previously by - ncurses_init_color if the terminal supports - color changing. - - - - - - - - &reftitle.returnvalues; - - Returns -1 if the function was successful, and - 0 if ncurses or terminal color capabilities have - not been initialized. - - - - &reftitle.seealso; - - - ncurses_init_pair - ncurses_start_color - - - - - - diff --git a/reference/ncurses/functions/ncurses-panel-above.xml b/reference/ncurses/functions/ncurses-panel-above.xml deleted file mode 100644 index 0a2f889a59..0000000000 --- a/reference/ncurses/functions/ncurses-panel-above.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - ncurses_panel_above - Returns the panel above panel - - - &reftitle.description; - - resourcencurses_panel_above - resourcepanel - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - panel - - - - - - - - - - &reftitle.returnvalues; - - If panel is null, returns the bottom panel in the stack. - - - - - diff --git a/reference/ncurses/functions/ncurses-panel-below.xml b/reference/ncurses/functions/ncurses-panel-below.xml deleted file mode 100644 index 9f12eab9fa..0000000000 --- a/reference/ncurses/functions/ncurses-panel-below.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - ncurses_panel_below - Returns the panel below panel - - - &reftitle.description; - - resourcencurses_panel_below - resourcepanel - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - panel - - - - - - - - - - &reftitle.parameters; - - If panel is null, returns the top panel in the stack. - - - - - diff --git a/reference/ncurses/functions/ncurses-panel-window.xml b/reference/ncurses/functions/ncurses-panel-window.xml deleted file mode 100644 index c62bfd0b49..0000000000 --- a/reference/ncurses/functions/ncurses-panel-window.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_panel_window - Returns the window associated with panel - - - &reftitle.description; - - resourcencurses_panel_window - resourcepanel - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - panel - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-pnoutrefresh.xml b/reference/ncurses/functions/ncurses-pnoutrefresh.xml deleted file mode 100644 index 95ea4aa6f9..0000000000 --- a/reference/ncurses/functions/ncurses-pnoutrefresh.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - ncurses_pnoutrefresh - Copies a region from a pad into the virtual screen - - - &reftitle.description; - - intncurses_pnoutrefresh - resourcepad - intpminrow - intpmincol - intsminrow - intsmincol - intsmaxrow - intsmaxcol - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - pad - - - - - - - pminrow - - - - - - - pmincol - - - - - - - sminrow - - - - - - - smincol - - - - - - - smaxrow - - - - - - - smaxcol - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-prefresh.xml b/reference/ncurses/functions/ncurses-prefresh.xml deleted file mode 100644 index 4ff749c8f0..0000000000 --- a/reference/ncurses/functions/ncurses-prefresh.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - ncurses_prefresh - Copies a region from a pad into the virtual screen - - - &reftitle.description; - - intncurses_prefresh - resourcepad - intpminrow - intpmincol - intsminrow - intsmincol - intsmaxrow - intsmaxcol - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - pad - - - - - - - pminrow - - - - - - - pmincol - - - - - - - sminrow - - - - - - - smincol - - - - - - - smaxrow - - - - - - - smaxcol - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-putp.xml b/reference/ncurses/functions/ncurses-putp.xml deleted file mode 100644 index aacfeac12a..0000000000 --- a/reference/ncurses/functions/ncurses-putp.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_putp - Apply padding information to the string and output it - - - &reftitle.description; - - intncurses_putp - stringtext - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - text - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-qiflush.xml b/reference/ncurses/functions/ncurses-qiflush.xml deleted file mode 100644 index a4edc63358..0000000000 --- a/reference/ncurses/functions/ncurses-qiflush.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_qiflush - Flush on signal characters - - - &reftitle.description; - - voidncurses_qiflush - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-raw.xml b/reference/ncurses/functions/ncurses-raw.xml deleted file mode 100644 index c0ce156551..0000000000 --- a/reference/ncurses/functions/ncurses-raw.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_raw - Switch terminal into raw mode - - - &reftitle.description; - - boolncurses_raw - - - &warn.experimental.func; - - Places the terminal in raw mode. Raw mode is similar to cbreak mode, in - that characters typed are immediately passed through to the user program. - The difference is that in raw mode, the interrupt, quit, suspend - and flow control characters are all passed through uninterpreted, instead - of generating a signal. - - - - &reftitle.returnvalues; - - Returns &true; if any error occurred, otherwise &false;. - - - - &reftitle.seealso; - - - ncurses_noraw - ncurses_cbreak - ncurses_nocbreak - - - - - - diff --git a/reference/ncurses/functions/ncurses-refresh.xml b/reference/ncurses/functions/ncurses-refresh.xml deleted file mode 100644 index 5124769c67..0000000000 --- a/reference/ncurses/functions/ncurses-refresh.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_refresh - Refresh screen - - - &reftitle.description; - - intncurses_refresh - intch - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - ch - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-replace-panel.xml b/reference/ncurses/functions/ncurses-replace-panel.xml deleted file mode 100644 index 908e0292a3..0000000000 --- a/reference/ncurses/functions/ncurses-replace-panel.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_replace_panel - Replaces the window associated with panel - - - &reftitle.description; - - intncurses_replace_panel - resourcepanel - resourcewindow - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - panel - - - - - - - window - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-reset-prog-mode.xml b/reference/ncurses/functions/ncurses-reset-prog-mode.xml deleted file mode 100644 index 3469a6ffde..0000000000 --- a/reference/ncurses/functions/ncurses-reset-prog-mode.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - ncurses_reset_prog_mode - Resets the prog mode saved by def_prog_mode - - - &reftitle.description; - - intncurses_reset_prog_mode - - - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-reset-shell-mode.xml b/reference/ncurses/functions/ncurses-reset-shell-mode.xml deleted file mode 100644 index 212cb1eb77..0000000000 --- a/reference/ncurses/functions/ncurses-reset-shell-mode.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - ncurses_reset_shell_mode - Resets the shell mode saved by def_shell_mode - - - &reftitle.description; - - intncurses_reset_shell_mode - - - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-resetty.xml b/reference/ncurses/functions/ncurses-resetty.xml deleted file mode 100644 index fd0b0108a3..0000000000 --- a/reference/ncurses/functions/ncurses-resetty.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_resetty - Restores saved terminal state - - - &reftitle.description; - - boolncurses_resetty - - - &warn.experimental.func; - - Restores the terminal state, which was previously saved by calling - ncurses_savetty. - - - - &reftitle.returnvalues; - - Always returns &false;. - - - - &reftitle.seealso; - - - ncurses_savetty - - - - - - diff --git a/reference/ncurses/functions/ncurses-savetty.xml b/reference/ncurses/functions/ncurses-savetty.xml deleted file mode 100644 index 89313aa7a0..0000000000 --- a/reference/ncurses/functions/ncurses-savetty.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_savetty - Saves terminal state - - - &reftitle.description; - - boolncurses_savetty - - - &warn.experimental.func; - - Saves the current terminal state. The saved terminal state can be restored - with ncurses_resetty. - - - - &reftitle.returnvalues; - - Always returns &false;. - - - - &reftitle.seealso; - - - ncurses_resetty - - - - - - diff --git a/reference/ncurses/functions/ncurses-scr-dump.xml b/reference/ncurses/functions/ncurses-scr-dump.xml deleted file mode 100644 index f30ea818b1..0000000000 --- a/reference/ncurses/functions/ncurses-scr-dump.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_scr_dump - Dump screen content to file - - - &reftitle.description; - - intncurses_scr_dump - stringfilename - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - filename - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-scr-init.xml b/reference/ncurses/functions/ncurses-scr-init.xml deleted file mode 100644 index 660f251bc0..0000000000 --- a/reference/ncurses/functions/ncurses-scr-init.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_scr_init - Initialize screen from file dump - - - &reftitle.description; - - intncurses_scr_init - stringfilename - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - filename - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-scr-restore.xml b/reference/ncurses/functions/ncurses-scr-restore.xml deleted file mode 100644 index e51f7d7772..0000000000 --- a/reference/ncurses/functions/ncurses-scr-restore.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_scr_restore - Restore screen from file dump - - - &reftitle.description; - - intncurses_scr_restore - stringfilename - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - filename - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-scr-set.xml b/reference/ncurses/functions/ncurses-scr-set.xml deleted file mode 100644 index 41d34b4a94..0000000000 --- a/reference/ncurses/functions/ncurses-scr-set.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_scr_set - Inherit screen from file dump - - - &reftitle.description; - - intncurses_scr_set - stringfilename - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - filename - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-scrl.xml b/reference/ncurses/functions/ncurses-scrl.xml deleted file mode 100644 index 72003907b6..0000000000 --- a/reference/ncurses/functions/ncurses-scrl.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_scrl - Scroll window content up or down without changing current position - - - &reftitle.description; - - intncurses_scrl - intcount - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - count - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-show-panel.xml b/reference/ncurses/functions/ncurses-show-panel.xml deleted file mode 100644 index c31ce17dfd..0000000000 --- a/reference/ncurses/functions/ncurses-show-panel.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_show_panel - Places an invisible panel on top of the stack, making it visible - - - &reftitle.description; - - intncurses_show_panel - resourcepanel - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - panel - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-attr.xml b/reference/ncurses/functions/ncurses-slk-attr.xml deleted file mode 100644 index ff3d455cc1..0000000000 --- a/reference/ncurses/functions/ncurses-slk-attr.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - ncurses_slk_attr - Returns current soft label key attribute - - - &reftitle.description; - - intncurses_slk_attr - - - &warn.experimental.func; - - Returns the current soft label key attribute. - - - - &reftitle.returnvalues; - - The attribute, as an integer. - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-attroff.xml b/reference/ncurses/functions/ncurses-slk-attroff.xml deleted file mode 100644 index fd336db36a..0000000000 --- a/reference/ncurses/functions/ncurses-slk-attroff.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_slk_attroff - Turn off the given attributes for soft function-key labels - - - &reftitle.description; - - intncurses_slk_attroff - intintarg - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - intarg - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-attron.xml b/reference/ncurses/functions/ncurses-slk-attron.xml deleted file mode 100644 index 3e14c5863a..0000000000 --- a/reference/ncurses/functions/ncurses-slk-attron.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_slk_attron - Turn on the given attributes for soft function-key labels - - - &reftitle.description; - - intncurses_slk_attron - intintarg - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - intarg - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-attrset.xml b/reference/ncurses/functions/ncurses-slk-attrset.xml deleted file mode 100644 index 92772bb8e3..0000000000 --- a/reference/ncurses/functions/ncurses-slk-attrset.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_slk_attrset - Set given attributes for soft function-key labels - - - &reftitle.description; - - intncurses_slk_attrset - intintarg - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - intarg - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-clear.xml b/reference/ncurses/functions/ncurses-slk-clear.xml deleted file mode 100644 index c807f250a6..0000000000 --- a/reference/ncurses/functions/ncurses-slk-clear.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - ncurses_slk_clear - Clears soft labels from screen - - - &reftitle.description; - - boolncurses_slk_clear - - - &warn.experimental.func; - - The function ncurses_slk_clear clears soft - label keys from screen. - - - - &reftitle.returnvalues; - - Returns &true; on errors, &false; otherwise. - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-color.xml b/reference/ncurses/functions/ncurses-slk-color.xml deleted file mode 100644 index 8942ec6538..0000000000 --- a/reference/ncurses/functions/ncurses-slk-color.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_slk_color - Sets color for soft label keys - - - &reftitle.description; - - intncurses_slk_color - intintarg - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - intarg - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-init.xml b/reference/ncurses/functions/ncurses-slk-init.xml deleted file mode 100644 index 563f256f25..0000000000 --- a/reference/ncurses/functions/ncurses-slk-init.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - ncurses_slk_init - Initializes soft label key functions - - - &reftitle.description; - - boolncurses_slk_init - intformat - - &warn.experimental.func; - - Initializes soft label key functions - - - This function must be called before ncurses_init - or ncurses_newwin is called. - - - - &reftitle.parameters; - - - - format - - - If ncurses_init eventually uses a line from - stdscr to emulate the soft labels, then this parameter determines how - the labels are arranged of the screen. - - - 0 indicates a 3-2-3 arrangement of the labels, 1 indicates a 4-4 - arrangement and 2 indicates the PC like 4-4-4 mode, but in addition an - index line will be created. - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-noutrefresh.xml b/reference/ncurses/functions/ncurses-slk-noutrefresh.xml deleted file mode 100644 index 4fd4a10fbe..0000000000 --- a/reference/ncurses/functions/ncurses-slk-noutrefresh.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_slk_noutrefresh - Copies soft label keys to virtual screen - - - &reftitle.description; - - boolncurses_slk_noutrefresh - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-slk-refresh.xml b/reference/ncurses/functions/ncurses-slk-refresh.xml deleted file mode 100644 index 5d262268fc..0000000000 --- a/reference/ncurses/functions/ncurses-slk-refresh.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - ncurses_slk_refresh - Copies soft label keys to screen - - - &reftitle.description; - - intncurses_slk_refresh - - - &warn.experimental.func; - - Copies soft label keys from virtual screen to physical screen. - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-restore.xml b/reference/ncurses/functions/ncurses-slk-restore.xml deleted file mode 100644 index 276f419784..0000000000 --- a/reference/ncurses/functions/ncurses-slk-restore.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - ncurses_slk_restore - Restores soft label keys - - - &reftitle.description; - - intncurses_slk_restore - - - &warn.experimental.func; - - Restores the soft label keys after ncurses_slk_clear - has been performed. - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-set.xml b/reference/ncurses/functions/ncurses-slk-set.xml deleted file mode 100644 index e890fbecb1..0000000000 --- a/reference/ncurses/functions/ncurses-slk-set.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - ncurses_slk_set - Sets function key labels - - - &reftitle.description; - - boolncurses_slk_set - intlabelnr - stringlabel - intformat - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - labelnr - - - - - - - label - - - - - - - format - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-slk-touch.xml b/reference/ncurses/functions/ncurses-slk-touch.xml deleted file mode 100644 index 5463bd7a0a..0000000000 --- a/reference/ncurses/functions/ncurses-slk-touch.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - ncurses_slk_touch - Forces output when ncurses_slk_noutrefresh is performed - - - &reftitle.description; - - intncurses_slk_touch - - - &warn.experimental.func; - - Forces all the soft labels to be output the next time a - ncurses_slk_noutrefresh is performed. - - - - - diff --git a/reference/ncurses/functions/ncurses-standend.xml b/reference/ncurses/functions/ncurses-standend.xml deleted file mode 100644 index 555c267fa8..0000000000 --- a/reference/ncurses/functions/ncurses-standend.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_standend - Stop using 'standout' attribute - - - &reftitle.description; - - intncurses_standend - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-standout.xml b/reference/ncurses/functions/ncurses-standout.xml deleted file mode 100644 index a4d3105fcf..0000000000 --- a/reference/ncurses/functions/ncurses-standout.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_standout - Start using 'standout' attribute - - - &reftitle.description; - - intncurses_standout - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-start-color.xml b/reference/ncurses/functions/ncurses-start-color.xml deleted file mode 100644 index 348c92de6b..0000000000 --- a/reference/ncurses/functions/ncurses-start-color.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - ncurses_start_color - Initializes color functionality - - - - &reftitle.description; - - intncurses_start_color - - - - Initializes color functionality in ncurses. This function must be called - before any color manipulation functions are called and after - ncurses_init is called. It is good practice to call - this function right after ncurses_init. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns 0 on success, or -1 if the - color table could not be allocated or ncurses was not initialized. - - - - - &reftitle.examples; - - - Writing a string with a specified color to the screen - - -]]> - - - - - - - &reftitle.seealso; - - - ncurses_can_change_color - ncurses_has_colors - - - - - - - diff --git a/reference/ncurses/functions/ncurses-termattrs.xml b/reference/ncurses/functions/ncurses-termattrs.xml deleted file mode 100644 index 1f36dd36ad..0000000000 --- a/reference/ncurses/functions/ncurses-termattrs.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_termattrs - Returns a logical OR of all attribute flags supported by terminal - - - &reftitle.description; - - boolncurses_termattrs - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-termname.xml b/reference/ncurses/functions/ncurses-termname.xml deleted file mode 100644 index 2408dede4d..0000000000 --- a/reference/ncurses/functions/ncurses-termname.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ncurses_termname - Returns terminals (short)-name - - - &reftitle.description; - - stringncurses_termname - - - &warn.experimental.func; - - Returns terminals shortname. - - - - &reftitle.returnvalues; - - Returns the shortname of the terminal, truncated to 14 characters. - On errors, returns &null;. - - - - &reftitle.seealso; - - - ncurses_longname - - - - - - diff --git a/reference/ncurses/functions/ncurses-timeout.xml b/reference/ncurses/functions/ncurses-timeout.xml deleted file mode 100644 index 3426329449..0000000000 --- a/reference/ncurses/functions/ncurses-timeout.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_timeout - Set timeout for special key sequences - - - &reftitle.description; - - voidncurses_timeout - intmillisec - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - millisec - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-top-panel.xml b/reference/ncurses/functions/ncurses-top-panel.xml deleted file mode 100644 index 2c51200854..0000000000 --- a/reference/ncurses/functions/ncurses-top-panel.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_top_panel - Moves a visible panel to the top of the stack - - - &reftitle.description; - - intncurses_top_panel - resourcepanel - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - panel - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-typeahead.xml b/reference/ncurses/functions/ncurses-typeahead.xml deleted file mode 100644 index 70266f4e7e..0000000000 --- a/reference/ncurses/functions/ncurses-typeahead.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_typeahead - Specify different filedescriptor for typeahead checking - - - &reftitle.description; - - intncurses_typeahead - intfd - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - fd - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-ungetch.xml b/reference/ncurses/functions/ncurses-ungetch.xml deleted file mode 100644 index f2caa6c672..0000000000 --- a/reference/ncurses/functions/ncurses-ungetch.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_ungetch - Put a character back into the input stream - - - &reftitle.description; - - intncurses_ungetch - intkeycode - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - keycode - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-ungetmouse.xml b/reference/ncurses/functions/ncurses-ungetmouse.xml deleted file mode 100644 index 2f0dc4eeec..0000000000 --- a/reference/ncurses/functions/ncurses-ungetmouse.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - ncurses_ungetmouse - Pushes mouse event to queue - - - &reftitle.description; - - boolncurses_ungetmouse - arraymevent - - &warn.experimental.func; - - Pushes a KEY_MOUSE event onto the input queue and associates with this - event the given state data and screen-relative character cell coordinates, - specified in mevent. - - - - &reftitle.parameters; - - - - mevent - - - An associative array specifying the event options: - - - "id" : Id to distinguish multiple devices - - - "x" : screen relative x-position in character cells - - - "y" : screen relative y-position in character cells - - - "z" : currently not supported - - - "mmask" : Mouse action - - - - - - - - - - &reftitle.returnvalues; - - Returns &false; on success, &true; otherwise. - - - - &reftitle.seealso; - - - ncurses_getmouse - - - - - - diff --git a/reference/ncurses/functions/ncurses-update-panels.xml b/reference/ncurses/functions/ncurses-update-panels.xml deleted file mode 100644 index 7b2da70fe3..0000000000 --- a/reference/ncurses/functions/ncurses-update-panels.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - ncurses_update_panels - Refreshes the virtual screen to reflect the relations between panels in the stack - - - &reftitle.description; - - voidncurses_update_panels - - - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-use-default-colors.xml b/reference/ncurses/functions/ncurses-use-default-colors.xml deleted file mode 100644 index dd6748c967..0000000000 --- a/reference/ncurses/functions/ncurses-use-default-colors.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - ncurses_use_default_colors - Assign terminal default colors to color id -1 - - - &reftitle.description; - - boolncurses_use_default_colors - - - &warn.experimental.func; - &warn.undocumented.func; - - - - diff --git a/reference/ncurses/functions/ncurses-use-env.xml b/reference/ncurses/functions/ncurses-use-env.xml deleted file mode 100644 index d1f9ca9d65..0000000000 --- a/reference/ncurses/functions/ncurses-use-env.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_use_env - Control use of environment information about terminal size - - - &reftitle.description; - - voidncurses_use_env - boolflag - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - flag - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-use-extended-names.xml b/reference/ncurses/functions/ncurses-use-extended-names.xml deleted file mode 100644 index 4602ed7d58..0000000000 --- a/reference/ncurses/functions/ncurses-use-extended-names.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_use_extended_names - Control use of extended names in terminfo descriptions - - - &reftitle.description; - - intncurses_use_extended_names - boolflag - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - flag - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-vidattr.xml b/reference/ncurses/functions/ncurses-vidattr.xml deleted file mode 100644 index fe1f727fdc..0000000000 --- a/reference/ncurses/functions/ncurses-vidattr.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_vidattr - Display the string on the terminal in the video attribute mode - - - &reftitle.description; - - intncurses_vidattr - intintarg - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - intarg - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-vline.xml b/reference/ncurses/functions/ncurses-vline.xml deleted file mode 100644 index 1856e3b94b..0000000000 --- a/reference/ncurses/functions/ncurses-vline.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ncurses_vline - Draw a vertical line at current position using an attributed character and max. n characters long - - - &reftitle.description; - - intncurses_vline - intcharattr - intn - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - charattr - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-waddch.xml b/reference/ncurses/functions/ncurses-waddch.xml deleted file mode 100644 index 50de623365..0000000000 --- a/reference/ncurses/functions/ncurses-waddch.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_waddch - Adds character at current position in a window and advance cursor - - - &reftitle.description; - - intncurses_waddch - resourcewindow - intch - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - ch - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-waddstr.xml b/reference/ncurses/functions/ncurses-waddstr.xml deleted file mode 100644 index 82cdb71ede..0000000000 --- a/reference/ncurses/functions/ncurses-waddstr.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - ncurses_waddstr - Outputs text at current postion in window - - - &reftitle.description; - - intncurses_waddstr - resourcewindow - stringstr - intn - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - str - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wattroff.xml b/reference/ncurses/functions/ncurses-wattroff.xml deleted file mode 100644 index 6b9391a962..0000000000 --- a/reference/ncurses/functions/ncurses-wattroff.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_wattroff - Turns off attributes for a window - - - &reftitle.description; - - intncurses_wattroff - resourcewindow - intattrs - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - attrs - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wattron.xml b/reference/ncurses/functions/ncurses-wattron.xml deleted file mode 100644 index ea41dfa250..0000000000 --- a/reference/ncurses/functions/ncurses-wattron.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_wattron - Turns on attributes for a window - - - &reftitle.description; - - intncurses_wattron - resourcewindow - intattrs - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - attrs - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wattrset.xml b/reference/ncurses/functions/ncurses-wattrset.xml deleted file mode 100644 index 44ee7c08b2..0000000000 --- a/reference/ncurses/functions/ncurses-wattrset.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_wattrset - Set the attributes for a window - - - &reftitle.description; - - intncurses_wattrset - resourcewindow - intattrs - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - attrs - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wborder.xml b/reference/ncurses/functions/ncurses-wborder.xml deleted file mode 100644 index e95588a0fb..0000000000 --- a/reference/ncurses/functions/ncurses-wborder.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - ncurses_wborder - Draws a border around the window using attributed characters - - - &reftitle.description; - - intncurses_wborder - resourcewindow - intleft - intright - inttop - intbottom - inttl_corner - inttr_corner - intbl_corner - intbr_corner - - &warn.experimental.func; - - Draws the specified lines and corners around the passed - window. - - - Use ncurses_border for borders around the main - window. - - - - &reftitle.parameters; - - Each parameter expects 0 to draw a line and 1 to skip it. - - - window - - - The window on which we operate - - - - - left - - - - - - - right - - - - - - - top - - - - - - - bottom - - - - - - - tl_corner - - - Top left corner - - - - - tr_corner - - - Top right corner - - - - - bl_corner - - - Bottom left corner - - - - - br_corner - - - Bottom right corner - - - - - - - - &reftitle.seealso; - - - ncurses_border - - - - - - diff --git a/reference/ncurses/functions/ncurses-wclear.xml b/reference/ncurses/functions/ncurses-wclear.xml deleted file mode 100644 index 3da9ffb812..0000000000 --- a/reference/ncurses/functions/ncurses-wclear.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_wclear - Clears window - - - &reftitle.description; - - intncurses_wclear - resourcewindow - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wcolor-set.xml b/reference/ncurses/functions/ncurses-wcolor-set.xml deleted file mode 100644 index 8878a5450c..0000000000 --- a/reference/ncurses/functions/ncurses-wcolor-set.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ncurses_wcolor_set - Sets windows color pairings - - - &reftitle.description; - - intncurses_wcolor_set - resourcewindow - intcolor_pair - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - color_pair - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-werase.xml b/reference/ncurses/functions/ncurses-werase.xml deleted file mode 100644 index 128ee9c3b0..0000000000 --- a/reference/ncurses/functions/ncurses-werase.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_werase - Erase window contents - - - &reftitle.description; - - intncurses_werase - resourcewindow - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wgetch.xml b/reference/ncurses/functions/ncurses-wgetch.xml deleted file mode 100644 index 644871cd51..0000000000 --- a/reference/ncurses/functions/ncurses-wgetch.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_wgetch - Reads a character from keyboard (window) - - - &reftitle.description; - - intncurses_wgetch - resourcewindow - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-whline.xml b/reference/ncurses/functions/ncurses-whline.xml deleted file mode 100644 index da5ce691ac..0000000000 --- a/reference/ncurses/functions/ncurses-whline.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - ncurses_whline - Draws a horizontal line in a window at current position using an attributed character and max. n characters long - - - &reftitle.description; - - intncurses_whline - resourcewindow - intcharattr - intn - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - charattr - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wmouse-trafo.xml b/reference/ncurses/functions/ncurses-wmouse-trafo.xml deleted file mode 100644 index 9e140230ce..0000000000 --- a/reference/ncurses/functions/ncurses-wmouse-trafo.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - ncurses_wmouse_trafo - Transforms window/stdscr coordinates - - - &reftitle.description; - - boolncurses_wmouse_trafo - resourcewindow - inty - intx - booltoscreen - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - x - - - - - - - y - - - - - - - toscreen - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wmove.xml b/reference/ncurses/functions/ncurses-wmove.xml deleted file mode 100644 index d5e26b41f5..0000000000 --- a/reference/ncurses/functions/ncurses-wmove.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - ncurses_wmove - Moves windows output position - - - &reftitle.description; - - intncurses_wmove - resourcewindow - inty - intx - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - y - - - - - - - x - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wnoutrefresh.xml b/reference/ncurses/functions/ncurses-wnoutrefresh.xml deleted file mode 100644 index f6b190c003..0000000000 --- a/reference/ncurses/functions/ncurses-wnoutrefresh.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_wnoutrefresh - Copies window to virtual screen - - - &reftitle.description; - - intncurses_wnoutrefresh - resourcewindow - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wrefresh.xml b/reference/ncurses/functions/ncurses-wrefresh.xml deleted file mode 100644 index fb6bc51e95..0000000000 --- a/reference/ncurses/functions/ncurses-wrefresh.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - ncurses_wrefresh - Refresh window on terminal screen - - - &reftitle.description; - - intncurses_wrefresh - resourcewindow - - &warn.experimental.func; - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wstandend.xml b/reference/ncurses/functions/ncurses-wstandend.xml deleted file mode 100644 index 642edb9df7..0000000000 --- a/reference/ncurses/functions/ncurses-wstandend.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_wstandend - End standout mode for a window - - - &reftitle.description; - - intncurses_wstandend - resourcewindow - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wstandout.xml b/reference/ncurses/functions/ncurses-wstandout.xml deleted file mode 100644 index c52de377af..0000000000 --- a/reference/ncurses/functions/ncurses-wstandout.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - ncurses_wstandout - Enter standout mode for a window - - - &reftitle.description; - - intncurses_wstandout - resourcewindow - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - - - - - diff --git a/reference/ncurses/functions/ncurses-wvline.xml b/reference/ncurses/functions/ncurses-wvline.xml deleted file mode 100644 index 052766bf74..0000000000 --- a/reference/ncurses/functions/ncurses-wvline.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - ncurses_wvline - Draws a vertical line in a window at current position using an attributed character and max. n characters long - - - &reftitle.description; - - intncurses_wvline - resourcewindow - intcharattr - intn - - &warn.undocumented.func; - - - &reftitle.parameters; - - - - window - - - - - - - charattr - - - - - - - n - - - - - - - - - - - diff --git a/reference/ncurses/reference.xml b/reference/ncurses/reference.xml deleted file mode 100644 index 70026b6bbf..0000000000 --- a/reference/ncurses/reference.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Ncurses &Functions; - - &reference.ncurses.entities.functions; - - - - - diff --git a/reference/ncurses/setup.xml b/reference/ncurses/setup.xml deleted file mode 100644 index e738e8a5f7..0000000000 --- a/reference/ncurses/setup.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - &reftitle.setup; - - -
- &reftitle.required; - - You need the ncurses libraries and headerfiles. Download the - latest version from the &url.ncurses; - or from an other GNU-Mirror. - -
- - - - &reference.ncurses.configure; - - - -
- &reftitle.runtime; - &no.config; -
- - - -
- &reftitle.resources; - - This extension defines window, panel and pad resources. - -
- - -
- - - diff --git a/reference/ncurses/versions.xml b/reference/ncurses/versions.xml deleted file mode 100644 index e68becd6ae..0000000000 --- a/reference/ncurses/versions.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/reference/network/functions/closelog.xml b/reference/network/functions/closelog.xml index 479fb95e80..1ebb0d977e 100644 --- a/reference/network/functions/closelog.xml +++ b/reference/network/functions/closelog.xml @@ -18,6 +18,11 @@
+ + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/network/functions/dns-get-record.xml b/reference/network/functions/dns-get-record.xml index ad9f1d079c..c2419682e5 100644 --- a/reference/network/functions/dns-get-record.xml +++ b/reference/network/functions/dns-get-record.xml @@ -262,7 +262,7 @@ - A6(PHP >= 5.1.0) + A6 masklen: Length (in bits) to inherit from the target specified by chain. @@ -510,17 +510,6 @@ Additional = Array - - &reftitle.notes; - - - For compatibility with versions before PHP 5.3.0 on some operating systems, - try the PEAR class - Net_DNS. - - - - &reftitle.seealso; diff --git a/reference/network/functions/gethostname.xml b/reference/network/functions/gethostname.xml index f3d7e5f711..5781c461b2 100644 --- a/reference/network/functions/gethostname.xml +++ b/reference/network/functions/gethostname.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; @@ -35,9 +40,6 @@ ]]> diff --git a/reference/network/functions/header.xml b/reference/network/functions/header.xml index c25855fb73..ba12b95689 100644 --- a/reference/network/functions/header.xml +++ b/reference/network/functions/header.xml @@ -67,7 +67,12 @@ exit; ]]> @@ -141,6 +146,14 @@ header('WWW-Authenticate: NTLM', false); + + &reftitle.errors; + + On failure to schedule the header to be sent, header + issues an E_WARNING level error. + + + &reftitle.examples; @@ -231,14 +244,6 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past at any time unless the HTTP headers have already been sent. - - - There is a bug in Microsoft Internet Explorer 4.01 that prevents - this from working. There is no workaround. There is also a bug - in Microsoft Internet Explorer 5.5 that interferes with this, - which can be resolved by upgrading to Service Pack 2 or later. - - Most contemporary clients accept relative URIs as argument to @@ -283,6 +288,7 @@ exit; setcookie http_response_code header_remove + header_list The section on HTTP authentication diff --git a/reference/network/functions/headers-list.xml b/reference/network/functions/headers-list.xml index 0b784b07d1..cc3114a462 100644 --- a/reference/network/functions/headers-list.xml +++ b/reference/network/functions/headers-list.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/network/functions/ip2long.xml b/reference/network/functions/ip2long.xml index 34f9f6ca67..d7f4c93e77 100644 --- a/reference/network/functions/ip2long.xml +++ b/reference/network/functions/ip2long.xml @@ -105,11 +105,8 @@ if ($long == -1 || $long === FALSE) { - ip2long will return &false; for the IP - 255.255.255.255 in PHP 5 <= 5.0.2, and -1 - on 64-bits systems in PHP 5 <=5.2.4. It was fixed in - PHP 5.2.5 where it returns 4294967295. 32-bit systems - will return -1 due to the integer value overflowing. + ip2long will return -1 for the IP + 255.255.255.255 on 32-bit systems due to the integer value overflowing. diff --git a/reference/network/functions/pfsockopen.xml b/reference/network/functions/pfsockopen.xml index e9c71084c9..0f177d0140 100644 --- a/reference/network/functions/pfsockopen.xml +++ b/reference/network/functions/pfsockopen.xml @@ -9,7 +9,7 @@ &reftitle.description; - resourcepfsockopen + resourcefalsepfsockopen stringhostname intport-1 interrno @@ -31,6 +31,17 @@
+ + &reftitle.returnvalues; + + pfsockopen returns a file pointer which may be used + together with the other file functions (such as + fgets, fgetss, + fwrite, fclose, and + feof),&return.falseforfailure;. + + + &reftitle.seealso; diff --git a/reference/network/functions/setcookie.xml b/reference/network/functions/setcookie.xml index 00c8aa51b0..9bde83f38a 100644 --- a/reference/network/functions/setcookie.xml +++ b/reference/network/functions/setcookie.xml @@ -185,116 +185,6 @@ - - &reftitle.examples; - - Some examples follow how to send cookies: - - <function>setcookie</function> send example - - -]]> - - - - - Note that the value portion of the cookie will automatically be - urlencoded when you send the cookie, and when it is received, it - is automatically decoded and assigned to a variable by the same - name as the cookie name. If you don't want this, you can use - setrawcookie instead. To see - the contents of our test cookie in a script, simply use one of the - following examples: - - - - - -]]> - - - - - - <function>setcookie</function> delete example - - When deleting a cookie you should assure that the expiration date - is in the past, to trigger the removal mechanism in your browser. - Examples follow how to delete cookies sent in previous example: - - - -]]> - - - - - - <function>setcookie</function> and arrays - - You may also set array cookies by using array notation in the - cookie name. This has the effect of setting as many cookies as - you have array elements, but when the cookie is received by your - script, the values are all placed in an array with the cookie's - name: - - - $value) { - $name = htmlspecialchars($name); - $value = htmlspecialchars($value); - echo "$name : $value
\n"; - } -} -?> -]]> -
- &example.outputs; - - - -
- - - Using separator characters such as [ and ] - as part of the cookie name is not compliant to RFC 6265, section 4, but supposed - to be supported by user agents according to RFC 6265, section 5. - - -
-
- &reftitle.changelog; @@ -321,6 +211,116 @@ one : cookieone + + &reftitle.examples; + + Some examples follow how to send cookies: + + <function>setcookie</function> send example + + +]]> + + + + + Note that the value portion of the cookie will automatically be + urlencoded when you send the cookie, and when it is received, it + is automatically decoded and assigned to a variable by the same + name as the cookie name. If you don't want this, you can use + setrawcookie instead. To see + the contents of our test cookie in a script, simply use one of the + following examples: + + + + + +]]> + + + + + + <function>setcookie</function> delete example + + When deleting a cookie you should assure that the expiration date + is in the past, to trigger the removal mechanism in your browser. + Examples follow how to delete cookies sent in previous example: + + + +]]> + + + + + + <function>setcookie</function> and arrays + + You may also set array cookies by using array notation in the + cookie name. This has the effect of setting as many cookies as + you have array elements, but when the cookie is received by your + script, the values are all placed in an array with the cookie's + name: + + + $value) { + $name = htmlspecialchars($name); + $value = htmlspecialchars($value); + echo "$name : $value
\n"; + } +} +?> +]]> +
+ &example.outputs; + + + +
+ + + Using separator characters such as [ and ] + as part of the cookie name is not compliant to RFC 6265, section 4, but supposed + to be supported by user agents according to RFC 6265, section 5. + + +
+
+ &reftitle.notes; diff --git a/reference/network/functions/syslog.xml b/reference/network/functions/syslog.xml index 6220ead04b..df992cc680 100644 --- a/reference/network/functions/syslog.xml +++ b/reference/network/functions/syslog.xml @@ -89,10 +89,7 @@ message - The message to send, except that the two characters - %m will be replaced by the error message string - (strerror) corresponding to the present value of - errno. + The message to send. @@ -142,7 +139,7 @@ closelog(); &reftitle.notes; - On Windows NT, the syslog service is emulated using the Event + On Windows, the syslog service is emulated using the Event Log. @@ -161,6 +158,7 @@ closelog(); openlog closelog + syslog.filter INI setting (starting with PHP 7.3) diff --git a/reference/oauth/book.xml b/reference/oauth/book.xml index df98aabf62..057bae2fcb 100644 --- a/reference/oauth/book.xml +++ b/reference/oauth/book.xml @@ -2,6 +2,7 @@ + OAuth diff --git a/reference/oci8/OCI-Collection/free.xml b/reference/oci8/OCI-Collection/free.xml index ecd94e146b..00aa46bea9 100644 --- a/reference/oci8/OCI-Collection/free.xml +++ b/reference/oci8/OCI-Collection/free.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/oci8/OCI-Collection/max.xml b/reference/oci8/OCI-Collection/max.xml index e7498b7de1..72b42560bd 100644 --- a/reference/oci8/OCI-Collection/max.xml +++ b/reference/oci8/OCI-Collection/max.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/oci8/OCI-Collection/size.xml b/reference/oci8/OCI-Collection/size.xml index 571a89fe99..3ec5918889 100644 --- a/reference/oci8/OCI-Collection/size.xml +++ b/reference/oci8/OCI-Collection/size.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/oci8/OCI-Lob/close.xml b/reference/oci8/OCI-Lob/close.xml index 5b9124da64..ed2d4a195b 100644 --- a/reference/oci8/OCI-Lob/close.xml +++ b/reference/oci8/OCI-Lob/close.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/oci8/OCI-Lob/eof.xml b/reference/oci8/OCI-Lob/eof.xml index 51756db669..e76ea4848b 100644 --- a/reference/oci8/OCI-Lob/eof.xml +++ b/reference/oci8/OCI-Lob/eof.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; @@ -25,15 +30,6 @@ - - &reftitle.notes; - - - This function will return an Oracle error if is enabled on the LOB. - - - - &reftitle.changelog; @@ -57,6 +53,15 @@ + + &reftitle.notes; + + + This function will return an Oracle error if is enabled on the LOB. + + + + &reftitle.seealso; diff --git a/reference/oci8/OCI-Lob/free.xml b/reference/oci8/OCI-Lob/free.xml index d88e56ff58..e5edaf99d1 100644 --- a/reference/oci8/OCI-Lob/free.xml +++ b/reference/oci8/OCI-Lob/free.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/oci8/OCI-Lob/getBuffering.xml b/reference/oci8/OCI-Lob/getBuffering.xml index 9e2ea74cf4..d94f99e229 100644 --- a/reference/oci8/OCI-Lob/getBuffering.xml +++ b/reference/oci8/OCI-Lob/getBuffering.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/oci8/OCI-Lob/load.xml b/reference/oci8/OCI-Lob/load.xml index a291d2d5ad..59e0961ab4 100644 --- a/reference/oci8/OCI-Lob/load.xml +++ b/reference/oci8/OCI-Lob/load.xml @@ -20,6 +20,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/oci8/OCI-Lob/rewind.xml b/reference/oci8/OCI-Lob/rewind.xml index ce39113c62..6b3da45589 100644 --- a/reference/oci8/OCI-Lob/rewind.xml +++ b/reference/oci8/OCI-Lob/rewind.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/oci8/OCI-Lob/size.xml b/reference/oci8/OCI-Lob/size.xml index ed2378f28c..91b4e4f2a4 100644 --- a/reference/oci8/OCI-Lob/size.xml +++ b/reference/oci8/OCI-Lob/size.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/oci8/OCI-Lob/tell.xml b/reference/oci8/OCI-Lob/tell.xml index c18bf73e08..1e24f69416 100644 --- a/reference/oci8/OCI-Lob/tell.xml +++ b/reference/oci8/OCI-Lob/tell.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/oci8/functions/oci-bind-by-name.xml b/reference/oci8/functions/oci-bind-by-name.xml index 3a8cf584f5..01ff3da919 100644 --- a/reference/oci8/functions/oci-bind-by-name.xml +++ b/reference/oci8/functions/oci-bind-by-name.xml @@ -97,7 +97,7 @@ statement - A valid OCI8 statement identifer. + A valid OCI8 statement identifier. @@ -798,20 +798,11 @@ var_dump($output2); // false - - &reftitle.returnvalues; - - &return.success; - - - &reftitle.notes; - Do not use magic_quotes_gpc or - addslashes + Do not use addslashes and oci_bind_by_name simultaneously as no quoting is needed. Any magically applied quotes will be written into your database because oci_bind_by_name diff --git a/reference/oci8/functions/oci-free-descriptor.xml b/reference/oci8/functions/oci-free-descriptor.xml index 1e792e5fc9..18c6fefef3 100644 --- a/reference/oci8/functions/oci-free-descriptor.xml +++ b/reference/oci8/functions/oci-free-descriptor.xml @@ -17,6 +17,22 @@ + + &reftitle.parameters; + + + + descriptor + + + Descriptor allocated by oci_new_descriptor. + + + + + + + &reftitle.returnvalues; diff --git a/reference/oci8/functions/oci-set-edition.xml b/reference/oci8/functions/oci-set-edition.xml index 768a7cb5d9..e6be7cac95 100644 --- a/reference/oci8/functions/oci-set-edition.xml +++ b/reference/oci8/functions/oci-set-edition.xml @@ -54,35 +54,6 @@ - - &reftitle.notes; - - Oracle version requirement - - This function is available from Oracle 11gR2 onwards. - - - - Persistent connections - - To avoid inconsistencies and unexpected errors, do not use ALTER - SESSION SET EDITION to change the edition on persistent connections. - - - - DRCP Connection Pooling - - To avoid inconsistencies and unexpected errors when using editions - and DRCP with Oracle - 11.2.0.1, keep a one-to-one correspondence between - the oci8.connection_class - and the edition name used by applications. Each pooled server of - a given connection class should only be used with one edition. - This restriction has been removed with Oracle 11.2.0.2. - - - - &reftitle.returnvalues; @@ -138,6 +109,35 @@ echo "The result is $r\n"; + + &reftitle.notes; + + Oracle version requirement + + This function is available from Oracle 11gR2 onwards. + + + + Persistent connections + + To avoid inconsistencies and unexpected errors, do not use ALTER + SESSION SET EDITION to change the edition on persistent connections. + + + + DRCP Connection Pooling + + To avoid inconsistencies and unexpected errors when using editions + and DRCP with Oracle + 11.2.0.1, keep a one-to-one correspondence between + the oci8.connection_class + and the edition name used by applications. Each pooled server of + a given connection class should only be used with one edition. + This restriction has been removed with Oracle 11.2.0.2. + + + +
+ OpenAL Audio Bindings OpenAL diff --git a/reference/openal/functions/openal-buffer-create.xml b/reference/openal/functions/openal-buffer-create.xml index a8ef97a9f7..f786e1ce7c 100644 --- a/reference/openal/functions/openal-buffer-create.xml +++ b/reference/openal/functions/openal-buffer-create.xml @@ -14,6 +14,12 @@ + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/openal/functions/openal-source-create.xml b/reference/openal/functions/openal-source-create.xml index 67b65b451f..7e23564126 100644 --- a/reference/openal/functions/openal-source-create.xml +++ b/reference/openal/functions/openal-source-create.xml @@ -14,6 +14,12 @@ + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/openssl/configure.xml b/reference/openssl/configure.xml index e8574f355b..0ee27694f7 100644 --- a/reference/openssl/configure.xml +++ b/reference/openssl/configure.xml @@ -14,7 +14,7 @@ /dev/random device. - As of PHP 5.6.3, the configure option + The configure option is available which causes PHP to use the system cipher list instead of a hard-coded default. diff --git a/reference/openssl/constants.xml b/reference/openssl/constants.xml index 598e8fe290..a2958e265a 100644 --- a/reference/openssl/constants.xml +++ b/reference/openssl/constants.xml @@ -180,7 +180,6 @@ This constant is only available when PHP is compiled with OpenSSL 0.9.8+. - Added in PHP 5.2.0. @@ -403,7 +402,7 @@ - Added in PHP 5.4.8. + @@ -414,7 +413,7 @@ - Added in PHP 5.4.8. + @@ -425,7 +424,7 @@ - Added in PHP 5.4.8. + @@ -436,7 +435,7 @@ - Added in PHP 5.4.8. + @@ -447,7 +446,7 @@ - Added in PHP 5.4.8. + @@ -480,7 +479,7 @@ - As of PHP 5.2.13 and PHP 5.3.2, this constant is only available + This constant is only available if PHP is compiled with MD2 support. This requires passing in the -DHAVE_OPENSSL_MD2_H CFLAG when compiling PHP, and enable-md2 when compiling OpenSSL 1.0.0+. @@ -558,7 +557,7 @@ - Added in PHP 5.4.0. + @@ -569,7 +568,7 @@ - Added in PHP 5.4.0. + @@ -580,7 +579,7 @@ - Added in PHP 5.4.0. + @@ -597,7 +596,7 @@ - Added in PHP 5.2.0. + @@ -608,7 +607,7 @@ - Added in PHP 5.2.0. + @@ -632,7 +631,7 @@ - This constant was added in 5.3.2 and requires PHP to be + This constant requires PHP to be built with OpenSSL 0.9.8j or greater. diff --git a/reference/openssl/functions/openssl-encrypt.xml b/reference/openssl/functions/openssl-encrypt.xml index 9332d7f419..ded01552c5 100644 --- a/reference/openssl/functions/openssl-encrypt.xml +++ b/reference/openssl/functions/openssl-encrypt.xml @@ -167,7 +167,7 @@ if (in_array($cipher, openssl_get_cipher_methods())) - AES Authenticated Encryption example for PHP 5.6+ + AES Authenticated Encryption example prior to PHP 7.1 + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/openssl/functions/openssl-pkcs7-read.xml b/reference/openssl/functions/openssl-pkcs7-read.xml index b7af9f747f..7df1c3241b 100644 --- a/reference/openssl/functions/openssl-pkcs7-read.xml +++ b/reference/openssl/functions/openssl-pkcs7-read.xml @@ -10,7 +10,7 @@ &reftitle.description; boolopenssl_pkcs7_read - stringinput_filename + stringdata arraycertificates @@ -25,10 +25,10 @@ &reftitle.parameters; - input_filename + data - + The string of data you wish to parse (p7b format). @@ -36,7 +36,7 @@ certificates - + The array of PEM certificates from the p7b input data. @@ -50,6 +50,46 @@ + + &reftitle.examples; + + + Get a PEM array from a P7B file + + +]]> + + + + + + + + &reftitle.seealso; + + + openssl_csr_sign + + + +
- - - - Paradox File Access - Paradox - - - - &reftitle.intro; - - This module allows to read and write Paradox databases, primary index - files and blob files. Write support has been proven to be quite reliable, - though due to lack of documentation the produced files may not in - any case be readable by other applications. Encrypted databases can - be read without specifying a password if pxlib >= 0.5.0 is used. - - - - This module is also in development and may change, though major changes to - the API are not expected. - - - &warn.experimental; - - - - &reference.paradox.setup; - &reference.paradox.constants; - &reference.paradox.reference; - - - - - diff --git a/reference/paradox/configure.xml b/reference/paradox/configure.xml deleted file mode 100644 index e10dd65dc5..0000000000 --- a/reference/paradox/configure.xml +++ /dev/null @@ -1,35 +0,0 @@ - - -
- &reftitle.install; - - &pecl.info; - &url.pecl.package;paradox - - - Make sure you have pxlib installed before. If you install - pxlib from an rpm or debian package, do not forget to install the development - package as well. - -
- - diff --git a/reference/paradox/constants.xml b/reference/paradox/constants.xml deleted file mode 100644 index 613d096ab8..0000000000 --- a/reference/paradox/constants.xml +++ /dev/null @@ -1,169 +0,0 @@ - - - - &reftitle.constants; - &extension.constants; - - The following two tables lists all constants defined by the paradox - extension. - - Contants for field types - - - - Name - Meaning - - - - - PX_FIELD_ALPHA - Character data with fixed length - - - PX_FIELD_DATE - Date, number of days since 1.1.0000 - - - PX_FIELD_SHORT - Short integer (2 Bytes) - - - PX_FIELD_LONG - Long integer (4 Bytes) - - - PX_FIELD_CURRENCY - same as PX_FIELD_NUMBER - - - PX_FIELD_NUMBER - Double - - - PX_FIELD_LOGICAL - Boolean - - - PX_FIELD_MEMOBLOB - Binary large object - - - PX_FIELD_BLOB - Binary large object (not supported) - - - PX_FIELD_FMTMEMOBLOB - Binary large object - - - PX_FIELD_OLE - OLE object (basically a blob, not supported) - - - PX_FIELD_GRAPHIC - Graphic (basically a blob, not supported) - - - PX_FIELD_TIME - time, number of milli seconds since midnight - - - PX_FIELD_TIMESTAMP - timestamp, number of milli seconds since 1.1.0000 - - - PX_FIELD_AUTOINC - Auto incrementing interger (like PX_FIELD_LONG) - - - PX_FIELD_BCD - Decimal number stored in bcd format (not supported) - - - PX_FIELD_BYTES - Array of Bytes with not more than 255 bytes (not supported) - - - PX_KEYTOLOWER - Turn all field names into lower case - - - PX_KEYTOUPPER - Turn all field names into upper case - - - -
- - Contants for file types - - - - Name - Meaning - - - - - PX_FILE_INDEX_DB - Indexed database - - - PX_FILE_PRIM_INDEX - Primary index - - - PX_FILE_NON_INDEX_DB - None indexed database - - - PX_FILE_NON_INC_SEC_INDEX - None incremental secondary index - - - PX_FILE_SEC_INDEX - Secondary index - - - PX_FILE_INC_SEC_INDEX - Incremental secondary index - - - PX_FILE_NON_INC_SEC_INDEX_G - Non incremental secondary index - - - PX_FILE_SEC_INDEX_G - Secondary index - - - PX_FILE_INC_SEC_INDEX_G - Non incremental secondary index - - - -
-
-
- - diff --git a/reference/paradox/functions/px-close.xml b/reference/paradox/functions/px-close.xml deleted file mode 100644 index ca110a9f59..0000000000 --- a/reference/paradox/functions/px-close.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - px_close - Closes a paradox database - - - - &reftitle.description; - - boolpx_close - resourcepxdoc - - - Closes the paradox database. This function will not close the file. You will - have to call fclose afterwards. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - px_open_fp - The example at px_new - - - - - - - diff --git a/reference/paradox/functions/px-create-fp.xml b/reference/paradox/functions/px-create-fp.xml deleted file mode 100644 index 3e6f1b5607..0000000000 --- a/reference/paradox/functions/px-create-fp.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - px_create_fp - Create a new paradox database - - - - &reftitle.description; - - boolpx_create_fp - resourcepxdoc - resourcefile - arrayfielddesc - - - Create a new paradox database file. The actual file has to be opened before - with fopen. Make sure the file is writable. - - - Calling this functions issues a warning about an empty tablename which - can be safely ignored. Just set the tablename afterwards with - px_set_parameter. - - - This function is highly experimental, due to insufficient - documentation of the paradox file format. Database files created with this - function can be opened by px_open_fp and has been - successfully opened by the Paradox software, but your milage may vary. - - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - file - - File handle as returned by fopen. - - - - - fielddesc - - - is an array containing one element for each - field specification. A field specification is an array itself with - either two or three elements.The first element is always a string value - used as the name of the field. It may not be larger than ten - characters. The second element contains the field type which is one of - the constants listed in the table Constants for field types. - In the case of a character field or bcd field, you will have to provide - a third element specifying the length respectively the precesion of the - field. If your field specification contains blob fields, you will have - to make sure to either make the field large enough for all field values - to fit or specify a blob file with - px_set_blob_file for storing the blobs. If this is - not done the field data is truncated. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - - Creating a Paradox database with two fields - - -]]> - - - - - - - &reftitle.seealso; - - - px_new - px_put_record - fopen - - - - - - - diff --git a/reference/paradox/functions/px-date2string.xml b/reference/paradox/functions/px-date2string.xml deleted file mode 100644 index 9ccc3bebbc..0000000000 --- a/reference/paradox/functions/px-date2string.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - px_date2string - - Converts a date into a string - - - - &reftitle.description; - - stringpx_date2string - resourcepxdoc - intvalue - stringformat - - - - Turns a date as it stored in the paradox file into human readable - format. Paradox dates are the number of days since 1.1.0000. - This function is just for convenience. It can be easily replaced by some - math and the calendar functions as demonstrated in the example below. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - value - - - Value as stored in paradox database field of type - PX_FIELD_DATE. - - - - - format - - - String format similar to the format used by date. - The placeholders support by this function is a subset of those - supported by date (Y, y, m, n, d, j, L). - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - - - - - - &reftitle.examples; - - - Turn a paradox date into a human readable form - - -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - px_timestamp2string - jdtogregorian - - - - - - - - diff --git a/reference/paradox/functions/px-delete-record.xml b/reference/paradox/functions/px-delete-record.xml deleted file mode 100644 index 1cb510e37f..0000000000 --- a/reference/paradox/functions/px-delete-record.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - px_delete_record - Deletes record from paradox database - - - - &reftitle.description; - - boolpx_delete_record - resourcepxdoc - intnum - - - - This function deletes a record from the database. It does not free - the space in the database file but just marks it as deleted. Inserting - a new record afterwards will reuse the space. - - - - This function is only available if pxlib >= 0.6.0 is used. - - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - num - - - The record number is an artificial number counting records in the order - as they are stored in the database. The first record has number 0. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - - diff --git a/reference/paradox/functions/px-delete.xml b/reference/paradox/functions/px-delete.xml deleted file mode 100644 index c4d92f65cf..0000000000 --- a/reference/paradox/functions/px-delete.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - px_delete - Deletes resource of paradox database - - - - &reftitle.description; - - boolpx_delete - resourcepxdoc - - - Deletes the resource of the paradox file and frees all memory. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - - diff --git a/reference/paradox/functions/px-get-field.xml b/reference/paradox/functions/px-get-field.xml deleted file mode 100644 index cba9f39d67..0000000000 --- a/reference/paradox/functions/px-get-field.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - px_get_field - Returns the specification of a single field - - - - &reftitle.description; - - arraypx_get_field - resourcepxdoc - intfieldno - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - fieldno - - - Number of the field. The first field has number 0. Specifying a field - number less than 0 and greater or equal the number of fields will - trigger an error. - - - - - - - - - &reftitle.returnvalues; - - Returns the specification of the 'th database - field as an associated array. The array contains three fields named - name, type, and - size. - - - - - - diff --git a/reference/paradox/functions/px-get-info.xml b/reference/paradox/functions/px-get-info.xml deleted file mode 100644 index 8dbf2ab84e..0000000000 --- a/reference/paradox/functions/px-get-info.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - px_get_info - Return lots of information about a paradox file - - - - &reftitle.description; - - arraypx_get_info - resourcepxdoc - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - - - - - &reftitle.returnvalues; - - Returns an associated array with lots of information about a paradox - file. This array is likely to be extended in the future. - - - - fileversion - - Version of file multiplied by 10, e.g. 70. - - - - tablename - - Name of table as stored in the file. If the database was created - by pxlib, then this will be the name of the file without the - extension. - - - - numrecords - - Number of records in this table. - - - - numfields - - Number of fields in this table. - - - - headersize - - Number of bytes used for the header. This is usually 0x800. - - - - recordsize - - Number of bytes used for each record. This is the sum of all - field sizes (available since version 1.4.2). - - - - maxtablesize - - - This value multiplied by 0x400 is the size of a data block in bytes. - The maximum number of records in a datablock is the integer part of - (maxtablesize * 0x400 - 8) / recordsize. - - - - - numdatablocks - - - The number of data blocks in the file. Each data block contains a - certain number of records which depends on the record size and the data - block size (maxtablesize). Data blocks may not necessarily be - completely filled. - - - - - numindexfields - - - Number of fields used for the primary index. The fields do always start - with field number 1. - - - - - codepage - - - The DOS codepage which was used for encoding fields with character data. - If the target encoding is not set with - px_set_targetencoding this will be the encoding for - character fields when records are being accessed with - px_get_record or - px_retrieve_record. - - - - - - - - &reftitle.seealso; - - - px_numfields - px_numrecords - - - - - - - diff --git a/reference/paradox/functions/px-get-parameter.xml b/reference/paradox/functions/px-get-parameter.xml deleted file mode 100644 index b92774f83b..0000000000 --- a/reference/paradox/functions/px-get-parameter.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - px_get_parameter - Gets a parameter - - - - &reftitle.description; - - stringfalsepx_get_parameter - resourcepxdoc - stringname - - - Gets various parameters. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - name - - - The name can be one of the following: - - - - tablename - - - The name of the table as it will be stored in the database header. - - - - - targetencoding - - - The encoding for the output. Data which is being read from character - fields with px_get_record or - px_retrieve_record is recoded into the - targetencoding. If it is not set, then the data - will be delivered as stored in the database file. - - - - - inputencoding - - - The encoding of the input data which is to be stored into the database. - When storing data of character fields in the database, the data is - expected to be delivered in this encoding. - - - - - - - - - - - - &reftitle.returnvalues; - - Returns the value of the parameter&return.falseforfailure;. - - - - - - diff --git a/reference/paradox/functions/px-get-record.xml b/reference/paradox/functions/px-get-record.xml deleted file mode 100644 index c0e77fa030..0000000000 --- a/reference/paradox/functions/px-get-record.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - px_get_record - Returns record of paradox database - - - - &reftitle.description; - - arraypx_get_record - resourcepxdoc - intnum - intmode0 - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - num - - - The record number is an artificial number counting records in the order - as they are stored in the database. The first record has number 0. - - - - - mode - - - The optional mode can be - PX_KEYTOLOWER or PX_KEYTOUPPER - in order to convert the keys of the returned array into lower or - upper case. If - mode is not passed or is 0, then the key will be - exactly like the field name. The element values will contain the field - values. NULL values will be retained and are different from 0.0, 0 or - the empty string. Fields of type PX_FIELD_TIME - will be returned as an integer counting the number of milliseconds - starting at midnight. A timestamp - (PX_FIELD_TIMESTAMP) and date - (PX_FIELD_DATE) are floating point respectively - int values counting milliseconds respectively days starting - at the beginning of julian calendar. - Use the functions px-timestamp2string and - px-date2string to convert them into a character - representation. - - - - - - - - - &reftitle.returnvalues; - - Returns the num'th record from the paradox - database. The record is returned as an associated array with its keys - being the field names. - - - - - &reftitle.seealso; - - - px_retrieve_record - - - - - - - diff --git a/reference/paradox/functions/px-get-schema.xml b/reference/paradox/functions/px-get-schema.xml deleted file mode 100644 index c6c51a6907..0000000000 --- a/reference/paradox/functions/px-get-schema.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - px_get_schema - Returns the database schema - - - - &reftitle.description; - - arraypx_get_schema - resourcepxdoc - intmode0 - - - px_get_schema returns the database schema. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - mode - - - If the optional mode is - PX_KEYTOLOWER or - PX_KEYTOUPPER the keys of the returned array - will be converted to lower - or upper case. If mode is 0 or not passed at all, - then the key name will be identical to the field name. - - - - - - - - - &reftitle.returnvalues; - - Returns the schema of a database file as an associated array. The key name - is equal to the field name. Each array element is itself an associated - array containing the two fields type and - size. type is one of the constants in - table Constants for field - types. size is the number of bytes this field - consumes in the record. The total of all field sizes is equal to the - record size as it can be retrieved with px-get-info. - - - - - - - diff --git a/reference/paradox/functions/px-get-value.xml b/reference/paradox/functions/px-get-value.xml deleted file mode 100644 index 5b3403a0a5..0000000000 --- a/reference/paradox/functions/px-get-value.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - px_get_value - Gets a value - - - - &reftitle.description; - - floatfalsepx_get_value - resourcepxdoc - stringname - - - Gets various values. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - name - - - name can be one of the following. - - - numprimkeys - - - The number of primary keys. Paradox databases always use the - first numprimkeys fields for the primary - index. - - - - - - - - - - - - - &reftitle.returnvalues; - - Returns the value of the parameter&return.falseforfailure;. - - - - - - - diff --git a/reference/paradox/functions/px-insert-record.xml b/reference/paradox/functions/px-insert-record.xml deleted file mode 100644 index 09fce75dcd..0000000000 --- a/reference/paradox/functions/px-insert-record.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - px_insert_record - Inserts record into paradox database - - - - &reftitle.description; - - intpx_insert_record - resourcepxdoc - arraydata - - - - Inserts a new record into the database. The record is not necessarily - inserted at the end of the database, but may be inserted at any - position depending on where the first free slot is found. - - - The record data is passed as an array of field values. The elements in - the array must correspond to the fields in the database. If the array - has less elements than fields in the database, the remaining fields - will be set to null. - - - Most field values can be passed as its equivalent php type e.g. a long - value is used for fields of type PX_FIELD_LONG, PX_FIELD_SHORT and - PX_FIELD_AUTOINC, a double values is used for fields of type - PX_FIELD_CURRENCY and PX_FIELD_NUMBER. - Field values for blob and alpha fields are passed as strings. - - - Fields of type PX_FIELD_TIME and PX_FIELD_DATE both require a long - value. In the first case this is the number of milliseconds since - midnight. In the second case this is the number of days since 1.1.0000. - Below there are two examples to convert the current date or timestamp - into a value suitable for one of paradox's date/time fields. - - - - This function is only available if pxlib >= 0.6.0 is used. - - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - data - - - Associated or indexed array containing the field values as e.g. - returned by px_retrieve_record. - - - - - - - - - &reftitle.returnvalues; - - Returns &false; on failure or the record number in case of success. - - - - - &reftitle.examples; - - - Set the date/time fields in a paradox database to the current - date/time - - -]]> - - &example.outputs; - - - - - - - - The Julian day count as passed to jdtogregorian - has a different base of 1.1.4714 b.c. and must therefore be calculated - by adding 1721425 to the day count used in the paradox file. Turning the - day count into a timestamp is easily done by multiplying with 86400000.0 - to obtain milli seconds. - - - - - &reftitle.seealso; - - px_update_record - - - - - - diff --git a/reference/paradox/functions/px-new.xml b/reference/paradox/functions/px-new.xml deleted file mode 100644 index 46d6acc8b7..0000000000 --- a/reference/paradox/functions/px-new.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - px_new - Create a new paradox object - - - - &reftitle.description; - - resourcepx_new - - - - Create a new paradox object. You will have to call this function before any - further functions. px_new does not create any file on - the disk, it just creates an instance of a paradox object. This function - must not be called if the object oriented interface is used. Use new - paradox_db() instead. - - - - - &reftitle.returnvalues; - - Returns &false; on failure. - - - - - - &reftitle.examples; - - - Opening a Paradox database - - -]]> - - - - - If you prefer the object oriented API, then the above example will look - like the following. - - Opening a Paradox database - -open_fp($fp)) { - /* Error handling */ -} -// ... -$pxdoc->close(); -fclose($fp); -?> -]]> - - - - - - - &reftitle.seealso; - - - px_delete - px_open_fp - - - - - - - - diff --git a/reference/paradox/functions/px-numfields.xml b/reference/paradox/functions/px-numfields.xml deleted file mode 100644 index b4353e6a85..0000000000 --- a/reference/paradox/functions/px-numfields.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - px_numfields - Returns number of fields in a database - - - - &reftitle.description; - - intpx_numfields - resourcepxdoc - - - Get the number of fields in a database file. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - - - - - &reftitle.returnvalues; - - Returns the number of fields in a database file. The return value of this - function is identical to the element numfields in the - array returned by px_get_info. - - - - - - diff --git a/reference/paradox/functions/px-numrecords.xml b/reference/paradox/functions/px-numrecords.xml deleted file mode 100644 index d5abf06c1b..0000000000 --- a/reference/paradox/functions/px-numrecords.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - px_numrecords - Returns number of records in a database - - - - &reftitle.description; - - intpx_numrecords - resourcepxdoc - - - Get the number of records in a database file. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - - - - - &reftitle.returnvalues; - - Returns the number of records in a database file. The return value of this - function is identical to the element numrecords in the - array returned by px_get_info. - - - - - - diff --git a/reference/paradox/functions/px-open-fp.xml b/reference/paradox/functions/px-open-fp.xml deleted file mode 100644 index 58c45288af..0000000000 --- a/reference/paradox/functions/px-open-fp.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - px_open_fp - Open paradox database - - - - &reftitle.description; - - boolpx_open_fp - resourcepxdoc - resourcefile - - - Open an existing paradox database file. The actual file has to be opened - before with fopen. This function can also be used to - open primary index files and tread them like a paradox database. This is - supported for those who would like to investigate a primary index. It - cannot be used to accelerate access to a database file. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - file - - - file is the return value from - fopen with the actual database file as parameter. - Make sure the database is writable if you plan to update or insert - records. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - fopen - The example at px_new - - - - - - - diff --git a/reference/paradox/functions/px-put-record.xml b/reference/paradox/functions/px-put-record.xml deleted file mode 100644 index d276e93f8b..0000000000 --- a/reference/paradox/functions/px-put-record.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - px_put_record - Stores record into paradox database - - - - &reftitle.description; - - boolpx_put_record - resourcepxdoc - arrayrecord - intrecpos-1 - - - Stores a record into a paradox database. The record is always added at - the end of the database, regardless of any free slots. Use - px_insert_record to add a new record into the first - free slot found in the database. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - record - - - Associated or indexed array containing the field values as e.g. - returned by px_retrieve_record. - - - - - recpos - - - This optional parameter may be used to specify a record number - greater than the current number of records in the database. The - function will add as many empty records as needed. There is hardly - any need for this parameter. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - - diff --git a/reference/paradox/functions/px-retrieve-record.xml b/reference/paradox/functions/px-retrieve-record.xml deleted file mode 100644 index 43e11100b5..0000000000 --- a/reference/paradox/functions/px-retrieve-record.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - px_retrieve_record - Returns record of paradox database - - - - &reftitle.description; - - arraypx_retrieve_record - resourcepxdoc - intnum - intmode0 - - - This function is very similar to px_get_record - but uses internally a different approach to retrieve the data. It - relies on pxlib for reading each single field value, which usually - results in support for more field types. - - - - This function is only available if pxlib >= 0.6.0 is used. - - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - num - - - The record number is an artificial number counting records in the order - as they are stored in the database. The first record has number 0. - - - - - mode - - - The optional mode can be - PX_KEYTOLOWER or PX_KEYTOUPPER - in order to convert the keys into lower or upper case. If - mode is not passed or is 0, then the key will be - exactly like the field name. The element values will contain the field - values. NULL values will be retained and are different from 0.0, 0 or - the empty string. Fields of type PX_FIELD_TIME - will be returned as an integer counting the number of milliseconds - starting at midnight. A timestamp is a floating point value also - counting milliseconds starting at the beginning of julian calendar. - - - - - - - - - &reftitle.returnvalues; - - Returns the num'th record from the paradox - database. The record is returned as an associated array with its keys - being the field names. - - - - - &reftitle.seealso; - - - px_get_record - - - - - - - diff --git a/reference/paradox/functions/px-set-blob-file.xml b/reference/paradox/functions/px-set-blob-file.xml deleted file mode 100644 index 0dd350d85f..0000000000 --- a/reference/paradox/functions/px-set-blob-file.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - px_set_blob_file - Sets the file where blobs are read from - - - - &reftitle.description; - - boolpx_set_blob_file - resourcepxdoc - stringfilename - - - Sets the name of the file where blobs are going to be read from or written - into. Without - calling this function, px_get_record or - px_retrieve_record will only return - data in blob fields if the data is part of the record and not stored in the - blob file. Blob data is stored in the record if it is small enough to fit - in the size of the blob field. - - Calling px_put_record, - px_insert_record, or - px_update_record without calling - px_set_blob_file will result in truncated blob fields - unless the data fits into the database file. - - - Calling this function twice will close the first blob file and open the new - one. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - filename - - - The name of the file. Its extension should be .MB. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - - diff --git a/reference/paradox/functions/px-set-parameter.xml b/reference/paradox/functions/px-set-parameter.xml deleted file mode 100644 index 487bc181fe..0000000000 --- a/reference/paradox/functions/px-set-parameter.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - px_set_parameter - Sets a parameter - - - - &reftitle.description; - - boolpx_set_parameter - resourcepxdoc - stringname - stringvalue - - - Sets various parameters. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - name - - - Depending on the parameter you want to set, name - can be one of the following. - - - - tablename - - - The name of the table as it will be stored in the database header. - - - - - targetencoding - - - The encoding for the output. Data which is being read from - character fields is recoded into the targetencoding. - - - - - inputencoding - - - The encoding of the input data which is to be stored into the - database. - - - - - - - - value - - - The value of parameter to set. For inputencoding and targetencoding - this must be the name of the encoding as understood by iconv or - recode, e.g. iso-8859-1, utf-8, cp850. - - - - - - - - - &reftitle.returnvalues; - &return.success; - - - - &reftitle.seealso; - - - px_get_info to determine the DOS code page. - - - - - - - diff --git a/reference/paradox/functions/px-set-tablename.xml b/reference/paradox/functions/px-set-tablename.xml deleted file mode 100644 index 24d5502eff..0000000000 --- a/reference/paradox/functions/px-set-tablename.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - px_set_tablename - Sets the name of a table (deprecated) - - - - &reftitle.description; - - voidfalsepx_set_tablename - resourcepxdoc - stringname - - - Sets the table name of a paradox database, which was created with - px_create_fp. This function is deprecated use - px_set_parameter instead. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - tablename - - - The name of the table. If it is not set explicitly it will be set - to the name of the database file. - - - - - - - - - &reftitle.returnvalues; - - Returns &null; on success&return.falseforfailure;. - - - - - &reftitle.seealso; - - px_set_parameter - - - - - - diff --git a/reference/paradox/functions/px-set-targetencoding.xml b/reference/paradox/functions/px-set-targetencoding.xml deleted file mode 100644 index 351544943c..0000000000 --- a/reference/paradox/functions/px-set-targetencoding.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - px_set_targetencoding - Sets the encoding for character fields (deprecated) - - - - &reftitle.description; - - boolpx_set_targetencoding - resourcepxdoc - stringencoding - - - Set the encoding for data retrieved from a character field. All character - fields will be recoded to the encoding set by this function. If the - encoding is not set, the character data will be returned in the DOS code - page encoding as specified in the database file. The - encoding can be any string identifier known to - iconv or recode. On Unix systems run iconv -l for - a list of available encodings. - - This function is deprecated and should be replaced by calling - px_set_parameter. - - - See also px_get_info to determine the DOS code page - as stored in the database file. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - encoding - - - The encoding for the output. Data which is being read from - character fields is recoded into the targetencoding. - - - - - - - - - &reftitle.returnvalues; - - Returns &false; if the encoding could not be set, e.g. the encoding is - unknown, or pxlib does not support recoding at all. In the second case a - warning will be issued. - - - - - &reftitle.seealso; - - px_set_parameter - - - - - - diff --git a/reference/paradox/functions/px-set-value.xml b/reference/paradox/functions/px-set-value.xml deleted file mode 100644 index a47a5a104f..0000000000 --- a/reference/paradox/functions/px-set-value.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - px_set_value - Sets a value - - - - &reftitle.description; - - boolpx_set_value - resourcepxdoc - stringname - floatvalue - - - Sets various values. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - name - - - name can be one of the following. - - - numprimkeys - - - The number of primary keys. Paradox databases always use the first - fields for the primary index. - - - - - - - - value - - - - - - - - - - - &reftitle.returnvalues; - &return.success; - - - - &reftitle.seealso; - - px_set_parameter - - - - - - - diff --git a/reference/paradox/functions/px-timestamp2string.xml b/reference/paradox/functions/px-timestamp2string.xml deleted file mode 100644 index e427bcf2e9..0000000000 --- a/reference/paradox/functions/px-timestamp2string.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - px_timestamp2string - - Converts the timestamp into a string - - - - &reftitle.description; - - stringpx_timestamp2string - resourcepxdoc - floatvalue - stringformat - - - - Turns a timestamp as it stored in the paradox file into human readable - format. Paradox timestamps are the number of miliseconds since 0001-01-02. - This function is just for convenience. It can be easily replaced by some - math and the calendar functions as demonstrated in the following example. - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database. - - - - - value - - - Value as stored in paradox database field of type - PX_FIELD_TIME, or PX_FIELD_TIMESTAMP. - - - - - format - - - String format similar to the format used by date. - The placeholders support by this function is a subset of those - supported by date (Y, y, m, n, d, j, H, h, G, g, - i, s, A, a, L). - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - - - - - - &reftitle.examples; - - - Turn a paradox timestamp into a human readable form - - -]]> - - &example.outputs; - - - - - - - - The Julian day count as passed to jdtogregorian - has a different base of 1.1.4714 b.c. and must therefore be calculated - by adding 1721425 to the day count used in the paradox file. Turning the - day count into a timestamp is easily done by multiplying with 86400000.0 - to obtain miliseconds. - - - - - - &reftitle.seealso; - - - px_date2string - jdtogregorian - - - - - - - - diff --git a/reference/paradox/functions/px-update-record.xml b/reference/paradox/functions/px-update-record.xml deleted file mode 100644 index 538efa2118..0000000000 --- a/reference/paradox/functions/px-update-record.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - px_update_record - Updates record in paradox database - - - - &reftitle.description; - - boolpx_update_record - resourcepxdoc - arraydata - intnum - - - - Updates an exiting record in the database. The record starts at 0. - - - The record data is passed as an array of field values. The elements in - the array must correspond to the fields in the database. If the array - has less elements than fields in the database, the remaining fields - will be set to null. - - - - This function is only available if pxlib >= 0.6.0 is used. - - - - - - - &reftitle.parameters; - - - - pxdoc - - - Resource identifier of the paradox database - as returned by px_new. - - - - - data - - - Associated array containing the field values as returned by - px_retrieve_record. - - - - - num - - - The record number is an artificial number counting records in the order - as they are stored in the database. The first record has number 0. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - px_insert_record - - - - - - diff --git a/reference/paradox/reference.xml b/reference/paradox/reference.xml deleted file mode 100644 index 25376c6026..0000000000 --- a/reference/paradox/reference.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - Paradox &Functions; - - - - -
- Object oriented API - - The paradox extension provides also an object oriented API. It consists of - only one class called paradox_db. Its methods only differ from the - functions in its name and of course the missing first parameter. The - following table will list all methods and its equivalent functions. - - - Methods of class paradox_db - - - - Name of method - Equivalent function - - - - - Constructor - px_new - - - Destructor - px_delete - - - open_fp - px_open_fp - - - create_fp - px_create_fp - - - close - px_close - - - numrecords - px_numrecords - - - numfields - px_numfields - - - get_record - px_get_record - - - put_record - px_put_record - - - retrieve_record - px_retrieve_record - - - delete_record - px_delete_record - - - insert_record - px_insert_record - - - update_record - px_update_record - - - get_field - px_get_field - - - get_schema - px_get_schema - - - get_info - px_get_info - - - set_parameter - px_set_parameter - - - get_parameter - px_get_parameter - - - set_value - px_set_value - - - get_value - px_get_value - - - get_info - px_get_info - - - set_targetencoding - px_set_targetencoding - - - set_tablename - px_set_tablename - - - set_blob_file - px_set_blob_file - - - date2string - px_date2string - - - timestamp2string - px_timestamp2string - - - -
-
-
-
- - &reference.paradox.entities.functions; - -
- - diff --git a/reference/paradox/setup.xml b/reference/paradox/setup.xml deleted file mode 100644 index c161ebbbde..0000000000 --- a/reference/paradox/setup.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - &reftitle.setup; - - -
- &reftitle.required; - - You need at least PHP 5.0.0 and pxlib >= 0.4.4 for the basic set - of functions. Some newer functions are only available with pxlib >= - 0.6.0. Reading and writing of encrypted databases requires at least - pxlib >= 0.5.0. The paradox library (pxlib) is available at - &url.paradox.pxlib;. - -
- - - - &reference.paradox.configure; - - - -
- &reftitle.runtime; - &no.config; -
- - - -
- &reftitle.resources; - - px_new creates a new Paradox object required by all - Paradox functions. - -
- - -
- - - diff --git a/reference/paradox/versions.xml b/reference/paradox/versions.xml deleted file mode 100644 index ce82352bfc..0000000000 --- a/reference/paradox/versions.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/reference/parallel/book.xml b/reference/parallel/book.xml index 4231eeea5e..7fddce853a 100644 --- a/reference/parallel/book.xml +++ b/reference/parallel/book.xml @@ -2,6 +2,7 @@ + parallel parallel diff --git a/reference/parallel/functions/parallel.bootstrap.xml b/reference/parallel/functions/parallel.bootstrap.xml index a4cf75ff81..8542f99eb8 100644 --- a/reference/parallel/functions/parallel.bootstrap.xml +++ b/reference/parallel/functions/parallel.bootstrap.xml @@ -18,8 +18,31 @@ - - Exceptions + + &reftitle.parameters; + + + + file + + + Path to the file to bootstrap all runtimes. + + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.errors; Shall throw parallel\Runtime\Error\Bootstrap if previously called for this process. diff --git a/reference/parallel/parallel/events/poll.xml b/reference/parallel/parallel/events/poll.xml index a74b171421..601ce5eb5a 100644 --- a/reference/parallel/parallel/events/poll.xml +++ b/reference/parallel/parallel/events/poll.xml @@ -10,7 +10,7 @@ &reftitle.description; - public Eventnullparallel\Events::poll + public parallel\Events\Eventnullparallel\Events::poll @@ -21,10 +21,10 @@ &reftitle.returnvalues; - Should there be no targets remaining, null shall be returned + Should there be no targets remaining, &null; shall be returned - Should this be a non-blocking loop, and blocking would occur, null shall be returned + Should this be a non-blocking loop, and blocking would occur, &null; shall be returned Otherwise, the parallel\Events\Event returned describes the event. diff --git a/reference/parallel/parallel/events/setblocking.xml b/reference/parallel/parallel/events/setblocking.xml index fa601193b0..1eb3889c7f 100644 --- a/reference/parallel/parallel/events/setblocking.xml +++ b/reference/parallel/parallel/events/setblocking.xml @@ -10,7 +10,7 @@ &reftitle.description; - By default when events are polled for, blocking will occur (at the PHP level) until the first event can be returned: Setting blocking mode to false will cause + By default when events are polled for, blocking will occur (at the PHP level) until the first event can be returned: Setting blocking mode to &false; will cause poll to return control if the first target polled is not ready. @@ -18,7 +18,7 @@ to be raised, which may be extremely slow or wasteful if what is really desired is non-blocking behaviour. - A non-blocking loop effects the return value of parallel\Events::poll, such that it may be null before all events have been processed. + A non-blocking loop effects the return value of parallel\Events::poll, such that it may be &null; before all events have been processed. public voidparallel\Events::setBlocking diff --git a/reference/parallel/parallel/events/settimeout.xml b/reference/parallel/parallel/events/settimeout.xml index 7f3f19b76d..64518bcdc7 100644 --- a/reference/parallel/parallel/events/settimeout.xml +++ b/reference/parallel/parallel/events/settimeout.xml @@ -14,7 +14,7 @@ thrown when the timeout is reached. - This differs from setting blocking mode to false with parallel\Events::setBlocking, which will not cause an exception to be thrown. + This differs from setting blocking mode to &false; with parallel\Events::setBlocking, which will not cause an exception to be thrown. public voidparallel\Events::setTimeout diff --git a/reference/parallel/parallel/input/add.xml b/reference/parallel/parallel/input/add.xml index 3f1e07b9a6..36a6638488 100644 --- a/reference/parallel/parallel/input/add.xml +++ b/reference/parallel/parallel/input/add.xml @@ -28,7 +28,7 @@ - Shall throw parallel\Events\Input\Error\IllegalValue if value is illegal (object, null). + Shall throw parallel\Events\Input\Error\IllegalValue if value is illegal (&object;, &null;). diff --git a/reference/parle/book.xml b/reference/parle/book.xml index ae56798891..22253860e4 100644 --- a/reference/parle/book.xml +++ b/reference/parle/book.xml @@ -2,6 +2,7 @@ + Parsing and lexing Parle diff --git a/reference/password/book.xml b/reference/password/book.xml index f80a3c7687..0a9350679b 100644 --- a/reference/password/book.xml +++ b/reference/password/book.xml @@ -13,12 +13,6 @@ to make it easy to create and manage passwords in a secure manner. - - This extension is available since PHP 5.5.0 but there is also an userland implementation for - PHP >= 5.3.7. - &reference.password.setup; diff --git a/reference/password/constants.xml b/reference/password/constants.xml index 16d6b37158..ea6bfa04c9 100644 --- a/reference/password/constants.xml +++ b/reference/password/constants.xml @@ -80,6 +80,7 @@ threads (int) - Number of threads to use for computing the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_THREADS. + Only available with libargon2, not with libsodium implementation. @@ -111,7 +112,7 @@ - Default amount of memory in bytes that Argon2lib will use while trying to + Default amount of memory in bytes that will be used while trying to compute a hash. @@ -126,7 +127,7 @@ - Default amount of time that Argon2lib will spend trying to compute a hash. + Default amount of time that will be spent trying to compute a hash. Available as of PHP 7.2.0. @@ -141,6 +142,7 @@ Default number of threads that Argon2lib will use. + Not available with libsodium implementation. Available as of PHP 7.2.0. diff --git a/reference/password/functions/password-hash.xml b/reference/password/functions/password-hash.xml index 60e2ce8421..fc6de5b799 100644 --- a/reference/password/functions/password-hash.xml +++ b/reference/password/functions/password-hash.xml @@ -10,10 +10,10 @@ &reftitle.description; - stringfalsepassword_hash + stringpassword_hash stringpassword - mixedalgo - arrayoptions + stringintnullalgo + arrayoptions[] password_hash creates a new password hash using a strong one-way hashing @@ -72,8 +72,9 @@ - The salt option has been deprecated as of PHP 7.0.0. It is now + The salt option is deprecated. It is now preferred to simply use the salt that is generated by default. + As of PHP 8.0.0, an explicitly given salt is ignored. @@ -112,6 +113,11 @@ threads (int) - Number of threads to use for computing the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_THREADS. + + + Only available when PHP uses libargon2, not with libsodium implementation. + + @@ -162,7 +168,7 @@ &reftitle.returnvalues; - Returns the hashed password, &return.falseforfailure;. + Returns the hashed password. The used algorithm, cost and salt are returned as part of the hash. Therefore, @@ -184,6 +190,18 @@ + + 8.0.0 + + password_hash no longer returns &false; on failure. + + + + 8.0.0 + + The algo parameter is nullable now. + + 7.4.0 @@ -191,6 +209,12 @@ &integer;s for backward compatibility. + + 7.4.0 + + The sodium extension provides an alternative implementation for Argon2 passwords. + + 7.3.0 diff --git a/reference/pcntl/constants.xml b/reference/pcntl/constants.xml index d6e9cfb52d..d6a514076b 100644 --- a/reference/pcntl/constants.xml +++ b/reference/pcntl/constants.xml @@ -455,7 +455,7 @@ - Available since PHP 5.3.0. + @@ -466,7 +466,7 @@ - Available since PHP 5.3.0. + @@ -477,7 +477,7 @@ - Available since PHP 5.3.0. + @@ -488,7 +488,7 @@ - Available since PHP 5.3.0. + @@ -499,7 +499,7 @@ - Available since PHP 5.3.0. + @@ -510,7 +510,7 @@ - Available since PHP 5.3.0. + @@ -521,7 +521,7 @@ - Available since PHP 5.3.0. + @@ -532,7 +532,7 @@ - Available since PHP 5.3.0. + @@ -543,7 +543,7 @@ - Available since PHP 5.3.0. + @@ -554,7 +554,7 @@ - Available since PHP 5.3.0. + @@ -565,7 +565,7 @@ - Available since PHP 5.3.0. + @@ -576,7 +576,7 @@ - Available since PHP 5.3.0. + @@ -587,7 +587,7 @@ - Available since PHP 5.3.0. + @@ -598,7 +598,7 @@ - Available since PHP 5.3.0. + @@ -609,7 +609,7 @@ - Available since PHP 5.3.0. + @@ -620,7 +620,7 @@ - Available since PHP 5.3.0. + @@ -631,7 +631,7 @@ - Available since PHP 5.3.0. + @@ -642,7 +642,7 @@ - Available since PHP 5.3.0. + @@ -653,7 +653,7 @@ - Available since PHP 5.3.0. + @@ -664,7 +664,7 @@ - Available since PHP 5.3.0. + @@ -675,7 +675,7 @@ - Available since PHP 5.3.0. + @@ -686,7 +686,7 @@ - Available since PHP 5.3.0. + @@ -697,7 +697,7 @@ - Available since PHP 5.3.0. + @@ -708,7 +708,7 @@ - Available since PHP 5.3.0. + @@ -719,7 +719,7 @@ - Available since PHP 5.3.0. + @@ -730,7 +730,7 @@ - Available since PHP 5.3.0. + @@ -741,7 +741,7 @@ - Available since PHP 5.3.0. + @@ -752,7 +752,7 @@ - Available since PHP 5.3.0. + @@ -763,7 +763,7 @@ - Available since PHP 5.3.0. + @@ -774,7 +774,7 @@ - Available since PHP 5.3.0. + @@ -785,7 +785,7 @@ - Available since PHP 5.3.0. + @@ -796,7 +796,7 @@ - Available since PHP 5.3.0. + @@ -807,7 +807,7 @@ - Available since PHP 5.3.0. + @@ -818,7 +818,7 @@ - Available since PHP 5.3.0. + @@ -829,7 +829,7 @@ - Available since PHP 5.3.0. + @@ -840,7 +840,7 @@ - Available since PHP 5.3.0. + @@ -851,7 +851,7 @@ - Available since PHP 5.3.0. + @@ -862,7 +862,7 @@ - Available since PHP 5.3.0. + @@ -873,7 +873,7 @@ - Available since PHP 5.3.0. + @@ -884,7 +884,7 @@ - Available since PHP 5.3.0. + @@ -895,7 +895,7 @@ - Available since PHP 5.3.0. + @@ -906,7 +906,7 @@ - Available since PHP 5.3.0. + @@ -917,7 +917,7 @@ - Available since PHP 5.3.0. + @@ -928,7 +928,7 @@ - Available since PHP 5.3.0. + @@ -939,7 +939,7 @@ - Available since PHP 5.3.0. + @@ -950,7 +950,7 @@ - Available since PHP 5.3.0. + @@ -961,7 +961,7 @@ - Available since PHP 5.3.0. + diff --git a/reference/pcntl/functions/pcntl-fork.xml b/reference/pcntl/functions/pcntl-fork.xml index 8e4baebe39..2611060ea5 100644 --- a/reference/pcntl/functions/pcntl-fork.xml +++ b/reference/pcntl/functions/pcntl-fork.xml @@ -20,6 +20,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/pcntl/functions/pcntl-signal-dispatch.xml b/reference/pcntl/functions/pcntl-signal-dispatch.xml index 6a4fadf22e..d1c296655d 100644 --- a/reference/pcntl/functions/pcntl-signal-dispatch.xml +++ b/reference/pcntl/functions/pcntl-signal-dispatch.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/pcre/book.xml b/reference/pcre/book.xml index 9ca93e33f6..185b4622d6 100644 --- a/reference/pcre/book.xml +++ b/reference/pcre/book.xml @@ -2,7 +2,7 @@ - + Regular Expressions (Perl-Compatible) PCRE @@ -25,10 +25,6 @@ See Pattern Modifiers. - - PHP also supports regular expressions using a POSIX-extended syntax - using the POSIX-extended regex functions. - This extension maintains a global per-thread cache of compiled regular diff --git a/reference/pcre/functions/preg-last-error.xml b/reference/pcre/functions/preg-last-error.xml index 83f0f184da..c8d9d84735 100644 --- a/reference/pcre/functions/preg-last-error.xml +++ b/reference/pcre/functions/preg-last-error.xml @@ -40,6 +40,11 @@ Backtrack limit was exhausted! + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -54,8 +59,8 @@ Backtrack limit was exhausted! PREG_RECURSION_LIMIT_ERROR (see also pcre.recursion_limit) PREG_BAD_UTF8_ERROR - PREG_BAD_UTF8_OFFSET_ERROR (since PHP 5.3.0) - PREG_JIT_STACKLIMIT_ERROR (since PHP 7.0.0) + PREG_BAD_UTF8_OFFSET_ERROR + PREG_JIT_STACKLIMIT_ERROR diff --git a/reference/pcre/functions/preg-match-all.xml b/reference/pcre/functions/preg-match-all.xml index 43f1ec3b6d..7f20070868 100644 --- a/reference/pcre/functions/preg-match-all.xml +++ b/reference/pcre/functions/preg-match-all.xml @@ -382,8 +382,7 @@ FOO; preg_match_all('/(?P\w+): (?P\d+)/', $str, $matches); -/* This also works in PHP 5.2.2 (PCRE 7.0) and later, however - * the above form is recommended for backwards compatibility */ +/* Alternative */ // preg_match_all('/(?\w+): (?\d+)/', $str, $matches); print_r($matches); diff --git a/reference/pcre/functions/preg-match.xml b/reference/pcre/functions/preg-match.xml index be0b0b7949..3c23c032e0 100644 --- a/reference/pcre/functions/preg-match.xml +++ b/reference/pcre/functions/preg-match.xml @@ -358,8 +358,7 @@ $str = 'foobar: 2008'; preg_match('/(?P\w+): (?P\d+)/', $str, $matches); -/* This also works in PHP 5.2.2 (PCRE 7.0) and later, however - * the above form is recommended for backwards compatibility */ +/* Alternative */ // preg_match('/(?\w+): (?\d+)/', $str, $matches); print_r($matches); diff --git a/reference/pcre/functions/preg-replace.xml b/reference/pcre/functions/preg-replace.xml index 9464f588e3..2e14dfb41a 100644 --- a/reference/pcre/functions/preg-replace.xml +++ b/reference/pcre/functions/preg-replace.xml @@ -145,8 +145,7 @@ &reftitle.errors; - As of PHP 5.5.0 E_DEPRECATED level error is emitted when - passing in the "\e" modifier. As of PHP 7.0.0 using the "\e" modifier is an error; + Using the "\e" modifier is an error; an E_WARNING is emitted in this case. diff --git a/reference/pcre/ini.xml b/reference/pcre/ini.xml index 7b2888cd3f..be3973c551 100644 --- a/reference/pcre/ini.xml +++ b/reference/pcre/ini.xml @@ -20,19 +20,19 @@ pcre.backtrack_limit "1000000" PHP_INI_ALL - Available since PHP 5.2.0. + pcre.recursion_limit "100000" PHP_INI_ALL - Available since PHP 5.2.0. + pcre.jit "1" PHP_INI_ALL - Available since PHP 7.0.0. + diff --git a/reference/pcre/pattern.modifiers.xml b/reference/pcre/pattern.modifiers.xml index 845bc6f322..4984ef5f88 100644 --- a/reference/pcre/pattern.modifiers.xml +++ b/reference/pcre/pattern.modifiers.xml @@ -75,74 +75,6 @@ - - e (PREG_REPLACE_EVAL) - - &warn.deprecated.feature-5-5-0.removed-7-0-0; - - If this deprecated modifier is set, preg_replace - does normal substitution of backreferences in the - replacement string, evaluates it as PHP code, and uses the - result for replacing the search string. - Single quotes, double quotes, backslashes (\) and NULL chars will - be escaped by backslashes in substituted backreferences. - - - - The addslashes function is run on each matched backreference before - the substitution takes place. As such, when the backreference - is used as a quoted string, escaped characters will be converted - to literals. However, characters which are escaped, which would - normally not be converted, will retain their slashes. This makes - use of this modifier very complicated. - - - - - Make sure that replacement constitutes a valid PHP code string, - otherwise PHP will complain about a parse error at the line containing - preg_replace. - - - - - Use of this modifier is discouraged, as it can easily introduce - remote code execution vulnerabilities. To prevent these, the - preg_replace_callback function should be used instead: - - - -(.*?))', - function ($m) { - return "" . strtoupper($m[2]) . ""; - }, - $html -); -]]> - - - - If the above example was written with preg_replace and the e - modifier, the code could be easily exploited by passing in a string such as - <h1>{${eval($_GET[php_code])}}</h1>. This gave - the attacker the ability to execute arbitrary PHP code and as such gave them - nearly complete access to the server. - - - - - Only preg_replace uses this modifier; - it is ignored by other PCRE functions. - - - - A (PCRE_ANCHORED) @@ -238,9 +170,7 @@ $html = preg_replace_callback( treated as UTF-8. An invalid subject will cause the preg_* function to match nothing; an invalid pattern will trigger an error of level E_WARNING. Five and six octet UTF-8 sequences are - regarded as invalid since PHP 5.3.4 (resp. PCRE 7.3 - 2007-08-28); formerly those have been regarded as valid - UTF-8. + regarded as invalid. diff --git a/reference/pcre/pattern.posix.xml b/reference/pcre/pattern.posix.xml deleted file mode 100644 index a7f587d8dd..0000000000 --- a/reference/pcre/pattern.posix.xml +++ /dev/null @@ -1,130 +0,0 @@ - - -
- Differences from POSIX regex - - - As of PHP 5.3.0, the POSIX Regex extension - is deprecated. There are a number of differences between POSIX regex and - PCRE regex. This page lists the most notable ones that are necessary to - know when converting to PCRE. - - - - - - - The PCRE functions require that the pattern is enclosed by delimiters. - - - - - Unlike POSIX, the PCRE extension does not have dedicated functions for - case-insensitive matching. Instead, this is supported using the - i (PCRE_CASELESS) pattern modifier. Other - pattern modifiers are also available for changing the matching strategy. - - - - - The POSIX functions find the longest of the leftmost match, but PCRE - stops on the first valid match. If the string doesn't match at all it - makes no difference, but if it matches it may have dramatic effects on - both the resulting match and the matching speed. - - - To illustrate this difference, consider the following example from - "Mastering Regular Expressions" by Jeffrey Friedl. Using the pattern - one(self)?(selfsufficient)? on the string - oneselfsufficient with PCRE will result in matching - oneself, but using POSIX the result will be the full - string oneselfsufficient. Both (sub)strings match the - original string, but POSIX requires that the longest be the result. - - - - - The POSIX definition of a "character class" differs from that of PCRE. - Simple bracket expressions to match a set of explicit characters are - supported in the form of PCRE - character classes - but POSIX collating elements, character classes and character equivalents - are not supported. - - - Supplying an expression with a character class that both starts and ends - with :, . or = - characters to PCRE is interpreted as an attempt to use one of these - unsupported features and causes a compilation error. - - - - - - - - Function replacements - - - - POSIX - PCRE - - - - - ereg_replace - preg_replace - - - ereg - preg_match - - - eregi_replace - preg_replace - - - eregi - preg_match - - - split - preg_split - - - spliti - preg_split - - - sql_regcase - No equivalent - - - -
-
-
- - diff --git a/reference/pcre/pattern.syntax.xml b/reference/pcre/pattern.syntax.xml index f4c7a204d5..d3c2e1867d 100644 --- a/reference/pcre/pattern.syntax.xml +++ b/reference/pcre/pattern.syntax.xml @@ -461,11 +461,11 @@ \h - any horizontal whitespace character (since PHP 5.2.4) + any horizontal whitespace character \H - any character that is not a horizontal whitespace character (since PHP 5.2.4) + any character that is not a horizontal whitespace character \s @@ -477,11 +477,11 @@ \v - any vertical whitespace character (since PHP 5.2.4) + any vertical whitespace character \V - any character that is not a vertical whitespace character (since PHP 5.2.4) + any character that is not a vertical whitespace character \w @@ -600,12 +600,16 @@ regexp metacharacters in the pattern. For example: \w+\Q.$.\E$ will match one or more word characters, followed by literals .$. and anchored at the end of - the string. + the string. Note that this does not change the behavior of + delimiters; for instance the pattern #\Q#\E#$ + is not valid, because the second # marks the end + of the pattern, and the \E# is interpreted as invalid + modifiers. - \K can be used to reset the match start since - PHP 5.2.4. For example, the pattern foo\Kbar matches + \K can be used to reset the match start. + For example, the pattern foo\Kbar matches "foobar", but reports that it has matched "bar". The use of \K does not interfere with the setting of captured substrings. For example, when the pattern (foo)\Kbar @@ -1277,7 +1281,7 @@ In UTF-8 mode, characters with values greater than 128 do not match any of the POSIX character classes. - As of PHP 5.3.0 and libpcre 8.10 some character classes are changed to use + As of libpcre 8.10 some character classes are changed to use Unicode character properties, in which case the mentioned restriction does not apply. Refer to the PCRE(3) manual for details. @@ -1490,7 +1494,7 @@ It is possible to name a subpattern using the syntax (?P<name>pattern). This subpattern will then be indexed in the matches array by its normal numeric position and - also by name. PHP 5.2.2 introduced two alternative syntaxes + also by name. There are two alternative syntaxes (?<name>pattern) and (?'name'pattern). @@ -1782,7 +1786,7 @@ example above, or by a quantifier with a minimum of zero. - As of PHP 5.2.2, the \g escape sequence can be + The \g escape sequence can be used for absolute and relative referencing of subpatterns. This escape sequence must be followed by an unsigned number or a negative number, optionally enclosed in braces. The sequences \1, @@ -1803,11 +1807,10 @@ Back references to the named subpatterns can be achieved by - (?P=name) or, since PHP 5.2.2, also by - \k<name> or \k'name'. - Additionally PHP 5.2.4 added support for \k{name} - and \g{name}, and PHP 5.2.7 for - \g<name> and \g'name'. + (?P=name), + \k<name>, \k'name', + \k{name}, \g{name}, + \g<name> or \g'name'. @@ -2158,6 +2161,41 @@ introduces a comment that continues up to the next newline character in the pattern. + + + Usage of comments in PCRE pattern + + + + &example.outputs; + + + + +
diff --git a/reference/pcre/pattern.xml b/reference/pcre/pattern.xml index 11316faaea..12d943f95e 100644 --- a/reference/pcre/pattern.xml +++ b/reference/pcre/pattern.xml @@ -7,7 +7,6 @@ &reference.pcre.pattern.syntax; &reference.pcre.pattern.modifiers; &reference.pcre.pattern.differences; - &reference.pcre.pattern.posix; diff --git a/reference/pdo/configure.xml b/reference/pdo/configure.xml index f79707d1d6..ac5bfa6961 100644 --- a/reference/pdo/configure.xml +++ b/reference/pdo/configure.xml @@ -7,7 +7,7 @@ PDO and the PDO_SQLITE driver - is enabled by default as of PHP 5.1.0. You may need + is enabled by default. You may need to enable the PDO driver for your database of choice; consult the documentation for database-specific PDO drivers @@ -42,24 +42,7 @@ extension=pdo.so Windows users - PDO and all the major drivers ship with PHP as shared extensions, and - simply need to be activated by editing the &php.ini; file: - - - - - - - This step is not necessary for PHP 5.3 and above, as a DLL is no longer - required for PDO. - - - - - - Next, choose the other database-specific DLL files and either use + Choose the other database-specific DLL files and either use dl to load them at runtime, or enable them in &php.ini; below php_pdo.dll. For example: diff --git a/reference/pdo/constants.xml b/reference/pdo/constants.xml index 166e5f3257..fb9475d070 100644 --- a/reference/pdo/constants.xml +++ b/reference/pdo/constants.xml @@ -4,12 +4,6 @@ &reftitle.constants; &extension.constants; - - - PDO uses class constants since PHP 5.1. Prior releases use global constants - in the form PDO_PARAM_BOOL. - - @@ -118,6 +112,17 @@ + + + PDO::FETCH_DEFAULT + (int) + + + + Specifies that the default fetch mode shall be used. Available as of PHP 8.0.7. + + + PDO::FETCH_LAZY @@ -303,7 +308,7 @@ Fetch a two-column result into an array where the first column is a key and the second column - is the value. Available since PHP 5.2.3. + is the value. @@ -327,8 +332,7 @@ As PDO::FETCH_INTO but object is provided as a serialized string. - Available since PHP 5.1.0. Since PHP 5.3.0 the class constructor is never called if this - flag is set. + The class constructor is never called if this flag is set. @@ -339,7 +343,7 @@ - Call the constructor before setting properties. Available since PHP 5.2.0. + Call the constructor before setting properties. @@ -595,7 +599,7 @@ if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') { - Available since PHP 5.2.0 + @@ -606,7 +610,7 @@ if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') { - Available since PHP 5.1.3. + diff --git a/reference/pdo/error-handling.xml b/reference/pdo/error-handling.xml index ca4c03c7dd..18c938d75e 100644 --- a/reference/pdo/error-handling.xml +++ b/reference/pdo/error-handling.xml @@ -13,7 +13,7 @@ PDO::ERRMODE_SILENT - This is the default mode. PDO will simply set the error code for you + Prior to PHP 8.0.0, this was the default mode. PDO will simply set the error code for you to inspect using the PDO::errorCode and PDO::errorInfo methods on both the statement and database objects; if the error resulted from a call on a @@ -41,6 +41,7 @@ PDO::ERRMODE_EXCEPTION + As of PHP 8.0.0, this is the default mode. In addition to setting the error code, PDO will throw a PDOException and set its properties to reflect the error code and error diff --git a/reference/pdo/pdo/begintransaction.xml b/reference/pdo/pdo/begintransaction.xml index 589923f1b5..4dcb488efd 100644 --- a/reference/pdo/pdo/begintransaction.xml +++ b/reference/pdo/pdo/begintransaction.xml @@ -31,6 +31,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/pdo/pdo/commit.xml b/reference/pdo/pdo/commit.xml index 9233e7dc2c..e449446381 100644 --- a/reference/pdo/pdo/commit.xml +++ b/reference/pdo/pdo/commit.xml @@ -21,6 +21,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/pdo/pdo/construct.xml b/reference/pdo/pdo/construct.xml index 8b1dab6c57..32f2a4cd62 100644 --- a/reference/pdo/pdo/construct.xml +++ b/reference/pdo/pdo/construct.xml @@ -12,9 +12,9 @@ public PDO::__construct stringdsn - stringusername - stringpasswd - arrayoptions + stringnullusername&null; + stringnullpassword&null; + arraynulloptions&null; Creates a PDO instance to represent a connection to the requested @@ -198,7 +198,6 @@ $dbh = new PDO($dsn, $user, $password); - - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + - + diff --git a/reference/pdo_cubrid/reference.xml b/reference/pdo_cubrid/reference.xml index 1d790bc0b0..3d49b7a490 100644 --- a/reference/pdo_cubrid/reference.xml +++ b/reference/pdo_cubrid/reference.xml @@ -1,7 +1,6 @@ - - + CUBRID Functions (PDO_CUBRID) CUBRID (PDO) diff --git a/reference/pdo_dblib/reference.xml b/reference/pdo_dblib/reference.xml index 0b4c86c75d..f258a29014 100644 --- a/reference/pdo_dblib/reference.xml +++ b/reference/pdo_dblib/reference.xml @@ -16,7 +16,7 @@ Microsoft SQL Server and Sybase databases through the FreeTDS library. - This extension is not available anymore on Windows with PHP 5.3 or later. + This extension is not available anymore on Windows. On Windows, you should use SqlSrv, an alternative driver for MS SQL is diff --git a/reference/pdo_firebird/constants.xml b/reference/pdo_firebird/constants.xml index c22a933cff..3e4a37c2ca 100644 --- a/reference/pdo_firebird/constants.xml +++ b/reference/pdo_firebird/constants.xml @@ -10,9 +10,6 @@ (int) - - Available since PHP 5.3.0. - Sets the date format. @@ -27,9 +24,6 @@ Sets the time format. - - Available since PHP 5.3.0. - @@ -41,9 +35,6 @@ Sets the timestamp format. - - Available since PHP 5.3.0. - diff --git a/reference/pdo_ibm/reference.xml b/reference/pdo_ibm/reference.xml index bb905f6c62..6882bde6fb 100644 --- a/reference/pdo_ibm/reference.xml +++ b/reference/pdo_ibm/reference.xml @@ -1,7 +1,6 @@ - - + IBM Functions (PDO_IBM) IBM (PDO) diff --git a/reference/pdo_informix/reference.xml b/reference/pdo_informix/reference.xml index 41a0c9f03a..b5424e07f3 100644 --- a/reference/pdo_informix/reference.xml +++ b/reference/pdo_informix/reference.xml @@ -1,7 +1,6 @@ - - + Informix Functions (PDO_INFORMIX) Informix (PDO) diff --git a/reference/pdo_mysql/configure.xml b/reference/pdo_mysql/configure.xml index 293c5214e6..92495f00be 100644 --- a/reference/pdo_mysql/configure.xml +++ b/reference/pdo_mysql/configure.xml @@ -27,7 +27,7 @@ When compiling, use to install the PDO MySQL extension, where the optional [=DIR] - is the MySQL base library. As of PHP 5.4, mysqlnd + is the MySQL base library. Mysqlnd is the default library. For details about choosing a library, see Choosing a MySQL library. diff --git a/reference/pdo_mysql/reference.xml b/reference/pdo_mysql/reference.xml index 5ea7006465..90e0fe02dd 100644 --- a/reference/pdo_mysql/reference.xml +++ b/reference/pdo_mysql/reference.xml @@ -48,6 +48,13 @@ commit any pending transactions. + + + The MySQL driver does not properly support PDO::PARAM_INPUT_OUTPUT + via PDOStatement::bindParam; while such parameters can be used, + they are not updated (i.e. the actual output is ignored). + +
&reference.pdo-mysql.configure; &reference.pdo-mysql.constants; diff --git a/reference/pdo_odbc/configure.xml b/reference/pdo_odbc/configure.xml index 1f3fab0df3..3e3e1e9c6a 100644 --- a/reference/pdo_odbc/configure.xml +++ b/reference/pdo_odbc/configure.xml @@ -6,7 +6,7 @@ PDO_ODBC on UNIX systems - As of PHP 5.1, PDO_ODBC is included in the PHP source. You can compile the + PDO_ODBC is included in the PHP source. You can compile the PDO_ODBC extension as either a static or shared module using the following configure commands. diff --git a/reference/pdo_odbc/ini.xml b/reference/pdo_odbc/ini.xml index c5695916ed..570886b93a 100644 --- a/reference/pdo_odbc/ini.xml +++ b/reference/pdo_odbc/ini.xml @@ -20,13 +20,13 @@ pdo_odbc.connection_pooling "strict" PHP_INI_ALL - Available since PHP 5.1.0. + pdo_odbc.db2_instance_name NULL PHP_INI_SYSTEM - Available since PHP 5.1.1. &removed.php.future; + &removed.php.future; diff --git a/reference/pdo_pgsql/PDO/pgsqlGetPid.xml b/reference/pdo_pgsql/PDO/pgsqlGetPid.xml index 3e6daba6fc..8d002356aa 100644 --- a/reference/pdo_pgsql/PDO/pgsqlGetPid.xml +++ b/reference/pdo_pgsql/PDO/pgsqlGetPid.xml @@ -16,6 +16,11 @@
+ + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; @@ -23,7 +28,6 @@
- - + Microsoft SQL Server Functions (PDO_SQLSRV) MS SQL Server (PDO) diff --git a/reference/pgsql/constants.xml b/reference/pgsql/constants.xml index 361ad3d82f..3829a94da0 100644 --- a/reference/pgsql/constants.xml +++ b/reference/pgsql/constants.xml @@ -85,7 +85,7 @@ Passed to pg_connect to create an asynchronous - connection. Added in PHP 5.6.0. + connection. @@ -96,7 +96,7 @@ - Available since PHP 5.6.0. + @@ -107,7 +107,7 @@ - Available since PHP 5.6.0. + @@ -130,7 +130,7 @@ - Available since PHP 5.6.0. + @@ -153,7 +153,7 @@ - Available since PHP 5.6.0. + @@ -164,7 +164,7 @@ - Available since PHP 5.6.0. + @@ -175,7 +175,7 @@ - Available since PHP 5.6.0. + @@ -796,7 +796,6 @@ Apply escape to all parameters instead of calling pg_convert internally. This option omits meta data look up. Query could be as fast as pg_query and pg_send_query. - Available since PHP 5.6.0. @@ -809,7 +808,6 @@ Returned by pg_connect_poll to indicate that the connection attempt failed. - Available since PHP 5.6.0. @@ -822,7 +820,6 @@ Returned by pg_connect_poll to indicate that the connection is waiting for the PostgreSQL socket to be readable. - Available since PHP 5.6.0. @@ -835,7 +832,6 @@ Returned by pg_connect_poll to indicate that the connection is waiting for the PostgreSQL socket to be writable. - Available since PHP 5.6.0. @@ -848,7 +844,6 @@ Returned by pg_connect_poll to indicate that the connection is ready to be used. - Available since PHP 5.6.0. @@ -861,7 +856,6 @@ Returned by pg_connect_poll to indicate that the connection is currently active. - Available since PHP 5.6.0. diff --git a/reference/pgsql/functions/pg-connect.xml b/reference/pgsql/functions/pg-connect.xml index 86252b0c4e..f8d12d5fe9 100644 --- a/reference/pgsql/functions/pg-connect.xml +++ b/reference/pgsql/functions/pg-connect.xml @@ -92,31 +92,6 @@ PostgreSQL connection resource on success, &false; on failure. - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - Support for giving the PGSQL_CONNECT_ASYNC - constant as the connect_type was added. - - - - - - - &reftitle.examples; diff --git a/reference/pgsql/functions/pg-convert.xml b/reference/pgsql/functions/pg-convert.xml index 981894ce7d..77f54f19d1 100644 --- a/reference/pgsql/functions/pg-convert.xml +++ b/reference/pgsql/functions/pg-convert.xml @@ -31,16 +31,10 @@ - Since PHP 5.6.0, it accepts boolean values, converting them to PostgreSQL - booleans. String representations of boolean values are also supported. &null; is + Boolean values are accepted and converted to PostgreSQL booleans. + String representations of boolean values are also supported. &null; is converted to PostgreSQL NULL. - - Prior to PHP 5.6.0, if there are boolean fields in table_name - don't use the constant &true; in assoc_array. It will be - converted to the string 'TRUE' which is not a valid entry for boolean fields - in PostgreSQL. Use one of "t", "true", 1, "y", "yes" instead. - @@ -117,32 +111,6 @@ - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - No longer experimental. Boolean/NULL data types are supported. Unknown/unsupported - data types are escaped without validation. pg_convert can - be used with any data types. - - - - - - - - &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-fetch-all.xml b/reference/pgsql/functions/pg-fetch-all.xml index 46bdf1f8f3..4bf00fc489 100644 --- a/reference/pgsql/functions/pg-fetch-all.xml +++ b/reference/pgsql/functions/pg-fetch-all.xml @@ -50,57 +50,6 @@ other error. - - - &reftitle.examples; - - - PostgreSQL fetch all - - -]]> - - &example.outputs.similar; - - Array - ( - [id] => 1 - [name] => Fred - ) - - [1] => Array - ( - [id] => 2 - [name] => Bob - ) - -) -]]> - - - - &reftitle.changelog; @@ -126,6 +75,57 @@ Array + + &reftitle.examples; + + + PostgreSQL fetch all + + +]]> + + &example.outputs.similar; + + Array + ( + [id] => 1 + [name] => Fred + ) + + [1] => Array + ( + [id] => 2 + [name] => Bob + ) + +) +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-get-notify.xml b/reference/pgsql/functions/pg-get-notify.xml index b0d85046d8..13149dc5e9 100644 --- a/reference/pgsql/functions/pg-get-notify.xml +++ b/reference/pgsql/functions/pg-get-notify.xml @@ -58,7 +58,7 @@ &reftitle.returnvalues; An array containing the NOTIFY message name and backend PID. - As of PHP 5.4.0 and if supported by the server, the array also contains the server version and the payload. + If supported by the server, the array also contains the server version and the payload. Otherwise if no NOTIFY is waiting, then &false; is returned. diff --git a/reference/pgsql/functions/pg-insert.xml b/reference/pgsql/functions/pg-insert.xml index 5406200dbd..7078d99439 100644 --- a/reference/pgsql/functions/pg-insert.xml +++ b/reference/pgsql/functions/pg-insert.xml @@ -125,45 +125,6 @@ - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - Unless PGSQL_DML_STRING is passed, the function - now returns the connection resource instead of &true; on success. - - - - 5.6.0 - - No longer experimental. Added PGSQL_DML_ESCAPE constant, - &true;/&false; and &null; data type support. - - - - 5.5.3/5.4.19 - - Direct SQL injection to table_name and Indirect SQL - injection to identifiers are fixed. - - - - - - - - &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-last-notice.xml b/reference/pgsql/functions/pg-last-notice.xml index 2ce50e5b00..205b9cad7e 100644 --- a/reference/pgsql/functions/pg-last-notice.xml +++ b/reference/pgsql/functions/pg-last-notice.xml @@ -76,34 +76,6 @@ or &false; on error. - - - &reftitle.examples; - - - <function>pg_last_notice</function> example - - -]]> - - &example.outputs; - - - - - - &reftitle.changelog; @@ -129,6 +101,34 @@ CREATE TABLE will create implicit sequence "test_id_seq" for "serial" column "te + + &reftitle.examples; + + + <function>pg_last_notice</function> example + + +]]> + + &example.outputs; + + + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-lo-create.xml b/reference/pgsql/functions/pg-lo-create.xml index f00d82d951..b8c17a827f 100644 --- a/reference/pgsql/functions/pg-lo-create.xml +++ b/reference/pgsql/functions/pg-lo-create.xml @@ -66,7 +66,7 @@ If an object_id is given the function will try to create a large object with this id, else a free object id is assigned by the server. The parameter - was added in PHP 5.3 and relies on functionality that first + relies on functionality that first appeared in PostgreSQL 8.1. diff --git a/reference/pgsql/functions/pg-lo-import.xml b/reference/pgsql/functions/pg-lo-import.xml index 66f17f33d5..6d496e2a66 100644 --- a/reference/pgsql/functions/pg-lo-import.xml +++ b/reference/pgsql/functions/pg-lo-import.xml @@ -62,7 +62,7 @@ If an object_id is given the function will try to create a large object with this id, else a free object id is assigned by the server. The parameter - was added in PHP 5.3 and relies on functionality that first + relies on functionality that first appeared in PostgreSQL 8.1. diff --git a/reference/pgsql/functions/pg-lo-seek.xml b/reference/pgsql/functions/pg-lo-seek.xml index e3a08b15d7..fcd2637ecd 100644 --- a/reference/pgsql/functions/pg-lo-seek.xml +++ b/reference/pgsql/functions/pg-lo-seek.xml @@ -92,31 +92,6 @@ - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - Added PostgreSQL 9.3's 64bit large object support. Both client and server must - support PostgreSQL 9.3 and PHP must be 64bit build to use 64bit large object. - - - - - - - &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-lo-tell.xml b/reference/pgsql/functions/pg-lo-tell.xml index 99100d6abd..56e09ef647 100644 --- a/reference/pgsql/functions/pg-lo-tell.xml +++ b/reference/pgsql/functions/pg-lo-tell.xml @@ -80,31 +80,6 @@ Seek position is: 50000 - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - Added PostgreSQL 9.3's 64bit large object support. Both client and server must - support PostgreSQL 9.3 and PHP must be 64bit build to use 64bit large object. - - - - - - - - &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-lo-truncate.xml b/reference/pgsql/functions/pg-lo-truncate.xml index 44daff83b7..eddf0193ed 100644 --- a/reference/pgsql/functions/pg-lo-truncate.xml +++ b/reference/pgsql/functions/pg-lo-truncate.xml @@ -79,31 +79,6 @@ - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - Added truncate function. It supports PostgreSQL 9.3's 64bit large object. Both client and server must - support PostgreSQL 9.3 and PHP must be 64bit build to use 64bit large object. - - - - - - - &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-meta-data.xml b/reference/pgsql/functions/pg-meta-data.xml index eff3e61921..5cf8817bff 100644 --- a/reference/pgsql/functions/pg-meta-data.xml +++ b/reference/pgsql/functions/pg-meta-data.xml @@ -131,31 +131,6 @@ array(5) { - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - No longer experimental. Added "is enum" as default attribute. - extended flag is added. - - - - - - - - &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-select.xml b/reference/pgsql/functions/pg-select.xml index 9e59dc81ef..98de4cecc0 100644 --- a/reference/pgsql/functions/pg-select.xml +++ b/reference/pgsql/functions/pg-select.xml @@ -100,32 +100,6 @@ - - &reftitle.examples; - - - <function>pg_select</function> example - - -]]> - - - - - &reftitle.changelog; @@ -144,26 +118,38 @@ The result_type parameter was added. - - 5.6.0 - - No longer experimental. Added PGSQL_DML_ESCAPE constant, - &true;/&false; and &null; data type support. - - - - 5.5.3/5.4.19 - - Direct SQL injection to table_name and Indirect SQL - injection to identifiers are fixed. - - + + &reftitle.examples; + + + <function>pg_select</function> example + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-unescape-bytea.xml b/reference/pgsql/functions/pg-unescape-bytea.xml index c9cfdc361b..9e7ec86da2 100644 --- a/reference/pgsql/functions/pg-unescape-bytea.xml +++ b/reference/pgsql/functions/pg-unescape-bytea.xml @@ -86,30 +86,6 @@ - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.5.1 - - A warning is thrown if the input string is invalid. - - - - - - - - &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-update.xml b/reference/pgsql/functions/pg-update.xml index a1a0bd95d4..003fc5dcab 100644 --- a/reference/pgsql/functions/pg-update.xml +++ b/reference/pgsql/functions/pg-update.xml @@ -140,38 +140,6 @@ - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - No longer experimental. Added PGSQL_DML_ESCAPE constant, - &true;/&false; and &null; data type support. - - - - 5.5.3/5.4.19 - - Direct SQL injection to table_name and Indirect - SQL injection to identifiers are fixed. - - - - - - - - &reftitle.seealso; diff --git a/reference/pgsql/ini.xml b/reference/pgsql/ini.xml index b974583408..2dc345d256 100644 --- a/reference/pgsql/ini.xml +++ b/reference/pgsql/ini.xml @@ -38,19 +38,19 @@ pgsql.auto_reset_persistent "0" PHP_INI_SYSTEM - Available since PHP 4.2.0. + pgsql.ignore_notice "0" PHP_INI_ALL - Available since PHP 4.3.0. + pgsql.log_notice "0" PHP_INI_ALL - Available since PHP 4.3.0. + diff --git a/reference/phar/Phar/buildFromIterator.xml b/reference/phar/Phar/buildFromIterator.xml index 61ab754e45..a8247a3987 100644 --- a/reference/phar/Phar/buildFromIterator.xml +++ b/reference/phar/Phar/buildFromIterator.xml @@ -58,6 +58,18 @@ + + &reftitle.errors; + + This method returns UnexpectedValueException when the + iterator returns incorrect values, such as an integer key instead of a + string, a BadMethodCallException when an + SplFileInfo-based iterator is passed without a base_directory + parameter, or a PharException if there were errors + saving the phar archive. + + + &reftitle.examples; @@ -155,20 +167,7 @@ $phar->setStub($phar->createDefaultStub('cli/index.php', 'www/index.php')); - - - &reftitle.errors; - - This method returns UnexpectedValueException when the - iterator returns incorrect values, such as an integer key instead of a - string, a BadMethodCallException when an - SplFileInfo-based iterator is passed without a base_directory - parameter, or a PharException if there were errors - saving the phar archive. - - - - + &reftitle.seealso; diff --git a/reference/phar/Phar/createDefaultStub.xml b/reference/phar/Phar/createDefaultStub.xml index 037e0f474a..e44a2d48ed 100644 --- a/reference/phar/Phar/createDefaultStub.xml +++ b/reference/phar/Phar/createDefaultStub.xml @@ -9,8 +9,8 @@ &reftitle.description; final public static stringPhar::createDefaultStub - stringindexfile - stringwebindexfile + stringindex + stringwebIndex @@ -47,6 +47,31 @@ php myphar.phar + + + &reftitle.parameters; + + + + index + + + Relative path within the phar archive to run if accessed on the command-line + + + + + webIndex + + + Relative path within the phar archive to run if accessed through a web browser + + + + + + + &reftitle.returnvalues; diff --git a/reference/phar/Phar/decompressFiles.xml b/reference/phar/Phar/decompressFiles.xml index 37ce9303a0..690201c57f 100644 --- a/reference/phar/Phar/decompressFiles.xml +++ b/reference/phar/Phar/decompressFiles.xml @@ -32,6 +32,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/Phar/getStub.xml b/reference/phar/Phar/getStub.xml index 6ed34f9ed6..b9aaafcc60 100644 --- a/reference/phar/Phar/getStub.xml +++ b/reference/phar/Phar/getStub.xml @@ -32,6 +32,12 @@ php myphar.phar + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/Phar/isBuffering.xml b/reference/phar/Phar/isBuffering.xml index 1b98636895..5b4a996e8a 100644 --- a/reference/phar/Phar/isBuffering.xml +++ b/reference/phar/Phar/isBuffering.xml @@ -25,6 +25,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/Phar/startBuffering.xml b/reference/phar/Phar/startBuffering.xml index c1f8661572..ceede7ec51 100644 --- a/reference/phar/Phar/startBuffering.xml +++ b/reference/phar/Phar/startBuffering.xml @@ -36,6 +36,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/Phar/stopBuffering.xml b/reference/phar/Phar/stopBuffering.xml index cbb7ea1fab..e347174657 100644 --- a/reference/phar/Phar/stopBuffering.xml +++ b/reference/phar/Phar/stopBuffering.xml @@ -38,6 +38,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/Phar/webPhar.xml b/reference/phar/Phar/webPhar.xml index 9209b3ee3b..87016e8198 100644 --- a/reference/phar/Phar/webPhar.xml +++ b/reference/phar/Phar/webPhar.xml @@ -3,7 +3,7 @@ Phar::webPhar - mapPhar for web-based phars. front controller for web applications + Routes a request from a web browser to an internal file within the phar archive @@ -17,14 +17,13 @@ callablerewrites - Phar::mapPhar for web-based phars. This method parses - $_SERVER['REQUEST_URI'] and routes a request from a web - browser to an internal file within the phar archive. In essence, it simulates - a web server, routing requests to the correct file, echoing the correct headers - and parsing PHP files as needed. This powerful method is part of what makes it easy - to convert an existing PHP application into a phar archive. Combined with - Phar::mungServer and Phar::interceptFileFuncs, - any web application can be used unmodified from a phar archive. + Phar::webPhar serves as Phar::mapPhar for + web-based phars. This method parses $_SERVER['REQUEST_URI'] and + routes a request from a web browser to an internal file within the phar archive. + It simulates a web server, routing requests to the correct file, echoing the correct + headers and parsing PHP files as needed. Combined with Phar::mungServer + and Phar::interceptFileFuncs, any web application can be used + unmodified from a phar archive. Phar::webPhar should only be diff --git a/reference/phar/PharData/buildFromIterator.xml b/reference/phar/PharData/buildFromIterator.xml index 3369faa2b8..c338a9340e 100644 --- a/reference/phar/PharData/buildFromIterator.xml +++ b/reference/phar/PharData/buildFromIterator.xml @@ -21,98 +21,6 @@ parameter is required. - - &reftitle.examples; - - A <function>PharData::buildFromIterator</function> with SplFileInfo - - For most tar/zip archives, the archive will reflect an actual directory layout, and - the second style is the most useful. For instance, to create a tar/zip archive - containing the files in this sample directory layout: - - - - - - - - This code could be used to add these files to the "project.tar" tar archive: - - - - buildFromIterator( - new RecursiveIteratorIterator( - new RecursiveDirectoryIterator('/path/to/project')), - '/path/to/project'); -?> - ]]> - - - - The file project.tar can then be used immediately. PharData::buildFromIterator does not - set values such as compression, metadata, and this can be done after creating the - tar/zip archive. - - - As an interesting note, PharData::buildFromIterator can also be used to - copy the contents of an existing phar, tar or zip archive, as the PharData object descends - from DirectoryIterator: - - - - buildFromIterator( - new RecursiveIteratorIterator( - new Phar('/path/to/anotherphar.phar')), - 'phar:///path/to/anotherphar.phar/path/to/project'); -$phar->setStub($phar->createDefaultStub('cli/index.php', 'www/index.php')); -?> - ]]> - - - - - A <function>PharData::buildFromIterator</function> with other iterators - - The second form of the iterator can be used with any iterator that returns - a key => value mapping, such as an ArrayIterator: - - - - buildFromIterator( - new ArrayIterator( - array( - 'internal/file.php' => dirname(__FILE__) . '/somefile.php', - 'another/file.jpg' => fopen('/path/to/bigfile.jpg', 'rb'), - ))); -?> - ]]> - - - - &reftitle.parameters; @@ -161,6 +69,99 @@ $phar->buildFromIterator( + + &reftitle.examples; + + A <function>PharData::buildFromIterator</function> with SplFileInfo + + For most tar/zip archives, the archive will reflect an actual directory layout, and + the second style is the most useful. For instance, to create a tar/zip archive + containing the files in this sample directory layout: + + + + + + + + This code could be used to add these files to the "project.tar" tar archive: + + + + buildFromIterator( + new RecursiveIteratorIterator( + new RecursiveDirectoryIterator('/path/to/project')), + '/path/to/project'); +?> + ]]> + + + + The file project.tar can then be used immediately. PharData::buildFromIterator does not + set values such as compression, metadata, and this can be done after creating the + tar/zip archive. + + + As an interesting note, PharData::buildFromIterator can also be used to + copy the contents of an existing phar, tar or zip archive, as the PharData object descends + from DirectoryIterator: + + + + buildFromIterator( + new RecursiveIteratorIterator( + new Phar('/path/to/anotherphar.phar')), + 'phar:///path/to/anotherphar.phar/path/to/project'); +$phar->setStub($phar->createDefaultStub('cli/index.php', 'www/index.php')); +?> + ]]> + + + + + A <function>PharData::buildFromIterator</function> with other iterators + + The second form of the iterator can be used with any iterator that returns + a key => value mapping, such as an ArrayIterator: + + + + buildFromIterator( + new ArrayIterator( + array( + 'internal/file.php' => dirname(__FILE__) . '/somefile.php', + 'another/file.jpg' => fopen('/path/to/bigfile.jpg', 'rb'), + ))); +?> + ]]> + + + + + &reftitle.seealso; diff --git a/reference/phar/PharData/decompressFiles.xml b/reference/phar/PharData/decompressFiles.xml index f84c15a2c1..0b57e72925 100644 --- a/reference/phar/PharData/decompressFiles.xml +++ b/reference/phar/PharData/decompressFiles.xml @@ -29,6 +29,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/PharFileInfo/compress.xml b/reference/phar/PharFileInfo/compress.xml index 328a1ccfc9..741b5e2b26 100644 --- a/reference/phar/PharFileInfo/compress.xml +++ b/reference/phar/PharFileInfo/compress.xml @@ -27,6 +27,22 @@ + + &reftitle.parameters; + + + + compression + + + Compression must be Phar::GZ or Phar::BZ2. + + + + + + + &reftitle.returnvalues; diff --git a/reference/phar/PharFileInfo/decompress.xml b/reference/phar/PharFileInfo/decompress.xml index 7e74f0ddf1..aa17d2200b 100644 --- a/reference/phar/PharFileInfo/decompress.xml +++ b/reference/phar/PharFileInfo/decompress.xml @@ -24,6 +24,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/PharFileInfo/getCRC32.xml b/reference/phar/PharFileInfo/getCRC32.xml index adf5cbd7ec..fa3ea2a591 100644 --- a/reference/phar/PharFileInfo/getCRC32.xml +++ b/reference/phar/PharFileInfo/getCRC32.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/PharFileInfo/getCompressedSize.xml b/reference/phar/PharFileInfo/getCompressedSize.xml index 04437259fa..1622dd803a 100644 --- a/reference/phar/PharFileInfo/getCompressedSize.xml +++ b/reference/phar/PharFileInfo/getCompressedSize.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/PharFileInfo/getPharFlags.xml b/reference/phar/PharFileInfo/getPharFlags.xml index f9aacaa6a0..188055139a 100644 --- a/reference/phar/PharFileInfo/getPharFlags.xml +++ b/reference/phar/PharFileInfo/getPharFlags.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/PharFileInfo/isCRCChecked.xml b/reference/phar/PharFileInfo/isCRCChecked.xml index 6471c0bcb5..f1fb3fac45 100644 --- a/reference/phar/PharFileInfo/isCRCChecked.xml +++ b/reference/phar/PharFileInfo/isCRCChecked.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/phar/book.xml b/reference/phar/book.xml index da1c8b3aca..46457ba882 100644 --- a/reference/phar/book.xml +++ b/reference/phar/book.xml @@ -30,7 +30,7 @@ Phar implements this functionality through a Stream Wrapper. Normally, to use an external file within a PHP script, you - would use include + would use include: @@ -137,7 +137,7 @@ If you are using phar applications, there are helpful tips in - How to use Phar Archives + How to use Phar Archives. The word phar is a portmanteau of PHP and diff --git a/reference/phar/fileformat.xml b/reference/phar/fileformat.xml index 310b2a6eca..a855595597 100644 --- a/reference/phar/fileformat.xml +++ b/reference/phar/fileformat.xml @@ -114,7 +114,7 @@ __HALT_COMPILER(); Whole-archive signature validation Yes Yes - Yes (PHP 5.3.1+) + Yes Web-specific application support diff --git a/reference/phar/installation.xml b/reference/phar/installation.xml index 9186e54ccc..7ca6f0e34d 100644 --- a/reference/phar/installation.xml +++ b/reference/phar/installation.xml @@ -3,7 +3,7 @@
&reftitle.install; - The Phar extension is bundled with PHP as of PHP version 5.3.0, and enabled by default. + The Phar extension is bundled with PHP, and enabled by default. To disable Phar support, use . diff --git a/reference/phar/setup.xml b/reference/phar/setup.xml index c9627f6c79..028057a134 100644 --- a/reference/phar/setup.xml +++ b/reference/phar/setup.xml @@ -7,12 +7,6 @@
&reftitle.required; - - Phar requires PHP 5.2.0 or newer. Additional features require the - SPL extension in order to take advantage - of iteration and array access to a Phar's file contents. The phar - stream does not require any additional extensions to function. - You may optionally wish to enable the zlib and bzip2 extensions to take @@ -21,12 +15,7 @@ enabled. - Note that a bug in the zlib.deflate stream filter - fixed in PHP version 5.2.6 and newer may cause truncation of gzip and bzip2-compressed - phar archives. - - - PHP 5.3 configured with --enable-zend-multibyte makes phar dependant on the ini option detect_unicode. + If zend.multibyte is enabled, zend.detect_unicode must be enabled as well.
diff --git a/reference/phar/versions.xml b/reference/phar/versions.xml index cf2fd32e1a..36ef460907 100644 --- a/reference/phar/versions.xml +++ b/reference/phar/versions.xml @@ -5,110 +5,110 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file +--> diff --git a/reference/phpdbg/book.xml b/reference/phpdbg/book.xml index 9f3cdbe3a9..f0e16d465d 100644 --- a/reference/phpdbg/book.xml +++ b/reference/phpdbg/book.xml @@ -2,6 +2,7 @@ + Interactive PHP Debugger phpdbg diff --git a/reference/phpdbg/ini.xml b/reference/phpdbg/ini.xml index c12b18bfbd..0b4933a7ad 100644 --- a/reference/phpdbg/ini.xml +++ b/reference/phpdbg/ini.xml @@ -21,13 +21,13 @@ phpdbg.eol 2 PHP_INI_ALL - Available as of PHP 7.0.0 + phpdbg.path 6 - Available as of PHP 5.6.3 + diff --git a/reference/posix/constants.xml b/reference/posix/constants.xml index 62d227f159..6b3a9e72ce 100644 --- a/reference/posix/constants.xml +++ b/reference/posix/constants.xml @@ -7,8 +7,7 @@ <function>posix_access</function> constants - These constants are available starting with PHP 5.1.0. Please note that - some of them may not be available on your system. + Please note that some of these constants may not be available on every system. @@ -63,8 +62,7 @@ <function>posix_mknod</function> constants - These constants are available starting with PHP 5.1.0. Please note that - some of them may not be available on your system. + Please note that some of them may not be available on your system. @@ -130,8 +128,7 @@ <function>posix_setrlimit</function> constants - These constants are available starting with PHP 7.0.0. Please note that - some of them may not be available on your system. + Please note that some of them may not be available on your system. diff --git a/reference/posix/functions/posix-ctermid.xml b/reference/posix/functions/posix-ctermid.xml index b6ac810d91..366a4c24c6 100644 --- a/reference/posix/functions/posix-ctermid.xml +++ b/reference/posix/functions/posix-ctermid.xml @@ -19,6 +19,11 @@
+ + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-get-last-error.xml b/reference/posix/functions/posix-get-last-error.xml index 3a69abda88..fdeedf495e 100644 --- a/reference/posix/functions/posix-get-last-error.xml +++ b/reference/posix/functions/posix-get-last-error.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-getcwd.xml b/reference/posix/functions/posix-getcwd.xml index 0821c374ec..a8075d19fc 100644 --- a/reference/posix/functions/posix-getcwd.xml +++ b/reference/posix/functions/posix-getcwd.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-getegid.xml b/reference/posix/functions/posix-getegid.xml index 8ca23386d5..ceccdd2ef9 100644 --- a/reference/posix/functions/posix-getegid.xml +++ b/reference/posix/functions/posix-getegid.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-geteuid.xml b/reference/posix/functions/posix-geteuid.xml index e906749bd1..e18c7e0426 100644 --- a/reference/posix/functions/posix-geteuid.xml +++ b/reference/posix/functions/posix-geteuid.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-getgid.xml b/reference/posix/functions/posix-getgid.xml index c3723bb28b..ad1470bc56 100644 --- a/reference/posix/functions/posix-getgid.xml +++ b/reference/posix/functions/posix-getgid.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-getgroups.xml b/reference/posix/functions/posix-getgroups.xml index 22bae36cb0..c77e249b6a 100644 --- a/reference/posix/functions/posix-getgroups.xml +++ b/reference/posix/functions/posix-getgroups.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-getlogin.xml b/reference/posix/functions/posix-getlogin.xml index e502ebd6c7..e5739453fc 100644 --- a/reference/posix/functions/posix-getlogin.xml +++ b/reference/posix/functions/posix-getlogin.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-getpgrp.xml b/reference/posix/functions/posix-getpgrp.xml index fd71ba377a..e5e8762e9d 100644 --- a/reference/posix/functions/posix-getpgrp.xml +++ b/reference/posix/functions/posix-getpgrp.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-getpid.xml b/reference/posix/functions/posix-getpid.xml index 9e04e0526a..1fc430b202 100644 --- a/reference/posix/functions/posix-getpid.xml +++ b/reference/posix/functions/posix-getpid.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-getppid.xml b/reference/posix/functions/posix-getppid.xml index 440a3c4c83..d28ff0764d 100644 --- a/reference/posix/functions/posix-getppid.xml +++ b/reference/posix/functions/posix-getppid.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-getrlimit.xml b/reference/posix/functions/posix-getrlimit.xml index 46c28da64d..961a7d9623 100644 --- a/reference/posix/functions/posix-getrlimit.xml +++ b/reference/posix/functions/posix-getrlimit.xml @@ -19,6 +19,11 @@ &posix.rlimits; + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-getuid.xml b/reference/posix/functions/posix-getuid.xml index 3afe886123..70dc00270a 100644 --- a/reference/posix/functions/posix-getuid.xml +++ b/reference/posix/functions/posix-getuid.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-setsid.xml b/reference/posix/functions/posix-setsid.xml index 334d33bc4d..bf54d2eafb 100644 --- a/reference/posix/functions/posix-setsid.xml +++ b/reference/posix/functions/posix-setsid.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/posix/functions/posix-times.xml b/reference/posix/functions/posix-times.xml index d87c8bf408..917bf0ba25 100644 --- a/reference/posix/functions/posix-times.xml +++ b/reference/posix/functions/posix-times.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; @@ -54,16 +59,6 @@ - - &reftitle.notes; - - - This function isn't reliable to use, it may return negative values for - high times. - - - - &reftitle.examples; @@ -96,6 +91,16 @@ Array + + &reftitle.notes; + + + This function isn't reliable to use, it may return negative values for + high times. + + + + - - - Proctitle - Proctitle - - - &reftitle.intro; - - This extension allows changing the current process', and thread, name on Linux and *BSD - systems. This is useful when using pcntl_fork to identify running - processes in process list - - - - &reference.proctitle.setup; - &reference.proctitle.constants; - &reference.proctitle.reference; - - - - diff --git a/reference/proctitle/configure.xml b/reference/proctitle/configure.xml deleted file mode 100644 index 0cb4bc410b..0000000000 --- a/reference/proctitle/configure.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - -
- &reftitle.install; - - - &pecl.info; - &url.pecl.package;proctitle. - - -
- - - diff --git a/reference/proctitle/constants.xml b/reference/proctitle/constants.xml deleted file mode 100644 index 7ab37de5c2..0000000000 --- a/reference/proctitle/constants.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - &reftitle.constants; - &no.constants; - - - diff --git a/reference/proctitle/functions/setproctitle.xml b/reference/proctitle/functions/setproctitle.xml deleted file mode 100644 index bf0147391a..0000000000 --- a/reference/proctitle/functions/setproctitle.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - setproctitle - Set the process title - - - - &reftitle.description; - - voidsetproctitle - stringtitle - - - Sets the process title of the current process. - - - - - &reftitle.parameters; - - - - title - - - The title to use as the process title. - - - - - - - - - &reftitle.returnvalues; - - &return.void; - - - - - &reftitle.examples; - - <function>setproctitle</function> example - - Running the example below will change the process title (visible with - ps a for example). - - - -]]> - - &example.outputs.similar; - - - - - - - - &reftitle.seealso; - - cli_set_process_title - pcntl_fork - setthreadtitle - - - - - - diff --git a/reference/proctitle/functions/setthreadtitle.xml b/reference/proctitle/functions/setthreadtitle.xml deleted file mode 100644 index c123be24fa..0000000000 --- a/reference/proctitle/functions/setthreadtitle.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - setthreadtitle - Set the thread title - - - - &reftitle.description; - - boolsetthreadtitle - stringtitle - - - Sets the thread title. - - - - - &reftitle.parameters; - - - - title - - - The title to use as the thread title. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - <function>setthreadtitle</function> example - - Running the example below will change the thread title (visible with - ps c for example). - - - -]]> - - &example.outputs.similar; - - - - - - - - &reftitle.seealso; - - pcntl_fork - setproctitle - - - - - - diff --git a/reference/proctitle/reference.xml b/reference/proctitle/reference.xml deleted file mode 100644 index 3cd3662dc5..0000000000 --- a/reference/proctitle/reference.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Proctitle &Functions; - - &reference.proctitle.entities.functions; - - - - diff --git a/reference/proctitle/setup.xml b/reference/proctitle/setup.xml deleted file mode 100644 index 3a12a7da2a..0000000000 --- a/reference/proctitle/setup.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - - Nothing special. - -
- -
- &reftitle.install; - - &pecl.info; - &url.pecl.package;proctitle. - -
- -
- &reftitle.runtime; - &no.config; -
- -
- &reftitle.resources; - &no.resource; -
- -
- - diff --git a/reference/proctitle/versions.xml b/reference/proctitle/versions.xml deleted file mode 100644 index e54b5efd7c..0000000000 --- a/reference/proctitle/versions.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - diff --git a/reference/ps/book.xml b/reference/ps/book.xml index b76c6a8d71..ae6d2cba94 100644 --- a/reference/ps/book.xml +++ b/reference/ps/book.xml @@ -1,9 +1,9 @@ - + PostScript document creation PS diff --git a/reference/pthreads/book.xml b/reference/pthreads/book.xml index 44e6283288..56369e29fb 100644 --- a/reference/pthreads/book.xml +++ b/reference/pthreads/book.xml @@ -2,6 +2,7 @@ + pthreads pthreads diff --git a/reference/pthreads/collectable/isgarbage.xml b/reference/pthreads/collectable/isgarbage.xml index 62f6166089..b5b3c1759c 100644 --- a/reference/pthreads/collectable/isgarbage.xml +++ b/reference/pthreads/collectable/isgarbage.xml @@ -18,6 +18,18 @@ + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Always returns &true; + + + &reftitle.seealso; diff --git a/reference/pthreads/collectable/setgarbage.xml b/reference/pthreads/collectable/setgarbage.xml index f321ca96c0..ef2c92e56a 100644 --- a/reference/pthreads/collectable/setgarbage.xml +++ b/reference/pthreads/collectable/setgarbage.xml @@ -26,6 +26,18 @@ + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.seealso; diff --git a/reference/pthreads/cond/broadcast.xml b/reference/pthreads/cond/broadcast.xml index 22bbbe1fb9..0fdc6c523f 100644 --- a/reference/pthreads/cond/broadcast.xml +++ b/reference/pthreads/cond/broadcast.xml @@ -46,7 +46,7 @@ &reftitle.returnvalues; - A boolean indication of success. + &return.success; diff --git a/reference/pthreads/cond/destroy.xml b/reference/pthreads/cond/destroy.xml index e02183f7cc..848a132cde 100644 --- a/reference/pthreads/cond/destroy.xml +++ b/reference/pthreads/cond/destroy.xml @@ -51,7 +51,7 @@ &reftitle.returnvalues; - A boolean indication of success. + &return.success; diff --git a/reference/pthreads/cond/signal.xml b/reference/pthreads/cond/signal.xml index e26dd87bac..92739ce854 100644 --- a/reference/pthreads/cond/signal.xml +++ b/reference/pthreads/cond/signal.xml @@ -47,7 +47,9 @@ &reftitle.returnvalues; - A boolean indication of success. + + &return.success; + diff --git a/reference/pthreads/cond/wait.xml b/reference/pthreads/cond/wait.xml index 9b9209fa5a..3a4dfad542 100644 --- a/reference/pthreads/cond/wait.xml +++ b/reference/pthreads/cond/wait.xml @@ -65,7 +65,9 @@ &reftitle.returnvalues; - A boolean indication of success. + + &return.success; + diff --git a/reference/pthreads/mutex/destroy.xml b/reference/pthreads/mutex/destroy.xml index e521641320..03d7b52634 100644 --- a/reference/pthreads/mutex/destroy.xml +++ b/reference/pthreads/mutex/destroy.xml @@ -48,7 +48,9 @@ &reftitle.returnvalues; - A boolean indication of success + + &return.success; + diff --git a/reference/pthreads/mutex/lock.xml b/reference/pthreads/mutex/lock.xml index ec59f58c92..5af9b56db3 100644 --- a/reference/pthreads/mutex/lock.xml +++ b/reference/pthreads/mutex/lock.xml @@ -46,7 +46,9 @@ &reftitle.returnvalues; - A boolean indication of success. + + &return.success; + diff --git a/reference/pthreads/mutex/trylock.xml b/reference/pthreads/mutex/trylock.xml index 89b1f82584..477954016f 100644 --- a/reference/pthreads/mutex/trylock.xml +++ b/reference/pthreads/mutex/trylock.xml @@ -46,7 +46,7 @@ &reftitle.returnvalues; - A boolean indication of success. + &return.success; diff --git a/reference/pthreads/mutex/unlock.xml b/reference/pthreads/mutex/unlock.xml index 8fddbfdab0..63bde681f9 100644 --- a/reference/pthreads/mutex/unlock.xml +++ b/reference/pthreads/mutex/unlock.xml @@ -58,7 +58,9 @@ &reftitle.returnvalues; - A boolean indication of success. + + &return.success; + diff --git a/reference/pthreads/pool/resize.xml b/reference/pthreads/pool/resize.xml index 4faa6d3b01..5f99d2d8b9 100644 --- a/reference/pthreads/pool/resize.xml +++ b/reference/pthreads/pool/resize.xml @@ -35,7 +35,7 @@ &reftitle.returnvalues; - void + &return.void; diff --git a/reference/pthreads/pool/shutdown.xml b/reference/pthreads/pool/shutdown.xml index 87028fa947..98067af51b 100644 --- a/reference/pthreads/pool/shutdown.xml +++ b/reference/pthreads/pool/shutdown.xml @@ -27,7 +27,7 @@ &reftitle.returnvalues; - No value is returned. + &return.void; diff --git a/reference/pthreads/thread/isjoined.xml b/reference/pthreads/thread/isjoined.xml index 951de2225d..e97d1d3259 100644 --- a/reference/pthreads/thread/isjoined.xml +++ b/reference/pthreads/thread/isjoined.xml @@ -26,7 +26,7 @@ &reftitle.returnvalues; - A boolean indication of state + &return.success; diff --git a/reference/pthreads/thread/isstarted.xml b/reference/pthreads/thread/isstarted.xml index 5968654b5b..554822d582 100644 --- a/reference/pthreads/thread/isstarted.xml +++ b/reference/pthreads/thread/isstarted.xml @@ -27,7 +27,7 @@ &reftitle.returnvalues; - boolean indication of state + &return.success; diff --git a/reference/pthreads/thread/join.xml b/reference/pthreads/thread/join.xml index 90ec59a8fb..036c80fe2f 100644 --- a/reference/pthreads/thread/join.xml +++ b/reference/pthreads/thread/join.xml @@ -26,7 +26,7 @@ &reftitle.returnvalues; - A boolean indication of success + &return.success; diff --git a/reference/pthreads/thread/kill.xml b/reference/pthreads/thread/kill.xml index a75bd02ee1..2d0329e494 100644 --- a/reference/pthreads/thread/kill.xml +++ b/reference/pthreads/thread/kill.xml @@ -39,7 +39,7 @@ &reftitle.returnvalues; - A boolean indication of success + &return.success; diff --git a/reference/pthreads/thread/start.xml b/reference/pthreads/thread/start.xml index e19e4b5e2b..08b38cb0e3 100644 --- a/reference/pthreads/thread/start.xml +++ b/reference/pthreads/thread/start.xml @@ -35,7 +35,7 @@ &reftitle.returnvalues; - A boolean indication of success + &return.success; diff --git a/reference/pthreads/threaded/extend.xml b/reference/pthreads/threaded/extend.xml index 3d2d986a39..4397e684a7 100644 --- a/reference/pthreads/threaded/extend.xml +++ b/reference/pthreads/threaded/extend.xml @@ -35,7 +35,7 @@ &reftitle.returnvalues; - A boolean indication of success + &return.success; diff --git a/reference/pthreads/threaded/merge.xml b/reference/pthreads/threaded/merge.xml index b6bc630b8c..4438ca86cf 100644 --- a/reference/pthreads/threaded/merge.xml +++ b/reference/pthreads/threaded/merge.xml @@ -44,7 +44,7 @@ &reftitle.returnvalues; - A boolean indication of success + &return.success; diff --git a/reference/pthreads/threaded/notify.xml b/reference/pthreads/threaded/notify.xml index 7d2ff465e4..80a2059529 100644 --- a/reference/pthreads/threaded/notify.xml +++ b/reference/pthreads/threaded/notify.xml @@ -26,7 +26,7 @@ &reftitle.returnvalues; - A boolean indication of success + &return.success; diff --git a/reference/pthreads/threaded/notifyone.xml b/reference/pthreads/threaded/notifyone.xml index 7ece3de824..7901930f03 100644 --- a/reference/pthreads/threaded/notifyone.xml +++ b/reference/pthreads/threaded/notifyone.xml @@ -28,7 +28,7 @@ &reftitle.returnvalues; - A boolean indication of success + &return.success; diff --git a/reference/pthreads/threaded/pop.xml b/reference/pthreads/threaded/pop.xml index cff8d541f5..5b9312dd55 100644 --- a/reference/pthreads/threaded/pop.xml +++ b/reference/pthreads/threaded/pop.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/pthreads/threaded/shift.xml b/reference/pthreads/threaded/shift.xml index 166ad8d841..56193936c0 100644 --- a/reference/pthreads/threaded/shift.xml +++ b/reference/pthreads/threaded/shift.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/pthreads/threaded/unlock.xml b/reference/pthreads/threaded/unlock.xml index e031d163df..7ebea264e3 100644 --- a/reference/pthreads/threaded/unlock.xml +++ b/reference/pthreads/threaded/unlock.xml @@ -35,7 +35,7 @@ &reftitle.returnvalues; - A boolean indication of success + &return.success; diff --git a/reference/pthreads/threaded/wait.xml b/reference/pthreads/threaded/wait.xml index 17ed6d4b17..a604a01dbd 100644 --- a/reference/pthreads/threaded/wait.xml +++ b/reference/pthreads/threaded/wait.xml @@ -35,7 +35,7 @@ &reftitle.returnvalues; - A boolean indication of success + &return.success; diff --git a/reference/pthreads/worker/isworking.xml b/reference/pthreads/worker/isworking.xml index 2f44976a3f..7a6f329ce8 100644 --- a/reference/pthreads/worker/isworking.xml +++ b/reference/pthreads/worker/isworking.xml @@ -36,7 +36,7 @@ &reftitle.returnvalues; - A boolean indication of state + Returns whether the worker is still working or not. diff --git a/reference/pthreads/worker/shutdown.xml b/reference/pthreads/worker/shutdown.xml index 8fe68db80d..0990041f67 100644 --- a/reference/pthreads/worker/shutdown.xml +++ b/reference/pthreads/worker/shutdown.xml @@ -26,7 +26,7 @@ &reftitle.returnvalues; - Whether the worker was successfully shutdown or not. + &return.success; diff --git a/reference/quickhash/book.xml b/reference/quickhash/book.xml deleted file mode 100644 index 3b96e09076..0000000000 --- a/reference/quickhash/book.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - Quickhash - Quickhash - - - &reftitle.intro; - - The quickhash extension contains a set of specific strongly-typed classes - to deal with specific set and hash implementations. - - - - &reference.quickhash.setup; - &reference.quickhash.constants; - &reference.quickhash.examples; - - &reference.quickhash.quickhashintset; - &reference.quickhash.quickhashinthash; - &reference.quickhash.quickhashstringinthash; - &reference.quickhash.quickhashintstringhash; - - - - diff --git a/reference/quickhash/constants.xml b/reference/quickhash/constants.xml deleted file mode 100644 index 4407f951b7..0000000000 --- a/reference/quickhash/constants.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - &reftitle.constants; - &no.constants; - - - - diff --git a/reference/quickhash/examples.xml b/reference/quickhash/examples.xml deleted file mode 100644 index e21c1e6330..0000000000 --- a/reference/quickhash/examples.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - &reftitle.examples; - - Quickhash Example - -add( 1 ); -$set->add( 3 ); - -var_dump( $set->exists( 3 ) ); -var_dump( $set->exists( 4 ) ); - -$set->saveToFile( "/tmp/test-set.set" ); - -$newSet = QuickHashIntSet::loadFromFile( - "/tmp/test-set.set" -); - -var_dump( $newSet->exists( 3 ) ); -var_dump( $newSet->exists( 4 ) ); -?> -]]> - - &example.outputs.similar; - - - - - - Quickhash ArrayAccess Example - - -]]> - - &example.outputs.similar; - - - - - - Quickhash Iterator Example - - $value ) -{ - echo $key, ' => ', $value, "\n"; -} -?> -]]> - - &example.outputs.similar; - - -4234 -4 => 712314 -1 => 145926 -2 => 1415926 -3 => 72 -]]> - - - - Quickhash String Values Example - -add( 2, "one more" ); - -foreach( $hash as $key => $value ) -{ - echo $key, ' => ', $value, "\n"; -} -?> -]]> - - &example.outputs.similar; - - one million four hundred fifteen thousand nine hundred twenty six -2 => one more -]]> - - - - - - diff --git a/reference/quickhash/quickhashinthash.xml b/reference/quickhash/quickhashinthash.xml deleted file mode 100644 index de2912c2c5..0000000000 --- a/reference/quickhash/quickhashinthash.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - The QuickHashIntHash class - QuickHashIntHash - - - - -
- &reftitle.intro; - - This class wraps around a hash containing integer numbers, where the - values are also integer numbers. Hashes are also available as - implementation of the ArrayAccess interface. - - - Hashes can also be iterated over with foreach as the Iterator interface is - implemented as well. The order of which elements are returned in is not - guaranteed. - -
- - -
- &reftitle.classsynopsis; - - - - QuickHashIntHash - - - - - QuickHashIntHash - - - - Constants - - const - int - QuickHashIntHash::CHECK_FOR_DUPES - 1 - - - const - int - QuickHashIntHash::DO_NOT_USE_ZEND_ALLOC - 2 - - - const - int - QuickHashIntHash::HASHER_NO_HASH - 256 - - - const - int - QuickHashIntHash::HASHER_JENKINS1 - 512 - - - const - int - QuickHashIntHash::HASHER_JENKINS2 - 1024 - - - Methods - - - - -
- - -
- &reftitle.constants; - - - - QuickHashIntHash::CHECK_FOR_DUPES - - If enabled, adding duplicate elements to a set (through either add() or - loadFromFile()) will result in those elements to be dropped from the - set. This will take up extra time, so only used when it is required. - - - - - QuickHashIntHash::DO_NOT_USE_ZEND_ALLOC - - Disables the use of PHP's internal memory manager for internal - set structures. With this option enabled, internal allocations will not - count towards the memory_limit settings. - - - - - QuickHashIntHash::HASHER_NO_HASH - - Selects to not use a hashing function, but merely use a modulo to - find the bucket list index. This is not faster than normal hashing, and - gives more collisions. - - - - - QuickHashIntHash::HASHER_JENKINS1 - - This is the default hashing function to turn the integer hashes - into bucket list indexes. - - - - - QuickHashIntHash::HASHER_JENKINS2 - - Selects a variant hashing algorithm. - - - - -
- - - -
- - &reference.quickhash.entities.quickhashinthash; - -
- - diff --git a/reference/quickhash/quickhashinthash/add.xml b/reference/quickhash/quickhashinthash/add.xml deleted file mode 100644 index e0abc73c6c..0000000000 --- a/reference/quickhash/quickhashinthash/add.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - QuickHashIntHash::add - This method adds a new entry to the hash - - - - &reftitle.description; - - public boolQuickHashIntHash::add - intkey - intvalue - - - This method adds a new entry to the hash, and returns whether the entry was - added. Entries are by default always added unless - QuickHashIntHash::CHECK_FOR_DUPES has been passed when the hash was created. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - value - - - The optional value of the entry to add. If no value is specified, - 1 will be used. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was added, and &false; if the entry was not added. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::add</function> example - -exists( 4 ) ); -var_dump( $hash->get( 4 ) ); -var_dump( $hash->add( 4, 22 ) ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->get( 4 ) ); -var_dump( $hash->add( 4, 12 ) ); - -echo "\nwith dupe checking\n"; -$hash = new QuickHashIntHash( 1024, QuickHashIntHash::CHECK_FOR_DUPES ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->get( 4 ) ); -var_dump( $hash->add( 4, 78 ) ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->get( 4 ) ); -var_dump( $hash->add( 4, 9 ) ); - -echo "\ndefault value\n"; -var_dump( $hash->add( 5 ) ); -var_dump( $hash->get( 5 ) ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/construct.xml b/reference/quickhash/quickhashinthash/construct.xml deleted file mode 100644 index a7d19dc45d..0000000000 --- a/reference/quickhash/quickhashinthash/construct.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - QuickHashIntHash::__construct - Creates a new QuickHashIntHash object - - - - &reftitle.description; - - public QuickHashIntHash::__construct - intsize - intoptions - - - This constructor creates a new QuickHashIntHash. The size is the amount of - bucket lists to create. The more lists there are, the less collisions you - will have. Options are also supported. - - - - - &reftitle.parameters; - - - - size - - - The amount of bucket lists to configure. The number you pass in will be - automatically rounded up to the next power of two. It is also - automatically limited from 64 to 4194304. - - - - - options - - - The options that you can pass in are: QuickHashIntHash::CHECK_FOR_DUPES, - which makes sure no duplicate entries are added to the hash; - QuickHashIntHash::DO_NOT_USE_ZEND_ALLOC to not use PHP's internal memory - manager as well as one of QuickHashIntHash::HASHER_NO_HASH, - QuickHashIntHash::HASHER_JENKINS1 or QuickHashIntHash::HASHER_JENKINS2. - These last three configure which hashing algorithm to use. All options - can be combined using bitmasks. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashIntHash object. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::__construct</function> example - - -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/delete.xml b/reference/quickhash/quickhashinthash/delete.xml deleted file mode 100644 index 4ea3f92ea6..0000000000 --- a/reference/quickhash/quickhashinthash/delete.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - QuickHashIntHash::delete - This method deletes am entry from the hash - - - - &reftitle.description; - - public boolQuickHashIntHash::delete - intkey - - - This method deletes an entry from the hash, and returns whether the entry was - deleted or not. Associated memory structures will not be freed immediately, - but rather when the hash itself is freed. - - - Elements can not be deleted when the hash is used in an iterator. The - method will not throw an exception, but simply return &false; like would - happen with any other deletion failure. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to delete. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was deleted, and &false; if the entry was not deleted. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::delete</function> example - -exists( 4 ) ); -var_dump( $hash->add( 4, 5 ) ); -var_dump( $hash->delete( 4 ) ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->delete( 4 ) ); -?>]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/exists.xml b/reference/quickhash/quickhashinthash/exists.xml deleted file mode 100644 index d8a91c37c6..0000000000 --- a/reference/quickhash/quickhashinthash/exists.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - QuickHashIntHash::exists - This method checks whether a key is part of the hash - - - - &reftitle.description; - - public boolQuickHashIntHash::exists - intkey - - - This method checks whether an entry with the provided key exists in the - hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to check for whether it exists in the hash. - - - - - - - - - &reftitle.returnvalues; - - Returns &true; when the entry was found, or &false; when the entry is not - found. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::exists</function> example - -add( $key, 56 ); -} - -echo "Doing 1000 tests: ", microtime( true ), "\n"; -foreach( $testForEntries as $key ) -{ - $foundCount += $hash->exists( $key ); -} -echo "Done, $foundCount found: ", microtime( true ), "\n"; -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/get.xml b/reference/quickhash/quickhashinthash/get.xml deleted file mode 100644 index 75a2f7d3db..0000000000 --- a/reference/quickhash/quickhashinthash/get.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - QuickHashIntHash::get - This method retrieves a value from the hash by its key - - - - &reftitle.description; - - public intQuickHashIntHash::get - intkey - - - This method retrieves a value from the hash by its key. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - - - - - &reftitle.returnvalues; - - The value if the key exists, or &null; if the key wasn't part of the hash. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::get</function> example - -get( 1 ) ); - -var_dump( $hash->add( 2 ) ); -var_dump( $hash->get( 2 ) ); - -var_dump( $hash->add( 3, 5 ) ); -var_dump( $hash->get( 3 ) ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/getsize.xml b/reference/quickhash/quickhashinthash/getsize.xml deleted file mode 100644 index c8722174f3..0000000000 --- a/reference/quickhash/quickhashinthash/getsize.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - QuickHashIntHash::getSize - Returns the number of elements in the hash - - - - &reftitle.description; - - public intQuickHashIntHash::getSize - - - Returns the number of elements in the hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - - - - - &reftitle.returnvalues; - - The number of elements in the hash. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::getSize</function> example - -add( 2 ) ); -var_dump( $hash->add( 3, 5 ) ); -var_dump( $hash->getSize() ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/loadfromfile.xml b/reference/quickhash/quickhashinthash/loadfromfile.xml deleted file mode 100644 index 1768319ee6..0000000000 --- a/reference/quickhash/quickhashinthash/loadfromfile.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - QuickHashIntHash::loadFromFile - This factory method creates a hash from a file - - - - &reftitle.description; - - public static QuickHashIntHashQuickHashIntHash::loadFromFile - stringfilename - intoptions - - - This factory method creates a new hash from a definition file on disk. The - file format consists of a signature 'QH\0x11\0', the number of elements as - a 32 bit signed integer in system Endianness, followed by 32 bit signed - integers packed together in the Endianness that the system that the code - runs on uses. For each hash element there are two 32 bit signed integers - stored. The first of each element is the key, and the second is the value - belonging to the key. An example could be: - - - - QuickHash IntHash file format - - - - - - QuickHash IntHash file format - - - - - - - - &reftitle.parameters; - - - - filename - - - The filename of the file to read the hash from. - - - - - options - - - The same options that the class' constructor takes; except that the size - option is ignored. It is automatically calculated to be the same as the - number of entries in the hash, rounded up to the nearest power of two - with a maximum limit of 4194304. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashIntHash. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::loadFromFile</function> example - -exists( $key ) ? 'set' : 'unset' - ); -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/loadfromstring.xml b/reference/quickhash/quickhashinthash/loadfromstring.xml deleted file mode 100644 index 4f46c3554d..0000000000 --- a/reference/quickhash/quickhashinthash/loadfromstring.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - QuickHashIntHash::loadFromString - This factory method creates a hash from a string - - - - &reftitle.description; - - public static QuickHashIntHashQuickHashIntHash::loadFromString - stringcontents - intoptions - - - This factory method creates a new hash from a definition in a string. The - file format consists of 32 bit signed integers packed together in the - Endianness that the system that the code runs on uses. For each element - there are two 32 bit signed integers stored. The first of each element is - the key, and the second is the value belonging to the key. - - - - - &reftitle.parameters; - - - - contents - - - The string containing a serialized format of the hash. - - - - - options - - - The same options that the class' constructor takes; except that the size - option is ignored. It is automatically calculated to be the same as the - number of entries in the hash, rounded up to the nearest power of two - with a maximum limit of 4194304. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashIntHash. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::loadFromString</function> example - -exists( $key ) ? 'set' : 'unset' - ); -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/savetofile.xml b/reference/quickhash/quickhashinthash/savetofile.xml deleted file mode 100644 index c2d017ca72..0000000000 --- a/reference/quickhash/quickhashinthash/savetofile.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - QuickHashIntHash::saveToFile - This method stores an in-memory hash to disk - - - - &reftitle.description; - - public voidQuickHashIntHash::saveToFile - stringfilename - - - This method stores an existing hash to a file on disk, in the same format - that loadFromFile() can read. - - - - - &reftitle.parameters; - - - - filename - - - The filename of the file to store the hash in. - - - - - - - - - &reftitle.returnvalues; - - &return.void; - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::saveToFile</function> example - -exists( 4 ) ); -var_dump( $hash->add( 4, 43 ) ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->add( 4, 52 ) ); - -$hash->saveToFile( '/tmp/test.hash' ); -?> -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/savetostring.xml b/reference/quickhash/quickhashinthash/savetostring.xml deleted file mode 100644 index fc7bf92863..0000000000 --- a/reference/quickhash/quickhashinthash/savetostring.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - QuickHashIntHash::saveToString - This method returns a serialized version of the hash - - - - &reftitle.description; - - public stringQuickHashIntHash::saveToString - - - This method returns a serialized version of the hash in the same format that - loadFromString() can read. - - - - - &reftitle.returnvalues; - - This method returns a string containing a serialized format of the hash. - Each element is stored as a four byte value in the Endianness that the - current system uses. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::saveToString</function> example - -exists( 4 ) ); -var_dump( $hash->add( 4, 34 ) ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->add( 4, 55 ) ); - -var_dump( $hash->saveToString() ); -?> -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/set.xml b/reference/quickhash/quickhashinthash/set.xml deleted file mode 100644 index cc18e40040..0000000000 --- a/reference/quickhash/quickhashinthash/set.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - QuickHashIntHash::set - This method updates an entry in the hash with a new value, or - adds a new one if the entry doesn't exist - - - - &reftitle.description; - - public boolQuickHashIntHash::set - intkey - intvalue - - - This method tries to update an entry with a new value. In case the entry - did not yet exist, it will instead add a new entry. It returns whether the - entry was added or update. If there are duplicate keys, only the first - found element will get an updated value. Use - QuickHashIntHash::CHECK_FOR_DUPES during hash creation to prevent duplicate - keys from being part of the hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add or update. - - - - - value - - - The new value to set the entry with. - - - - - - - - - &reftitle.returnvalues; - - 2 if the entry was found and updated, 1 if the entry was newly added or 0 - if there was an error. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::set</function> example - -Add\n"; -var_dump( $hash->get( 46692 ) ); -var_dump( $hash->set( 46692, 16091 ) ); -var_dump( $hash->get( 46692 ) ); - -echo "Set->Update\n"; -var_dump( $hash->set( 46692, 29906 ) ); -var_dump( $hash->get( 46692 ) ); -?> -]]> - - &example.outputs.similar; - -Update -int(1) -int(29906) -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashinthash/update.xml b/reference/quickhash/quickhashinthash/update.xml deleted file mode 100644 index 1ccfa361ed..0000000000 --- a/reference/quickhash/quickhashinthash/update.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - QuickHashIntHash::update - This method updates an entry in the hash with a new value - - - - &reftitle.description; - - public boolQuickHashIntHash::update - intkey - intvalue - - - This method updates an entry with a new value, and returns whether the entry was - update. If there are duplicate keys, only the first found element will get - an updated value. Use QuickHashIntHash::CHECK_FOR_DUPES during hash - creation to prevent duplicate keys from being part of the hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - value - - - The new value to update the entry with. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was found and updated, and &false; if the entry was - not part of the hash already. - - - - - &reftitle.examples; - - - <function>QuickHashIntHash::update</function> example - -add( 141421, 173205 ) ); -var_dump( $hash->update( 141421, 223606 ) ); -var_dump( $hash->get( 141421 ) ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintset.xml b/reference/quickhash/quickhashintset.xml deleted file mode 100644 index cdd50463ff..0000000000 --- a/reference/quickhash/quickhashintset.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - The QuickHashIntSet class - QuickHashIntSet - - - - -
- &reftitle.intro; - - This class wraps around a set containing integer numbers. - - - Sets can also be iterated over with foreach as the Iterator interface is - implemented as well. The order of which elements are returned in is not - guaranteed. - -
- - -
- &reftitle.classsynopsis; - - - - QuickHashIntSet - - - - - QuickHashIntSet - - - - Constants - - const - int - QuickHashIntSet::CHECK_FOR_DUPES - 1 - - - const - int - QuickHashIntSet::DO_NOT_USE_ZEND_ALLOC - 2 - - - const - int - QuickHashIntSet::HASHER_NO_HASH - 256 - - - const - int - QuickHashIntSet::HASHER_JENKINS1 - 512 - - - const - int - QuickHashIntSet::HASHER_JENKINS2 - 1024 - - - Methods - - - - -
- - -
- &reftitle.constants; - - - - QuickHashIntSet::CHECK_FOR_DUPES - - If enabled, adding duplicate elements to a set (through either add() or - loadFromFile()) will result in those elements to be dropped from the - set. This will take up extra time, so only used when it is required. - - - - - QuickHashIntSet::DO_NOT_USE_ZEND_ALLOC - - Disables the use of PHP's internal memory manager for internal - set structures. With this option enabled, internal allocations will not - count towards the memory_limit settings. - - - - - QuickHashIntSet::HASHER_NO_HASH - - Selects to not use a hashing function, but merely use a modulo to - find the bucket list index. This is not faster than normal hashing, and - gives more collisions. - - - - - QuickHashIntSet::HASHER_JENKINS1 - - This is the default hashing function to turn the integer hashes - into bucket list indexes. - - - - - QuickHashIntSet::HASHER_JENKINS2 - - Selects a variant hashing algorithm. - - - - -
- - - -
- - &reference.quickhash.entities.quickhashintset; - -
- - diff --git a/reference/quickhash/quickhashintset/add.xml b/reference/quickhash/quickhashintset/add.xml deleted file mode 100644 index 32193ad561..0000000000 --- a/reference/quickhash/quickhashintset/add.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - QuickHashIntSet::add - This method adds a new entry to the set - - - - &reftitle.description; - - public boolQuickHashIntSet::add - intkey - - - This method adds a new entry to the set, and returns whether the entry was - added. Entries are by default always added unless - QuickHashIntSet::CHECK_FOR_DUPES has been passed when the set was created. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was added, and &false; if the entry was not added. - - - - - &reftitle.examples; - - - <function>QuickHashIntSet::add</function> example - -exists( 4 ) ); -var_dump( $set->add( 4 ) ); -var_dump( $set->exists( 4 ) ); -var_dump( $set->add( 4 ) ); - -echo "\nwith dupe checking\n"; -$set = new QuickHashIntSet( 1024, QuickHashIntSet::CHECK_FOR_DUPES ); -var_dump( $set->exists( 4 ) ); -var_dump( $set->add( 4 ) ); -var_dump( $set->exists( 4 ) ); -var_dump( $set->add( 4 ) ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintset/construct.xml b/reference/quickhash/quickhashintset/construct.xml deleted file mode 100644 index f90a56bd59..0000000000 --- a/reference/quickhash/quickhashintset/construct.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - QuickHashIntSet::__construct - Creates a new QuickHashIntSet object - - - - &reftitle.description; - - public QuickHashIntSet::__construct - intsize - intoptions - - - This constructor creates a new QuickHashIntSet. The size is the amount of - bucket lists to create. The more lists there are, the less collisions you - will have. Options are also supported. - - - - - &reftitle.parameters; - - - - size - - - The amount of bucket lists to configure. The number you pass in will be - automatically rounded up to the next power of two. It is also - automatically limited from 4 to 4194304. - - - - - options - - - The options that you can pass in are: QuickHashIntSet::CHECK_FOR_DUPES, - which makes sure no duplicate entries are added to the set; - QuickHashIntSet::DO_NOT_USE_ZEND_ALLOC to not use PHP's internal memory - manager as well as one of QuickHashIntSet::HASHER_NO_HASH, - QuickHashIntSet::HASHER_JENKINS1 or QuickHashIntSet::HASHER_JENKINS2. - These last three configure which hashing algorithm to use. All options - can be combined using bitmasks. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashIntSet object. - - - - - &reftitle.examples; - - - <function>QuickHashIntSet::__construct</function> example - - -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashintset/delete.xml b/reference/quickhash/quickhashintset/delete.xml deleted file mode 100644 index 0edd3cb9e4..0000000000 --- a/reference/quickhash/quickhashintset/delete.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - QuickHashIntSet::delete - This method deletes an entry from the set - - - - &reftitle.description; - - public boolQuickHashIntSet::delete - intkey - - - This method deletes an entry from the set, and returns whether the entry was - deleted or not. Associated memory structures will not be freed immediately, - but rather when the set itself is freed. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to delete. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was deleted, and &false; if the entry was not deleted. - - - - - &reftitle.examples; - - - <function>QuickHashIntSet::delete</function> example - -exists( 4 ) ); -var_dump( $set->add( 4 ) ); -var_dump( $set->delete( 4 ) ); -var_dump( $set->exists( 4 ) ); -var_dump( $set->delete( 4 ) ); -?>]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintset/exists.xml b/reference/quickhash/quickhashintset/exists.xml deleted file mode 100644 index a9b6082347..0000000000 --- a/reference/quickhash/quickhashintset/exists.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - QuickHashIntSet::exists - This method checks whether a key is part of the set - - - - &reftitle.description; - - public boolQuickHashIntSet::exists - intkey - - - This method checks whether an entry with the provided key exists in the - set. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to check for whether it exists in the set. - - - - - - - - - &reftitle.returnvalues; - - Returns &true; when the entry was found, or &false; when the entry is not - found. - - - - - &reftitle.examples; - - - <function>QuickHashIntSet::exists</function> example - -add( $key ); -} - -echo "Doing 1000 tests: ", microtime( true ), "\n"; -foreach( $testForEntries as $key ) -{ - $foundCount += $set->exists( $key ); -} -echo "Done, $foundCount found: ", microtime( true ), "\n"; -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintset/getsize.xml b/reference/quickhash/quickhashintset/getsize.xml deleted file mode 100644 index 7078319681..0000000000 --- a/reference/quickhash/quickhashintset/getsize.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - QuickHashIntSet::getSize - Returns the number of elements in the set - - - - &reftitle.description; - - publicintQuickHashIntSet::getSize - - - Returns the number of elements in the set. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - - - - - &reftitle.returnvalues; - - The number of elements in the set. - - - - - &reftitle.examples; - - - <function>QuickHashIntSet::getSize</function> example - -add( 2 ) ); -var_dump( $set->add( 3 ) ); -var_dump( $set->getSize() ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintset/loadfromfile.xml b/reference/quickhash/quickhashintset/loadfromfile.xml deleted file mode 100644 index 21b137c82c..0000000000 --- a/reference/quickhash/quickhashintset/loadfromfile.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - QuickHashIntSet::loadFromFile - This factory method creates a set from a file - - - - &reftitle.description; - - public static QuickHashIntSetQuickHashIntSet::loadFromFile - stringfilename - intsize - intoptions - - - This factory method creates a new set from a definition file on disk. The - file format consists of 32 bit signed integers packed together in the - Endianness that the system that the code runs on uses. - - - - - &reftitle.parameters; - - - - filename - - - The filename of the file to read the set from. - - - - - size - - - The amount of bucket lists to configure. The number you pass in will be - automatically rounded up to the next power of two. It is also - automatically limited from 4 to 4194304. - - - - - options - - - The same options that the class' constructor takes; except that the size - option is ignored. It is automatically calculated to be the same as the - number of entries in the set, rounded up to the nearest power of two - with a maximum limit of 4194304. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashIntSet. - - - - - &reftitle.examples; - - - <function>QuickHashIntSet::loadFromFile</function> example - -exists( $key ) ? 'set' : 'unset' - ); -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintset/loadfromstring.xml b/reference/quickhash/quickhashintset/loadfromstring.xml deleted file mode 100644 index 76ac082f27..0000000000 --- a/reference/quickhash/quickhashintset/loadfromstring.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - QuickHashIntSet::loadFromString - This factory method creates a set from a string - - - - &reftitle.description; - - public static QuickHashIntSetQuickHashIntSet::loadFromString - stringcontents - intsize - intoptions - - - This factory method creates a new set from a definition in a string. The - file format consists of 32 bit signed integers packed together in the - Endianness that the system that the code runs on uses. - - - - - &reftitle.parameters; - - - - contents - - - The string containing a serialized format of the set. - - - - - size - - - The amount of bucket lists to configure. The number you pass in will be - automatically rounded up to the next power of two. It is also - automatically limited from 4 to 4194304. - - - - - options - - - The same options that the class' constructor takes; except that the size - option is ignored. It is automatically calculated to be the same as the - number of entries in the set, rounded up to the nearest power of two - automatically limited from 64 to 4194304. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashIntSet. - - - - - &reftitle.examples; - - - <function>QuickHashIntSet::loadFromString</function> example - -exists( $key ) ? 'set' : 'unset' - ); -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintset/savetofile.xml b/reference/quickhash/quickhashintset/savetofile.xml deleted file mode 100644 index fc1fb46356..0000000000 --- a/reference/quickhash/quickhashintset/savetofile.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - QuickHashIntSet::saveToFile - This method stores an in-memory set to disk - - - - &reftitle.description; - - public voidQuickHashIntSet::saveToFile - stringfilename - - - This method stores an existing set to a file on disk, in the same format - that loadFromFile() can read. - - - - - &reftitle.parameters; - - - - filename - - - The filename of the file to store the hash in. - - - - - - - - - &reftitle.returnvalues; - - &return.void; - - - - - &reftitle.examples; - - - <function>QuickHashIntSet::saveToFile</function> example - -exists( 4 ) ); -var_dump( $set->add( 4 ) ); -var_dump( $set->exists( 4 ) ); -var_dump( $set->add( 4 ) ); - -$set->saveToFile( '/tmp/test.set' ); -?> -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashintset/savetostring.xml b/reference/quickhash/quickhashintset/savetostring.xml deleted file mode 100644 index f6b985d8ab..0000000000 --- a/reference/quickhash/quickhashintset/savetostring.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - QuickHashIntSet::saveToString - This method returns a serialized version of the set - - - - &reftitle.description; - - public stringQuickHashIntSet::saveToString - - - This method returns a serialized version of the set in the same format that - loadFromString() can read. - - - - - &reftitle.returnvalues; - - This method returns a string containing a serialized format of the set. - Each element is stored as a four byte value in the Endianness that the - current system uses. - - - - - &reftitle.examples; - - - <function>QuickHashIntSet::saveToString</function> example - -exists( 4 ) ); -var_dump( $set->add( 4 ) ); -var_dump( $set->exists( 4 ) ); -var_dump( $set->add( 4 ) ); - -var_dump( $set->saveToString() ); -?> -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash.xml b/reference/quickhash/quickhashintstringhash.xml deleted file mode 100644 index 2dc4a5ed5e..0000000000 --- a/reference/quickhash/quickhashintstringhash.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - The QuickHashIntStringHash class - QuickHashIntStringHash - - - - -
- &reftitle.intro; - - This class wraps around a hash containing integer numbers, where the - values are strings. Hashes are also available as implementation of the - ArrayAccess interface. - - - Hashes can also be iterated over with foreach as the Iterator interface is - implemented as well. The order of which elements are returned in is not - guaranteed. - -
- - -
- &reftitle.classsynopsis; - - - - QuickHashIntStringHash - - - - - QuickHashIntStringHash - - - - Constants - - const - int - QuickHashIntStringHash::CHECK_FOR_DUPES - 1 - - - const - int - QuickHashIntStringHash::DO_NOT_USE_ZEND_ALLOC - 2 - - - const - int - QuickHashIntStringHash::HASHER_NO_HASH - 256 - - - const - int - QuickHashIntStringHash::HASHER_JENKINS1 - 512 - - - const - int - QuickHashIntStringHash::HASHER_JENKINS2 - 1024 - - - Methods - - - - -
- - -
- &reftitle.constants; - - - - QuickHashIntStringHash::CHECK_FOR_DUPES - - If enabled, adding duplicate elements to a set (through either add() or - loadFromFile()) will result in those elements to be dropped from the - set. This will take up extra time, so only used when it is required. - - - - - QuickHashIntStringHash::DO_NOT_USE_ZEND_ALLOC - - Disables the use of PHP's internal memory manager for internal - set structures. With this option enabled, internal allocations will not - count towards the memory_limit settings. - - - - - QuickHashIntStringHash::HASHER_NO_HASH - - Selects to not use a hashing function, but merely use a modulo to - find the bucket list index. This is not faster than normal hashing, and - gives more collisions. - - - - - QuickHashIntStringHash::HASHER_JENKINS1 - - This is the default hashing function to turn the integer hashes - into bucket list indexes. - - - - - QuickHashIntStringHash::HASHER_JENKINS2 - - Selects a variant hashing algorithm. - - - - -
- - - -
- - &reference.quickhash.entities.quickhashintstringhash; - -
- - diff --git a/reference/quickhash/quickhashintstringhash/add.xml b/reference/quickhash/quickhashintstringhash/add.xml deleted file mode 100644 index f0239cab51..0000000000 --- a/reference/quickhash/quickhashintstringhash/add.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - QuickHashIntStringHash::add - This method adds a new entry to the hash - - - - &reftitle.description; - - public boolQuickHashIntStringHash::add - intkey - stringvalue - - - This method adds a new entry to the hash, and returns whether the entry was - added. Entries are by default always added unless - QuickHashIntStringHash::CHECK_FOR_DUPES has been passed when the hash was created. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - value - - - The value of the entry to add. If a non-string is passed, it will be - converted to a string automatically if possible. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was added, and &false; if the entry was not added. - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::add</function> example - -exists( 4 ) ); -var_dump( $hash->get( 4 ) ); -var_dump( $hash->add( 4, "twenty two" ) ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->get( 4 ) ); -var_dump( $hash->add( 4, "twelve" ) ); - -echo "\nwith dupe checking\n"; -$hash = new QuickHashIntStringHash( 1024, QuickHashIntStringHash::CHECK_FOR_DUPES ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->get( 4 ) ); -var_dump( $hash->add( 4, "seventy eight" ) ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->get( 4 ) ); -var_dump( $hash->add( 4, "nine" ) ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/construct.xml b/reference/quickhash/quickhashintstringhash/construct.xml deleted file mode 100644 index 44b7c50421..0000000000 --- a/reference/quickhash/quickhashintstringhash/construct.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - QuickHashIntStringHash::__construct - Creates a new QuickHashIntStringHash object - - - - &reftitle.description; - - public QuickHashIntStringHash::__construct - intsize - intoptions0 - - - This constructor creates a new QuickHashIntStringHash. The size is the amount of - bucket lists to create. The more lists there are, the less collisions you - will have. Options are also supported. - - - - - &reftitle.parameters; - - - - size - - - The amount of bucket lists to configure. The number you pass in will be - automatically rounded up to the next power of two. It is also - automatically limited from 64 to 4194304. - - - - - options - - - The options that you can pass in are: QuickHashIntStringHash::CHECK_FOR_DUPES, - which makes sure no duplicate entries are added to the hash; - QuickHashIntStringHash::DO_NOT_USE_ZEND_ALLOC to not use PHP's internal memory - manager as well as one of QuickHashIntStringHash::HASHER_NO_HASH, - QuickHashIntStringHash::HASHER_JENKINS1 or QuickHashIntStringHash::HASHER_JENKINS2. - These last three configure which hashing algorithm to use. All options - can be combined using bitmasks. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashIntStringHash object. - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::__construct</function> example - - -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/delete.xml b/reference/quickhash/quickhashintstringhash/delete.xml deleted file mode 100644 index 73f784f477..0000000000 --- a/reference/quickhash/quickhashintstringhash/delete.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - QuickHashIntStringHash::delete - This method deletes am entry from the hash - - - - &reftitle.description; - - public boolQuickHashIntStringHash::delete - intkey - - - This method deletes an entry from the hash, and returns whether the entry was - deleted or not. Associated memory structures will not be freed immediately, - but rather when the hash itself is freed. - - - Elements can not be deleted when the hash is used in an iterator. The - method will not throw an exception, but simply return &false; like would - happen with any other deletion failure. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to delete. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was deleted, and &false; if the entry was not deleted. - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::delete</function> example - -exists( 4 ) ); -var_dump( $hash->add( 4, "five" ) ); -var_dump( $hash->delete( 4 ) ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->delete( 4 ) ); -?>]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/exists.xml b/reference/quickhash/quickhashintstringhash/exists.xml deleted file mode 100644 index d46833bbb3..0000000000 --- a/reference/quickhash/quickhashintstringhash/exists.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - QuickHashIntStringHash::exists - This method checks whether a key is part of the hash - - - - &reftitle.description; - - public boolQuickHashIntStringHash::exists - intkey - - - This method checks whether an entry with the provided key exists in the - hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to check for whether it exists in the hash. - - - - - - - - - &reftitle.returnvalues; - - Returns &true; when the entry was found, or &false; when the entry is not - found. - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/get.xml b/reference/quickhash/quickhashintstringhash/get.xml deleted file mode 100644 index 5945335f37..0000000000 --- a/reference/quickhash/quickhashintstringhash/get.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - QuickHashIntStringHash::get - This method retrieves a value from the hash by its key - - - - &reftitle.description; - - public mixedQuickHashIntStringHash::get - intkey - - - This method retrieves a value from the hash by its key. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - - - - - &reftitle.returnvalues; - - The value if the key exists, or &null; if the key wasn't part of the hash. - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::get</function> example - -get( 1 ) ); - -var_dump( $hash->add( 2, "two" ) ); -var_dump( $hash->get( 2 ) ); - -var_dump( $hash->add( 3, 5 ) ); -var_dump( $hash->get( 3 ) ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/getsize.xml b/reference/quickhash/quickhashintstringhash/getsize.xml deleted file mode 100644 index 1de848c82c..0000000000 --- a/reference/quickhash/quickhashintstringhash/getsize.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - QuickHashIntStringHash::getSize - Returns the number of elements in the hash - - - - &reftitle.description; - - public intQuickHashIntStringHash::getSize - - - Returns the number of elements in the hash. - - - - - &reftitle.returnvalues; - - The number of elements in the hash. - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::getSize</function> example - -add( 2, "two" ) ); -var_dump( $hash->add( 3, 5 ) ); -var_dump( $hash->getSize() ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/loadfromfile.xml b/reference/quickhash/quickhashintstringhash/loadfromfile.xml deleted file mode 100644 index 34f26edf21..0000000000 --- a/reference/quickhash/quickhashintstringhash/loadfromfile.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - QuickHashIntStringHash::loadFromFile - This factory method creates a hash from a file - - - - &reftitle.description; - - public static QuickHashIntStringHashQuickHashIntStringHash::loadFromFile - stringfilename - intsize0 - intoptions0 - - - This factory method creates a new hash from a definition file on disk. The - file format consists of a signature 'QH\0x12\0', the number of elements as - a 32 bit signed integer in system Endianness, an unsigned 32 bit integer - containing the number of element data to follow in characters. This element - data contains all the strings. After the header and the strings, the - elements follow in pairs of two unsigned 32 bit integers where the first - one is the key, and the second one the index in the element data - string. An example could be: - - - - QuickHash IntString file format - - - - - - QuickHash IntString file format - - - - - - - &reftitle.parameters; - - - - filename - - - The filename of the file to read the hash from. - - - - - size - - - The amount of bucket lists to configure. The number you pass in will be - automatically rounded up to the next power of two. It is also - automatically limited from 4 to 4194304. - - - - - options - - - The same options that the class' constructor takes; except that the size - option is ignored. It is automatically calculated to be the same as the - number of entries in the hash, rounded up to the nearest power of two - with a maximum limit of 4194304. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashIntStringHash. - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::loadFromFile</function> example - -exists( $key ) ? 'set' : 'unset' - ); -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/loadfromstring.xml b/reference/quickhash/quickhashintstringhash/loadfromstring.xml deleted file mode 100644 index 4e9cd98eea..0000000000 --- a/reference/quickhash/quickhashintstringhash/loadfromstring.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - QuickHashIntStringHash::loadFromString - This factory method creates a hash from a string - - - - &reftitle.description; - - public static QuickHashIntStringHashQuickHashIntStringHash::loadFromString - stringcontents - intsize0 - intoptions0 - - - This factory method creates a new hash from a definition in a string. The - format is the same as the one used in "loadFromFile". - - - - - &reftitle.parameters; - - - - contents - - - The string containing a serialized format of the hash. - - - - - size - - - The amount of bucket lists to configure. The number you pass in will be - automatically rounded up to the next power of two. It is also - automatically limited from 4 to 4194304. - - - - - options - - - The same options that the class' constructor takes; except that the size - option is ignored. It is automatically calculated to be the same as the - number of entries in the hash, rounded up to the nearest power of two - with a maximum limit of 4194304. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashIntStringHash. - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::loadFromString</function> example - -exists( $key ) ? 'set' : 'unset' - ); -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/savetofile.xml b/reference/quickhash/quickhashintstringhash/savetofile.xml deleted file mode 100644 index d2eaf036b9..0000000000 --- a/reference/quickhash/quickhashintstringhash/savetofile.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - QuickHashIntStringHash::saveToFile - This method stores an in-memory hash to disk - - - - &reftitle.description; - - public voidQuickHashIntStringHash::saveToFile - stringfilename - - - This method stores an existing hash to a file on disk, in the same format - that loadFromFile() can read. - - - - - &reftitle.parameters; - - - - filename - - - The filename of the file to store the hash in. - - - - - - - - - &reftitle.returnvalues; - - &return.void; - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::saveToFile</function> example - -exists( 4 ) ); -var_dump( $hash->add( 4, "fourty three" ) ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->add( 4, "fifty two" ) ); - -$hash->saveToFile( '/tmp/test.string.hash' ); -?> -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/savetostring.xml b/reference/quickhash/quickhashintstringhash/savetostring.xml deleted file mode 100644 index c20d511f41..0000000000 --- a/reference/quickhash/quickhashintstringhash/savetostring.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - QuickHashIntStringHash::saveToString - This method returns a serialized version of the hash - - - - &reftitle.description; - - public stringQuickHashIntStringHash::saveToString - - - This method returns a serialized version of the hash in the same format that - loadFromString() can read. - - - - - &reftitle.returnvalues; - - This method returns a string containing a serialized format of the hash. - Each element is stored as a four byte value in the Endianness that the - current system uses. - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::saveToString</function> example - -exists( 4 ) ); -var_dump( $hash->add( 4, "thirty four" ) ); -var_dump( $hash->exists( 4 ) ); -var_dump( $hash->add( 5, "fifty five" ) ); - -var_dump( $hash->saveToString() ); -?> -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/set.xml b/reference/quickhash/quickhashintstringhash/set.xml deleted file mode 100644 index 5b4d9f45a9..0000000000 --- a/reference/quickhash/quickhashintstringhash/set.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - QuickHashIntStringHash::set - This method updates an entry in the hash with a new value, or - adds a new one if the entry doesn't exist - - - - &reftitle.description; - - public intQuickHashIntStringHash::set - intkey - stringvalue - - - This method tries to update an entry with a new value. In case the entry - did not yet exist, it will instead add a new entry. It returns whether the - entry was added or update. If there are duplicate keys, only the first - found element will get an updated value. Use - QuickHashIntStringHash::CHECK_FOR_DUPES during hash creation to prevent duplicate - keys from being part of the hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add or update. - - - - - value - - - The value of the entry to add. If a non-string is passed, it will be - converted to a string automatically if possible. - - - - - - - - - &reftitle.returnvalues; - - 2 if the entry was found and updated, 1 if the entry was newly added or 0 - if there was an error. - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::set</function> example - -Add\n"; -var_dump( $hash->get( 46692 ) ); -var_dump( $hash->set( 46692, "sixteen thousand ninety one" ) ); -var_dump( $hash->get( 46692 ) ); - -echo "Set->Update\n"; -var_dump( $hash->set( 46692, "twenty nine thousand nine hundred six" ) ); -var_dump( $hash->get( 46692 ) ); -?> -]]> - - &example.outputs.similar; - -Add -bool(false) -int(2) -string(27) "sixteen thousand ninety one" -Set->Update -int(1) -string(37) "twenty nine thousand nine hundred six" -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashintstringhash/update.xml b/reference/quickhash/quickhashintstringhash/update.xml deleted file mode 100644 index e02d1fff7e..0000000000 --- a/reference/quickhash/quickhashintstringhash/update.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - QuickHashIntStringHash::update - This method updates an entry in the hash with a new value - - - - &reftitle.description; - - public boolQuickHashIntStringHash::update - intkey - stringvalue - - - This method updates an entry with a new value, and returns whether the entry was - update. If there are duplicate keys, only the first found element will get - an updated value. Use QuickHashIntStringHash::CHECK_FOR_DUPES during hash - creation to prevent duplicate keys from being part of the hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - value - - - The new value for the entry. If a non-string is passed, it will be - converted to a string automatically if possible. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was found and updated, and &false; if the entry was - not part of the hash already. - - - - - &reftitle.examples; - - - <function>QuickHashIntStringHash::update</function> example - -add( 161803398, "--" ); -$hash->add( 314159265, "a lot" ); - -echo $hash->get( 161803398 ), "\n"; -echo $hash->get( 314159265 ), "\n"; - -var_dump( $hash->update( 314159265, "a lot plus one" ) ); -var_dump( $hash->update( 314159999, "a lot plus one" ) ); - -echo $hash->get( 161803398 ), "\n"; -echo $hash->get( 314159265 ), "\n"; -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash.xml b/reference/quickhash/quickhashstringinthash.xml deleted file mode 100644 index d750449d8b..0000000000 --- a/reference/quickhash/quickhashstringinthash.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - The QuickHashStringIntHash class - QuickHashStringIntHash - - - - -
- &reftitle.intro; - - This class wraps around a hash containing strings, where the - values are integer numbers. Hashes are also available as - implementation of the ArrayAccess interface. - - - Hashes can also be iterated over with foreach as the Iterator interface is - implemented as well. The order of which elements are returned in is not - guaranteed. - -
- - -
- &reftitle.classsynopsis; - - - - QuickHashStringIntHash - - - - - QuickHashStringIntHash - - - - Constants - - const - int - QuickHashStringIntHash::CHECK_FOR_DUPES - 1 - - - const - int - QuickHashStringIntHash::DO_NOT_USE_ZEND_ALLOC - 2 - - - Methods - - - - -
- - -
- &reftitle.constants; - - - - QuickHashStringIntHash::CHECK_FOR_DUPES - - If enabled, adding duplicate elements to a set (through either add() or - loadFromFile()) will result in those elements to be dropped from the - set. This will take up extra time, so only used when it is required. - - - - - QuickHashStringIntHash::DO_NOT_USE_ZEND_ALLOC - - Disables the use of PHP's internal memory manager for internal - set structures. With this option enabled, internal allocations will not - count towards the memory_limit settings. - - - - -
- - - -
- - &reference.quickhash.entities.quickhashstringinthash; - -
- - diff --git a/reference/quickhash/quickhashstringinthash/add.xml b/reference/quickhash/quickhashstringinthash/add.xml deleted file mode 100644 index 026ef6bc38..0000000000 --- a/reference/quickhash/quickhashstringinthash/add.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - QuickHashStringIntHash::add - This method adds a new entry to the hash - - - - &reftitle.description; - - public boolQuickHashStringIntHash::add - stringkey - intvalue - - - This method adds a new entry to the hash, and returns whether the entry was - added. Entries are by default always added unless - QuickHashStringIntHash::CHECK_FOR_DUPES has been passed when the hash was created. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - value - - - The value of the entry to add. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was added, and &false; if the entry was not added. - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::add</function> example - -exists( "four" ) ); -var_dump( $hash->get( "four" ) ); -var_dump( $hash->add( "four", 22 ) ); -var_dump( $hash->exists( "four" ) ); -var_dump( $hash->get( "four" ) ); -var_dump( $hash->add( "four", 12 ) ); - -echo "\nwith dupe checking\n"; -$hash = new QuickHashStringIntHash( 1024, QuickHashStringIntHash::CHECK_FOR_DUPES ); -var_dump( $hash ); -var_dump( $hash->exists( "four" ) ); -var_dump( $hash->get( "four" ) ); -var_dump( $hash->add( "four", 78 ) ); -var_dump( $hash->exists( "four" ) ); -var_dump( $hash->get( "four" ) ); -var_dump( $hash->add( "four", 9 ) ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/construct.xml b/reference/quickhash/quickhashstringinthash/construct.xml deleted file mode 100644 index 20f5247f79..0000000000 --- a/reference/quickhash/quickhashstringinthash/construct.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - QuickHashStringIntHash::__construct - Creates a new QuickHashStringIntHash object - - - - &reftitle.description; - - public QuickHashStringIntHash::__construct - intsize - intoptions0 - - - This constructor creates a new QuickHashStringIntHash. The size is the amount of - bucket lists to create. The more lists there are, the less collisions you - will have. Options are also supported. - - - - - &reftitle.parameters; - - - - size - - - The amount of bucket lists to configure. The number you pass in will be - automatically rounded up to the next power of two. It is also - automatically limited from 64 to 4194304. - - - - - options - - - The options that you can pass in are: - QuickHashStringIntHash::CHECK_FOR_DUPES, which makes sure no duplicate - entries are added to the hash and - QuickHashStringIntHash::DO_NOT_USE_ZEND_ALLOC to not use PHP's internal - memory manager. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashStringIntHash object. - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::__construct</function> example - - -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/delete.xml b/reference/quickhash/quickhashstringinthash/delete.xml deleted file mode 100644 index d8724d2ec4..0000000000 --- a/reference/quickhash/quickhashstringinthash/delete.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - QuickHashStringIntHash::delete - This method deletes am entry from the hash - - - - &reftitle.description; - - public boolQuickHashStringIntHash::delete - stringkey - - - This method deletes an entry from the hash, and returns whether the entry was - deleted or not. Associated memory structures will not be freed immediately, - but rather when the hash itself is freed. - - - Elements can not be deleted when the hash is used in an iterator. The - method will not throw an exception, but simply return &false; like would - happen with any other deletion failure. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to delete. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was deleted, and &false; if the entry was not deleted. - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::delete</function> example - -exists( 'four' ) ); -var_dump( $hash->add( 'four', 5 ) ); -var_dump( $hash->get( 'four' ) ); -var_dump( $hash->delete( 'four' ) ); -var_dump( $hash->exists( 'four' ) ); -var_dump( $hash->get( 'four' ) ); -var_dump( $hash->delete( 'four' ) ); -?>]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/exists.xml b/reference/quickhash/quickhashstringinthash/exists.xml deleted file mode 100644 index fd334454c4..0000000000 --- a/reference/quickhash/quickhashstringinthash/exists.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - QuickHashStringIntHash::exists - This method checks whether a key is part of the hash - - - - &reftitle.description; - - public boolQuickHashStringIntHash::exists - stringkey - - - This method checks whether an entry with the provided key exists in the - hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to check for whether it exists in the hash. - - - - - - - - - &reftitle.returnvalues; - - Returns &true; when the entry was found, or &false; when the entry is not - found. - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/get.xml b/reference/quickhash/quickhashstringinthash/get.xml deleted file mode 100644 index b5de095933..0000000000 --- a/reference/quickhash/quickhashstringinthash/get.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - QuickHashStringIntHash::get - This method retrieves a value from the hash by its key - - - - &reftitle.description; - - public mixedQuickHashStringIntHash::get - stringkey - - - This method retrieves a value from the hash by its key. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - - - - - &reftitle.returnvalues; - - The value if the key exists, or &null; if the key wasn't part of the hash. - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::get</function> example - -get( "one" ) ); - -var_dump( $hash->add( "two", 2 ) ); -var_dump( $hash->get( "two" ) ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/getsize.xml b/reference/quickhash/quickhashstringinthash/getsize.xml deleted file mode 100644 index 2ea1c74780..0000000000 --- a/reference/quickhash/quickhashstringinthash/getsize.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - QuickHashStringIntHash::getSize - Returns the number of elements in the hash - - - - &reftitle.description; - - public intQuickHashStringIntHash::getSize - - - Returns the number of elements in the hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - - - - - &reftitle.returnvalues; - - The number of elements in the hash. - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::getSize</function> example - -add( "two", 2 ) ); -var_dump( $hash->add( "three", 5 ) ); -var_dump( $hash->getSize() ); -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/loadfromfile.xml b/reference/quickhash/quickhashstringinthash/loadfromfile.xml deleted file mode 100644 index 1aa42545e4..0000000000 --- a/reference/quickhash/quickhashstringinthash/loadfromfile.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - QuickHashStringIntHash::loadFromFile - This factory method creates a hash from a file - - - - &reftitle.description; - - public static QuickHashStringIntHashQuickHashStringIntHash::loadFromFile - stringfilename - intsize0 - intoptions0 - - - This factory method creates a new hash from a definition file on disk. The - file format consists of a signature 'QH\0x21\0', the number of elements as - a 32 bit signed integer in system Endianness, an unsigned 32 bit integer - containing the number of element data to follow in characters. This element - data contains all the strings. The follows another signed 32 bit integer - containing the number of bucket lists. After the header and the strings, - the elements follow. They are ordered by bucket list so that the keys don't - have to be hashed in order to restore the hash. For each bucket list, the - following information is stored (all as 32 bit integers): the bucket list - index, the number of elements in that list, and then in pairs of two - unsigned 32 bit integers the elements, where the first one is the index - into the string list containing the keys, and the second one the value. An - example could be: - - - - QuickHash StringIntHash file format - - - - - - QuickHash IntHash file format - - - - - - - &reftitle.parameters; - - - - filename - - - The filename of the file to read the hash from. - - - - - size - - - The amount of bucket lists to configure. The number you pass in will be - automatically rounded up to the next power of two. It is also - automatically limited from 4 to 4194304. - - - - - options - - - The same options that the class' constructor takes; except that the size - option is ignored. It is read from the file format (unlike the - QuickHashIntHash and QuickHashIntStringHash classes, where it is - automatically calculated from the number of entries in the hash.) - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashStringIntHash. - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::loadFromFile</function> example - - ', $hash->get( $k ), "\n"; -} -?> -]]> - - &example.outputs.similar; - - 48712 -12uf => 50343 -143q => 51974 -15d1 => 53605 -16mc => 55236 -17vn => 56867 -194y => 58498 -1ae9 => 60129 -1bnk => 61760 -1cwv => 63391 -1e66 => 65022 -1ffh => 66653 -1gos => 68284 -1hy3 => 69915 -1j7e => 71546 -1kgp => 73177 -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/loadfromstring.xml b/reference/quickhash/quickhashstringinthash/loadfromstring.xml deleted file mode 100644 index 731a6870d4..0000000000 --- a/reference/quickhash/quickhashstringinthash/loadfromstring.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - QuickHashStringIntHash::loadFromString - This factory method creates a hash from a string - - - - &reftitle.description; - - public static QuickHashStringIntHashQuickHashStringIntHash::loadFromString - stringcontents - intsize0 - intoptions0 - - - This factory method creates a new hash from a definition in a string. The - format is the same as the one used in "loadFromFile". - - - - - &reftitle.parameters; - - - - contents - - - The string containing a serialized format of the hash. - - - - - size - - - The amount of bucket lists to configure. The number you pass in will be - automatically rounded up to the next power of two. It is also - automatically limited from 4 to 4194304. - - - - - options - - - The same options that the class' constructor takes; except that the size - option is ignored. It is automatically calculated to be the same as the - number of entries in the hash, rounded up to the nearest power of two - with a maximum limit of 4194304. - - - - - - - - - &reftitle.returnvalues; - - Returns a new QuickHashStringIntHash. - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::loadFromString</function> example - - ', $hash->get( $k ), "\n"; -} -?> -]]> - - &example.outputs.similar; - - 48712 -12uf => 50343 -143q => 51974 -15d1 => 53605 -16mc => 55236 -17vn => 56867 -194y => 58498 -1ae9 => 60129 -1bnk => 61760 -1cwv => 63391 -1e66 => 65022 -1ffh => 66653 -1gos => 68284 -1hy3 => 69915 -1j7e => 71546 -1kgp => 73177 -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/savetofile.xml b/reference/quickhash/quickhashstringinthash/savetofile.xml deleted file mode 100644 index 7fa64f6f7c..0000000000 --- a/reference/quickhash/quickhashstringinthash/savetofile.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - QuickHashStringIntHash::saveToFile - This method stores an in-memory hash to disk - - - - &reftitle.description; - - public voidQuickHashStringIntHash::saveToFile - stringfilename - - - This method stores an existing hash to a file on disk, in the same format - that loadFromFile() can read. - - - - - &reftitle.parameters; - - - - filename - - - The filename of the file to store the hash in. - - - - - - - - - &reftitle.returnvalues; - - &return.void; - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::saveToFile</function> example - -add( "fourty three", 42 ) ); -var_dump( $hash->add( "fifty two", 52 ) ); - -$hash->saveToFile( '/tmp/test.hash.string' ); -?> -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/savetostring.xml b/reference/quickhash/quickhashstringinthash/savetostring.xml deleted file mode 100644 index ecb26752d4..0000000000 --- a/reference/quickhash/quickhashstringinthash/savetostring.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - QuickHashStringIntHash::saveToString - This method returns a serialized version of the hash - - - - &reftitle.description; - - public stringQuickHashStringIntHash::saveToString - - - This method returns a serialized version of the hash in the same format that - loadFromString() can read. - - - - - &reftitle.returnvalues; - - This method returns a serialized format of an existing hash, in the same format - that loadFromString() can read. - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::saveToString</function> example - -add( "fourty three", 42 ) ); -var_dump( $hash->add( "fifty two", 52 ) ); - -var_dump( $hash->saveToString() ); -?> -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/set.xml b/reference/quickhash/quickhashstringinthash/set.xml deleted file mode 100644 index e26a89d2a4..0000000000 --- a/reference/quickhash/quickhashstringinthash/set.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - QuickHashStringIntHash::set - This method updates an entry in the hash with a new value, or - adds a new one if the entry doesn't exist - - - - &reftitle.description; - - public intQuickHashStringIntHash::set - stringkey - intvalue - - - This method tries to update an entry with a new value. In case the entry - did not yet exist, it will instead add a new entry. It returns whether the - entry was added or update. If there are duplicate keys, only the first - found element will get an updated value. Use - QuickHashStringIntHash::CHECK_FOR_DUPES during hash creation to prevent duplicate - keys from being part of the hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add or update. - - - - - value - - - The value of the entry to add. If a non-string is passed, it will be - converted to a string automatically if possible. - - - - - - - - - &reftitle.returnvalues; - - 2 if the entry was found and updated, 1 if the entry was newly added or 0 - if there was an error. - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::set</function> example - -Add\n"; -var_dump( $hash->get( "fourty six thousand six hundred ninety two" ) ); -var_dump( $hash->set( "fourty six thousand six hundred ninety two", 16091 ) ); -var_dump( $hash->get( "fourty six thousand six hundred ninety two" ) ); - -echo "Set->Update\n"; -var_dump( $hash->set( "fourty six thousand six hundred ninety two", 29906 ) ); -var_dump( $hash->get( "fourty six thousand six hundred ninety two" ) ); -?> -]]> - - &example.outputs.similar; - -Add -bool(false) -int(2) -int(16091) -Set->Update -int(1) -int(29906) -]]> - - - - - - - - - diff --git a/reference/quickhash/quickhashstringinthash/update.xml b/reference/quickhash/quickhashstringinthash/update.xml deleted file mode 100644 index 6836460cc0..0000000000 --- a/reference/quickhash/quickhashstringinthash/update.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - QuickHashStringIntHash::update - This method updates an entry in the hash with a new value - - - - &reftitle.description; - - public boolQuickHashStringIntHash::update - stringkey - intvalue - - - This method updates an entry with a new value, and returns whether the entry was - update. If there are duplicate keys, only the first found element will get - an updated value. Use QuickHashStringIntHash::CHECK_FOR_DUPES during hash - creation to prevent duplicate keys from being part of the hash. - - - - - &reftitle.parameters; - - - - key - - - The key of the entry to add. - - - - - value - - - The new value for the entry. If a non-string is passed, it will be - converted to a string automatically if possible. - - - - - - - - - &reftitle.returnvalues; - - &true; when the entry was found and updated, and &false; if the entry was - not part of the hash already. - - - - - &reftitle.examples; - - - <function>QuickHashStringIntHash::update</function> example - -add( 'six', 314159265 ); -$hash->add( "a lot", 314159265 ); - -echo $hash->get( 'six' ), "\n"; -echo $hash->get( 'a lot' ), "\n"; - -var_dump( $hash->update( 'a lot', 314159266 ) ); -var_dump( $hash->update( "a lot plus one", 314159999 ) ); - -echo $hash->get( 'six' ), "\n"; -echo $hash->get( 'a lot' ), "\n"; -?> -]]> - - &example.outputs.similar; - - - - - - - - - - - diff --git a/reference/quickhash/reference.xml b/reference/quickhash/reference.xml deleted file mode 100644 index 6524387406..0000000000 --- a/reference/quickhash/reference.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Quickhash &Functions; - - &reference.quickhash.entities.functions; - - - - - diff --git a/reference/quickhash/setup.xml b/reference/quickhash/setup.xml deleted file mode 100644 index e6b918bbd8..0000000000 --- a/reference/quickhash/setup.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - - This extension requires no additional libraries. - -
- -
- &reftitle.install; - - &pecl.info; - &url.pecl.package;quickhash - -
- -
- &reftitle.runtime; - &no.config; -
- -
- - - diff --git a/reference/quickhash/versions.xml b/reference/quickhash/versions.xml deleted file mode 100644 index ab265c6cbc..0000000000 --- a/reference/quickhash/versions.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reference/radius/book.xml b/reference/radius/book.xml index cd8c81846f..c36e275564 100644 --- a/reference/radius/book.xml +++ b/reference/radius/book.xml @@ -2,6 +2,7 @@ + Radius diff --git a/reference/radius/functions/radius-acct-open.xml b/reference/radius/functions/radius-acct-open.xml index 1ece573975..283ab706da 100644 --- a/reference/radius/functions/radius-acct-open.xml +++ b/reference/radius/functions/radius-acct-open.xml @@ -17,6 +17,11 @@
+ + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/radius/functions/radius-auth-open.xml b/reference/radius/functions/radius-auth-open.xml index 5e54fe9036..60886bb8d8 100644 --- a/reference/radius/functions/radius-auth-open.xml +++ b/reference/radius/functions/radius-auth-open.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/radius/functions/radius-close.xml b/reference/radius/functions/radius-close.xml index 56394ce78d..5bac7fb896 100644 --- a/reference/radius/functions/radius-close.xml +++ b/reference/radius/functions/radius-close.xml @@ -19,6 +19,15 @@ + + &reftitle.parameters; + + + &radius.parameter.handle; + + + + &reftitle.returnvalues; diff --git a/reference/radius/functions/radius-cvt-addr.xml b/reference/radius/functions/radius-cvt-addr.xml index ca48e99a3e..dec2b86973 100644 --- a/reference/radius/functions/radius-cvt-addr.xml +++ b/reference/radius/functions/radius-cvt-addr.xml @@ -14,7 +14,30 @@ stringdata - + Converts raw data to IP-Address + + + + + &reftitle.parameters; + + + + data + + + Input data + + + + + + + + + &reftitle.returnvalues; + + Returns the IP-Address. diff --git a/reference/radius/functions/radius-cvt-int.xml b/reference/radius/functions/radius-cvt-int.xml index 611b900104..a820977319 100644 --- a/reference/radius/functions/radius-cvt-int.xml +++ b/reference/radius/functions/radius-cvt-int.xml @@ -14,7 +14,30 @@ stringdata + Converts raw data to integer + + + + &reftitle.parameters; + + + + data + + + Input data + + + + + + + + + &reftitle.returnvalues; + + Returns the integer, retrieved from data. diff --git a/reference/radius/functions/radius-cvt-string.xml b/reference/radius/functions/radius-cvt-string.xml index 106428e11f..ef139354da 100644 --- a/reference/radius/functions/radius-cvt-string.xml +++ b/reference/radius/functions/radius-cvt-string.xml @@ -14,10 +14,32 @@ stringdata - + Converts raw data to string + + &reftitle.parameters; + + + + data + + + Input data + + + + + + + + + &reftitle.returnvalues; + + Returns the string, retrieved from data. + + &reftitle.examples; diff --git a/reference/radius/functions/radius-demangle-mppe-key.xml b/reference/radius/functions/radius-demangle-mppe-key.xml index 7cc8446856..a515dc1c94 100644 --- a/reference/radius/functions/radius-demangle-mppe-key.xml +++ b/reference/radius/functions/radius-demangle-mppe-key.xml @@ -22,6 +22,23 @@ + + &reftitle.parameters; + + + &radius.parameter.handle; + + mangled + + + The mangled data to demangle + + + + + + + &reftitle.returnvalues; diff --git a/reference/radius/functions/radius-demangle.xml b/reference/radius/functions/radius-demangle.xml index f54650e1c1..3cd6778f82 100644 --- a/reference/radius/functions/radius-demangle.xml +++ b/reference/radius/functions/radius-demangle.xml @@ -20,6 +20,23 @@ + + &reftitle.parameters; + + + &radius.parameter.handle; + + mangled + + + The mangled data to demangle + + + + + + + &reftitle.returnvalues; diff --git a/reference/radius/functions/radius-get-attr.xml b/reference/radius/functions/radius-get-attr.xml index c76888eaec..d64399819c 100644 --- a/reference/radius/functions/radius-get-attr.xml +++ b/reference/radius/functions/radius-get-attr.xml @@ -23,6 +23,15 @@ + + &reftitle.parameters; + + + &radius.parameter.handle; + + + + &reftitle.returnvalues; diff --git a/reference/radius/functions/radius-get-vendor-attr.xml b/reference/radius/functions/radius-get-vendor-attr.xml index bbb389ae77..28fae2c107 100644 --- a/reference/radius/functions/radius-get-vendor-attr.xml +++ b/reference/radius/functions/radius-get-vendor-attr.xml @@ -21,6 +21,22 @@ + + &reftitle.parameters; + + + + data + + + Input data + + + + + + + &reftitle.returnvalues; diff --git a/reference/radius/functions/radius-put-attr.xml b/reference/radius/functions/radius-put-attr.xml index 9b87844b33..dc1b0439ba 100644 --- a/reference/radius/functions/radius-put-attr.xml +++ b/reference/radius/functions/radius-put-attr.xml @@ -50,29 +50,6 @@ - - &reftitle.examples; - - - <function>radius_put_attr</function> example - -"; - exit; -} -?> -]]> - - - - - &reftitle.changelog; @@ -98,6 +75,29 @@ if (!radius_put_attr($res, RADIUS_CHAP_PASSWORD, $pass)) { + + &reftitle.examples; + + + <function>radius_put_attr</function> example + + "; + exit; +} +?> +]]> + + + + + &reftitle.seealso; diff --git a/reference/radius/functions/radius-request-authenticator.xml b/reference/radius/functions/radius-request-authenticator.xml index edeec62f2a..de39991bad 100644 --- a/reference/radius/functions/radius-request-authenticator.xml +++ b/reference/radius/functions/radius-request-authenticator.xml @@ -19,6 +19,15 @@ + + &reftitle.parameters; + + + &radius.parameter.handle; + + + + &reftitle.returnvalues; diff --git a/reference/radius/functions/radius-send-request.xml b/reference/radius/functions/radius-send-request.xml index c79fa8567d..3af0b72b95 100644 --- a/reference/radius/functions/radius-send-request.xml +++ b/reference/radius/functions/radius-send-request.xml @@ -24,6 +24,15 @@ + + &reftitle.parameters; + + + &radius.parameter.handle; + + + + &reftitle.returnvalues; diff --git a/reference/radius/functions/radius-server-secret.xml b/reference/radius/functions/radius-server-secret.xml index c77c1526fe..5df2c5c53e 100644 --- a/reference/radius/functions/radius-server-secret.xml +++ b/reference/radius/functions/radius-server-secret.xml @@ -19,6 +19,15 @@ + + &reftitle.parameters; + + + &radius.parameter.handle; + + + + &reftitle.returnvalues; diff --git a/reference/radius/functions/radius-strerror.xml b/reference/radius/functions/radius-strerror.xml index 0bbb20393d..06c449fb02 100644 --- a/reference/radius/functions/radius-strerror.xml +++ b/reference/radius/functions/radius-strerror.xml @@ -18,6 +18,16 @@ message can be retrieved with this function. + + + &reftitle.parameters; + + + &radius.parameter.handle; + + + + &reftitle.returnvalues; diff --git a/reference/rar/book.xml b/reference/rar/book.xml index 47de5be5e2..c28a471885 100644 --- a/reference/rar/book.xml +++ b/reference/rar/book.xml @@ -2,6 +2,7 @@ + Rar Archiving Rar diff --git a/reference/rar/rarexception/setusingexceptions.xml b/reference/rar/rarexception/setusingexceptions.xml index 73718ec555..e99025587b 100644 --- a/reference/rar/rarexception/setusingexceptions.xml +++ b/reference/rar/rarexception/setusingexceptions.xml @@ -51,6 +51,13 @@ + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.examples; diff --git a/reference/rar/setup.xml b/reference/rar/setup.xml index 08bf16f120..e4f69b805c 100644 --- a/reference/rar/setup.xml +++ b/reference/rar/setup.xml @@ -54,8 +54,8 @@ phpize &reftitle.resources; This extension registers three internal classes: - The archive representations returned by rar_open – - RarArchive –, the entry representations returned by + the archive representations returned by rar_open – + RarArchive, the entry representations returned by rar_list and rar_entry_getRarEntry and the exception type RarException. diff --git a/reference/readline/constants.xml b/reference/readline/constants.xml index 34cdf5dddc..5de58baac3 100644 --- a/reference/readline/constants.xml +++ b/reference/readline/constants.xml @@ -14,7 +14,6 @@ The library which is used for readline support; currently either readline or libedit. - Available as of PHP 5.5.0. diff --git a/reference/readline/functions/readline-callback-handler-install.xml b/reference/readline/functions/readline-callback-handler-install.xml index 9be019942c..3eaaa583f2 100644 --- a/reference/readline/functions/readline-callback-handler-install.xml +++ b/reference/readline/functions/readline-callback-handler-install.xml @@ -59,7 +59,7 @@ - + &reftitle.examples; diff --git a/reference/readline/functions/readline-callback-handler-remove.xml b/reference/readline/functions/readline-callback-handler-remove.xml index e03de00410..c7c328ba75 100644 --- a/reference/readline/functions/readline-callback-handler-remove.xml +++ b/reference/readline/functions/readline-callback-handler-remove.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/readline/functions/readline-callback-read-char.xml b/reference/readline/functions/readline-callback-read-char.xml index e2e96f85a0..bec5b46d24 100644 --- a/reference/readline/functions/readline-callback-read-char.xml +++ b/reference/readline/functions/readline-callback-read-char.xml @@ -20,6 +20,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/readline/functions/readline-clear-history.xml b/reference/readline/functions/readline-clear-history.xml index be8293ccdd..d1533e193d 100644 --- a/reference/readline/functions/readline-clear-history.xml +++ b/reference/readline/functions/readline-clear-history.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/readline/functions/readline-list-history.xml b/reference/readline/functions/readline-list-history.xml index ac79a9e972..4960fb7d64 100644 --- a/reference/readline/functions/readline-list-history.xml +++ b/reference/readline/functions/readline-list-history.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/readline/functions/readline-on-new-line.xml b/reference/readline/functions/readline-on-new-line.xml index 93bcb5ff18..7c588428fd 100644 --- a/reference/readline/functions/readline-on-new-line.xml +++ b/reference/readline/functions/readline-on-new-line.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; @@ -24,6 +29,15 @@ + + &reftitle.notes; + + + This function is only available if supported by the underlying readline library. + It is not supported on Windows. + + + - + GNU Recode Recode diff --git a/reference/reflection/book.xml b/reference/reflection/book.xml index 7847ce174d..40e8521d19 100644 --- a/reference/reflection/book.xml +++ b/reference/reflection/book.xml @@ -43,6 +43,7 @@ &reference.reflection.reflectionuniontype; &reference.reflection.reflectiongenerator; &reference.reflection.reflectionreference; + &reference.reflection.reflectionattribute; &reference.reflection.reflector; &reference.reflection.reflectionexception; diff --git a/reference/reflection/configure.xml b/reference/reflection/configure.xml index 5ff64fede0..060470ff79 100644 --- a/reference/reflection/configure.xml +++ b/reference/reflection/configure.xml @@ -5,7 +5,7 @@ &reftitle.install; - The reflection extension is enabled by default, as of PHP 5. + The reflection extension is enabled by default.
diff --git a/reference/reflection/reflection/export.xml b/reference/reflection/reflection/export.xml index 45282665bf..fec5703c2a 100644 --- a/reference/reflection/reflection/export.xml +++ b/reference/reflection/reflection/export.xml @@ -8,7 +8,7 @@ - &warn.deprecated.function-7-4-0; + &warn.deprecated.function-7-4-0.removed-8-0-0; diff --git a/reference/mysqlnd_uh/mysqlnduhconnection.xml b/reference/reflection/reflectionattribute.xml similarity index 56% rename from reference/mysqlnd_uh/mysqlnduhconnection.xml rename to reference/reflection/reflectionattribute.xml index b2f6c6dcaf..9bc536cb01 100644 --- a/reference/mysqlnd_uh/mysqlnduhconnection.xml +++ b/reference/reflection/reflectionattribute.xml @@ -1,39 +1,44 @@ - + - The MysqlndUhConnection class - MysqlndUhConnection + The ReflectionAttribute class + ReflectionAttribute - -
+ +
&reftitle.intro; - + The ReflectionAttribute class provides information about + an Attributes.
-
+
&reftitle.classsynopsis; - MysqlndUhConnection + ReflectionAttribute - MysqlndUhConnection + final ReflectionAttribute &Methods; - + + + + + @@ -41,7 +46,7 @@ - &reference.mysqlnd-uh.entities.mysqlnduhconnection; + &reference.reflection.entities.reflectionattribute; diff --git a/reference/sphinx/sphinxclient/construct.xml b/reference/reflection/reflectionattribute/construct.xml similarity index 62% rename from reference/sphinx/sphinxclient/construct.xml rename to reference/reflection/reflectionattribute/construct.xml index 67b52b6e40..a2a28c47e0 100644 --- a/reference/sphinx/sphinxclient/construct.xml +++ b/reference/reflection/reflectionattribute/construct.xml @@ -1,21 +1,17 @@ - - + - SphinxClient::__construct - Create a new SphinxClient object + ReflectionAttribute::__construct + Private constructor to disallow direct instantiation &reftitle.description; - - public SphinxClient::__construct + + private ReflectionAttribute::__construct - - - Creates a new SphinxClient object. - + @@ -24,7 +20,6 @@ - - + - suhosin_get_raw_cookies - Returns an array containing the raw cookie values + ReflectionAttribute::getArguments + Gets arguments passed to attribute. &reftitle.description; - arraysuhosin_get_raw_cookies + public arrayReflectionAttribute::getArguments - + Gets arguments passed to attribute. - &warn.undocumented.func; - @@ -29,11 +27,10 @@ &reftitle.returnvalues; - Returns an array containing the raw cookie values. + The arguments passed to attribute. - - + - MysqlndUhConnection::__construct - The __construct purpose + ReflectionAttribute::getName + Gets attribute name &reftitle.description; - public MysqlndUhConnection::__construct + public stringReflectionAttribute::getName - + Gets the attributes name. - &warn.undocumented.func; - @@ -29,11 +27,10 @@ &reftitle.returnvalues; - + The name of the attibute. - + + + + ReflectionAttribute::getTarget + Returns the target of the attribute as bitmask. + + + + &reftitle.description; + + public intReflectionAttribute::getTarget + + + + Gets target of the attribute as bitmask. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + + Gets target of the attribute as bitmask. + + + + + + diff --git a/reference/reflection/reflectionattribute/isrepeated.xml b/reference/reflection/reflectionattribute/isrepeated.xml new file mode 100644 index 0000000000..c4e465dcb3 --- /dev/null +++ b/reference/reflection/reflectionattribute/isrepeated.xml @@ -0,0 +1,55 @@ + + + + + + ReflectionAttribute::isRepeated + Returns whether the attribute of this name could occur repeatedly on a code element. + + + + &reftitle.description; + + public boolReflectionAttribute::isRepeated + + + + Returns whether the attribute of this name could occur repeatedly on a code element. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns &true; when attribute is used repeatedly, otherwise &false;. + + + + + + diff --git a/reference/mongo/mongowriteconcernexception/getdocument.xml b/reference/reflection/reflectionattribute/newinstance.xml similarity index 61% rename from reference/mongo/mongowriteconcernexception/getdocument.xml rename to reference/reflection/reflectionattribute/newinstance.xml index dac57cbccf..0e2ba4dd61 100644 --- a/reference/mongo/mongowriteconcernexception/getdocument.xml +++ b/reference/reflection/reflectionattribute/newinstance.xml @@ -1,22 +1,21 @@ - + - MongoWriteConcernException::getDocument - Get the error document + ReflectionAttribute::newInstance + Instantiates the attribute class represented by this ReflectionAttribute class and arguments. &reftitle.description; - public arrayMongoWriteConcernException::getDocument + public objectReflectionAttribute::newInstance - Returns the actual response from the server that was interperated as an error. + Instantiates the attribute class represented by this ReflectionAttribute class and arguments. - @@ -27,11 +26,10 @@ &reftitle.returnvalues; - A MongoDB document, if available, as an array. + New instance of the attribute. - + + + + ReflectionClass::getAttributes + Gets Attributes + + + + &reftitle.description; + + public arrayReflectionClass::getAttributes + stringname&null; + intflags0 + + + Returns all attributes declared on this class as an array of ReflectionAttribute. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + name + + + + + + + + flags + + + + + + + + + + + &reftitle.returnvalues; + + Array of attributes, as a ReflectionAttribute object. + + + + + &reftitle.seealso; + + + ReflectionClassConstant::getAttributes + ReflectionFunctionAbstract::getAttributes + ReflectionParameter::getAttributes + ReflectionProperty::getAttributes + + + + + + + diff --git a/reference/reflection/reflectionclass/newinstanceargs.xml b/reference/reflection/reflectionclass/newinstanceargs.xml index b776957df6..d46425bd65 100644 --- a/reference/reflection/reflectionclass/newinstanceargs.xml +++ b/reference/reflection/reflectionclass/newinstanceargs.xml @@ -41,6 +41,17 @@ Returns a new instance of the class. + + + &reftitle.errors; + + A ReflectionException if the class constructor is not public. + + + A ReflectionException if the class does not have a constructor + and the args parameter contains one or more parameters. + + &reftitle.examples; @@ -69,17 +80,6 @@ object(ReflectionFunction)#2 (1) { - - &reftitle.errors; - - A ReflectionException if the class constructor is not public. - - - A ReflectionException if the class does not have a constructor - and the args parameter contains one or more parameters. - - - &reftitle.seealso; diff --git a/reference/reflection/reflectionclass/newinstancewithoutconstructor.xml b/reference/reflection/reflectionclass/newinstancewithoutconstructor.xml index 7ed357ca16..c6f77c204c 100644 --- a/reference/reflection/reflectionclass/newinstancewithoutconstructor.xml +++ b/reference/reflection/reflectionclass/newinstancewithoutconstructor.xml @@ -30,37 +30,12 @@ - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - All internal classes can now be instantiated except for those declared - final. - - - - - - - - &reftitle.errors; A ReflectionException if the class is an internal - class that cannot be instantiated without invoking the constructor. In PHP - 5.6.0 onwards, this exception is limited only to internal classes that are + class that cannot be instantiated without invoking the constructor. + This exception is limited only to internal classes that are final. diff --git a/reference/reflection/reflectionclassconstant.xml b/reference/reflection/reflectionclassconstant.xml index ab979c009d..c7466d5f43 100644 --- a/reference/reflection/reflectionclassconstant.xml +++ b/reference/reflection/reflectionclassconstant.xml @@ -41,16 +41,19 @@ const int ReflectionClassConstant::IS_PUBLIC + 1 const int ReflectionClassConstant::IS_PROTECTED + 2 const int ReflectionClassConstant::IS_PRIVATE + 4 &Properties; @@ -114,6 +117,7 @@ Indicates public constants. + Prior to PHP 7.4.0, the value was 256. @@ -124,6 +128,7 @@ Indicates protected constants. + Prior to PHP 7.4.0, the value was 512. @@ -134,11 +139,19 @@ Indicates private constants. + Prior to PHP 7.4.0, the value was 1024. + + + The values of these constants may change between PHP versions. + It is recommended to always use the constants + and not rely on the values directly. + +
diff --git a/reference/reflection/reflectionclassconstant/export.xml b/reference/reflection/reflectionclassconstant/export.xml index 920f910a6d..03680739f0 100644 --- a/reference/reflection/reflectionclassconstant/export.xml +++ b/reference/reflection/reflectionclassconstant/export.xml @@ -8,7 +8,7 @@ - &warn.deprecated.function-7-4-0; + &warn.deprecated.function-7-4-0.removed-8-0-0; diff --git a/reference/reflection/reflectionclassconstant/getattributes.xml b/reference/reflection/reflectionclassconstant/getattributes.xml new file mode 100644 index 0000000000..b8037089a0 --- /dev/null +++ b/reference/reflection/reflectionclassconstant/getattributes.xml @@ -0,0 +1,87 @@ + + + + + + ReflectionClassConstant::getAttributes + Gets Attributes + + + + &reftitle.description; + + public arrayReflectionClassConstant::getAttributes + stringname&null; + intflags0 + + + Returns all attributes declared on this class constant as an array of ReflectionAttribute. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + name + + + + + + + + flags + + + + + + + + + + + &reftitle.returnvalues; + + Array of attributes, as a ReflectionAttribute object. + + + + + &reftitle.seealso; + + + ReflectionClass::getAttributes + ReflectionFunctionAbstract::getAttributes + ReflectionParameter::getAttributes + ReflectionProperty::getAttributes + + + + + + + diff --git a/reference/reflection/reflectionclassconstant/getmodifiers.xml b/reference/reflection/reflectionclassconstant/getmodifiers.xml index 910c460cc1..9d04db297d 100644 --- a/reference/reflection/reflectionclassconstant/getmodifiers.xml +++ b/reference/reflection/reflectionclassconstant/getmodifiers.xml @@ -27,8 +27,8 @@ &reftitle.returnvalues; A numeric representation of the modifiers. - The actual meanings of these modifiers are described in the - predefined constants. + The actual meaning of these modifiers are described under + predefined constants. diff --git a/reference/reflection/reflectionextension/export.xml b/reference/reflection/reflectionextension/export.xml index 36460c847f..eb01887107 100644 --- a/reference/reflection/reflectionextension/export.xml +++ b/reference/reflection/reflectionextension/export.xml @@ -8,7 +8,7 @@ - &warn.deprecated.function-7-4-0; + &warn.deprecated.function-7-4-0.removed-8-0-0; diff --git a/reference/reflection/reflectionfunction/export.xml b/reference/reflection/reflectionfunction/export.xml index ed379d441a..fe7426e86e 100644 --- a/reference/reflection/reflectionfunction/export.xml +++ b/reference/reflection/reflectionfunction/export.xml @@ -8,7 +8,7 @@ - &warn.deprecated.function-7-4-0; + &warn.deprecated.function-7-4-0.removed-8-0-0; diff --git a/reference/reflection/reflectionfunction/invoke.xml b/reference/reflection/reflectionfunction/invoke.xml index 4324c0c9ca..58b79bc772 100644 --- a/reference/reflection/reflectionfunction/invoke.xml +++ b/reference/reflection/reflectionfunction/invoke.xml @@ -76,7 +76,8 @@ Dr. Phil &reftitle.notes; - &reflection.invoke.reference; + ReflectionFunction::invoke cannot be used when reference parameters are expected. + ReflectionFunction::invokeArgs has to be used instead (passing references in the argument list). diff --git a/reference/mysqlnd_ms/functions/mysqlnd-ms-fabric-select-global.xml b/reference/reflection/reflectionfunctionabstract/getattributes.xml similarity index 50% rename from reference/mysqlnd_ms/functions/mysqlnd-ms-fabric-select-global.xml rename to reference/reflection/reflectionfunctionabstract/getattributes.xml index fee5dc5ea6..cfa805a2ea 100644 --- a/reference/mysqlnd_ms/functions/mysqlnd-ms-fabric-select-global.xml +++ b/reference/reflection/reflectionfunctionabstract/getattributes.xml @@ -1,73 +1,66 @@ - + - mysqlnd_ms_fabric_select_global - Switch to global sharding server for a given table + ReflectionFunctionAbstract::getAttributes + Gets Attributes &reftitle.description; - array - mysqlnd_ms_fabric_select_global - mixedconnection - mixedtable_name + public arrayReflectionFunctionAbstract::getAttributes + stringname&null; + intflags0 + + Returns all attributes declared on this function or method as an array of ReflectionAttribute. + &warn.undocumented.func; - - MySQL Fabric related. - - - Switch the connection to the nodes handling global sharding queries - for the given table name. - &reftitle.parameters; - connection + name - A MySQL connection handle obtained from any of the - connect functions of the mysqli, - mysql or - PDO_MYSQL extensions. + - table_name + flags - The table name to ask Fabric about. + - &reftitle.returnvalues; - &false; on error. Otherwise, &true; + Array of attributes, as a ReflectionAttribute object. - - &reftitle.notes; - - - mysqlnd_ms_fabric_select_global requires - PECL mysqlnd_ms >> 1.6.0. - - + + &reftitle.seealso; + + + ReflectionClass::getAttributes + ReflectionClassConstant::getAttributes + ReflectionParameter::getAttributes + ReflectionProperty::getAttributes + + diff --git a/reference/reflection/reflectionfunctionabstract/getparameters.xml b/reference/reflection/reflectionfunctionabstract/getparameters.xml index 0dbf610662..aaa7b74574 100644 --- a/reference/reflection/reflectionfunctionabstract/getparameters.xml +++ b/reference/reflection/reflectionfunctionabstract/getparameters.xml @@ -14,7 +14,8 @@ - Get the parameters as an array of ReflectionParameter. + Get the parameters as an array of ReflectionParameter, + in the order in which they are defined in the source. &warn.undocumented.func; diff --git a/reference/reflection/reflectionmethod.xml b/reference/reflection/reflectionmethod.xml index 372d855898..7b5951a65f 100644 --- a/reference/reflection/reflectionmethod.xml +++ b/reference/reflection/reflectionmethod.xml @@ -46,38 +46,38 @@ const int ReflectionMethod::IS_STATIC - 1 + 16 const int ReflectionMethod::IS_PUBLIC - 256 + 1 const int ReflectionMethod::IS_PROTECTED - 512 - - - const - int - ReflectionMethod::IS_PRIVATE - 1024 - - - const - int - ReflectionMethod::IS_ABSTRACT 2 const int - ReflectionMethod::IS_FINAL + ReflectionMethod::IS_PRIVATE 4 + + const + int + ReflectionMethod::IS_ABSTRACT + 64 + + + const + int + ReflectionMethod::IS_FINAL + 32 + &Properties; @@ -136,46 +136,71 @@ ReflectionMethod::IS_STATIC - Indicates that the method is static. + + Indicates that the method is static. + Prior to PHP 7.4.0, the value was 1. + ReflectionMethod::IS_PUBLIC - Indicates that the method is public. + + Indicates that the method is public. + Prior to PHP 7.4.0, the value was 256. + ReflectionMethod::IS_PROTECTED - Indicates that the method is protected. + + Indicates that the method is protected. + Prior to PHP 7.4.0, the value was 512. + ReflectionMethod::IS_PRIVATE - Indicates that the method is private. + + Indicates that the method is private. + Prior to PHP 7.4.0, the value was 1024. + ReflectionMethod::IS_ABSTRACT - Indicates that the method is abstract. + + Indicates that the method is abstract. + Prior to PHP 7.4.0, the value was 2. + ReflectionMethod::IS_FINAL - Indicates that the method is final. + + Indicates that the method is final. + Prior to PHP 7.4.0, the value was 4. + + + + The values of these constants may change between PHP versions. + It is recommended to always use the constants + and not rely on the values directly. + +
diff --git a/reference/reflection/reflectionmethod/export.xml b/reference/reflection/reflectionmethod/export.xml index 9de62318fa..cb7b2fe457 100644 --- a/reference/reflection/reflectionmethod/export.xml +++ b/reference/reflection/reflectionmethod/export.xml @@ -8,7 +8,7 @@ - &warn.deprecated.function-7-4-0; + &warn.deprecated.function-7-4-0.removed-8-0-0; diff --git a/reference/reflection/reflectionmethod/getmodifiers.xml b/reference/reflection/reflectionmethod/getmodifiers.xml index c0b9f17437..8b6a1d1b98 100644 --- a/reference/reflection/reflectionmethod/getmodifiers.xml +++ b/reference/reflection/reflectionmethod/getmodifiers.xml @@ -26,8 +26,8 @@ &reftitle.returnvalues; - A numeric representation of the modifiers. The modifiers are listed below. - The actual meanings of these modifiers are described in the + A numeric representation of the modifiers. + The actual meaning of these modifiers are described under predefined constants. @@ -70,10 +70,10 @@ echo implode(' ', Reflection::getModifierNames($bar->getModifiers())); diff --git a/reference/reflection/reflectionmethod/invoke.xml b/reference/reflection/reflectionmethod/invoke.xml index b4a45c9a3d..1f0ad71d11 100644 --- a/reference/reflection/reflectionmethod/invoke.xml +++ b/reference/reflection/reflectionmethod/invoke.xml @@ -98,7 +98,8 @@ Hello Mike &reftitle.notes; - &reflection.invoke.reference; + ReflectionMethod::invoke cannot be used when reference parameters are expected. + ReflectionMethod::invokeArgs has to be used instead (passing references in the argument list). diff --git a/reference/reflection/reflectionnamedtype/isbuiltin.xml b/reference/reflection/reflectionnamedtype/isbuiltin.xml index 1e18bb8c14..f6f5f719f9 100644 --- a/reference/reflection/reflectionnamedtype/isbuiltin.xml +++ b/reference/reflection/reflectionnamedtype/isbuiltin.xml @@ -14,7 +14,8 @@ - Checks if the type is a built-in type in PHP. + Checks if the type is a built-in type in PHP. A built-in type is any type that + is not a class, interface, or trait.
diff --git a/reference/reflection/reflectionobject/export.xml b/reference/reflection/reflectionobject/export.xml index 3c82e727e5..736c8d0bf6 100644 --- a/reference/reflection/reflectionobject/export.xml +++ b/reference/reflection/reflectionobject/export.xml @@ -7,6 +7,10 @@ Export + + &warn.deprecated.function-7-4-0.removed-8-0-0; + + &reftitle.description; diff --git a/reference/reflection/reflectionparameter/construct.xml b/reference/reflection/reflectionparameter/construct.xml index 4fd1f48cff..9040f36613 100644 --- a/reference/reflection/reflectionparameter/construct.xml +++ b/reference/reflection/reflectionparameter/construct.xml @@ -75,7 +75,7 @@ foreach ($reflect->getParameters() as $i => $param) { " Passed to by reference: %s\n". " Is optional?: %s\n". "}\n", - $i, // $param->getPosition() can be used from PHP 5.2.3 + $i, // $param->getPosition() can be used $param->getName(), var_export($param->getClass(), 1), var_export($param->allowsNull(), 1), diff --git a/reference/reflection/reflectionparameter/export.xml b/reference/reflection/reflectionparameter/export.xml index 68424f4130..479bb0de81 100644 --- a/reference/reflection/reflectionparameter/export.xml +++ b/reference/reflection/reflectionparameter/export.xml @@ -8,7 +8,7 @@ - &warn.deprecated.function-7-4-0; + &warn.deprecated.function-7-4-0.removed-8-0-0; diff --git a/reference/reflection/reflectionparameter/getattributes.xml b/reference/reflection/reflectionparameter/getattributes.xml new file mode 100644 index 0000000000..2bfdd5be37 --- /dev/null +++ b/reference/reflection/reflectionparameter/getattributes.xml @@ -0,0 +1,87 @@ + + + + + + ReflectionParameter::getAttributes + Gets Attributes + + + + &reftitle.description; + + public arrayReflectionParameter::getAttributes + stringname&null; + intflags0 + + + Returns all attributes declared on this parameter as an array of ReflectionAttribute. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + name + + + + + + + + flags + + + + + + + + + + + &reftitle.returnvalues; + + Array of attributes, as a ReflectionAttribute object. + + + + + &reftitle.seealso; + + + ReflectionClass::getAttributes + ReflectionClassConstant::getAttributes + ReflectionFunctionAbstract::getAttributes + ReflectionProperty::getAttributes + + + + + + + diff --git a/reference/reflection/reflectionparameter/getclass.xml b/reference/reflection/reflectionparameter/getclass.xml index b260bddae3..d4df4b1a25 100644 --- a/reference/reflection/reflectionparameter/getclass.xml +++ b/reference/reflection/reflectionparameter/getclass.xml @@ -19,6 +19,11 @@ Gets the class type hinted for the parameter as a ReflectionClass object. + + As of PHP 8.0.0 this function is deprecated and not recommended. Instead, use + ReflectionParameter::getType to get the ReflectionType + of the parameter, then interrogate that object to determine the parameter type. + &warn.undocumented.func; @@ -36,7 +41,7 @@ or the declared type is not a class or interface.
- + &reftitle.examples; @@ -55,12 +60,6 @@ echo $aParameter->getClass()->name; ?> ]]> - &example.outputs; - - - diff --git a/reference/reflection/reflectionparameter/gettype.xml b/reference/reflection/reflectionparameter/gettype.xml index a4a67bbae8..6933de3765 100644 --- a/reference/reflection/reflectionparameter/gettype.xml +++ b/reference/reflection/reflectionparameter/gettype.xml @@ -92,6 +92,32 @@ NULL ]]> + + <methodname>ReflectionParameter::getType</methodname> Usage in PHP 8.0.0 and later + + As of PHP 8.0.0, this method may return a ReflectionNamedType instance or + a ReflectionUnionType instance. The latter is a collection of the former. + To analyze a type, it is often convenient to normalize it to an array of ReflectionNamedType + objects. The following function will return an array of 0 or more ReflectionNamedType + instances. + + +getType(); + + if (!$reflectionType) return []; + + return $reflectionType instanceof ReflectionUnionType + ? $reflectionType->getTypes() + : [$reflectionType]; +} +?> +]]> + + diff --git a/reference/reflection/reflectionparameter/isarray.xml b/reference/reflection/reflectionparameter/isarray.xml index 50945444bf..5974b61658 100644 --- a/reference/reflection/reflectionparameter/isarray.xml +++ b/reference/reflection/reflectionparameter/isarray.xml @@ -9,6 +9,7 @@ &warn.deprecated.function-8-0-0; + See the example below for an alternative way to derive this information. @@ -34,6 +35,37 @@ + + &reftitle.examples; + + + PHP 8.0.0 equivalent + + As of PHP 8.0.0, the following code will report if a type declares arrays, + including as part of a union. + + +getType(); + + if (!$reflectionType) return false; + + $types = $reflectionType instanceof ReflectionUnionType + ? $reflectionType->getTypes() + : [$reflectionType]; + + return in_array('array', array_map(fn(ReflectionNamedType $t) => $t->getName(), $types)); +} +?> +]]> + + + + + &reftitle.seealso; diff --git a/reference/reflection/reflectionparameter/iscallable.xml b/reference/reflection/reflectionparameter/iscallable.xml index cb6a99e229..33dca2292f 100644 --- a/reference/reflection/reflectionparameter/iscallable.xml +++ b/reference/reflection/reflectionparameter/iscallable.xml @@ -9,6 +9,7 @@ &warn.deprecated.function-8-0-0; + See the example below for an alternative way to derive this information. @@ -38,6 +39,36 @@ + + &reftitle.examples; + + + PHP 8.0.0 equivalent + + As of PHP 8.0.0, the following code will report if a type supports callables, + including as part of a union. + + +getType(); + + if (!$reflectionType) return false; + + $types = $reflectionType instanceof ReflectionUnionType + ? $reflectionType->getTypes() + : [$reflectionType]; + + return in_array('callable', array_map(fn(ReflectionNamedType $t) => $t->getName(), $types)); +} +?> +]]> + + + +
diff --git a/reference/reflection/reflectionproperty.xml b/reference/reflection/reflectionproperty.xml index ad167fc4ad..43b1e2d0f1 100644 --- a/reference/reflection/reflectionproperty.xml +++ b/reference/reflection/reflectionproperty.xml @@ -41,25 +41,25 @@ const int ReflectionProperty::IS_STATIC - 1 + 16 const int ReflectionProperty::IS_PUBLIC - 256 + 1 const int ReflectionProperty::IS_PROTECTED - 512 + 2 const int ReflectionProperty::IS_PRIVATE - 1024 + 4 &Properties; @@ -124,6 +124,7 @@ Indicates static properties. + Prior to PHP 7.4.0, the value was 1. @@ -134,6 +135,7 @@ Indicates public properties. + Prior to PHP 7.4.0, the value was 256. @@ -144,6 +146,7 @@ Indicates protected properties. + Prior to PHP 7.4.0, the value was 512. @@ -154,11 +157,19 @@ Indicates private properties. + Prior to PHP 7.4.0, the value was 1024. + + + The values of these constants may change between PHP versions. + It is recommended to always use the constants + and not rely on the values directly. + + diff --git a/reference/reflection/reflectionproperty/construct.xml b/reference/reflection/reflectionproperty/construct.xml index f499252aee..07cf2ae784 100644 --- a/reference/reflection/reflectionproperty/construct.xml +++ b/reference/reflection/reflectionproperty/construct.xml @@ -137,11 +137,11 @@ class Foo { $obj = new Foo; $prop = new ReflectionProperty('Foo', 'y'); -$prop->setAccessible(true); /* As of PHP 5.3.0 */ +$prop->setAccessible(true); var_dump($prop->getValue($obj)); // int(2) $prop = new ReflectionProperty('Foo', 'z'); -$prop->setAccessible(true); /* As of PHP 5.3.0 */ +$prop->setAccessible(true); var_dump($prop->getValue($obj)); // int(2) ?> diff --git a/reference/reflection/reflectionproperty/export.xml b/reference/reflection/reflectionproperty/export.xml index 1b6589bd7b..7500be00c5 100644 --- a/reference/reflection/reflectionproperty/export.xml +++ b/reference/reflection/reflectionproperty/export.xml @@ -7,6 +7,10 @@ Export + + &warn.deprecated.function-7-4-0.removed-8-0-0; + + &reftitle.description; diff --git a/reference/reflection/reflectionproperty/getattributes.xml b/reference/reflection/reflectionproperty/getattributes.xml new file mode 100644 index 0000000000..e8c76e8880 --- /dev/null +++ b/reference/reflection/reflectionproperty/getattributes.xml @@ -0,0 +1,87 @@ + + + + + + ReflectionProperty::getAttributes + Gets Attributes + + + + &reftitle.description; + + public arrayReflectionProperty::getAttributes + stringname&null; + intflags0 + + + Returns all attributes declared on this class property as an array of ReflectionAttribute. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + name + + + + + + + + flags + + + + + + + + + + + &reftitle.returnvalues; + + Array of attributes, as a ReflectionAttribute object. + + + + + &reftitle.seealso; + + + ReflectionClass::getAttributes + ReflectionClassConstant::getAttributes + ReflectionFunctionAbstract::getAttributes + ReflectionParameter::getAttributes + + + + + + + diff --git a/reference/reflection/reflectionproperty/getdefaultvalue.xml b/reference/reflection/reflectionproperty/getdefaultvalue.xml index 235143bb5a..378b8c71b1 100644 --- a/reference/reflection/reflectionproperty/getdefaultvalue.xml +++ b/reference/reflection/reflectionproperty/getdefaultvalue.xml @@ -29,7 +29,7 @@ The default value if the property has any default value (including &null;). If there is no default value, then &null; is returned. It is not possible to differentiate between a &null; default value and an unitialized typed property. - Use ReflectionClass::hasDefaultValue to detect the difference. + Use ReflectionProperty::hasDefaultValue to detect the difference. @@ -37,7 +37,7 @@ &reftitle.examples; - <methodname>ReflectionClass::getDefaultValue</methodname> example + <methodname>ReflectionProperty::getDefaultValue</methodname> example A numeric representation of the modifiers. + The actual meaning of these modifiers are described under + predefined constants. diff --git a/reference/reflection/reflectionproperty/hasdefaultvalue.xml b/reference/reflection/reflectionproperty/hasdefaultvalue.xml index d645cd3685..3d26658e91 100644 --- a/reference/reflection/reflectionproperty/hasdefaultvalue.xml +++ b/reference/reflection/reflectionproperty/hasdefaultvalue.xml @@ -37,7 +37,7 @@ &reftitle.examples; - <methodname>ReflectionClass::hasDefaultValue</methodname> example + <methodname>ReflectionProperty::hasDefaultValue</methodname> example - <methodname>ReflectionClass::isDefault</methodname> example + <methodname>ReflectionProperty::isDefault</methodname> example The ReflectionType class reports information about a function's return type. + The Reflection extension declares the following subtypes: + + ReflectionNamedType (as of PHP 7.1.0) + ReflectionUnionType (as of PHP 8.0.0) + diff --git a/reference/reflection/reflectiontype/tostring.xml b/reference/reflection/reflectiontype/tostring.xml index 36718fe503..0032137c0a 100644 --- a/reference/reflection/reflectiontype/tostring.xml +++ b/reference/reflection/reflectiontype/tostring.xml @@ -34,6 +34,28 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 7.1.0 + + ReflectionType::__toString has been deprecated. + + + + + + + &reftitle.examples; @@ -60,28 +82,6 @@ string - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 7.1.0 - - ReflectionType::__toString has been deprecated. - - - - - - - &reftitle.seealso; diff --git a/reference/reflection/reflectionzendextension/export.xml b/reference/reflection/reflectionzendextension/export.xml index 657bfb876d..5b3e65ed9d 100644 --- a/reference/reflection/reflectionzendextension/export.xml +++ b/reference/reflection/reflectionzendextension/export.xml @@ -8,7 +8,7 @@ - &warn.deprecated.function-7-4-0; + &warn.deprecated.function-7-4-0.removed-8-0-0; diff --git a/reference/reflection/reflector.xml b/reference/reflection/reflector.xml index d16676ac7e..02b74c3b5c 100644 --- a/reference/reflection/reflector.xml +++ b/reference/reflection/reflector.xml @@ -19,7 +19,7 @@
- &reftitle.classsynopsis; + &reftitle.interfacesynopsis; @@ -27,9 +27,9 @@ - - Reflector - + + Reflector + diff --git a/reference/reflection/reflector/export.xml b/reference/reflection/reflector/export.xml index 3dd12df64f..4f36eb7be8 100644 --- a/reference/reflection/reflector/export.xml +++ b/reference/reflection/reflector/export.xml @@ -8,7 +8,7 @@ - &warn.deprecated.function-7-4-0; + &warn.deprecated.function-7-4-0.removed-8-0-0; diff --git a/reference/reflection/versions.xml b/reference/reflection/versions.xml index a6ec0e8e1e..6da21c2089 100644 --- a/reference/reflection/versions.xml +++ b/reference/reflection/versions.xml @@ -4,340 +4,353 @@ Do NOT translate this file --> - - - - - - - - - - - + + + + + + + + + + + - + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - + + - + - - - + + + - - - - - - - - + + + + + + + + - - - + + + + + + + + + + + diff --git a/reference/regex/book.xml b/reference/regex/book.xml deleted file mode 100644 index 8f31c92513..0000000000 --- a/reference/regex/book.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - Regular Expression (POSIX Extended) - POSIX Regex - - - &reftitle.intro; - - &warn.deprecated.feature.5-3-0.removed.7-0-0.alternatives; - - - PCRE - (for full regular expression support) - - - fnmatch - (for simpler shell style wildcard pattern matching) - - - - - - PHP also supports regular expressions using a Perl-compatible syntax - using the PCRE functions. Those functions - support non-greedy matching, assertions, conditional subpatterns, and a - number of other features not supported by the POSIX-extended regular - expression syntax. - - - - - These regular expression functions are not binary-safe. The PCRE functions are. - - - - Regular expressions are used for complex string manipulation. - PHP uses the POSIX extended regular expressions as defined by POSIX - 1003.2. For a full description of POSIX regular expressions see the regex - man pages included in the regex directory in the PHP distribution. It's - in manpage format, so you'll want to do something along the lines of - man /usr/local/src/regex/regex.7 in order to read it. - - - - &reference.regex.setup; - &reference.regex.constants; - &reference.regex.examples; - &reference.regex.reference; - - - - diff --git a/reference/regex/configure.xml b/reference/regex/configure.xml deleted file mode 100644 index 3052b533fa..0000000000 --- a/reference/regex/configure.xml +++ /dev/null @@ -1,52 +0,0 @@ - - -
- &reftitle.install; - -
- PHP 7 - - &pecl.info; - &url.pecl.package;regex. - -
- -
- PHP 5 - - - Do not change the TYPE unless you know what you are doing. - - - - To enable regexp support configure PHP - . TYPE can be one of - system, apache, php. - The default value is php. - - &windows.builtin; -
- -
- - - diff --git a/reference/regex/constants.xml b/reference/regex/constants.xml deleted file mode 100644 index 04dbada782..0000000000 --- a/reference/regex/constants.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - &reftitle.constants; - &no.constants; - - - - diff --git a/reference/regex/examples.xml b/reference/regex/examples.xml deleted file mode 100644 index 2a594dfc97..0000000000 --- a/reference/regex/examples.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - &reftitle.examples; - - - Regular Expression Examples - - tag at the beginning of $string. -$string = ereg_replace("^", "
", $string); - -// Put a
tag at the end of $string. -$string = ereg_replace("$", "
", $string); - -// Get rid of any newline characters in $string. -$string = ereg_replace("\n", "", $string); -?> -]]> -
-
-
-
- - - diff --git a/reference/regex/functions/ereg-replace.xml b/reference/regex/functions/ereg-replace.xml deleted file mode 100644 index 754678c4d9..0000000000 --- a/reference/regex/functions/ereg-replace.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - ereg_replace - Replace regular expression - - - - - &warn.deprecated.function.5-3-0.removed.7-0-0.alternatives; - - preg_replace - - - - - - &reftitle.description; - - stringereg_replace - stringpattern - stringreplacement - stringstring - - - This function scans string for matches to - pattern, then replaces the matched text - with replacement. - - - - - &reftitle.parameters; - - - - pattern - - - A POSIX extended regular expression. - - - - - replacement - - - If pattern contains parenthesized substrings, - replacement may contain substrings of the form - \digit, which will be - replaced by the text matching the digit'th parenthesized substring; - \0 will produce the entire contents of string. - Up to nine substrings may be used. Parentheses may be nested, in which - case they are counted by the opening parenthesis. - - - - - string - - - The input string. - - - - - - - - - &reftitle.returnvalues; - - The modified string is returned. If no matches are found in - string, then it will be returned unchanged. - - - - - &reftitle.examples; - - For example, the following code snippet prints "This was a test" - three times: - - - - <function>ereg_replace</function> example - - -]]> - - - - - One thing to take note of is that if you use an integer value as - the replacement parameter, you may not get - the results you expect. This is because - ereg_replace will interpret the number as - the ordinal value of a character, and apply that. For instance: - - - - <function>ereg_replace</function> example - - -]]> - - - - - - Replace URLs with links - -[:space:]]+[[:alnum:]/]", - '\\0', $text); -?> -]]> - - - - - - - &reftitle.seealso; - - - ereg - eregi - eregi_replace - str_replace - preg_replace - quotemeta - - - - - - - diff --git a/reference/regex/functions/ereg.xml b/reference/regex/functions/ereg.xml deleted file mode 100644 index 1b883b4b74..0000000000 --- a/reference/regex/functions/ereg.xml +++ /dev/null @@ -1,177 +0,0 @@ - - - - - ereg - Regular expression match - - - - - &warn.deprecated.function.5-3-0.removed.7-0-0.alternatives; - - preg_match - - - - - - &reftitle.description; - - intereg - stringpattern - stringstring - arrayregs - - - Searches a string for matches to the regular - expression given in pattern in a case-sensitive - way. - - - - - &reftitle.parameters; - - - - pattern - - - Case sensitive regular expression. - - - - - string - - - The input string. - - - - - regs - - - If matches are found for parenthesized substrings of - pattern and the function is called with the - third argument regs, the matches will be stored - in the elements of the array regs. - - - $regs[1] will contain the substring which starts at - the first left parenthesis; $regs[2] will contain - the substring starting at the second, and so on. - $regs[0] will contain a copy of the complete string - matched. - - - - - - - - - &reftitle.returnvalues; - - Returns the length of the matched string if a match for - pattern was found in string, - or &false; if no matches were found or an error occurred. - - - If the optional parameter regs was not passed or - the length of the matched string is 0, this function returns 1. - - - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 4.1.0 - - Up to (and including) PHP 4.1.0 $regs will be - filled with exactly ten elements, even though more or fewer than - ten parenthesized substrings may actually have matched. This has - no effect on ereg's ability to match more - substrings. If no matches are found, $regs - will not be altered by ereg. - - - - - - - - - - &reftitle.examples; - - - <function>ereg</function> example - - The following code snippet takes a date in ISO format (YYYY-MM-DD) and - prints it in DD.MM.YYYY format: - - - -]]> - - - - - - - &reftitle.seealso; - - - eregi - ereg_replace - eregi_replace - preg_match - strpos - strstr - quotemeta - - - - - - - diff --git a/reference/regex/functions/eregi-replace.xml b/reference/regex/functions/eregi-replace.xml deleted file mode 100644 index 859b8f972e..0000000000 --- a/reference/regex/functions/eregi-replace.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - eregi_replace - Replace regular expression case insensitive - - - - - &warn.deprecated.function.5-3-0.removed.7-0-0.alternatives; - - - preg_replace - (with the i (PCRE_CASELESS) - modifier) - - - - - - - &reftitle.description; - - stringeregi_replace - stringpattern - stringreplacement - stringstring - - - This function is identical to ereg_replace - except that this ignores case distinction when matching - alphabetic characters. - - - - - &reftitle.parameters; - - - - pattern - - - A POSIX extended regular expression. - - - - - replacement - - - If pattern contains parenthesized substrings, - replacement may contain substrings of the form - \digit, which will be - replaced by the text matching the digit'th parenthesized substring; - \0 will produce the entire contents of string. - Up to nine substrings may be used. Parentheses may be nested, in which - case they are counted by the opening parenthesis. - - - - - string - - - The input string. - - - - - - - - - &reftitle.returnvalues; - - The modified string is returned. If no matches are found in - string, then it will be returned unchanged. - - - - - &reftitle.examples; - - - Highlight search results - -[^<]*)('. quotemeta($_GET['search']) .')'; -$replacement = '\\1\\2'; -$body = eregi_replace($pattern, $replacement, $body); -?> -]]> - - - - - - - &reftitle.seealso; - - - ereg - eregi - ereg_replace - preg_replace - quotemeta - - - - - - diff --git a/reference/regex/functions/eregi.xml b/reference/regex/functions/eregi.xml deleted file mode 100644 index 9ee942c4c6..0000000000 --- a/reference/regex/functions/eregi.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - eregi - Case insensitive regular expression match - - - - - &warn.deprecated.function.5-3-0.removed.7-0-0.alternatives; - - - preg_match - (with the i (PCRE_CASELESS) - modifier) - - - - - - - &reftitle.description; - - interegi - stringpattern - stringstring - arrayregs - - - This function is identical to ereg except that it - ignores case distinction when matching alphabetic characters. - - - - - &reftitle.parameters; - - - - pattern - - - Case insensitive regular expression. - - - - - string - - - The input string. - - - - - regs - - - If matches are found for parenthesized substrings of - pattern and the function is called with the - third argument regs, the matches will be stored - in the elements of the array regs. - - - $regs[1] will contain the substring which starts at - the first left parenthesis; $regs[2] will contain - the substring starting at the second, and so on. - $regs[0] will contain a copy of the complete string - matched. - - - - - - - - - &reftitle.returnvalues; - - Returns the length of the matched string if a match for - pattern was found in string, - or &false; if no matches were found or an error occurred. - - - If the optional parameter regs was not passed or - the length of the matched string is 0, this function returns 1. - - - - - &reftitle.examples; - - - <function>eregi</function> example - - -]]> - - - - - - - &reftitle.seealso; - - - ereg - ereg_replace - eregi_replace - preg_match - stripos - stristr - quotemeta - - - - - - diff --git a/reference/regex/functions/split.xml b/reference/regex/functions/split.xml deleted file mode 100644 index a3bd79a09d..0000000000 --- a/reference/regex/functions/split.xml +++ /dev/null @@ -1,190 +0,0 @@ - - - - - split - Split string into array by regular expression - - - - - &warn.deprecated.function.5-3-0.removed.7-0-0.alternatives; - - preg_split - explode - str_split - - - - - - &reftitle.description; - - arraysplit - stringpattern - stringstring - intlimit-1 - - - Splits a string into array by regular expression. - - - - - &reftitle.parameters; - - - - pattern - - - Case sensitive regular expression. - - - If you want to split on any of the characters which are considered - special by regular expressions, you'll need to escape them first. If - you think split (or any other regex function, for - that matter) is doing something weird, please read the file - regex.7, included in the - regex/ subdirectory of the PHP distribution. It's - in manpage format, so you'll want to do something along the lines of - man /usr/local/src/regex/regex.7 in order to read it. - - - - - string - - - The input string. - - - - - limit - - - If limit is set, the returned array will - contain a maximum of limit elements with the - last element containing the whole rest of - string. - - - - - - - - - &reftitle.returnvalues; - - Returns an array of strings, each of which is a substring of - string formed by splitting it on boundaries formed - by the case-sensitive regular expression pattern. - - - If there are n occurrences of - pattern, the returned array will contain - n+1 items. For example, if - there is no occurrence of pattern, an array with - only one element will be returned. Of course, this is also true if - string is empty. If an error occurs, - split returns &false;. - - - - - &reftitle.examples; - - - <function>split</function> example - - To split off the first four fields from a line from - /etc/passwd: - - - -]]> - - - - - - <function>split</function> example - - To parse a date which may be delimited with slashes, dots, or hyphens: - - -\n"; -?> -]]> - - - - - - - &reftitle.notes; - - - split is deprecated as of PHP 5.3.0. preg_split - is the suggested alternative to this function. If you don't require the power of regular - expressions, it is faster to use explode, which - doesn't incur the overhead of the regular expression engine. - - - - - For users looking for a way to emulate Perl's @chars = - split('', $str) behaviour, please see the examples for - preg_split or str_split. - - - - - - &reftitle.seealso; - - - preg_split - spliti - str_split - explode - implode - chunk_split - wordwrap - - - - - - - diff --git a/reference/regex/functions/spliti.xml b/reference/regex/functions/spliti.xml deleted file mode 100644 index d1f109c86c..0000000000 --- a/reference/regex/functions/spliti.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - spliti - Split string into array by regular expression case insensitive - - - - - &warn.deprecated.function.5-3-0.removed.7-0-0.alternatives; - - - preg_split - (with the i (PCRE_CASELESS) - modifier) - - - - - - - &reftitle.description; - - arrayspliti - stringpattern - stringstring - intlimit-1 - - - Splits a string into array by regular expression. - - - This function is identical to split except that this - ignores case distinction when matching alphabetic characters. - - - - - &reftitle.parameters; - - - - pattern - - - Case insensitive regular expression. - - - If you want to split on any of the characters which are considered - special by regular expressions, you'll need to escape them first. If - you think spliti (or any other regex function, for - that matter) is doing something weird, please read the file - regex.7, included in the - regex/ subdirectory of the PHP distribution. It's - in manpage format, so you'll want to do something along the lines of - man /usr/local/src/regex/regex.7 in order to read it. - - - - - string - - - The input string. - - - - - limit - - - If limit is set, the returned array will - contain a maximum of limit elements with the - last element containing the whole rest of - string. - - - - - - - - - &reftitle.returnvalues; - - Returns an array of strings, each of which is a substring of - string formed by splitting it on boundaries formed - by the case insensitive regular expression pattern. - - - If there are n occurrences of - pattern, the returned array will contain - n+1 items. For example, if - there is no occurrence of pattern, an array with - only one element will be returned. Of course, this is also true if - string is empty. If an error occurs, - spliti returns &false;. - - - - - &reftitle.examples; - - This example splits a string using 'a' as the separator : - - <function>spliti</function> example - - -]]> - - &example.outputs; - - - [1] => BBB - [2] => CCC - [3] => DDD - [4] => EEEaGGGA -) -]]> - - - - - - - &reftitle.seealso; - - - preg_split - split - explode - implode - - - - - - - diff --git a/reference/regex/functions/sql-regcase.xml b/reference/regex/functions/sql-regcase.xml deleted file mode 100644 index 4060355c01..0000000000 --- a/reference/regex/functions/sql-regcase.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - sql_regcase - Make regular expression for case insensitive match - - - - - &warn.deprecated.function.5-3-0.removed.7-0-0.alternatives; - - preg_match - preg_quote - - - - - - &reftitle.description; - - stringsql_regcase - stringstring - - - Creates a regular expression for a case insensitive match. - - - - - &reftitle.parameters; - - - - string - - - The input string. - - - - - - - - - &reftitle.returnvalues; - - Returns a valid regular expression which will match - string, ignoring case. This expression is - string with each alphabetic character converted to - a bracket expression; this bracket expression contains that character's - uppercase and lowercase form. Other characters remain unchanged. - - - - - &reftitle.examples; - - - <function>sql_regcase</function> example - - -]]> - - &example.outputs; - - - - - - - This can be used to achieve case insensitive pattern matching in - products which support only case sensitive regular expressions. - - - - - - diff --git a/reference/regex/reference.xml b/reference/regex/reference.xml deleted file mode 100644 index 87df75b687..0000000000 --- a/reference/regex/reference.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - POSIX Regex &Functions; - - &reftitle.seealso; - - &warn.deprecated.feature.5-3-0.removed.7-0-0.alternatives; - - - PCRE - (for full regular expression support) - - - fnmatch - (for simpler shell style wildcard pattern matching) - - - - - - &reference.regex.entities.functions; - - - - - diff --git a/reference/regex/setup.xml b/reference/regex/setup.xml deleted file mode 100644 index 2bd5c3c48e..0000000000 --- a/reference/regex/setup.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - &no.requirement; -
- - &reference.regex.configure; - -
- &reftitle.runtime; - &no.config; -
- -
- &reftitle.resources; - &no.resource; -
- -
- - - diff --git a/reference/regex/versions.xml b/reference/regex/versions.xml deleted file mode 100644 index ec0a021a0d..0000000000 --- a/reference/regex/versions.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/reference/rpminfo/book.xml b/reference/rpminfo/book.xml index e935030d29..4f2aeac183 100644 --- a/reference/rpminfo/book.xml +++ b/reference/rpminfo/book.xml @@ -2,6 +2,7 @@ + RpmInfo RpmInfo diff --git a/reference/rpminfo/functions/rpmdbinfo.xml b/reference/rpminfo/functions/rpmdbinfo.xml index ee8f55b2a6..cc8a798b13 100644 --- a/reference/rpminfo/functions/rpmdbinfo.xml +++ b/reference/rpminfo/functions/rpmdbinfo.xml @@ -49,15 +49,6 @@
- - &reftitle.seealso; - - - rpmaddtag - - - - &reftitle.examples; @@ -93,6 +84,14 @@ Array + + &reftitle.seealso; + + + rpmaddtag + + + diff --git a/reference/rpminfo/functions/rpmdbsearch.xml b/reference/rpminfo/functions/rpmdbsearch.xml index 2505e9d765..c21480ec30 100644 --- a/reference/rpminfo/functions/rpmdbsearch.xml +++ b/reference/rpminfo/functions/rpmdbsearch.xml @@ -67,15 +67,6 @@ - - &reftitle.seealso; - - - rpmaddtag - - - - &reftitle.examples; @@ -110,6 +101,14 @@ Array + + &reftitle.seealso; + + + rpmaddtag + + + diff --git a/reference/rpminfo/functions/rpminfo.xml b/reference/rpminfo/functions/rpminfo.xml index 256c08300e..2b53391d22 100644 --- a/reference/rpminfo/functions/rpminfo.xml +++ b/reference/rpminfo/functions/rpminfo.xml @@ -58,15 +58,6 @@ - - &reftitle.seealso; - - - rpmaddtag - - - - &reftitle.examples; @@ -99,6 +90,14 @@ Array + + &reftitle.seealso; + + + rpmaddtag + + + diff --git a/reference/rrd/book.xml b/reference/rrd/book.xml index b5b4a5bf8d..dc48e32b4c 100644 --- a/reference/rrd/book.xml +++ b/reference/rrd/book.xml @@ -2,6 +2,7 @@ + RRDtool RRD diff --git a/reference/rrd/functions/rrd-first.xml b/reference/rrd/functions/rrd-first.xml index c937003b9d..46e1069e08 100644 --- a/reference/rrd/functions/rrd-first.xml +++ b/reference/rrd/functions/rrd-first.xml @@ -44,7 +44,7 @@ &reftitle.returnvalues; - Integer number of unix timestamp, &false; if some error occurs. + Integer number of unix timestamp,&return.falseforfailure;. diff --git a/reference/rrd/functions/rrd-graph.xml b/reference/rrd/functions/rrd-graph.xml index 8492802913..0d3ada773a 100644 --- a/reference/rrd/functions/rrd-graph.xml +++ b/reference/rrd/functions/rrd-graph.xml @@ -37,7 +37,7 @@ Options for generating image. See man page of rrd graph for all - possible options. All options (data definitions, variable defintions, etc.) + possible options. All options (data definitions, variable definitions, etc.) are allowed. @@ -48,8 +48,7 @@ &reftitle.returnvalues; - Array with information about generated image is returned, &false; when error - occurs. + Array with information about generated image is returned,&return.falseforfailure;. diff --git a/reference/rrd/functions/rrd-info.xml b/reference/rrd/functions/rrd-info.xml index ca752a0f14..050adcebf3 100644 --- a/reference/rrd/functions/rrd-info.xml +++ b/reference/rrd/functions/rrd-info.xml @@ -35,7 +35,7 @@ &reftitle.returnvalues; - Array with information about requsted RRD file, &false; when error occurs. + Array with information about requested RRD file,&return.falseforfailure;. diff --git a/reference/rrd/functions/rrd-lastupdate.xml b/reference/rrd/functions/rrd-lastupdate.xml index 1410d1508e..a32e9960ad 100644 --- a/reference/rrd/functions/rrd-lastupdate.xml +++ b/reference/rrd/functions/rrd-lastupdate.xml @@ -36,7 +36,7 @@ &reftitle.returnvalues; - Array of information about last update, &false; when error occurs. + Array of information about last update,&return.falseforfailure;. diff --git a/reference/rrd/functions/rrd-restore.xml b/reference/rrd/functions/rrd-restore.xml index 35b4865497..00f70df894 100644 --- a/reference/rrd/functions/rrd-restore.xml +++ b/reference/rrd/functions/rrd-restore.xml @@ -53,7 +53,7 @@ &reftitle.returnvalues; - Returns &true; on success, &false; otherwise. + &return.success; diff --git a/reference/rrd/functions/rrd-tune.xml b/reference/rrd/functions/rrd-tune.xml index 65a4a68e93..95ac019b2e 100644 --- a/reference/rrd/functions/rrd-tune.xml +++ b/reference/rrd/functions/rrd-tune.xml @@ -46,7 +46,7 @@ &reftitle.returnvalues; - Returns &true; on success, &false; otherwise. + &return.success; diff --git a/reference/rrd/functions/rrd-update.xml b/reference/rrd/functions/rrd-update.xml index 5660775d2d..d7ff6f63a7 100644 --- a/reference/rrd/functions/rrd-update.xml +++ b/reference/rrd/functions/rrd-update.xml @@ -46,7 +46,7 @@ &reftitle.returnvalues; - Returns &true; on success, &false; when error occurs. + &return.success; diff --git a/reference/rrd/functions/rrd-xport.xml b/reference/rrd/functions/rrd-xport.xml index fb014df9f6..dc65c0a42b 100644 --- a/reference/rrd/functions/rrd-xport.xml +++ b/reference/rrd/functions/rrd-xport.xml @@ -37,7 +37,7 @@ &reftitle.returnvalues; - Array with information about RRD database file, &false; when error occurs. + Array with information about RRD database file,&return.falseforfailure;. diff --git a/reference/rrd/rrdcreator/construct.xml b/reference/rrd/rrdcreator/construct.xml index edeb5c3fa4..1779039ec1 100644 --- a/reference/rrd/rrdcreator/construct.xml +++ b/reference/rrd/rrdcreator/construct.xml @@ -16,7 +16,7 @@ intstep0 - Creates new RRDCreator instance. + Creates new RRDCreator instance. diff --git a/reference/rrd/rrdgraph/construct.xml b/reference/rrd/rrdgraph/construct.xml index 8b35c0e347..2bb2d58a38 100644 --- a/reference/rrd/rrdgraph/construct.xml +++ b/reference/rrd/rrdgraph/construct.xml @@ -14,7 +14,7 @@ stringpath - Creates new RRDGraph instance. This instance is responsible for rendering + Creates new RRDGraph instance. This instance is responsible for rendering the result of RRD database query into image. diff --git a/reference/rrd/rrdgraph/save.xml b/reference/rrd/rrdgraph/save.xml index 4003f92c7d..cea6477843 100644 --- a/reference/rrd/rrdgraph/save.xml +++ b/reference/rrd/rrdgraph/save.xml @@ -27,8 +27,7 @@ &reftitle.returnvalues; - Array with information about generated image is returned, &false; if error - occurs. + Returns array with information about generated image,&return.falseforfailure;. diff --git a/reference/rrd/rrdgraph/saveverbose.xml b/reference/rrd/rrdgraph/saveverbose.xml index aa579a86f6..0ab1976e99 100644 --- a/reference/rrd/rrdgraph/saveverbose.xml +++ b/reference/rrd/rrdgraph/saveverbose.xml @@ -30,8 +30,7 @@ &reftitle.returnvalues; - Array with detailed information about generated image is returned, optionally - with image data, &false; if error occurs. + Returns array with detailed information about generated image,&return.falseforfailure;. diff --git a/reference/rrd/rrdupdater/update.xml b/reference/rrd/rrdupdater/update.xml index caaede94ba..618040f80d 100644 --- a/reference/rrd/rrdupdater/update.xml +++ b/reference/rrd/rrdupdater/update.xml @@ -38,7 +38,7 @@ time - Time value for updating the RRD with a particulat data. Default value + Time value for updating the RRD with a particular data. Default value is current time. diff --git a/reference/rrd/setup.xml b/reference/rrd/setup.xml index cc34c8d1da..840a98fda7 100644 --- a/reference/rrd/setup.xml +++ b/reference/rrd/setup.xml @@ -8,10 +8,9 @@ &reftitle.required; You need to install librrd first to be able to use PECL/rrd. Most common option - is using of librrd-dev package from your favourite linux distro. + is using of librrd-dev package from your favourite Linux distro. PECL/rrd is tested with librrd 1.4.3, older or newer versions might or might not work for you. - PECL/rrd installation is tested with PHP 5.3.2 or newer. diff --git a/reference/runkit7/book.xml b/reference/runkit7/book.xml index 0e051bc3d1..88bcd9f948 100644 --- a/reference/runkit7/book.xml +++ b/reference/runkit7/book.xml @@ -2,6 +2,7 @@ + runkit7 runkit7 diff --git a/reference/runkit7/functions/runkit7-zval-inspect.xml b/reference/runkit7/functions/runkit7-zval-inspect.xml index c2e39fbf00..35f7b20fbd 100644 --- a/reference/runkit7/functions/runkit7-zval-inspect.xml +++ b/reference/runkit7/functions/runkit7-zval-inspect.xml @@ -28,8 +28,73 @@ - + + &reftitle.returnvalues; + + The array returned by this function contains the following elements: + + address + refcount (optional) + is_ref (optional) + type + + + + + + &reftitle.examples; + + + <function>runkit7_zval_inspect</function> example + + +]]> + + &example.outputs; + + + string(14) "0x7f45ab21b1e0" + ["refcount"]=> + int(2) + ["is_ref"]=> + bool(false) + ["type"]=> + int(8) +} + +array(2) { + ["address"]=> + string(14) "0x7f45ab21b1e0" + ["type"]=> + int(4) +} +]]> + + + + + + + &reftitle.seealso; + + + References Explained + References Explained (by Derick Rethans) + + + + + ScoutAPM ScoutAPM diff --git a/reference/seaslog/book.xml b/reference/seaslog/book.xml index de75fb18a6..add6df2546 100644 --- a/reference/seaslog/book.xml +++ b/reference/seaslog/book.xml @@ -2,6 +2,7 @@ + Seaslog Seaslog @@ -10,9 +11,6 @@ The Seaslog is an effective,fast,stable log extension for PHP. - - SeasLog requires PHP 5.2.0 or greater. Earlier versions may not work. - The log journal,which is usually the operate record of the system, software and the application record. diff --git a/reference/seaslog/ini.xml b/reference/seaslog/ini.xml index 8b2527404b..dadbfefab8 100644 --- a/reference/seaslog/ini.xml +++ b/reference/seaslog/ini.xml @@ -181,11 +181,11 @@ SeasLog will send log to tcp://remote_host:remote_port or udp://remote_host:remote_port server, - when seaslog.appender configured to `2 (TCP)` or `3 (UDP)`. + when seaslog.appender configured to 2 (TCP) or 3 (UDP). When SeasLog send log to TCP/UDP,style follow RFC5424. - The `{logInfo}` affected by seaslog.default_template. + The {logInfo} affected by seaslog.default_template. - Log function recall depth.Will affected variable `LineNo` in `%F`. + Log function recall depth.Will affected variable LineNo in %F. Default 0 @@ -515,17 +515,17 @@ The log style finally formatted such as: - `SeasLog`The following default variables are provided, + The following default variables are provided, which can be used directly in the log template and replaced as a corresponding value when the log is eventually generated. - Default log template is:`seaslog.default_template = "%T | %L | %P | %Q | %t | %M"`, - that's mean,default log style is:`{dateTime} | {level} | {pid} | {uniqid} | {timeStamp} | {logInfo}` + Default log template is: seaslog.default_template = "%T | %L | %P | %Q | %t | %M", + that's mean,default log style is: {dateTime} | {level} | {pid} | {uniqid} | {timeStamp} | {logInfo} - If you custom log template, such as:`seaslog.default_template = "[%T]:%L %P %Q %t %M" `, - that's will mean,log style was custom as:`[{dateTime}]:{level} {pid} {uniqid} {timeStamp} {logInfo}` + If you custom log template, such as: seaslog.default_template = "[%T]:%L %P %Q %t %M", + that's will mean,log style was custom as: [{dateTime}]:{level} {pid} {uniqid} {timeStamp} {logInfo} Seaslog Default Variable Table @@ -547,17 +547,17 @@ The log style finally formatted such as: %T - DateTime. Such as`2017-08-16 19:15:02`,affected by `seaslog.default_datetime_format`. + DateTime. Such as 2017-08-16 19:15:02, affected by seaslog.default_datetime_format. %t - Timestamp. Such as`1502882102.862`,accurate to milliseconds. + Timestamp. Such as 1502882102.862,accurate to milliseconds. %Q RequestId. To distinguish a single request, - such as not invoking the `SeasLog::setRequestId($string)` function, - the unique value generated by the built-in `static char *get_uniqid ()` + such as not invoking the SeasLog::setRequestId($string) function, + the unique value generated by the built-in static char *get_uniqid () function is used when the request is initialized. @@ -570,37 +570,37 @@ The log style finally formatted such as: %D - Domain:Port. Such as`www.cloudwise.com:80`; When Cli, Such as `cli`. + Domain:Port. Such as www.cloudwise.com:80; When Cli, Such as cli. %R - Request URI. Such as`/app/user/signin`; - When Cli it's the index script, Such as `CliIndex.php`. + Request URI. Such as /app/user/signin; + When Cli it's the index script, Such as CliIndex.php. %m - Request Method. Such as`Get`; When Cli it's the command script, Such as `/bin/bash`. + Request Method. Such as Get; When Cli it's the command script, Such as /bin/bash. %I - Client IP; When Cli it's `local`. + Client IP; When Cli it's local. Priority value: HTTP_X_REAL_IP > HTTP_X_FORWARDED_FOR > REMOTE_ADDR %F - FileName:LineNo. Such as `UserService.php:118`. + FileName:LineNo. Such as UserService.php:118. %U - MemoryUsage. byte. Call `zend_memory_usage`. + MemoryUsage. byte. Call zend_memory_usage. %u - PeakMemoryUsage. byte. Call `zend_memory_peak_usage`. + PeakMemoryUsage. byte. Call zend_memory_peak_usage. %C - `TODO` Class::Action. Such as `UserService::getUserInfo` + TODO Class::Action. Such as UserService::getUserInfo diff --git a/reference/sem/book.xml b/reference/sem/book.xml index 50c63bdd00..2ca0a42c6e 100644 --- a/reference/sem/book.xml +++ b/reference/sem/book.xml @@ -10,7 +10,7 @@ &reftitle.intro; - This module provides wrappers for the System V IPC family of functions. + These modules provide wrappers for the System V IPC family of functions. It includes semaphores, shared memory and inter-process messaging (IPC). @@ -60,7 +60,13 @@ data between processes, without the need for setting up an alternative using Unix domain sockets. - ¬e.no-windows.extension; + + + Only the shared memory functions and ftok are available + on Windows. Neither semaphores nor inter-process messaging functions are + supported on that platform. + + diff --git a/reference/sem/constants.xml b/reference/sem/constants.xml index 05a75bd106..8d652ada64 100644 --- a/reference/sem/constants.xml +++ b/reference/sem/constants.xml @@ -3,49 +3,59 @@ &reftitle.constants; &extension.constants; - -
- System V message constants - - - - Constant - Type - Changelog - - - - - MSG_IPC_NOWAIT - int - - - - MSG_EAGAIN - int - As of 5.2.0 - - - MSG_ENOMSG - int - As of 5.2.0 - - - MSG_NOERROR - int - - - - MSG_EXCEPT - int - - - - -
- + + + + MSG_IPC_NOWAIT + (int) + + + + + + + + + MSG_EAGAIN + (int) + + + + + + + + + MSG_ENOMSG + (int) + + + + + + + + + MSG_NOERROR + (int) + + + + + + + + + MSG_EXCEPT + (int) + + + + + + + - - - - session_is_registered - Find out whether a global variable is registered in a session - - - - &reftitle.description; - - boolsession_is_registered - stringname - - - Finds out whether a global variable is registered in a session. - - &warn.deprecated.function-5-3-0.removed-5-4-0; - - - - &reftitle.parameters; - - - - name - - - The variable name. - - - - - - - - - &reftitle.returnvalues; - - session_is_registered returns &true; if there is a - global variable with the name name registered in - the current session, &false; otherwise. - - - - - &reftitle.notes; - - - If $_SESSION is used, use isset to check a - variable is registered in $_SESSION. - - - - - If you are using $_SESSION - (or $HTTP_SESSION_VARS), do not use - session_register, - session_is_registered and - session_unregister. - - - - - - - diff --git a/reference/session/functions/session-regenerate-id.xml b/reference/session/functions/session-regenerate-id.xml index 0889e465cc..75cacecc13 100644 --- a/reference/session/functions/session-regenerate-id.xml +++ b/reference/session/functions/session-regenerate-id.xml @@ -91,7 +91,7 @@ if (isset($_SESSION['destroyed']) $old_sessionid = session_id(); // Set destroyed timestamp -$_SESSION['destroyed'] = time(); // Since PHP 7.0.0 and up, session_regenerate_id() saves old session data +$_SESSION['destroyed'] = time(); // session_regenerate_id() saves old session data // Simply calling session_regenerate_id() may result in lost session, etc. // See next example. diff --git a/reference/session/functions/session-reset.xml b/reference/session/functions/session-reset.xml index b66ea05196..8a947ef882 100644 --- a/reference/session/functions/session-reset.xml +++ b/reference/session/functions/session-reset.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/session/functions/session-set-save-handler.xml b/reference/session/functions/session-set-save-handler.xml index 897be804aa..df23668708 100644 --- a/reference/session/functions/session-set-save-handler.xml +++ b/reference/session/functions/session-set-save-handler.xml @@ -20,7 +20,7 @@ callableupdate_timestamp - Since PHP 5.4 it is possible to register the following prototype: + It is possible to register the following prototype: boolsession_set_save_handler @@ -50,7 +50,7 @@ SessionIdInterface and/or SessionUpdateTimestampHandlerInterface, such as SessionHandler, to register as the session - handler. Since PHP 5.4 only. + handler. @@ -279,7 +279,7 @@ Custom session handler: see full code in SessionHandlerInterface synopsis. - The following code is for PHP version 5.4.0 and above. We just show the invocation here, the full example can be + We just show the invocation here, the full example can be seen in the SessionHandlerInterface synopsis linked above. @@ -299,95 +299,6 @@ $handler = new MySessionHandler(); session_set_save_handler($handler, true); session_start(); -// proceed to set and retrieve values by key from $_SESSION -]]> - - - - Custom session save handler using objects - - The following code is for PHP versions less than 5.4.0. - - - The following example provides file based session storage similar to the - PHP sessions default save handler files. This - example could easily be extended to cover database storage using your - favorite PHP supported database engine. - - - Note we additionally register the shutdown function session_write_close - using register_shutdown_function under PHP less than 5.4.0. - This is generally advised when registering objects as session save handlers under PHP less - than 5.4.0. - - -savePath = $savePath; - if (!is_dir($this->savePath)) { - mkdir($this->savePath, 0777); - } - - return true; - } - - function close() - { - return true; - } - - function read($id) - { - return (string)@file_get_contents("$this->savePath/sess_$id"); - } - - function write($id, $data) - { - return file_put_contents("$this->savePath/sess_$id", $data) === false ? false : true; - } - - function destroy($id) - { - $file = "$this->savePath/sess_$id"; - if (file_exists($file)) { - unlink($file); - } - - return true; - } - - function gc($maxlifetime) - { - foreach (glob("$this->savePath/sess_*") as $file) { - if (filemtime($file) + $maxlifetime < time() && file_exists($file)) { - unlink($file); - } - } - - return true; - } -} - -$handler = new FileSessionHandler(); -session_set_save_handler( - array($handler, 'open'), - array($handler, 'close'), - array($handler, 'read'), - array($handler, 'write'), - array($handler, 'destroy'), - array($handler, 'gc') - ); - -// the following prevents unexpected effects when using objects as save handlers -register_shutdown_function('session_write_close'); - -session_start(); // proceed to set and retrieve values by key from $_SESSION ]]> @@ -399,23 +310,7 @@ session_start(); &reftitle.notes; - When using objects as session save handlers, it is important to register the - shutdown function with PHP to avoid unexpected side-effects from the way - PHP internally destroys objects on shutdown and may prevent the - write and close from being called. - Typically you should register 'session_write_close' using the - register_shutdown_function function. - - - As of PHP 5.4.0 you can use session_register_shutdown or - simply use the 'register shutdown' flag when invoking - session_set_save_handler using the OOP method and passing an - instance that implements SessionHandlerInterface. - - - - - As of PHP 5.0.5 the write and + The write and close handlers are called after object destruction and therefore cannot use objects or throw exceptions. Exceptions are not able to be caught since will not be caught nor will @@ -450,7 +345,7 @@ session_start(); configuration directive. The register_shutdown_function - The session_register_shutdown for PHP 5.4.0+ + The session_register_shutdown Refer to save_handler.inc for a full procedural reference implementation diff --git a/reference/session/functions/session-status.xml b/reference/session/functions/session-status.xml index f2d62aa152..1e070b04ad 100644 --- a/reference/session/functions/session-status.xml +++ b/reference/session/functions/session-status.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/session/functions/session-unregister.xml b/reference/session/functions/session-unregister.xml deleted file mode 100644 index 9da6d45e86..0000000000 --- a/reference/session/functions/session-unregister.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - session_unregister - Unregister a global variable from the current session - - - - &reftitle.description; - - boolsession_unregister - stringname - - - session_unregister unregisters the global variable - named name from the current session. - - &warn.deprecated.function-5-3-0.removed-5-4-0; - - - - &reftitle.parameters; - - - - name - - - The variable name. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.notes; - - - If $_SESSION is used, use unset to - unregister a session variable. Do not unset - $_SESSION itself as this will disable the special - function of the $_SESSION superglobal. - - - - - This function does not unset the corresponding global variable for - name, it only prevents the variable from being - saved as part of the session. You must call unset - to remove the corresponding global variable. - - - - - If you are using $_SESSION (or - $HTTP_SESSION_VARS), do not use - session_register, - session_is_registered and - session_unregister. - - - - - - - diff --git a/reference/session/functions/session-unset.xml b/reference/session/functions/session-unset.xml index 21164ecdb6..87b0831876 100644 --- a/reference/session/functions/session-unset.xml +++ b/reference/session/functions/session-unset.xml @@ -18,6 +18,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/session/functions/session-write-close.xml b/reference/session/functions/session-write-close.xml index 9ec02a6d9c..af1fa22ec4 100644 --- a/reference/session/functions/session-write-close.xml +++ b/reference/session/functions/session-write-close.xml @@ -26,6 +26,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/session/ini.xml b/reference/session/ini.xml index bece5cddd2..0641e72e85 100644 --- a/reference/session/ini.xml +++ b/reference/session/ini.xml @@ -367,8 +367,7 @@ php_binary) and WDDX are supported (name wddx). WDDX is only available, if PHP is compiled with WDDX - support. php_serialize is available - from PHP 5.5.4. php_serialize uses plain + support. php_serialize uses plain serialize/unserialize function internally and does not have limitations that php and php_binary have. Older serialize handlers @@ -472,7 +471,7 @@ which are available on many Unix systems. - This feature is supported on Windows since PHP 5.3.3. Setting + This feature is supported on Windows. Setting session.entropy_length to a non zero value will make PHP use the Windows Random API as entropy source. @@ -481,9 +480,9 @@ Removed in PHP 7.1.0. - As of PHP 5.4.0 session.entropy_file defaults + session.entropy_file defaults to /dev/urandom or /dev/arandom - if it is available. In PHP 5.3.0 this directive is left empty by default. + if it is available.
@@ -567,7 +566,7 @@ cookies to store the session id on the client side. Enabling this setting prevents attacks involved passing session ids in URLs. - Defaults to 1 (enabled) since PHP 5.3.0. + Defaults to 1 (enabled). @@ -865,7 +864,7 @@ '1' means SHA-1 (160 bits). - Since PHP 5.3.0 it is also possible to specify any of the algorithms + It is also possible to specify any of the algorithms provided by the hash extension (if it is available), like sha512 or whirlpool. A complete list of supported algorithms can @@ -873,7 +872,7 @@ - This setting was introduced in PHP 5. Removed in PHP 7.1.0. + Removed in PHP 7.1.0. diff --git a/reference/session/security.xml b/reference/session/security.xml index a818b734e6..4c8671d11f 100644 --- a/reference/session/security.xml +++ b/reference/session/security.xml @@ -72,9 +72,8 @@ - As of PHP 5.5.2, - session.use_strict_mode - is available. When it is enabled, and the session save handler supports it, + When session.use_strict_mode is enabled, + and the session save handler supports it, an uninitialized session ID is rejected and a new one is created. This prevents an attack that forces users to use a known session ID. An attacker may paste links or send emails that contains the session ID. @@ -190,8 +189,8 @@ Session IDs must be regenerated when user privileges are elevated, such as after authenticating. session_regenerate_id must be called prior to - setting the authentication information to $_SESSION. (As of PHP 7.0.0, - session_regenerate_id saves the current session data + setting the authentication information to $_SESSION. + (session_regenerate_id saves the current session data automatically in order to save timestamp/etc. to the current session.) Ensure only the new session contains the authenticated flag. diff --git a/reference/session/sessionhandler.xml b/reference/session/sessionhandler.xml index 24c323182f..88fa9ac78b 100644 --- a/reference/session/sessionhandler.xml +++ b/reference/session/sessionhandler.xml @@ -93,30 +93,6 @@
-
- &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.5.1 - - Added SessionHandler::create_sid. - - - - - - -
-
diff --git a/reference/session/sessionhandler/create-sid.xml b/reference/session/sessionhandler/create-sid.xml index ebb933d55a..f5309e8381 100644 --- a/reference/session/sessionhandler/create-sid.xml +++ b/reference/session/sessionhandler/create-sid.xml @@ -18,6 +18,11 @@ </para> </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> diff --git a/reference/session/sessionhandler/read.xml b/reference/session/sessionhandler/read.xml index c23895b286..3ef5642c80 100644 --- a/reference/session/sessionhandler/read.xml +++ b/reference/session/sessionhandler/read.xml @@ -9,7 +9,7 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <modifier>public</modifier> <type>string</type><methodname>SessionHandler::read</methodname> + <modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>SessionHandler::read</methodname> <methodparam><type>string</type><parameter>id</parameter></methodparam> </methodsynopsis> <para> @@ -52,7 +52,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns an encoded string of the read data. If nothing was read, it must return an empty string. Note this value is returned internally to PHP for processing. + Returns an encoded string of the read data. If nothing was read, it must return &false;. Note this value is returned internally to PHP for processing. </para> </refsect1> diff --git a/reference/session/sessionhandlerinterface.xml b/reference/session/sessionhandlerinterface.xml index 4dcf5ef12c..45c45bd1a5 100644 --- a/reference/session/sessionhandlerinterface.xml +++ b/reference/session/sessionhandlerinterface.xml @@ -25,7 +25,7 @@ <!-- }}} --> <section xml:id="sessionhandlerinterface.synopsis"> - &reftitle.classsynopsis; + &reftitle.interfacesynopsis; <!-- {{{ Synopsis --> <classsynopsis> @@ -33,9 +33,9 @@ <!-- {{{ Class synopsis --> <classsynopsisinfo> - <ooclass> - <classname>SessionHandlerInterface</classname> - </ooclass> + <oointerface> + <interfacename>SessionHandlerInterface</interfacename> + </oointerface> </classsynopsisinfo> <!-- }}} --> diff --git a/reference/session/sessionhandlerinterface/gc.xml b/reference/session/sessionhandlerinterface/gc.xml index 12bca46c74..a260d38cd5 100644 --- a/reference/session/sessionhandlerinterface/gc.xml +++ b/reference/session/sessionhandlerinterface/gc.xml @@ -9,7 +9,7 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <modifier>abstract</modifier> <modifier>public</modifier> <type class="union"><type>int</type><type>bool</type></type><methodname>SessionHandlerInterface::gc</methodname> + <modifier>abstract</modifier> <modifier>public</modifier> <type class="union"><type>int</type><type>false</type></type><methodname>SessionHandlerInterface::gc</methodname> <methodparam><type>int</type><parameter>max_lifetime</parameter></methodparam> </methodsynopsis> <para> diff --git a/reference/session/sessionhandlerinterface/read.xml b/reference/session/sessionhandlerinterface/read.xml index 868d94df87..29aaab046e 100644 --- a/reference/session/sessionhandlerinterface/read.xml +++ b/reference/session/sessionhandlerinterface/read.xml @@ -9,7 +9,7 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <modifier>abstract</modifier> <modifier>public</modifier> <type>string</type><methodname>SessionHandlerInterface::read</methodname> + <modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>SessionHandlerInterface::read</methodname> <methodparam><type>string</type><parameter>id</parameter></methodparam> </methodsynopsis> <para> @@ -22,7 +22,7 @@ This method should retrieve the session data from storage by the session ID provided. The string returned by this method must be in the same serialized format as when originally passed to the <function>SessionHandlerInterface::write</function> - If the record was not found, return an empty string. + If the record was not found, return &false;. </para> <para> The data returned by this method will be decoded internally by PHP using the @@ -52,7 +52,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns an encoded string of the read data. If nothing was read, it must return an empty string. Note this value is returned internally to PHP for processing. + Returns an encoded string of the read data. If nothing was read, it must return &false;. Note this value is returned internally to PHP for processing. </para> </refsect1> diff --git a/reference/session/sessionidinterface.xml b/reference/session/sessionidinterface.xml index 38c0601458..a11c459485 100644 --- a/reference/session/sessionidinterface.xml +++ b/reference/session/sessionidinterface.xml @@ -25,7 +25,7 @@ <!-- }}} --> <section xml:id="sessionidinterface.synopsis"> - &reftitle.classsynopsis; + &reftitle.interfacesynopsis; <!-- {{{ Synopsis --> <classsynopsis> @@ -33,9 +33,9 @@ <!-- {{{ Class synopsis --> <classsynopsisinfo> - <ooclass> - <classname>SessionIdInterface</classname> - </ooclass> + <oointerface> + <interfacename>SessionIdInterface</interfacename> + </oointerface> </classsynopsisinfo> <!-- }}} --> diff --git a/reference/session/upload-progress.xml b/reference/session/upload-progress.xml index f57ac4990f..085fe53c68 100644 --- a/reference/session/upload-progress.xml +++ b/reference/session/upload-progress.xml @@ -4,12 +4,6 @@ <chapter xml:id="session.upload-progress" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Session Upload Progress - - - This feature is available as of PHP 5.4.0. - - - When the session.upload_progress.enabled diff --git a/reference/simplexml/configure.xml b/reference/simplexml/configure.xml index 7dfc32be0f..1220e19142 100644 --- a/reference/simplexml/configure.xml +++ b/reference/simplexml/configure.xml @@ -6,10 +6,6 @@ &installation.enabled.disable; - - Note: Before PHP 5.1.2, is - required to enable this extension. -
- + simplexml_import_dom Get a SimpleXMLElement object from a DOM node @@ -9,8 +9,8 @@ &reftitle.description; SimpleXMLElementnullsimplexml_import_dom - DOMNodenode - stringclass_name"SimpleXMLElement" + SimpleXMLElementDOMNodenode + stringnullclass_nameSimpleXMLElement::class This function takes a node of a DOM @@ -95,7 +95,6 @@ blah
- - + simplexml_load_file @@ -12,9 +12,9 @@ SimpleXMLElementfalsesimplexml_load_file stringfilename - stringclass_name"SimpleXMLElement" + stringnullclass_nameSimpleXMLElement::class intoptions0 - stringns"" + stringnamespace_or_prefix"" boolis_prefix&false; @@ -32,16 +32,6 @@ Path to the XML file - - - Libxml 2 unescapes the URI, so if you want to pass e.g. - b&c as the URI parameter a, - you have to call - simplexml_load_file(rawurlencode('http://example.com/?a=' . - urlencode('b&c'))). Since PHP 5.1.0 you don't need to do - this because PHP will do it for you. - - @@ -59,14 +49,13 @@ options - Since PHP 5.1.0 and Libxml 2.6.0, you may also use the - options parameter to specify additional Libxml parameters. + Since Libxml 2.6.0, you may also use the + options parameter to specify additional Libxml parameters. - ns + namespace_or_prefix Namespace prefix or URI. @@ -77,7 +66,7 @@ is_prefix - &true; if ns is a prefix, &false; if it's a URI; + &true; if namespace_or_prefix is a prefix, &false; if it's a URI; defaults to &false;. @@ -109,30 +98,6 @@ - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.2.0 - - The optional parameter is_prefix was added. - - - - - - - &reftitle.examples; @@ -168,7 +133,7 @@ SimpleXMLElement Object ]]> - At this point, you can go about using $xml->title + At this point, you can go about using $xml->title and any other elements. @@ -181,14 +146,13 @@ SimpleXMLElement Object simplexml_load_string SimpleXMLElement::__construct - + libxml_use_internal_errors - - + simplexml_load_string @@ -12,9 +12,9 @@ SimpleXMLElementfalsesimplexml_load_string stringdata - stringclass_name"SimpleXMLElement" + stringnullclass_nameSimpleXMLElement::class intoptions0 - stringns"" + stringnamespace_or_prefix"" boolis_prefix&false; @@ -49,14 +49,13 @@ options - Since PHP 5.1.0 and Libxml 2.6.0, you may also use the - options parameter to specify additional Libxml parameters. + Since Libxml 2.6.0, you may also use the + options parameter to specify additional Libxml parameters. - ns + namespace_or_prefix Namespace prefix or URI. @@ -67,7 +66,7 @@ is_prefix - &true; if ns is a prefix, &false; if it's a URI; + &true; if namespace_or_prefix is a prefix, &false; if it's a URI; defaults to &false;. @@ -100,30 +99,6 @@ - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.2.0 - - The optional parameter is_prefix was added. - - - - - - - - &reftitle.examples; @@ -164,7 +139,7 @@ SimpleXMLElement Object ]]> - At this point, you can go about using $xml->body + At this point, you can go about using $xml->body and such. @@ -177,14 +152,13 @@ SimpleXMLElement Object simplexml_load_file SimpleXMLElement::__construct - + libxml_use_internal_errors - diff --git a/reference/simplexml/simplexmlelement/addAttribute.xml b/reference/simplexml/simplexmlelement/addAttribute.xml index 8ad912c5c9..fff4da9e66 100644 --- a/reference/simplexml/simplexmlelement/addAttribute.xml +++ b/reference/simplexml/simplexmlelement/addAttribute.xml @@ -11,9 +11,9 @@ &reftitle.description; public voidSimpleXMLElement::addAttribute - stringname - stringvalue - stringnamespace + stringqualifiedName + stringvalue + stringnullnamespace&null; Adds an attribute to the SimpleXML element. @@ -25,7 +25,7 @@ - name + qualifiedName The name of the attribute to add. @@ -153,7 +153,6 @@ echo $sxe->asXML(); - + &reftitle.examples; + + <function>sodium_crypto_box_seal_open</function> example + + +]]> + + &example.outputs.similar; + + + + + + + &reftitle.examples; + + <function>sodium_crypto_box_seal</function> example + + +]]> + + &example.outputs.similar; + + + + + + &reftitle.examples; + + <function>sodium_crypto_generichash_final</function> example + + +]]> + + &example.outputs.similar; + + + + + + &reftitle.examples; + + <function>sodium_crypto_generichash_init</function> example + + +]]> + + &example.outputs.similar; + + + + + + &reftitle.examples; + + <function>sodium_crypto_generichash_update</function> example + + +]]> + + &example.outputs.similar; + + + + + + &reftitle.examples; + + <function>sodium_crypto_secretstream_xchacha20poly1305_init_pull</function> example + + +]]> + + &example.outputs.similar; + + + + + + &reftitle.examples; + + <function>sodium_crypto_secretstream_xchacha20poly1305_init_push</function> example + + +]]> + + &example.outputs.similar; + + + + + diff --git a/reference/sodium/functions/sodium-crypto-secretstream-xchacha20poly1305-keygen.xml b/reference/sodium/functions/sodium-crypto-secretstream-xchacha20poly1305-keygen.xml index b79c03442f..37c7ae3839 100644 --- a/reference/sodium/functions/sodium-crypto-secretstream-xchacha20poly1305-keygen.xml +++ b/reference/sodium/functions/sodium-crypto-secretstream-xchacha20poly1305-keygen.xml @@ -4,7 +4,7 @@ sodium_crypto_secretstream_xchacha20poly1305_keygen - Description + Generate a random secretstream key. @@ -14,11 +14,9 @@ - + Generate a random secretstream key. - &warn.undocumented.func; - @@ -29,7 +27,7 @@ &reftitle.returnvalues; - + Returns a string of random bytes. diff --git a/reference/sodium/functions/sodium-crypto-secretstream-xchacha20poly1305-pull.xml b/reference/sodium/functions/sodium-crypto-secretstream-xchacha20poly1305-pull.xml index d8d66e5b5f..bd9a2dd448 100644 --- a/reference/sodium/functions/sodium-crypto-secretstream-xchacha20poly1305-pull.xml +++ b/reference/sodium/functions/sodium-crypto-secretstream-xchacha20poly1305-pull.xml @@ -3,7 +3,7 @@ sodium_crypto_secretstream_xchacha20poly1305_pull - Description + Decrypt a chunk of data from an encrypted stream @@ -15,11 +15,9 @@ stringadditional_data"" - + Decrypt a chunk of data from an encrypted stream. - &warn.undocumented.func; - @@ -29,7 +27,8 @@ state - + See sodium_crypto_secretstream_xchacha20poly1305_init_pull + and sodium_crypto_secretstream_xchacha20poly1305_init_push @@ -37,7 +36,7 @@ ciphertext - + The ciphertext chunk to decrypt. @@ -45,7 +44,7 @@ additional_data - + Optional additional data to include in the authentication tag. @@ -55,11 +54,42 @@ &reftitle.returnvalues; - + An array with two values: + + + + string; The decrypted chunk + + + + + int; An optional tag (if provided during push). Possible values: + + + SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE: + the most common tag, that doesn't add any information about the nature of the message. + + + SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINAL: + indicates that the message marks the end of the stream, and erases the secret key used to encrypt the previous sequence. + + + SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PUSH: + indicates that the message marks the end of a set of messages, but not the end of the stream. + For example, a huge JSON string sent as multiple chunks can use this tag to indicate to the application that the + string is complete and that it can be decoded. But the stream itself is not closed, and more data may follow. + + + SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY: + "forget" the key used to encrypt this message and the previous ones, and derive a new secret key. + + + + + - + Apache Solr Solr diff --git a/reference/solr/setup.xml b/reference/solr/setup.xml index 5a4ca3ee8e..bb724b4f63 100644 --- a/reference/solr/setup.xml +++ b/reference/solr/setup.xml @@ -7,7 +7,6 @@
&reftitle.required; - PHP version 5.2.11 or later is required. The libxml and curl extensions must also be enabled for the Apache Solr extension to be available. libxml2 2.6.31 or later is required. libcurl 7.18.0 or later is also required. diff --git a/reference/solr/solrinputdocument/addchilddocument.xml b/reference/solr/solrinputdocument/addchilddocument.xml index 5b77261a99..325314f5d5 100644 --- a/reference/solr/solrinputdocument/addchilddocument.xml +++ b/reference/solr/solrinputdocument/addchilddocument.xml @@ -31,7 +31,14 @@ - + + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.errors; @@ -42,13 +49,6 @@ - - &reftitle.returnvalues; - - - - - &reftitle.examples; diff --git a/reference/solr/solrinputdocument/addchilddocuments.xml b/reference/solr/solrinputdocument/addchilddocuments.xml index d442522043..a2c56ae4cf 100644 --- a/reference/solr/solrinputdocument/addchilddocuments.xml +++ b/reference/solr/solrinputdocument/addchilddocuments.xml @@ -32,7 +32,14 @@ - + + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.errors; @@ -43,13 +50,6 @@ - - &reftitle.returnvalues; - - - - - &reftitle.examples; diff --git a/reference/solr/solrinputdocument/setfieldboost.xml b/reference/solr/solrinputdocument/setfieldboost.xml index 42cfeab40c..c6cd0e4a22 100644 --- a/reference/solr/solrinputdocument/setfieldboost.xml +++ b/reference/solr/solrinputdocument/setfieldboost.xml @@ -44,6 +44,13 @@ + + &reftitle.returnvalues; + + &return.success; + + + - - - Sphinx Client - Sphinx - - - &reftitle.intro; - - This extension provides bindings for Sphinx search client library. - Sphinx is a standalone search engine meant to provide fast, - size-efficient and relevant fulltext search functions to other - applications. Sphinx was specially designed to integrate well with - SQL databases and scripting languages. - Both Sphinx and its client library can be obtained from the - official site - - - - &reference.sphinx.setup; - &reference.sphinx.constants; - &reference.sphinx.examples; - &reference.sphinx.sphinxclient; - - - - - diff --git a/reference/sphinx/configure.xml b/reference/sphinx/configure.xml deleted file mode 100644 index 244a7524ef..0000000000 --- a/reference/sphinx/configure.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - -
- &reftitle.install; - - &pecl.info; - . - - - If the ./configure script generated by - phpize is having trouble finding the libsphinxclient - files (for example, it was installed into a custom prefix directory), use - ./configure --with-sphinx=$PREFIX, where $PREFIX is - installation prefix of libsphinxclient. - -
- - - diff --git a/reference/sphinx/constants.xml b/reference/sphinx/constants.xml deleted file mode 100644 index 178091fda9..0000000000 --- a/reference/sphinx/constants.xml +++ /dev/null @@ -1,393 +0,0 @@ - - - - - &reftitle.constants; - &extension.constants; - - - - - SEARCHD_OK - (int) - - - - - - - - - SEARCHD_ERROR - (int) - - - - - - - - - SEARCHD_RETRY - (int) - - - - - - - - - SEARCHD_WARNING - (int) - - - - - - - - - SPH_MATCH_ALL - (int) - - - - - - - - - SPH_MATCH_ANY - (int) - - - - - - - - - SPH_MATCH_PHRASE - (int) - - - - - - - - - SPH_MATCH_BOOLEAN - (int) - - - - - - - - - SPH_MATCH_EXTENDED - (int) - - - - - - - - - SPH_MATCH_FULLSCAN - (int) - - - - - - - - - SPH_MATCH_EXTENDED2 - (int) - - - - - - - - - SPH_RANK_PROXIMITY_BM25 - (int) - - - - - - - - - SPH_RANK_BM25 - (int) - - - - - - - - - SPH_RANK_NONE - (int) - - - - - - - - - SPH_RANK_WORDCOUNT - (int) - - - - - - - - - SPH_SORT_RELEVANCE - (int) - - - - - - - - - SPH_SORT_ATTR_DESC - (int) - - - - - - - - - SPH_SORT_ATTR_ASC - (int) - - - - - - - - - SPH_SORT_TIME_SEGMENTS - (int) - - - - - - - - - SPH_SORT_EXTENDED - (int) - - - - - - - - - SPH_SORT_EXPR - (int) - - - - - - - - - SPH_FILTER_VALUES - (int) - - - - - - - - - SPH_FILTER_RANGE - (int) - - - - - - - - - SPH_FILTER_FLOATRANGE - (int) - - - - - - - - - SPH_ATTR_INTEGER - (int) - - - - - - - - - SPH_ATTR_TIMESTAMP - (int) - - - - - - - - - SPH_ATTR_ORDINAL - (int) - - - - - - - - - SPH_ATTR_BOOL - (int) - - - - - - - - - SPH_ATTR_FLOAT - (int) - - - - - - - - - SPH_ATTR_MULTI - (int) - - - - - - - - - SPH_GROUPBY_DAY - (int) - - - - - - - - - SPH_GROUPBY_WEEK - (int) - - - - - - - - - SPH_GROUPBY_MONTH - (int) - - - - - - - - - SPH_GROUPBY_YEAR - (int) - - - - - - - - - SPH_GROUPBY_ATTR - (int) - - - - - - - - - SPH_GROUPBY_ATTRPAIR - (int) - - - - - - - - - - - - diff --git a/reference/sphinx/examples.xml b/reference/sphinx/examples.xml deleted file mode 100644 index 62460eed05..0000000000 --- a/reference/sphinx/examples.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - &reftitle.examples; - - Basic usage example - -setServer("localhost", 6712); -$s->setMatchMode(SPH_MATCH_ANY); -$s->setMaxQueryTime(3); - -$result = $s->query("test"); - -var_dump($result); - -?> -]]> - - &example.outputs.similar; - - - string(0) "" - ["warning"]=> - string(0) "" - ["status"]=> - int(0) - ["fields"]=> - array(3) { - [0]=> - string(7) "subject" - [1]=> - string(4) "body" - [2]=> - string(6) "author" - } - ["attrs"]=> - array(0) { - } - ["matches"]=> - array(1) { - [3]=> - array(2) { - ["weight"]=> - int(1) - ["attrs"]=> - array(0) { - } - } - } - ["total"]=> - int(1) - ["total_found"]=> - int(1) - ["time"]=> - float(0) - ["words"]=> - array(1) { - ["to"]=> - array(2) { - ["docs"]=> - int(1) - ["hits"]=> - int(1) - } - } -} -]]> - - - - - - diff --git a/reference/sphinx/reference.xml b/reference/sphinx/reference.xml deleted file mode 100644 index 44cf131e0c..0000000000 --- a/reference/sphinx/reference.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Sphinx &Functions; - - &reference.sphinx.entities.functions; - - - - - diff --git a/reference/sphinx/setup.xml b/reference/sphinx/setup.xml deleted file mode 100644 index 33e576f80b..0000000000 --- a/reference/sphinx/setup.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - - PECL/sphinx requires PHP 5.2.2 or newer. - -
- - - &reference.sphinx.configure; - - - -
- &reftitle.runtime; - &no.config; -
- - -
- &reftitle.resources; - &no.resource; -
- -
- - - diff --git a/reference/sphinx/sphinxclient.xml b/reference/sphinx/sphinxclient.xml deleted file mode 100644 index 4c08ee765e..0000000000 --- a/reference/sphinx/sphinxclient.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - The SphinxClient class - SphinxClient - - - - -
- &reftitle.intro; - - The SphinxClient class provides object-oriented interface to Sphinx. - -
- - -
- &reftitle.classsynopsis; - - - - SphinxClient - - - - - SphinxClient - - - - - &Methods; - - - - -
- -
- - &reference.sphinx.entities.sphinxclient; - -
- - diff --git a/reference/sphinx/sphinxclient/addquery.xml b/reference/sphinx/sphinxclient/addquery.xml deleted file mode 100644 index 0851b6ee9e..0000000000 --- a/reference/sphinx/sphinxclient/addquery.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - SphinxClient::addQuery - Add query to multi-query batch - - - - &reftitle.description; - - public intSphinxClient::addQuery - stringquery - stringindex"*" - stringcomment"" - - - Adds query with the current settings to multi-query batch. This method - doesn't affect current settings (sorting, filtering, grouping etc.) in any way. - - - - - &reftitle.parameters; - - - - query - - - Query string. - - - - - index - - - An index name (or names). - - - - - comment - - - - - - - - - - - &reftitle.returnvalues; - - Returns an index in an array of results that will be returned - by call or false on error. - - - - - &reftitle.seealso; - - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/buildexcerpts.xml b/reference/sphinx/sphinxclient/buildexcerpts.xml deleted file mode 100644 index dbe0404fe2..0000000000 --- a/reference/sphinx/sphinxclient/buildexcerpts.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - SphinxClient::buildExcerpts - Build text snippets - - - - &reftitle.description; - - public arrayfalseSphinxClient::buildExcerpts - arraydocs - stringindex - stringwords - arrayopts - - - Connects to searchd, requests it to generate excerpts (snippets) from the - given documents, and returns the results. - - - - - &reftitle.parameters; - - - - docs - - - Array of strings with documents' contents. - - - - - index - - - Index name. - - - - - words - - - Keywords to highlight. - - - - - opts - - - Associative array of additional highlighting options (see below). - - - - - - - Highlighting options - - - - Option - Description - - - - - "before_match" - A string to insert before a keyword match. Default is "<b>". - - - "after_match" - A string to insert after a keyword match. Default is "</b>". - - - "chunk_separator" - A string to insert between snippet chunks (passages). Default is " ... ". - - - "limit" - Maximum snippet size, in symbols (codepoints). Integer, default is 256. - - - "around" - How much words to pick around each matching keywords block. Integer, default is 5. - - - "exact_phrase" - Whether to highlight exact query phrase matches only instead of - individual keywords. Boolean, default is &false;. - - - "single_passage" - Whether to extract single best passage only. Boolean, default is &false;. - - - -
-
-
- - - &reftitle.returnvalues; - - Returns array of snippets on success&return.falseforfailure;. - - - -
- - diff --git a/reference/sphinx/sphinxclient/buildkeywords.xml b/reference/sphinx/sphinxclient/buildkeywords.xml deleted file mode 100644 index aade712903..0000000000 --- a/reference/sphinx/sphinxclient/buildkeywords.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - SphinxClient::buildKeywords - Extract keywords from query - - - - &reftitle.description; - - public arraySphinxClient::buildKeywords - stringquery - stringindex - boolhits - - - Extracts keywords from query using tokenizer - settings for the given index, optionally with - per-keyword occurrence statistics. - - - - - &reftitle.parameters; - - - - query - - - A query to extract keywords from. - - - - - index - - - An index to get tokenizing settings and keyword occurrence statistics - from. - - - - - hits - - - A boolean flag to enable/disable keyword statistics generation. - - - - - - - - - &reftitle.returnvalues; - - Returns an array of associative arrays with per-keyword information. - - - - - - diff --git a/reference/sphinx/sphinxclient/close.xml b/reference/sphinx/sphinxclient/close.xml deleted file mode 100644 index 013602e5aa..0000000000 --- a/reference/sphinx/sphinxclient/close.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - SphinxClient::close - Closes previously opened persistent connection - - - - &reftitle.description; - - public boolSphinxClient::close - - - - Closes previously opened persistent connection. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.changelog; - - - - - - PECL/sphinx &Version; - &Description; - - - - - PECL sphinx 1.0.3 - - Added SphinxClient::close(), available only if compiled with - libsphinxclient >= 0.9.9. - - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/escapestring.xml b/reference/sphinx/sphinxclient/escapestring.xml deleted file mode 100644 index 2b52a9edd7..0000000000 --- a/reference/sphinx/sphinxclient/escapestring.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - SphinxClient::escapeString - Escape special characters - - - - &reftitle.description; - - public stringSphinxClient::escapeString - stringstring - - - Escapes characters that are treated as special operators by the query - language parser. - - - - - &reftitle.parameters; - - - - string - - - String to escape. - - - - - - - - - &reftitle.returnvalues; - - Returns escaped string. - - - - - - diff --git a/reference/sphinx/sphinxclient/getlasterror.xml b/reference/sphinx/sphinxclient/getlasterror.xml deleted file mode 100644 index 5d38e8f5af..0000000000 --- a/reference/sphinx/sphinxclient/getlasterror.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - SphinxClient::getLastError - Get the last error message - - - - &reftitle.description; - - public stringSphinxClient::getLastError - - - - Returns string with the last error message. If there were no errors during - the previous API call, empty string is returned. This method doesn't reset - the error message, so you can safely call it several times. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the last error message or an empty string if there were no errors. - - - - - &reftitle.seealso; - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/getlastwarning.xml b/reference/sphinx/sphinxclient/getlastwarning.xml deleted file mode 100644 index b5d064b522..0000000000 --- a/reference/sphinx/sphinxclient/getlastwarning.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - SphinxClient::getLastWarning - Get the last warning - - - - &reftitle.description; - - public stringSphinxClient::getLastWarning - - - - Returns last warning message. If there were no warnings during - the previous API call, empty string is returned. This method doesn't reset - the warning, so you can safely call it several times. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the last warning message or an empty string if there were no warnings. - - - - - &reftitle.seealso; - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/open.xml b/reference/sphinx/sphinxclient/open.xml deleted file mode 100644 index 07651a6f47..0000000000 --- a/reference/sphinx/sphinxclient/open.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - SphinxClient::open - Opens persistent connection to the server - - - - &reftitle.description; - - public boolSphinxClient::open - - - - Opens persistent connection to the server. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.changelog; - - - - - - PECL/sphinx &Version; - &Description; - - - - - PECL sphinx 1.0.3 - - Added SphinxClient::open(), available only if compiled with - libsphinxclient >= 0.9.9. - - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/query.xml b/reference/sphinx/sphinxclient/query.xml deleted file mode 100644 index 93ffe53ca0..0000000000 --- a/reference/sphinx/sphinxclient/query.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - SphinxClient::query - Execute search query - - - - &reftitle.description; - - public arraySphinxClient::query - stringquery - stringindex"*" - stringcomment"" - - - Connects to searchd server, runs the given search query with the current settings, - obtains and returns the result set. - - - - - &reftitle.parameters; - - - - query - - - Query string. - - - - - index - - - An index name (or names). - - - - - comment - - - - - - - - - - - &reftitle.returnvalues; - - On success, SphinxClient::query returns a list of - found matches and additional per-query statistics. The result set is a - hash utilize other structures instead of hash) with the following keys and - values: - - Result set structure - - - - Key - Value description - - - - - "matches" - An array with found document IDs as keys and their weight and - attributes values as values - - - "total" - Total number of matches found and retrieved (depends on your - settings) - - - "total_found" - Total number of found documents matching the query - - - "words" - An array with words (case-folded and stemmed) as keys and - per-word statistics as values - - - "error" - Query error message reported by searchd - - - "warning" - Query warning reported by searchd - - - -
-
-
- - - &reftitle.seealso; - - - - - - - - -
- - diff --git a/reference/sphinx/sphinxclient/resetfilters.xml b/reference/sphinx/sphinxclient/resetfilters.xml deleted file mode 100644 index 2620c21a04..0000000000 --- a/reference/sphinx/sphinxclient/resetfilters.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - SphinxClient::resetFilters - Clear all filters - - - - &reftitle.description; - - public voidSphinxClient::resetFilters - - - - Clears all currently set filters. This call is normally required when - using multi-queries. You might want to set different filters for different - queries in the batch. To do that, you should call - SphinxClient::resetFilters and add new filters using - the respective calls. - - - - - &reftitle.returnvalues; - - &return.void; - - - - - &reftitle.seealso; - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/resetgroupby.xml b/reference/sphinx/sphinxclient/resetgroupby.xml deleted file mode 100644 index f1d196fb20..0000000000 --- a/reference/sphinx/sphinxclient/resetgroupby.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - SphinxClient::resetGroupBy - Clear all group-by settings - - - - &reftitle.description; - - public voidSphinxClient::resetGroupBy - - - - Clears all currently group-by settings, and disables group-by. - This call is normally required only when using multi-queries. - - - - - &reftitle.returnvalues; - - &return.void; - - - - - &reftitle.seealso; - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/runqueries.xml b/reference/sphinx/sphinxclient/runqueries.xml deleted file mode 100644 index f702f99950..0000000000 --- a/reference/sphinx/sphinxclient/runqueries.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - SphinxClient::runQueries - Run a batch of search queries - - - - &reftitle.description; - - public arraySphinxClient::runQueries - - - - Connects to searchd, runs a batch of all queries added using , obtains and returns the result sets. - - - - - &reftitle.returnvalues; - - Returns &false; on failure and array of result sets on success. - - - - - &reftitle.seealso; - - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/setarrayresult.xml b/reference/sphinx/sphinxclient/setarrayresult.xml deleted file mode 100644 index 6d01f52c94..0000000000 --- a/reference/sphinx/sphinxclient/setarrayresult.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - SphinxClient::setArrayResult - Change the format of result set array - - - - &reftitle.description; - - public boolSphinxClient::setArrayResult - boolarray_result&false; - - - Controls the format of search results set arrays (whether matches should - be returned as an array or a hash). - - - - - &reftitle.parameters; - - - - array_result - - - If array_result is &false;, matches - are returned as a hash with document IDs as keys, and other information (weight, - attributes) as values. If array_result is &true;, matches - are returned as a plain array with complete per-match information including - document IDs. - - - - - - - - - &reftitle.returnvalues; - - Always returns &true;. - - - - - - diff --git a/reference/sphinx/sphinxclient/setfieldweights.xml b/reference/sphinx/sphinxclient/setfieldweights.xml deleted file mode 100644 index 1264cd4ac3..0000000000 --- a/reference/sphinx/sphinxclient/setfieldweights.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - SphinxClient::setFieldWeights - Set field weights - - - - &reftitle.description; - - public boolSphinxClient::setFieldWeights - arrayweights - - - Binds per-field weights by name. - - - Match ranking can be affected by per-field weights. See Sphinx documentation for an explanation - on how phrase proximity ranking is affected. This call lets you specify - non-default weights for full-text fields. - - - The weights must be positive 32-bit integers, so be careful not to hit - 32-bit integer maximum. The final weight is a 32-bit integer too. - Default weight value is 1. Unknown field names are silently ignored. - - - - - &reftitle.parameters; - - - - weights - - - Associative array of field names and field weights. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/setfilter.xml b/reference/sphinx/sphinxclient/setfilter.xml deleted file mode 100644 index bcbe9b3862..0000000000 --- a/reference/sphinx/sphinxclient/setfilter.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - SphinxClient::setFilter - Add new integer values set filter - - - - &reftitle.description; - - public boolSphinxClient::setFilter - stringattribute - arrayvalues - boolexclude&false; - - - Adds new integer values set filter to the existing list of filters. - - - - - &reftitle.parameters; - - - - attribute - - - An attribute name. - - - - - values - - - Plain array of integer values. - - - - - exclude - - - If set to &true;, matching documents are excluded from the result set. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/setfilterfloatrange.xml b/reference/sphinx/sphinxclient/setfilterfloatrange.xml deleted file mode 100644 index 9b0b38b7ce..0000000000 --- a/reference/sphinx/sphinxclient/setfilterfloatrange.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - SphinxClient::setFilterFloatRange - Add new float range filter - - - - &reftitle.description; - - public boolSphinxClient::setFilterFloatRange - stringattribute - floatmin - floatmax - boolexclude&false; - - - Adds new float range filter to the existing list of filters. - Only those documents which have attribute - value stored in the index between min and - max (including values that are exactly equal - to min or max) will - be matched (or rejected, if exclude is &true;). - - - - - &reftitle.parameters; - - - - attribute - - - An attribute name. - - - - - min - - - Minimum value. - - - - - max - - - Maximum value. - - - - - exclude - - - If set to &true;, matching documents are excluded from the result set. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/setfilterrange.xml b/reference/sphinx/sphinxclient/setfilterrange.xml deleted file mode 100644 index 5793311105..0000000000 --- a/reference/sphinx/sphinxclient/setfilterrange.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - SphinxClient::setFilterRange - Add new integer range filter - - - - &reftitle.description; - - public boolSphinxClient::setFilterRange - stringattribute - intmin - intmax - boolexclude&false; - - - Adds new integer range filter to the existing list of filters. - Only those documents which have attribute - value stored in the index between min and - max (including values that are exactly equal - to min or max) will - be matched (or rejected, if exclude is &true;). - - - - - &reftitle.parameters; - - - - attribute - - - An attribute name. - - - - - min - - - Minimum value. - - - - - max - - - Maximum value. - - - - - exclude - - - If set to &true;, matching documents are excluded from the result set. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/setgeoanchor.xml b/reference/sphinx/sphinxclient/setgeoanchor.xml deleted file mode 100644 index faefc12ec5..0000000000 --- a/reference/sphinx/sphinxclient/setgeoanchor.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - SphinxClient::setGeoAnchor - Set anchor point for a geosphere distance calculations - - - - &reftitle.description; - - public boolSphinxClient::setGeoAnchor - stringattrlat - stringattrlong - floatlatitude - floatlongitude - - - Sets anchor point for a geosphere distance (geodistance) calculations - and enables them. - - - Once an anchor point is set, you can use magic "@geodist" attribute name in - your filters and/or sorting expressions. - - - - - &reftitle.parameters; - - - - attrlat - - - Name of a latitude attribute. - - - - - attrlong - - - Name of a longitude attribute. - - - - - latitude - - - Anchor latitude in radians. - - - - - longitude - - - Anchor longitude in radians. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/setgroupby.xml b/reference/sphinx/sphinxclient/setgroupby.xml deleted file mode 100644 index 7f7d90344e..0000000000 --- a/reference/sphinx/sphinxclient/setgroupby.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - SphinxClient::setGroupBy - Set grouping attribute - - - - &reftitle.description; - - public boolSphinxClient::setGroupBy - stringattribute - intfunc - stringgroupsort"@group desc" - - - Sets grouping attribute, function, and group sorting mode, and enables - grouping. - - - Grouping feature is very similar to GROUP BY clause in SQL. - Results produced by this function call are going to be the same as produced - by the following pseudo code: - SELECT ... GROUP BY $func($attribute) ORDER BY $groupsort. - - - - - &reftitle.parameters; - - - - attribute - - - A string containing group-by attribute name. - - - - - func - - - Constant, which sets a function applied to the attribute value in order - to compute group-by key. - - - - - groupsort - - - An optional clause controlling how the groups are sorted. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/setgroupdistinct.xml b/reference/sphinx/sphinxclient/setgroupdistinct.xml deleted file mode 100644 index 84acbab399..0000000000 --- a/reference/sphinx/sphinxclient/setgroupdistinct.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - SphinxClient::setGroupDistinct - Set attribute name for per-group distinct values count calculations - - - - &reftitle.description; - - public boolSphinxClient::setGroupDistinct - stringattribute - - - Sets attribute name for per-group distinct values count calculations. Only - available for grouping queries. For each group, all values of - attribute will be stored, then the amount of - distinct values will be calculated and returned to the client. This feature - is similar to COUNT(DISTINCT) clause in SQL. - - - - - &reftitle.parameters; - - - - attribute - - - A string containing group-by attribute name. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - - - - - diff --git a/reference/sphinx/sphinxclient/setidrange.xml b/reference/sphinx/sphinxclient/setidrange.xml deleted file mode 100644 index 0974a7e299..0000000000 --- a/reference/sphinx/sphinxclient/setidrange.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - SphinxClient::setIDRange - Set a range of accepted document IDs - - - - &reftitle.description; - - public boolSphinxClient::setIDRange - intmin - intmax - - - Sets an accepted range of document IDs. Default range is from 0 to 0, i.e. - no limit. Only those records that have document ID between - min and max - (including IDs exactly equal to min or - max) will be matched. - - - - - &reftitle.parameters; - - - - min - - - Minimum ID value. - - - - - max - - - Maximum ID value. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - diff --git a/reference/sphinx/sphinxclient/setindexweights.xml b/reference/sphinx/sphinxclient/setindexweights.xml deleted file mode 100644 index b13cc19daf..0000000000 --- a/reference/sphinx/sphinxclient/setindexweights.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - SphinxClient::setIndexWeights - Set per-index weights - - - - &reftitle.description; - - public boolSphinxClient::setIndexWeights - arrayweights - - - Sets per-index weights and enables weighted summing of match weights across - different indexes. - - - - - &reftitle.parameters; - - - - weights - - - An associative array mapping string index names to integer - weights. Default is empty array, i.e. weighting summing is disabled. - - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - diff --git a/reference/sphinx/sphinxclient/setlimits.xml b/reference/sphinx/sphinxclient/setlimits.xml deleted file mode 100644 index e7a998f1bb..0000000000 --- a/reference/sphinx/sphinxclient/setlimits.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - SphinxClient::setLimits - Set offset and limit of the result set - - - - &reftitle.description; - - public boolSphinxClient::setLimits - intoffset - intlimit - intmax_matches0 - intcutoff0 - - - Sets offset into server-side result set and amount - of matches to return to client starting from that offset - (limit). Can additionally control maximum - server-side result set size for current query - (max_matches) and the threshold amount of matches - to stop searching at (cutoff). - - - - - &reftitle.parameters; - - - - offset - - - Result set offset. - - - - - limit - - - Amount of matches to return. - - - - - max_matches - - - Controls how much matches searchd will keep in RAM while searching. - - - - - cutoff - - - Used for advanced performance control. It tells searchd to forcibly - stop search query once cutoff matches have been - found and processed. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - diff --git a/reference/sphinx/sphinxclient/setmatchmode.xml b/reference/sphinx/sphinxclient/setmatchmode.xml deleted file mode 100644 index 3788dbb572..0000000000 --- a/reference/sphinx/sphinxclient/setmatchmode.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - SphinxClient::setMatchMode - Set full-text query matching mode - - - - &reftitle.description; - - public boolSphinxClient::setMatchMode - intmode - - - Sets full-text query matching mode. mode is one of - the constants listed below. - - Match modes - - - - Constant - Description - - - - - SPH_MATCH_ALL - Match all query words (default mode). - - - SPH_MATCH_ANY - Match any of query words. - - - SPH_MATCH_PHRASE - Match query as a phrase, requiring perfect match. - - - SPH_MATCH_BOOLEAN - Match query as a boolean expression. - - - SPH_MATCH_EXTENDED - Match query as an expression in Sphinx internal query language. - - - SPH_MATCH_FULLSCAN - Enables fullscan. - - - SPH_MATCH_EXTENDED2 - The same as SPH_MATCH_EXTENDED plus ranking - and quorum searching support. - - - -
-
-
- - - &reftitle.parameters; - - - - mode - - - Matching mode. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - -
- - diff --git a/reference/sphinx/sphinxclient/setmaxquerytime.xml b/reference/sphinx/sphinxclient/setmaxquerytime.xml deleted file mode 100644 index 95343c728e..0000000000 --- a/reference/sphinx/sphinxclient/setmaxquerytime.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - SphinxClient::setMaxQueryTime - Set maximum query time - - - - &reftitle.description; - - public boolSphinxClient::setMaxQueryTime - intqtime - - - Sets maximum search query time. - - - - - &reftitle.parameters; - - - - qtime - - - Maximum query time, in milliseconds. It must be a - non-negative integer. Default value is 0, i.e. no limit. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - diff --git a/reference/sphinx/sphinxclient/setoverride.xml b/reference/sphinx/sphinxclient/setoverride.xml deleted file mode 100644 index 491e0d16dc..0000000000 --- a/reference/sphinx/sphinxclient/setoverride.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - SphinxClient::setOverride - Sets temporary per-document attribute value - overrides - - - - &reftitle.description; - - public boolSphinxClient::setOverride - stringattribute - inttype - arrayvalues - - - Sets temporary (per-query) per-document attribute value overrides. Override - feature lets you "temporary" update attribute values for some documents - within a single query, leaving all other queries unaffected. This might be - useful for personalized data - - - - &reftitle.parameters; - - - - attribute - - - An attribute name. - - - - - type - - - An attribute type. Only supports scalar attributes. - - - - - values - - - Array of attribute values that maps document IDs to overridden - attribute values. - - - - - - - - - &reftitle.changelog; - - - - - - PECL/sphinx &Version; - &Description; - - - - - PECL sphinx 1.0.3 - - Added SphinxClient::setOverride(), available only if compiled with - libsphinxclient >= 0.9.9. - - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - diff --git a/reference/sphinx/sphinxclient/setrankingmode.xml b/reference/sphinx/sphinxclient/setrankingmode.xml deleted file mode 100644 index eec36a9712..0000000000 --- a/reference/sphinx/sphinxclient/setrankingmode.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - SphinxClient::setRankingMode - Set ranking mode - - - - &reftitle.description; - - public boolSphinxClient::setRankingMode - intranker - - - Sets ranking mode. Only available in - SPH_MATCH_EXTENDED2 matching mode. - - Ranking modes - - - - Constant - Description - - - - - SPH_RANK_PROXIMITY_BM25 - Default ranking mode which uses both proximity and BM25 - ranking. - - - SPH_RANK_BM25 - Statistical ranking mode which uses BM25 ranking only (similar - to most of other full-text engines). This mode is faster, but may result - in worse quality on queries which contain more than 1 keyword. - - - SPH_RANK_NONE - Disables ranking. This mode is the fastest. It is essentially - equivalent to boolean searching, a weight of 1 is assigned to all - matches. - - - -
-
-
- - - &reftitle.parameters; - - - - ranker - - - Ranking mode. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - -
- - diff --git a/reference/sphinx/sphinxclient/setretries.xml b/reference/sphinx/sphinxclient/setretries.xml deleted file mode 100644 index 85a91eaa60..0000000000 --- a/reference/sphinx/sphinxclient/setretries.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - SphinxClient::setRetries - Set retry count and delay - - - - &reftitle.description; - - public boolSphinxClient::setRetries - intcount - intdelay0 - - - Sets distributed retry count and delay. - - - On temporary failures searchd will attempt up to - count retries per agent. - delay is the delay between the retries, - in milliseconds. Retries are disabled by default. - Note that this call will not make the API itself retry - on temporary failure; it only tells searchd to do so. - - - - - &reftitle.parameters; - - - - count - - - Number of retries. - - - - - - - delay - - - Delay between retries, in milliseconds. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - diff --git a/reference/sphinx/sphinxclient/setselect.xml b/reference/sphinx/sphinxclient/setselect.xml deleted file mode 100644 index 817d97f781..0000000000 --- a/reference/sphinx/sphinxclient/setselect.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - SphinxClient::setSelect - Set select clause - - - - &reftitle.description; - - public boolSphinxClient::setSelect - stringclause - - - Sets the select clause, listing specific attributes to fetch, and - expressions to compute and fetch. - - - - - &reftitle.parameters; - - - - clause - - - SQL-like clause. - - - - - - - - - &reftitle.changelog; - - - - - - PECL/sphinx &Version; - &Description; - - - - - PECL sphinx 1.0.1 - - Added SphinxClient::setSelect(), available only if compiled with - libsphinxclient >= 0.9.9. - - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - diff --git a/reference/sphinx/sphinxclient/setserver.xml b/reference/sphinx/sphinxclient/setserver.xml deleted file mode 100644 index e5f30cf046..0000000000 --- a/reference/sphinx/sphinxclient/setserver.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - SphinxClient::setServer - Set searchd host and port - - - - &reftitle.description; - - public boolSphinxClient::setServer - stringserver - intport - - - Sets searchd host name and TCP port. All subsequent requests will use the - new host and port settings. Default host and port are 'localhost' and 3312, - respectively. - - - - - &reftitle.parameters; - - - - server - - - IP or hostname. - - - - - port - - - Port number. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - diff --git a/reference/sphinx/sphinxclient/setsortmode.xml b/reference/sphinx/sphinxclient/setsortmode.xml deleted file mode 100644 index 9ebfc19a35..0000000000 --- a/reference/sphinx/sphinxclient/setsortmode.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - SphinxClient::setSortMode - Set matches sorting mode - - - - &reftitle.description; - - public boolSphinxClient::setSortMode - intmode - stringsortby - - - Sets matches sorting mode. See available modes below. - - Sorting modes - - - - Constant - Description - - - - - SPH_SORT_RELEVANCE - Sort by relevance in descending order (best matches first). - - - SPH_SORT_ATTR_DESC - Sort by an attribute in descending order (bigger attribute - values first). - - - SPH_SORT_ATTR_ASC - Sort by an attribute in ascending order (smaller attribute - values first). - - - SPH_SORT_TIME_SEGMENTS - Sort by time segments (last hour/day/week/month) in descending - order, and then by relevance in descending order. - - - SPH_SORT_EXTENDED - Sort by SQL-like combination of columns in ASC/DESC order. - - - SPH_SORT_EXPR - Sort by an arithmetic expression. - - - -
-
-
- - - &reftitle.parameters; - - - - mode - - - Sorting mode. - - - - - sortby - - - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.seealso; - - - - - - - - -
- - diff --git a/reference/sphinx/sphinxclient/status.xml b/reference/sphinx/sphinxclient/status.xml deleted file mode 100644 index 0acaa5fb6c..0000000000 --- a/reference/sphinx/sphinxclient/status.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - SphinxClient::status - Queries searchd status - - - - &reftitle.description; - - public arraySphinxClient::status - - - - Queries searchd status, and returns an array of status variable name and - value pairs. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.changelog; - - - - - - PECL/sphinx &Version; - &Description; - - - - - PECL sphinx 1.0.3 - - Added SphinxClient::status(), available only if compiled with - libsphinxclient >= 0.9.9. - - - - - - - - - - &reftitle.returnvalues; - - Returns an associative array of search server statistics&return.falseforfailure;. - - - - - - diff --git a/reference/sphinx/sphinxclient/updateattributes.xml b/reference/sphinx/sphinxclient/updateattributes.xml deleted file mode 100644 index 7e9df0afa7..0000000000 --- a/reference/sphinx/sphinxclient/updateattributes.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - SphinxClient::updateAttributes - Update document attributes - - - - &reftitle.description; - - public intSphinxClient::updateAttributes - stringindex - arrayattributes - arrayvalues - boolmva&false; - - - Instantly updates given attribute values in given documents. - - - - - &reftitle.parameters; - - - - index - - - Name of the index (or indexes) to be updated. - - - - - attributes - - - Array of attribute names, listing attributes that are updated. - - - - - values - - - Associative array containing document IDs as keys and array of - attribute values as values. - - - - - - - - - &reftitle.returnvalues; - - Returns number of actually updated documents (0 or more) on success, or - &false; on failure. - - - - - - diff --git a/reference/sphinx/versions.xml b/reference/sphinx/versions.xml deleted file mode 100644 index 691f677b46..0000000000 --- a/reference/sphinx/versions.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reference/spl/appenditerator/construct.xml b/reference/spl/appenditerator/construct.xml index e6b1206ff0..27d9ac2801 100644 --- a/reference/spl/appenditerator/construct.xml +++ b/reference/spl/appenditerator/construct.xml @@ -114,7 +114,7 @@ while ($appendIterator->valid()) { When using iterator_to_array to copy the values of the AppendIterator into an array, you have to set the optional use_key argument to - &false;. When use_key is not &false; any keys reoccuring in inner + &false;. When use_key is not &false; any keys reoccurring in inner iterators will get overwritten in the returned array. There is no way to preserve the original keys. diff --git a/reference/spl/arrayobject.xml b/reference/spl/arrayobject.xml index c645b353ba..748c93ed6b 100644 --- a/reference/spl/arrayobject.xml +++ b/reference/spl/arrayobject.xml @@ -99,31 +99,6 @@
- -
- &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.3.0 - - Implements Serializable. - - - - - - -
- - - Countable - + + Countable + diff --git a/reference/spl/directoryiterator.xml b/reference/spl/directoryiterator.xml index 0795878eeb..88d1515b9f 100644 --- a/reference/spl/directoryiterator.xml +++ b/reference/spl/directoryiterator.xml @@ -71,32 +71,6 @@ }}} --> - -
- &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.1.2 - - DirectoryIterator extends SplFileInfo. - - - - - - -
- - &reference.spl.entities.directoryiterator; diff --git a/reference/spl/directoryiterator/getextension.xml b/reference/spl/directoryiterator/getextension.xml index 90e571687e..9d92c75810 100644 --- a/reference/spl/directoryiterator/getextension.xml +++ b/reference/spl/directoryiterator/getextension.xml @@ -66,7 +66,6 @@ gz &reftitle.notes; - This method is only available as of PHP 5.3.6. Another way of getting the extension is to use the pathinfo function. diff --git a/reference/spl/filesystemiterator.xml b/reference/spl/filesystemiterator.xml index fc03ef6dc4..da01d199b9 100644 --- a/reference/spl/filesystemiterator.xml +++ b/reference/spl/filesystemiterator.xml @@ -199,30 +199,6 @@ - -
- &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.3.1 - Added FilesystemIterator::FOLLOW_SYMLINKS - - - - - -
- - &reference.spl.entities.filesystemiterator; diff --git a/reference/spl/functions/class-implements.xml b/reference/spl/functions/class-implements.xml index 8189b119a4..d5ce0e4d74 100644 --- a/reference/spl/functions/class-implements.xml +++ b/reference/spl/functions/class-implements.xml @@ -36,8 +36,7 @@ autoload - Whether to allow this function to load the class automatically through - the __autoload magic method. + Whether to call &link.autoload; by default. @@ -67,15 +66,12 @@ class bar implements foo {} print_r(class_implements(new bar)); -// since PHP 5.1.0 you may also specify the parameter as a string +// you may also specify the parameter as a string print_r(class_implements('bar')); +spl_autoload_register(); -function __autoload($class_name) { - require_once $class_name . '.php'; -} - -// use __autoload to load the 'not_loaded' class +// use autoloading to load the 'not_loaded' class print_r(class_implements('not_loaded', true)); ?> @@ -88,7 +84,10 @@ Array ( [foo] => foo ) - +Array +( + [foo] => foo +) Array ( [interface_of_not_loaded] => interface_of_not_loaded diff --git a/reference/spl/functions/class-parents.xml b/reference/spl/functions/class-parents.xml index 0da3b027dd..63124e707c 100644 --- a/reference/spl/functions/class-parents.xml +++ b/reference/spl/functions/class-parents.xml @@ -36,8 +36,7 @@ autoload - Whether to allow this function to load the class automatically through - the __autoload magic method. + Whether to call &link.autoload; by default. @@ -66,16 +65,14 @@ class bar extends foo {} print_r(class_parents(new bar)); -// since PHP 5.1.0 you may also specify the parameter as a string +// you may also specify the parameter as a string print_r(class_parents('bar')); +spl_autoload_register(); -function __autoload($class_name) { - require_once $class_name . '.php'; -} - -// use __autoload to load the 'not_loaded' class +// use autoloading to load the 'not_loaded' class print_r(class_parents('not_loaded', true)); + ?> ]]> @@ -86,7 +83,10 @@ Array ( [foo] => foo ) - +Array +( + [foo] => foo +) Array ( [parent_of_not_loaded] => parent_of_not_loaded diff --git a/reference/spl/functions/class-uses.xml b/reference/spl/functions/class-uses.xml index 32768a092d..d13880ba17 100644 --- a/reference/spl/functions/class-uses.xml +++ b/reference/spl/functions/class-uses.xml @@ -37,8 +37,7 @@ autoload - Whether to allow this function to load the class automatically through - the __autoload magic method. + Whether to call &link.autoload; by default. @@ -72,11 +71,9 @@ print_r(class_uses(new bar)); print_r(class_uses('bar')); -function __autoload($class_name) { - require_once $class_name . '.php'; -} +spl_autoload_register(); -// use __autoload to load the 'not_loaded' class +// use autoloading to load the 'not_loaded' class print_r(class_uses('not_loaded', true)); ?> @@ -89,12 +86,10 @@ Array ( [foo] => foo ) - Array ( [foo] => foo ) - Array ( [trait_of_not_loaded] => trait_of_not_loaded diff --git a/reference/spl/functions/iterator-to-array.xml b/reference/spl/functions/iterator-to-array.xml index 3017b7289d..d795033c2f 100644 --- a/reference/spl/functions/iterator-to-array.xml +++ b/reference/spl/functions/iterator-to-array.xml @@ -37,7 +37,7 @@ Whether to use the iterator element keys as index. - In PHP 5.5 and later, if a key is an array or + If a key is an array or object, a warning will be generated. &null; keys will be converted to an empty string, float keys will be truncated to their int counterpart, diff --git a/reference/spl/functions/spl-autoload-register.xml b/reference/spl/functions/spl-autoload-register.xml index 14a2bf903a..077cb6d793 100644 --- a/reference/spl/functions/spl-autoload-register.xml +++ b/reference/spl/functions/spl-autoload-register.xml @@ -45,6 +45,10 @@ If no parameter is provided, then the default implementation of spl_autoload will be registered. + + voidcallback + stringclass_name + @@ -97,7 +101,7 @@ function my_autoloader($class) { spl_autoload_register('my_autoloader'); -// Or, using an anonymous function as of PHP 5.3.0 +// Or, using an anonymous function spl_autoload_register(function ($class) { include 'classes/' . $class . '.class.php'; }); @@ -120,7 +124,7 @@ class Foo { } } -spl_autoload_register(__NAMESPACE__ .'\Foo::test'); // As of PHP 5.3.0 +spl_autoload_register(__NAMESPACE__ .'\Foo::test'); new InexistentClass; diff --git a/reference/spl/outeriterator.xml b/reference/spl/outeriterator.xml index 4ac9a0774e..fe0fb8685d 100644 --- a/reference/spl/outeriterator.xml +++ b/reference/spl/outeriterator.xml @@ -27,9 +27,9 @@ - - OuterIterator - + + OuterIterator + extends diff --git a/reference/spl/recursivearrayiterator.xml b/reference/spl/recursivearrayiterator.xml index 763b54f71d..9b7e246bfb 100644 --- a/reference/spl/recursivearrayiterator.xml +++ b/reference/spl/recursivearrayiterator.xml @@ -86,30 +86,6 @@ - -
- &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.3.0 - - CHILD_ARRAYS_ONLY flag was added. - - - - - - -
-
- &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.3.0 - - The FilesystemIterator was introduced as - the parent class. Previously, the parent was the - DirectoryIterator. - - - - 5.3.0 - - Implements SeekableIterator. - - - - 5.2.11, 5.3.1 - Added RecursiveDirectoryIterator::FOLLOW_SYMLINKS - - - - - -
- &reference.spl.entities.recursivedirectoryiterator; diff --git a/reference/spl/recursiveiterator.xml b/reference/spl/recursiveiterator.xml index f300ba2734..19fcf9c6b1 100644 --- a/reference/spl/recursiveiterator.xml +++ b/reference/spl/recursiveiterator.xml @@ -27,9 +27,9 @@ - - RecursiveIterator - + + RecursiveIterator + extends diff --git a/reference/spl/regexiterator/getflags.xml b/reference/spl/regexiterator/getflags.xml index 2352e95404..32976a9a36 100644 --- a/reference/spl/regexiterator/getflags.xml +++ b/reference/spl/regexiterator/getflags.xml @@ -19,6 +19,11 @@
+ + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/spl/regexiterator/getmode.xml b/reference/spl/regexiterator/getmode.xml index 1d84cad612..4646cda28d 100644 --- a/reference/spl/regexiterator/getmode.xml +++ b/reference/spl/regexiterator/getmode.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/spl/regexiterator/getpregflags.xml b/reference/spl/regexiterator/getpregflags.xml index ae77080695..e9cb7a7555 100644 --- a/reference/spl/regexiterator/getpregflags.xml +++ b/reference/spl/regexiterator/getpregflags.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/spl/seekableiterator.xml b/reference/spl/seekableiterator.xml index 92316a1ea0..2f51870072 100644 --- a/reference/spl/seekableiterator.xml +++ b/reference/spl/seekableiterator.xml @@ -26,9 +26,9 @@ - - SeekableIterator - + + SeekableIterator + extends diff --git a/reference/spl/spldoublylinkedlist.xml b/reference/spl/spldoublylinkedlist.xml index b98e0b3975..401a09087c 100644 --- a/reference/spl/spldoublylinkedlist.xml +++ b/reference/spl/spldoublylinkedlist.xml @@ -84,7 +84,6 @@ }}} --> &Methods; - diff --git a/reference/spl/spldoublylinkedlist/construct.xml b/reference/spl/spldoublylinkedlist/construct.xml deleted file mode 100644 index 04b5647ee5..0000000000 --- a/reference/spl/spldoublylinkedlist/construct.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - SplDoublyLinkedList::__construct - Constructs a new doubly linked list - - - - &reftitle.description; - - public SplDoublyLinkedList::__construct - - - - This constructs a new empty doubly linked list. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - &return.void; - - - - - &reftitle.examples; - - - <function>SplDoublyLinkedList::__construct</function> example - -push(2); -$dll->push(3); -$dll->unshift(5); - -var_dump($dll); -?> -]]> - - &example.outputs; - - - int(0) - ["dllist":"SplDoublyLinkedList":private]=> - array(3) { - [0]=> - int(5) - [1]=> - int(2) - [2]=> - int(3) - } -} -]]> - - - - - - - diff --git a/reference/spl/splfileinfo/getextension.xml b/reference/spl/splfileinfo/getextension.xml index 39556575e2..9238463030 100644 --- a/reference/spl/splfileinfo/getextension.xml +++ b/reference/spl/splfileinfo/getextension.xml @@ -67,7 +67,6 @@ string(2) "gz" &reftitle.notes; - This method is only available as of PHP 5.3.6. Another way of getting the extension is to use the pathinfo function. diff --git a/reference/spl/splfileobject.xml b/reference/spl/splfileobject.xml index 173ae27600..582d78febb 100644 --- a/reference/spl/splfileobject.xml +++ b/reference/spl/splfileobject.xml @@ -118,31 +118,6 @@ -
- &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.3.9 - - SplFileObject::SKIP_EMPTY value changed to 4. - Previously, value was 6. - - - - - - -
- &reference.spl.entities.splfileobject; diff --git a/reference/spl/splfileobject/fgetcsv.xml b/reference/spl/splfileobject/fgetcsv.xml index d5c72c3725..42ba04d3f8 100644 --- a/reference/spl/splfileobject/fgetcsv.xml +++ b/reference/spl/splfileobject/fgetcsv.xml @@ -35,7 +35,7 @@ delimiter - The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. + The field delimiter (one single-byte character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. @@ -43,7 +43,7 @@ enclosure - The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. + The field enclosure character (one single-byte character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. @@ -51,7 +51,7 @@ escape - The escape character (at most one character). Defaults as a backslash (\) or the value set using SplFileObject::setCsvControl. + The escape character (at most one single-byte character). Defaults as a backslash (\) or the value set using SplFileObject::setCsvControl. An empty string ("") disables the proprietary escape mechanism. diff --git a/reference/spl/splfileobject/fputcsv.xml b/reference/spl/splfileobject/fputcsv.xml index 8d4ee58c75..b0332033b7 100644 --- a/reference/spl/splfileobject/fputcsv.xml +++ b/reference/spl/splfileobject/fputcsv.xml @@ -37,7 +37,7 @@ The optional delimiter parameter sets the field - delimiter (one character only). + delimiter (one single-byte character only). @@ -46,7 +46,7 @@ The optional enclosure parameter sets the field - enclosure (one character only). + enclosure (one single-byte character only). @@ -55,7 +55,7 @@ The optional escape parameter sets the - escape character (at most one character). + escape character (at most one single-byte character). An empty string ("") disables the proprietary escape mechanism. @@ -110,12 +110,6 @@ string to disable the proprietary escape mechanism. - - 5.5.21, 5.6.5 - - Added the escape parameter. - - diff --git a/reference/spl/splfileobject/getcsvcontrol.xml b/reference/spl/splfileobject/getcsvcontrol.xml index 8f0ee327b6..5d58974055 100644 --- a/reference/spl/splfileobject/getcsvcontrol.xml +++ b/reference/spl/splfileobject/getcsvcontrol.xml @@ -49,7 +49,7 @@ - 5.6.25, 7.0.10 + 7.0.10 Added the escape character to the returned array. diff --git a/reference/spl/splfileobject/setcsvcontrol.xml b/reference/spl/splfileobject/setcsvcontrol.xml index 46010a9c72..6b7332a3da 100644 --- a/reference/spl/splfileobject/setcsvcontrol.xml +++ b/reference/spl/splfileobject/setcsvcontrol.xml @@ -28,7 +28,7 @@ delimiter - The field delimiter (one character only). + The field delimiter (one single-byte character only). @@ -36,7 +36,7 @@ enclosure - The field enclosure character (one character only). + The field enclosure character (one single-byte character only). @@ -44,7 +44,7 @@ escape - The field escape character (at most one character). + The field escape character (at most one single-byte character). An empty string ("") disables the proprietary escape mechanism. diff --git a/reference/spl/versions.xml b/reference/spl/versions.xml index abe8299d71..32d7b82e81 100644 --- a/reference/spl/versions.xml +++ b/reference/spl/versions.xml @@ -5,1023 +5,1023 @@ --> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - PHP 5 >= 5.1.0 - - - - - - - - - - + + + + PHP 5 >= 5.1.0 + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - - - + + + + + Microsoft SQL Server Driver for PHP SQLSRV diff --git a/reference/sqlsrv/configure.xml b/reference/sqlsrv/configure.xml index ecc92ad4bd..61c5e0bfd3 100644 --- a/reference/sqlsrv/configure.xml +++ b/reference/sqlsrv/configure.xml @@ -5,25 +5,18 @@ The SQLSRV extension is enabled by adding appropriate DLL file to your PHP extension directory and the corresponding entry to the &php.ini; file. The SQLSRV - download comes 8 driver files, four of which are for PDO support. If you are - running non-thread-safe PHP (PHP 5.3), use the php_sqlsrv_53_nts.dll file. - (You should use a non-thread-safe version if you are using IIS as your web - server). If you are running thread-safe PHP, use the php_sqlsrv_53_ts.dll file. - Similarly for PHP 5.4, use the php_sqlsrv_54_nts.dll or php_sqlsrv_54_ts.dll - depending on whether your PHP installation is non-thread-safe or thread-safe. + download comes with 8 driver files, four of which are for PDO support. The most recent version of the driver is available for download here: - SQLSRV 4.0 download. If you need support - for PHP 5.2 and/or PHP compiled with VC6, use the 2.0 release of the driver: - SQLSRV 2.0 download. + SQLSRV download. For more information about SQLSRV requirements, see SQLSRV System Requirements. - The SQLSRV extension is only compatible with PHP 5 running on Windows. Since version 4.0 the SQLSRV extension is compatilbe only with PHP 7.0 running on Linux or Windows. + Since version 4.0 the SQLSRV extension is compatible only with PHP 7.0 running on Linux or Windows. @@ -46,4 +39,4 @@ End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> \ No newline at end of file +--> diff --git a/reference/sqlsrv/setup.xml b/reference/sqlsrv/setup.xml index 4c14828f8b..e5a57aaa08 100644 --- a/reference/sqlsrv/setup.xml +++ b/reference/sqlsrv/setup.xml @@ -27,18 +27,11 @@
- The SQLSRV download comes 8 driver files, four of which are for PDO support. - If you are running non-thread-safe PHP (PHP 5.3), use the php_sqlsrv_53_nts.dll - file. (You should use a non-thread-safe version if you are using IIS as your - web server). If you are running thread-safe PHP, use the php_sqlsrv_53_ts.dll - file. Similarly for PHP 5.4, use the php_sqlsrv_54_nts.dll or php_sqlsrv_54_ts.dll - depending on whether your PHP installation is non-thread-safe or thread-safe. + The SQLSRV download comes 8 driver files, four of which are for PDO support. The most recent version of the driver is available for download here: - SQLSRV 4.0 download. If you need support - for PHP 5.2 and/or PHP compiled with VC6, use the 2.0 release of the driver: - SQLSRV 2.0 download. + SQLSRV download. For more information about SQLSRV requirements, see diff --git a/reference/ssdeep/book.xml b/reference/ssdeep/book.xml index aa4223a891..86beb5e893 100644 --- a/reference/ssdeep/book.xml +++ b/reference/ssdeep/book.xml @@ -1,7 +1,6 @@ - - + ssdeep Fuzzy Hashing ssdeep @@ -29,7 +28,6 @@ &reference.ssdeep.reference; - \ No newline at end of file +--> diff --git a/reference/ssh2/book.xml b/reference/ssh2/book.xml index f663fd3fff..65ea086f51 100644 --- a/reference/ssh2/book.xml +++ b/reference/ssh2/book.xml @@ -2,6 +2,7 @@ + Secure Shell2 SSH2 diff --git a/reference/ssh2/functions/ssh2-sftp-lstat.xml b/reference/ssh2/functions/ssh2-sftp-lstat.xml index 58d0c7d029..6e45dd4ce4 100644 --- a/reference/ssh2/functions/ssh2-sftp-lstat.xml +++ b/reference/ssh2/functions/ssh2-sftp-lstat.xml @@ -19,7 +19,7 @@ This function is similar to using the lstat function - with the ssh2.sftp:// wrapper in PHP 5 + with the ssh2.sftp:// wrapper and returns the same values.
diff --git a/reference/ssh2/functions/ssh2-sftp-stat.xml b/reference/ssh2/functions/ssh2-sftp-stat.xml index c8777a5cc9..71c0a48281 100644 --- a/reference/ssh2/functions/ssh2-sftp-stat.xml +++ b/reference/ssh2/functions/ssh2-sftp-stat.xml @@ -18,7 +18,7 @@ This function is similar to using the stat function - with the ssh2.sftp:// wrapper in PHP 5 + with the ssh2.sftp:// wrapper and returns the same values. diff --git a/reference/ssh2/setup.xml b/reference/ssh2/setup.xml index d400f2451b..ab7e695a0e 100644 --- a/reference/ssh2/setup.xml +++ b/reference/ssh2/setup.xml @@ -28,7 +28,7 @@ will only be available with libssh >= 1.2.9. - Libssh2 comes in two flavours: gcrypt or openssl. Some linux + Libssh2 comes in two flavours: gcrypt or openssl. Some Linux distributions build libssh2 with the gcrypt library, some use openssl. Libssh2 has some issues when compiled with gcrypt, please use openssl. diff --git a/reference/stats/book.xml b/reference/stats/book.xml deleted file mode 100644 index dc8a7ea134..0000000000 --- a/reference/stats/book.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - Statistics - - - - &reftitle.intro; - - This is the statistics extension. It contains few dozens of functions - useful for statistical computations. It is a wrapper around 2 scientific - libraries, namely DCDFLIB (Library of C routines for Cumulative - Distributions Functions, Inverses, and Other parameters) by B. Brown & - J. Lavato and RANDLIB by Barry Brown, James Lavato & Kathy Russell. - Includes CD and PD functions. - - - - - &reference.stats.setup; - &reference.stats.constants; - &reference.stats.reference; - - - - - diff --git a/reference/stats/constants.xml b/reference/stats/constants.xml deleted file mode 100644 index db0033b20f..0000000000 --- a/reference/stats/constants.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - &reftitle.constants; - &no.constants; - - - - diff --git a/reference/stats/functions/stats-absolute-deviation.xml b/reference/stats/functions/stats-absolute-deviation.xml deleted file mode 100644 index e79c08d859..0000000000 --- a/reference/stats/functions/stats-absolute-deviation.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - stats_absolute_deviation - Returns the absolute deviation of an array of values - - - &reftitle.description; - - floatstats_absolute_deviation - arraya - - - Returns the absolute deviation of the values in a. - - - - &reftitle.parameters; - - - - a - - - The input array - - - - - - - - - &reftitle.returnvalues; - - Returns the absolute deviation of the values in a, - or &false; if a is empty or is not an array. - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-cdf-beta.xml b/reference/stats/functions/stats-cdf-beta.xml deleted file mode 100644 index b20ecf6bff..0000000000 --- a/reference/stats/functions/stats-cdf-beta.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - stats_cdf_beta - Calculates any one parameter of the beta distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_beta - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the beta distribution. The kind of the return value and parameters (par1, - par2, and par3) are determined by - which. - - - The following table lists the return value and parameters by which. - CDF, x, alpha, and beta denotes cumulative distribution function, the value of the random - variable, and shape parameters of the beta distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - alpha - beta - - - 2 - x - CDF - alpha - beta - - - 3 - alpha - x - CDF - beta - - - 4 - beta - x - CDF - alpha - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, alpha, or beta, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-binomial.xml b/reference/stats/functions/stats-cdf-binomial.xml deleted file mode 100644 index a9421844a6..0000000000 --- a/reference/stats/functions/stats-cdf-binomial.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - stats_cdf_binomial - Calculates any one parameter of the binomial distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_binomial - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the binomial distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, n, and p denotes cumulative distribution function, the number of successes, - the number of trials, and the success rate for each trial, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - n - p - - - 2 - x - CDF - n - p - - - 3 - n - x - CDF - p - - - 4 - p - x - CDF - n - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, n, or p, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-cauchy.xml b/reference/stats/functions/stats-cdf-cauchy.xml deleted file mode 100644 index 9245450d24..0000000000 --- a/reference/stats/functions/stats-cdf-cauchy.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - stats_cdf_cauchy - Calculates any one parameter of the Cauchy distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_cauchy - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the Cauchy distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, x0, and gamma denotes cumulative distribution function, the value of the random - variable, the location and the scale parameter of the Cauchy distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - x0 - gamma - - - 2 - x - CDF - x0 - gamma - - - 3 - x0 - x - CDF - gamma - - - 4 - gamma - x - CDF - x0 - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, x0, or gamma, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-chisquare.xml b/reference/stats/functions/stats-cdf-chisquare.xml deleted file mode 100644 index 7f3764a670..0000000000 --- a/reference/stats/functions/stats-cdf-chisquare.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - stats_cdf_chisquare - Calculates any one parameter of the chi-square distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_chisquare - floatpar1 - floatpar2 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the chi-square distribution. The kind of the return value and parameters - (par1 and par2) are determined by - which. - - - The following table lists the return value and parameters by which. - CDF, x, and k denotes cumulative distribution function, the value of the random variable, - and the degree of freedom of the chi-square distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - - - - - 1 - CDF - x - k - - - 2 - x - CDF - k - - - 3 - k - x - CDF - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, or k, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-exponential.xml b/reference/stats/functions/stats-cdf-exponential.xml deleted file mode 100644 index b22f5fda63..0000000000 --- a/reference/stats/functions/stats-cdf-exponential.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - stats_cdf_exponential - Calculates any one parameter of the exponential distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_exponential - floatpar1 - floatpar2 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the exponential distribution. The kind of the return value and parameters - (par1 and par2) are determined by - which. - - - The following table lists the return value and parameters by which. - CDF, x, and lambda denotes cumulative distribution function, the value of the random - variable, and the rate parameter of the exponential distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - - - - - 1 - CDF - x - lambda - - - 2 - x - CDF - lambda - - - 3 - lambda - x - CDF - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, or lambda, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-f.xml b/reference/stats/functions/stats-cdf-f.xml deleted file mode 100644 index 18e5973624..0000000000 --- a/reference/stats/functions/stats-cdf-f.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - stats_cdf_f - Calculates any one parameter of the F distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_f - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the F distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, d1, and d2 denotes cumulative distribution function, the value of the random - variable, and the degree of freedoms of the F distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - d1 - d2 - - - 2 - x - CDF - d1 - d2 - - - 3 - d1 - x - CDF - d2 - - - 4 - d2 - x - CDF - d1 - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, d1, or d2, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-gamma.xml b/reference/stats/functions/stats-cdf-gamma.xml deleted file mode 100644 index e58a70ec27..0000000000 --- a/reference/stats/functions/stats-cdf-gamma.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - stats_cdf_gamma - Calculates any one parameter of the gamma distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_gamma - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the gamma distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, k, and theta denotes cumulative distribution function, the value of the random - variable, and the shape and the scale parameter of the gamma distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - k - theta - - - 2 - x - CDF - k - theta - - - 3 - k - x - CDF - theta - - - 4 - theta - x - CDF - k - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, k, or theta, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-laplace.xml b/reference/stats/functions/stats-cdf-laplace.xml deleted file mode 100644 index 38ef88db64..0000000000 --- a/reference/stats/functions/stats-cdf-laplace.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - stats_cdf_laplace - Calculates any one parameter of the Laplace distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_laplace - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the Laplace distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, mu, and b denotes cumulative distribution function, the value of the random - variable, and the location and the scale parameter of the Laplace distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - mu - b - - - 2 - x - CDF - mu - b - - - 3 - mu - x - CDF - b - - - 4 - b - x - CDF - mu - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, mu, or b, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-logistic.xml b/reference/stats/functions/stats-cdf-logistic.xml deleted file mode 100644 index 6d3cb1bcb1..0000000000 --- a/reference/stats/functions/stats-cdf-logistic.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - stats_cdf_logistic - Calculates any one parameter of the logistic distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_logistic - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the logistic distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, mu, and s denotes cumulative distribution function, the value of the random - variable, and the location and the scale parameter of the logistic distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - mu - s - - - 2 - x - CDF - mu - s - - - 3 - mu - x - CDF - s - - - 4 - s - x - CDF - mu - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, mu, or s, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-negative-binomial.xml b/reference/stats/functions/stats-cdf-negative-binomial.xml deleted file mode 100644 index eea959c7ed..0000000000 --- a/reference/stats/functions/stats-cdf-negative-binomial.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - stats_cdf_negative_binomial - Calculates any one parameter of the negative binomial distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_negative_binomial - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the negative binomial distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, r, and p denotes cumulative distribution function, the number of failure, the number - of success, and the success rate for each trial, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - r - p - - - 2 - x - CDF - r - p - - - 3 - r - x - CDF - p - - - 4 - p - x - CDF - r - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, r, or p, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-noncentral-chisquare.xml b/reference/stats/functions/stats-cdf-noncentral-chisquare.xml deleted file mode 100644 index 7003018494..0000000000 --- a/reference/stats/functions/stats-cdf-noncentral-chisquare.xml +++ /dev/null @@ -1,222 +0,0 @@ - - - - - stats_cdf_noncentral_chisquare - Calculates any one parameter of the non-central chi-square distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_noncentral_chisquare - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the non-central chi-square distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, k, and lambda denotes cumulative distribution function, the value of the random - variable, the degree of freedom and the non-centrality parameter of the distribution, - respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - k - lambda - - - 2 - x - CDF - k - lambda - - - 3 - k - x - CDF - lambda - - - 4 - lambda - x - CDF - k - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, k, or lambda, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-noncentral-f.xml b/reference/stats/functions/stats-cdf-noncentral-f.xml deleted file mode 100644 index de8e1651c1..0000000000 --- a/reference/stats/functions/stats-cdf-noncentral-f.xml +++ /dev/null @@ -1,244 +0,0 @@ - - - - - stats_cdf_noncentral_f - Calculates any one parameter of the non-central F distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_noncentral_f - floatpar1 - floatpar2 - floatpar3 - floatpar4 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the non-central F distribution. The kind of the return value and parameters - (par1, par2, par3, - and par4) are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, nu1, nu2, and lambda denotes cumulative distribution function, the value of the - random variable, the degree of freedoms and the non-centrality parameter of the distribution, - respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - par4 - - - - - 1 - CDF - x - nu1 - nu2 - lambda - - - 2 - x - CDF - nu1 - nu2 - lambda - - - 3 - nu1 - x - CDF - nu2 - lambda - - - 4 - nu2 - x - CDF - nu1 - lambda - - - 5 - lambda - x - CDF - nu1 - nu2 - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - par4 - - - The fourth parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, nu1, nu2, or lambda, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-noncentral-t.xml b/reference/stats/functions/stats-cdf-noncentral-t.xml deleted file mode 100644 index 4e2bf39b3c..0000000000 --- a/reference/stats/functions/stats-cdf-noncentral-t.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - stats_cdf_noncentral_t - Calculates any one parameter of the non-central t-distribution give values for the others - - - - &reftitle.description; - - floatstats_cdf_noncentral_t - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the non-central t-distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, nu, and mu denotes cumulative distribution function, the value of the random - variable, the degrees of freedom and the non-centrality parameter of the distribution, - respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - nu - mu - - - 2 - x - CDF - nu - mu - - - 3 - nu - x - CDF - mu - - - 4 - mu - x - CDF - nu - - - -
-
-
- - - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, nu, or mu, determined by which. - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-normal.xml b/reference/stats/functions/stats-cdf-normal.xml deleted file mode 100644 index 1a58ea588e..0000000000 --- a/reference/stats/functions/stats-cdf-normal.xml +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - stats_cdf_normal - Calculates any one parameter of the normal distribution given values for the others - - - - &reftitle.description; - - floatstats_cdf_normal - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the normal distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, mu, and sigma denotes cumulative distribution function, the value of the random - variable, the mean and the standard deviation of the normal distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - mu - sigma - - - 2 - x - CDF - mu - sigma - - - 3 - mu - x - CDF - sigma - - - 4 - sigma - x - CDF - mu - - - -
-
-
- - - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, mu, or sigma, determined by which. - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-poisson.xml b/reference/stats/functions/stats-cdf-poisson.xml deleted file mode 100644 index 302b783298..0000000000 --- a/reference/stats/functions/stats-cdf-poisson.xml +++ /dev/null @@ -1,200 +0,0 @@ - - - - - stats_cdf_poisson - Calculates any one parameter of the Poisson distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_poisson - floatpar1 - floatpar2 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, of the Poisson distribution. - The kind of the return value and parameters (par1 and par2) are - determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, and lambda denotes cumulative distribution function, the value of the random variable, - and the parameter of the Poisson distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - - - - - 1 - CDF - x - lambda - - - 2 - x - CDF - lambda - - - 3 - lambda - x - CDF - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, or lambda, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-t.xml b/reference/stats/functions/stats-cdf-t.xml deleted file mode 100644 index 17daaf3f70..0000000000 --- a/reference/stats/functions/stats-cdf-t.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - stats_cdf_t - Calculates any one parameter of the t-distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_t - floatpar1 - floatpar2 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the t-distribution. The kind of the return value and parameters - (par1 and par2) are determined by - which. - - - The following table lists the return value and parameters by which. - CDF, x, and nu denotes cumulative distribution function, the value of the random - variable, and the degrees of freedom of the t-distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - - - - - 1 - CDF - x - nu - - - 2 - x - CDF - nu - - - 3 - nu - x - CDF - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, or nu, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-uniform.xml b/reference/stats/functions/stats-cdf-uniform.xml deleted file mode 100644 index 93604c06d3..0000000000 --- a/reference/stats/functions/stats-cdf-uniform.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - stats_cdf_uniform - Calculates any one parameter of the uniform distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_uniform - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the uniform distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, a, and b denotes cumulative distribution function, the value of the random variable, - the lower bound and the higher bound of the uniform distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - a - b - - - 2 - x - CDF - a - b - - - 3 - a - x - CDF - b - - - 4 - b - x - CDF - a - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, a, or b, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-cdf-weibull.xml b/reference/stats/functions/stats-cdf-weibull.xml deleted file mode 100644 index 0fc5ae789f..0000000000 --- a/reference/stats/functions/stats-cdf-weibull.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - stats_cdf_weibull - Calculates any one parameter of the Weibull distribution given values for the others - - - &reftitle.description; - - floatstats_cdf_weibull - floatpar1 - floatpar2 - floatpar3 - intwhich - - - Returns the cumulative distribution function, its inverse, or one of its parameters, - of the Weibull distribution. The kind of the return value and parameters - (par1, par2, and par3) - are determined by which. - - - The following table lists the return value and parameters by which. - CDF, x, k, and lambda denotes cumulative distribution function, the value of the random variable, - the shape and the scale parameter of the Weibull distribution, respectively. - - Return value and parameters - - - - which - Return value - par1 - par2 - par3 - - - - - 1 - CDF - x - k - lambda - - - 2 - x - CDF - k - lambda - - - 3 - k - x - CDF - lambda - - - 4 - lambda - x - CDF - k - - - -
-
-
- - &reftitle.parameters; - - - - par1 - - - The first parameter - - - - - par2 - - - The second parameter - - - - - par3 - - - The third parameter - - - - - which - - - The flag to determine what to be calculated - - - - - - - - - &reftitle.returnvalues; - - Returns CDF, x, k, or lambda, determined by which. - - - - - - - - - - - - - - - -
- - diff --git a/reference/stats/functions/stats-covariance.xml b/reference/stats/functions/stats-covariance.xml deleted file mode 100644 index 303d71813b..0000000000 --- a/reference/stats/functions/stats-covariance.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_covariance - Computes the covariance of two data sets - - - &reftitle.description; - - floatstats_covariance - arraya - arrayb - - - Returns the covariance of a and b. - - - - &reftitle.parameters; - - - - a - - - The first array - - - - - b - - - The second array - - - - - - - - - &reftitle.returnvalues; - - Returns the covariance of a and b, - or &false; on failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-beta.xml b/reference/stats/functions/stats-dens-beta.xml deleted file mode 100644 index 8df89f19f9..0000000000 --- a/reference/stats/functions/stats-dens-beta.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - stats_dens_beta - Probability density function of the beta distribution - - - &reftitle.description; - - floatstats_dens_beta - floatx - floata - floatb - - - Returns the probability density at x, where the - random variable follows the beta distribution of which the shape parameters - are a and b. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - a - - - The shape parameter of the distribution - - - - - b - - - The shape parameter of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-cauchy.xml b/reference/stats/functions/stats-dens-cauchy.xml deleted file mode 100644 index 3048d0833c..0000000000 --- a/reference/stats/functions/stats-dens-cauchy.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - stats_dens_cauchy - Probability density function of the Cauchy distribution - - - &reftitle.description; - - floatstats_dens_cauchy - floatx - floatave - floatstdev - - - Returns the probability density at x, where the - random variable follows the Cauchy distribution whose location and scale are - ave and stdev, respectively. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - ave - - - The location parameter of the distribution - - - - - stdev - - - The scale parameter of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-chisquare.xml b/reference/stats/functions/stats-dens-chisquare.xml deleted file mode 100644 index 812fb4ad30..0000000000 --- a/reference/stats/functions/stats-dens-chisquare.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - stats_dens_chisquare - Probability density function of the chi-square distribution - - - &reftitle.description; - - floatstats_dens_chisquare - floatx - floatdfr - - - Returns the probability density at x, where the - random variable follows the chi-square distribution of which the degree of - freedom is dfr. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - dfr - - - The degree of freedom of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-exponential.xml b/reference/stats/functions/stats-dens-exponential.xml deleted file mode 100644 index dffa0e5e15..0000000000 --- a/reference/stats/functions/stats-dens-exponential.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - stats_dens_exponential - Probability density function of the exponential distribution - - - &reftitle.description; - - floatstats_dens_exponential - floatx - floatscale - - - Returns the probability density at x, where the - random variable follows the exponential distribution of which the scale is - scale. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - scale - - - The scale of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-f.xml b/reference/stats/functions/stats-dens-f.xml deleted file mode 100644 index b1eb378007..0000000000 --- a/reference/stats/functions/stats-dens-f.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - stats_dens_f - Probability density function of the F distribution - - - &reftitle.description; - - floatstats_dens_f - floatx - floatdfr1 - floatdfr2 - - - Returns the probability density at x, where the - random variable follows the F distribution of which the degree of freedoms - are dfr1 and dfr2. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - dfr1 - - - The degree of freedom of the distribution - - - - - dfr2 - - - The degree of freedom of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-gamma.xml b/reference/stats/functions/stats-dens-gamma.xml deleted file mode 100644 index 7493ecf771..0000000000 --- a/reference/stats/functions/stats-dens-gamma.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - stats_dens_gamma - Probability density function of the gamma distribution - - - &reftitle.description; - - floatstats_dens_gamma - floatx - floatshape - floatscale - - - Returns the probability density at x, where the - random variable follows the gamma distribution of which the shape parameter - is shape and the scale parameter is scale. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - shape - - - The shape parameter of the distribution - - - - - scale - - - The scale parameter of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-laplace.xml b/reference/stats/functions/stats-dens-laplace.xml deleted file mode 100644 index e2443edb84..0000000000 --- a/reference/stats/functions/stats-dens-laplace.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - stats_dens_laplace - Probability density function of the Laplace distribution - - - &reftitle.description; - - floatstats_dens_laplace - floatx - floatave - floatstdev - - - Returns the probability density at x, where the - random variable follows the Laplace distribution of which the location parameter - is ave and the scale parameter is stdev. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - ave - - - The location parameter of the distribution - - - - - stdev - - - The shape parameter of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-logistic.xml b/reference/stats/functions/stats-dens-logistic.xml deleted file mode 100644 index 1b0959644f..0000000000 --- a/reference/stats/functions/stats-dens-logistic.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - stats_dens_logistic - Probability density function of the logistic distribution - - - &reftitle.description; - - floatstats_dens_logistic - floatx - floatave - floatstdev - - - Returns the probability density at x, where the - random variable follows the logistic distribution of which the location parameter - is ave and the scale parameter is stdev. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - ave - - - The location parameter of the distribution - - - - - stdev - - - The shape parameter of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-normal.xml b/reference/stats/functions/stats-dens-normal.xml deleted file mode 100644 index 8053d8e3fa..0000000000 --- a/reference/stats/functions/stats-dens-normal.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - - stats_dens_normal - Probability density function of the normal distribution - - - &reftitle.description; - - floatstats_dens_normal - floatx - floatave - floatstdev - - - Returns the probability density at x, where the - random variable follows the normal distribution of which the mean is - ave and the standard deviation is - stdev. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - ave - - - The mean of the distribution - - - - - stdev - - - The standard deviation of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-pmf-binomial.xml b/reference/stats/functions/stats-dens-pmf-binomial.xml deleted file mode 100644 index 3f6422c6da..0000000000 --- a/reference/stats/functions/stats-dens-pmf-binomial.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - stats_dens_pmf_binomial - Probability mass function of the binomial distribution - - - &reftitle.description; - - floatstats_dens_pmf_binomial - floatx - floatn - floatpi - - - Returns the probability mass at x, where the random variable - follows the binomial distribution of which the number of trials is n - and the success rate is pi. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability mass is calculated - - - - - n - - - The number of trials of the distribution - - - - - pi - - - The success rate of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability mass at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-pmf-hypergeometric.xml b/reference/stats/functions/stats-dens-pmf-hypergeometric.xml deleted file mode 100644 index 26867dbac0..0000000000 --- a/reference/stats/functions/stats-dens-pmf-hypergeometric.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - stats_dens_pmf_hypergeometric - Probability mass function of the hypergeometric distribution - - - &reftitle.description; - - floatstats_dens_pmf_hypergeometric - floatn1 - floatn2 - floatN1 - floatN2 - - - Returns the probability mass at n1, where the random variable - follows the hypergeometric distribution of which the number of failure is - n2, the number of success samples is N1, - and the number of failure samples is N2. - - - - &reftitle.parameters; - - - - n1 - - - The number of success, at which the probability mass is calculated - - - - - n2 - - - The number of failure of the distribution - - - - - N1 - - - The number of success samples of the distribution - - - - - N2 - - - The number of failure samples of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability mass at n1 or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-pmf-negative-binomial.xml b/reference/stats/functions/stats-dens-pmf-negative-binomial.xml deleted file mode 100644 index 80e1c5c581..0000000000 --- a/reference/stats/functions/stats-dens-pmf-negative-binomial.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - stats_dens_pmf_negative_binomial - Probability mass function of the negative binomial distribution - - - - &reftitle.description; - - floatstats_dens_pmf_negative_binomial - floatx - floatn - floatpi - - - Returns the probability mass at x, where the - random variable follows the negative binomial distribution of which - the number of the success is n and the success - rate is pi. - - - - - &reftitle.parameters; - - - - x - - - The value at which the probability mass is calculated - - - - - n - - - The number of the success of the distribution - - - - - pi - - - The success rate of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability mass at x or &false; for failure. - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-pmf-poisson.xml b/reference/stats/functions/stats-dens-pmf-poisson.xml deleted file mode 100644 index 633aee3c8f..0000000000 --- a/reference/stats/functions/stats-dens-pmf-poisson.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_dens_pmf_poisson - Probability mass function of the Poisson distribution - - - &reftitle.description; - - floatstats_dens_pmf_poisson - floatx - floatlb - - - Returns the probability mass at x, where the random variable - follows the Poisson distribution whose parameter is lb. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability mass is calculated - - - - - lb - - - The parameter of the Poisson distribution - - - - - - - - - &reftitle.returnvalues; - - The probability mass at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-t.xml b/reference/stats/functions/stats-dens-t.xml deleted file mode 100644 index 1f5415b7e6..0000000000 --- a/reference/stats/functions/stats-dens-t.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - stats_dens_t - Probability density function of the t-distribution - - - &reftitle.description; - - floatstats_dens_t - floatx - floatdfr - - - Returns the probability density at x, where the - random variable follows the t-distribution of which the degree of - freedom is dfr. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - dfr - - - The degree of freedom of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-uniform.xml b/reference/stats/functions/stats-dens-uniform.xml deleted file mode 100644 index 27aabb0943..0000000000 --- a/reference/stats/functions/stats-dens-uniform.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - stats_dens_uniform - Probability density function of the uniform distribution - - - - &reftitle.description; - - floatstats_dens_uniform - floatx - floata - floatb - - - Returns the probability density at x, where the - random variable follows the uniform distribution of which the lower bound is - a and the upper bound is b. - - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - a - - - The lower bound of the distribution - - - - - b - - - The upper bound of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-dens-weibull.xml b/reference/stats/functions/stats-dens-weibull.xml deleted file mode 100644 index d71b612d1b..0000000000 --- a/reference/stats/functions/stats-dens-weibull.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - stats_dens_weibull - Probability density function of the Weibull distribution - - - &reftitle.description; - - floatstats_dens_weibull - floatx - floata - floatb - - - Returns the probability density at x, where the - random variable follows the Weibull distribution of which the shape parameter - is a and the scale parameter is b. - - - - &reftitle.parameters; - - - - x - - - The value at which the probability density is calculated - - - - - a - - - The shape parameter of the distribution - - - - - b - - - The scale parameter of the distribution - - - - - - - - - &reftitle.returnvalues; - - The probability density at x or &false; for failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-harmonic-mean.xml b/reference/stats/functions/stats-harmonic-mean.xml deleted file mode 100644 index 1327fbd197..0000000000 --- a/reference/stats/functions/stats-harmonic-mean.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - stats_harmonic_mean - Returns the harmonic mean of an array of values - - - &reftitle.description; - - numberstats_harmonic_mean - arraya - - - Returns the harmonic mean of the values in a. - - - - &reftitle.parameters; - - - - a - - - The input array - - - - - - - - - &reftitle.returnvalues; - - Returns the harmonic mean of the values in a, - or &false; if a is empty or is not an array. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-kurtosis.xml b/reference/stats/functions/stats-kurtosis.xml deleted file mode 100644 index 47b7d42654..0000000000 --- a/reference/stats/functions/stats-kurtosis.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - stats_kurtosis - Computes the kurtosis of the data in the array - - - &reftitle.description; - - floatstats_kurtosis - arraya - - - Returns the kurtosis of the values in a. - - - - &reftitle.parameters; - - - - a - - - The input array - - - - - - - - - &reftitle.returnvalues; - - Returns the kurtosis of the values in a, - or &false; if a is empty or is not an array. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-beta.xml b/reference/stats/functions/stats-rand-gen-beta.xml deleted file mode 100644 index 5d5405b653..0000000000 --- a/reference/stats/functions/stats-rand-gen-beta.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - stats_rand_gen_beta - Generates a random deviate from the beta distribution - - - &reftitle.description; - - floatstats_rand_gen_beta - floata - floatb - - - Returns a random deviate from the beta distribution with parameters A and - B. The density of the beta is x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 < x - <. Method R. C. H. Cheng. - - - - - &reftitle.parameters; - - - - a - - - The shape parameter of the beta distribution - - - - - b - - - The shape parameter of the beta distribution - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-chisquare.xml b/reference/stats/functions/stats-rand-gen-chisquare.xml deleted file mode 100644 index 372b57b7a5..0000000000 --- a/reference/stats/functions/stats-rand-gen-chisquare.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - stats_rand_gen_chisquare - Generates a random deviate from the chi-square distribution - - - &reftitle.description; - - floatstats_rand_gen_chisquare - floatdf - - - Returns a random deviate from the chi-square distribution where the degrees of - freedom is df. - - - - &reftitle.parameters; - - - - df - - - The degrees of freedom - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-exponential.xml b/reference/stats/functions/stats-rand-gen-exponential.xml deleted file mode 100644 index 88d58536cd..0000000000 --- a/reference/stats/functions/stats-rand-gen-exponential.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - stats_rand_gen_exponential - Generates a random deviate from the exponential distribution - - - &reftitle.description; - - floatstats_rand_gen_exponential - floatav - - - Returns a random deviate from the exponential distribution of which the scale is - av. - - - - &reftitle.parameters; - - - - av - - - The scale parameter - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-f.xml b/reference/stats/functions/stats-rand-gen-f.xml deleted file mode 100644 index 0574db6aae..0000000000 --- a/reference/stats/functions/stats-rand-gen-f.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - stats_rand_gen_f - Generates a random deviate from the F distribution - - - &reftitle.description; - - floatstats_rand_gen_f - floatdfn - floatdfd - - - Generates a random deviate from the F (variance ratio) distribution with - "dfn" degrees of freedom in the numerator and "dfd" degrees of freedom in - the denominator. Method : directly generates ratio of chisquare variates. - - - - &reftitle.parameters; - - - - dfn - - - The degrees of freedom in the numerator - - - - - dfd - - - The degrees of freedom in the denominator - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-funiform.xml b/reference/stats/functions/stats-rand-gen-funiform.xml deleted file mode 100644 index 087da301cd..0000000000 --- a/reference/stats/functions/stats-rand-gen-funiform.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_rand_gen_funiform - Generates uniform float between low (exclusive) and high (exclusive) - - - &reftitle.description; - - floatstats_rand_gen_funiform - floatlow - floathigh - - - Returns a random deviate from the uniform distribution from - low to high. - - - - &reftitle.parameters; - - - - low - - - The lower bound (inclusive) - - - - - high - - - The upper bound (exclusive) - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-gamma.xml b/reference/stats/functions/stats-rand-gen-gamma.xml deleted file mode 100644 index 85523b087d..0000000000 --- a/reference/stats/functions/stats-rand-gen-gamma.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - stats_rand_gen_gamma - Generates a random deviate from the gamma distribution - - - &reftitle.description; - - floatstats_rand_gen_gamma - floata - floatr - - - Generates a random deviate from the gamma distribution whose density is - (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X). - - - - - &reftitle.parameters; - - - - a - - - location parameter of Gamma distribution (a - > 0). - - - - - r - - - shape parameter of Gamma distribution (r > - 0). - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-ibinomial-negative.xml b/reference/stats/functions/stats-rand-gen-ibinomial-negative.xml deleted file mode 100644 index ac7edfee03..0000000000 --- a/reference/stats/functions/stats-rand-gen-ibinomial-negative.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_rand_gen_ibinomial_negative - Generates a random deviate from the negative binomial distribution - - - &reftitle.description; - - intstats_rand_gen_ibinomial_negative - intn - floatp - - - Returns a random deviate from a negative binomial distribution where the number of success is - n and the success rate is p. - - - - &reftitle.parameters; - - - - n - - - The number of success - - - - - p - - - The success rate - - - - - - - - - &reftitle.returnvalues; - - A random deviate, which is the number of failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-ibinomial.xml b/reference/stats/functions/stats-rand-gen-ibinomial.xml deleted file mode 100644 index 348d4e9338..0000000000 --- a/reference/stats/functions/stats-rand-gen-ibinomial.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_rand_gen_ibinomial - Generates a random deviate from the binomial distribution - - - &reftitle.description; - - intstats_rand_gen_ibinomial - intn - floatpp - - - Returns a random deviate from the binomial distribution whose number of trials is n - and whose probability of an event in each trial is pp. - - - - &reftitle.parameters; - - - - n - - - The number of trials - - - - - pp - - - The probability of an event in each trial - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-int.xml b/reference/stats/functions/stats-rand-gen-int.xml deleted file mode 100644 index 28aefa0574..0000000000 --- a/reference/stats/functions/stats-rand-gen-int.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - stats_rand_gen_int - Generates random integer between 1 and 2147483562 - - - &reftitle.description; - - intstats_rand_gen_int - - - - Returns a random integer between 1 and 2147483562 - - - - - - - &reftitle.returnvalues; - - A random integer - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-ipoisson.xml b/reference/stats/functions/stats-rand-gen-ipoisson.xml deleted file mode 100644 index 087ff4806f..0000000000 --- a/reference/stats/functions/stats-rand-gen-ipoisson.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - stats_rand_gen_ipoisson - Generates a single random deviate from a Poisson distribution - - - &reftitle.description; - - intstats_rand_gen_ipoisson - floatmu - - - Returns a random deviate from the Poisson distribution with parameter mu. - - - - &reftitle.parameters; - - - - mu - - - The parameter of the Poisson distribution - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-iuniform.xml b/reference/stats/functions/stats-rand-gen-iuniform.xml deleted file mode 100644 index b676c1196f..0000000000 --- a/reference/stats/functions/stats-rand-gen-iuniform.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_rand_gen_iuniform - Generates integer uniformly distributed between LOW (inclusive) and HIGH (inclusive) - - - &reftitle.description; - - intstats_rand_gen_iuniform - intlow - inthigh - - - Returns a random integer from the discrete uniform distribution between low (inclusive) - and high (inclusive). - - - - &reftitle.parameters; - - - - low - - - The lower bound - - - - - high - - - The upper bound - - - - - - - - - &reftitle.returnvalues; - - A random integer - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-noncentral-chisquare.xml b/reference/stats/functions/stats-rand-gen-noncentral-chisquare.xml deleted file mode 100644 index a9ef7c83da..0000000000 --- a/reference/stats/functions/stats-rand-gen-noncentral-chisquare.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - stats_rand_gen_noncentral_chisquare - Generates a random deviate from the non-central chi-square distribution - - - - &reftitle.description; - - floatstats_rand_gen_noncentral_chisquare - floatdf - floatxnonc - - - Returns a random deviate from the non-central chi-square distribution with degrees of freedom, - df, and non-centrality parameter, xnonc. - - - - - &reftitle.parameters; - - - - df - - - The degrees of freedom - - - - - xnonc - - - The non-centrality parameter - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-noncentral-f.xml b/reference/stats/functions/stats-rand-gen-noncentral-f.xml deleted file mode 100644 index de5e2cc632..0000000000 --- a/reference/stats/functions/stats-rand-gen-noncentral-f.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - stats_rand_gen_noncentral_f - Generates a random deviate from the noncentral F distribution - - - &reftitle.description; - - floatstats_rand_gen_noncentral_f - floatdfn - floatdfd - floatxnonc - - - Returns a random deviate from the non-central F distribution where the degrees of freedoms are - dfn (numerator) and dfd (denominator), and the non-centrality - parameter is xnonc. - - - - &reftitle.parameters; - - - - dfn - - - The degrees of freedom of the numerator - - - - - dfd - - - The degrees of freedom of the denominator - - - - - xnonc - - - The non-centrality parameter - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-noncentral-t.xml b/reference/stats/functions/stats-rand-gen-noncentral-t.xml deleted file mode 100644 index ede7d12f2b..0000000000 --- a/reference/stats/functions/stats-rand-gen-noncentral-t.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_rand_gen_noncentral_t - Generates a single random deviate from a non-central t-distribution - - - &reftitle.description; - - floatstats_rand_gen_noncentral_t - floatdf - floatxnonc - - - Returns a random deviate from the non-central t-distribution with the degrees of freedom, - df, and the non-centrality parameter, xnonc. - - - - &reftitle.parameters; - - - - df - - - The degrees of freedom - - - - - xnonc - - - The non-centrality parameter - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-normal.xml b/reference/stats/functions/stats-rand-gen-normal.xml deleted file mode 100644 index 5853e8ec6c..0000000000 --- a/reference/stats/functions/stats-rand-gen-normal.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_rand_gen_normal - Generates a single random deviate from a normal distribution - - - &reftitle.description; - - floatstats_rand_gen_normal - floatav - floatsd - - - Returns a random deviate from the normal distribution with mean, av, and standard deviation, - sd. - - - - &reftitle.parameters; - - - - av - - - The mean of the normal distribution - - - - - sd - - - The standard deviation of the normal distribution - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-gen-t.xml b/reference/stats/functions/stats-rand-gen-t.xml deleted file mode 100644 index 3294ece5f8..0000000000 --- a/reference/stats/functions/stats-rand-gen-t.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - stats_rand_gen_t - Generates a single random deviate from a t-distribution - - - &reftitle.description; - - floatstats_rand_gen_t - floatdf - - - Returns a random deviate from the t-distribution with the degrees of freedom, df. - - - - &reftitle.parameters; - - - - df - - - The degrees of freedom - - - - - - - - - &reftitle.returnvalues; - - A random deviate - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-get-seeds.xml b/reference/stats/functions/stats-rand-get-seeds.xml deleted file mode 100644 index 488129a5e9..0000000000 --- a/reference/stats/functions/stats-rand-get-seeds.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - stats_rand_get_seeds - Get the seed values of the random number generator - - - &reftitle.description; - - arraystats_rand_get_seeds - - - - Returns the current seed values of the random number generator - - - - - - &reftitle.returnvalues; - - Returns an array of two integers. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-phrase-to-seeds.xml b/reference/stats/functions/stats-rand-phrase-to-seeds.xml deleted file mode 100644 index f15b1abefd..0000000000 --- a/reference/stats/functions/stats-rand-phrase-to-seeds.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - stats_rand_phrase_to_seeds - Generate two seeds for the RGN random number generator - - - &reftitle.description; - - arraystats_rand_phrase_to_seeds - stringphrase - - - Generate two seeds for the random number generator from a phrase. - - - - &reftitle.parameters; - - - - phrase - - - The input phrase - - - - - - - - - &reftitle.returnvalues; - - Returns an array of two integers. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-ranf.xml b/reference/stats/functions/stats-rand-ranf.xml deleted file mode 100644 index 13b4720ecd..0000000000 --- a/reference/stats/functions/stats-rand-ranf.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - stats_rand_ranf - Generates a random floating point number between 0 and 1 - - - &reftitle.description; - - floatstats_rand_ranf - - - - Returns a random floating point number from a uniform distribution between 0 (exclusive) and 1 (exclusive). - - - - - - - &reftitle.returnvalues; - - A random floating point number - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-rand-setall.xml b/reference/stats/functions/stats-rand-setall.xml deleted file mode 100644 index dcdf15030b..0000000000 --- a/reference/stats/functions/stats-rand-setall.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_rand_setall - Set seed values to the random generator - - - &reftitle.description; - - voidstats_rand_setall - intiseed1 - intiseed2 - - - Set iseed1 and iseed2 as seed values to the random generator - used in statistic functions. - - - - &reftitle.parameters; - - - - iseed1 - - - The value which is used as the random seed - - - - - iseed2 - - - The value which is used as the random seed - - - - - - - - - &reftitle.returnvalues; - - No values are returned. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-skew.xml b/reference/stats/functions/stats-skew.xml deleted file mode 100644 index 2180f4b2ef..0000000000 --- a/reference/stats/functions/stats-skew.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - stats_skew - Computes the skewness of the data in the array - - - &reftitle.description; - - floatstats_skew - arraya - - - Returns the skewness of the values in a. - - - - &reftitle.parameters; - - - - a - - - The input array - - - - - - - - - &reftitle.returnvalues; - - Returns the skewness of the values in a, - or &false; if a is empty or is not an array. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-standard-deviation.xml b/reference/stats/functions/stats-standard-deviation.xml deleted file mode 100644 index f58c68a05c..0000000000 --- a/reference/stats/functions/stats-standard-deviation.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - stats_standard_deviation - Returns the standard deviation - - - &reftitle.description; - - floatstats_standard_deviation - arraya - boolsample&false; - - - Returns the standard deviation of the values in a. - - - - &reftitle.parameters; - - - - a - - - The array of data to find the standard deviation for. Note that all - values of the array will be cast to float. - - - - - sample - - - Indicates if a represents a sample of the - population; defaults to &false;. - - - - - - - - - &reftitle.returnvalues; - - Returns the standard deviation on success; &false; on failure. - - - - - &reftitle.errors; - - Raises an E_WARNING when there are fewer than 2 - values in a. - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-stat-binomial-coef.xml b/reference/stats/functions/stats-stat-binomial-coef.xml deleted file mode 100644 index 94f5f7171e..0000000000 --- a/reference/stats/functions/stats-stat-binomial-coef.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - stats_stat_binomial_coef - Returns a binomial coefficient - - - &reftitle.description; - - floatstats_stat_binomial_coef - intx - intn - - - Returns the binomial coefficient of n choose x. - - - - &reftitle.parameters; - - - - x - - - The number of chooses from the set - - - - - n - - - The number of elements in the set - - - - - - - - - &reftitle.returnvalues; - - Returns the binomial coefficient - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-stat-correlation.xml b/reference/stats/functions/stats-stat-correlation.xml deleted file mode 100644 index 20bbf43c9f..0000000000 --- a/reference/stats/functions/stats-stat-correlation.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_stat_correlation - Returns the Pearson correlation coefficient of two data sets - - - &reftitle.description; - - floatstats_stat_correlation - arrayarr1 - arrayarr2 - - - Returns the Pearson correlation coefficient between arr1 and arr2. - - - - &reftitle.parameters; - - - - arr1 - - - The first array - - - - - arr2 - - - The second array - - - - - - - - - &reftitle.returnvalues; - - Returns the Pearson correlation coefficient between arr1 and arr2, - or &false; on failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-stat-factorial.xml b/reference/stats/functions/stats-stat-factorial.xml deleted file mode 100644 index f3bb459a18..0000000000 --- a/reference/stats/functions/stats-stat-factorial.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - stats_stat_factorial - Returns the factorial of an integer - - - - &reftitle.description; - - floatstats_stat_factorial - intn - - - Returns the factorial of an integer, n. - - - - - &reftitle.parameters; - - - n - - - An integer - - - - - - - - &reftitle.returnvalues; - - The factorial of n. - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-stat-independent-t.xml b/reference/stats/functions/stats-stat-independent-t.xml deleted file mode 100644 index 4ac049fff4..0000000000 --- a/reference/stats/functions/stats-stat-independent-t.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - stats_stat_independent_t - Returns the t-value from the independent two-sample t-test - - - &reftitle.description; - - floatstats_stat_independent_t - arrayarr1 - arrayarr2 - - - Returns the t-value of the independent two-sample t-test between - arr1 and arr2. - - &warn.undocumented.func; - - - - &reftitle.parameters; - - - - arr1 - - - The first set of values - - - - - arr2 - - - The second set of values - - - - - - - - - &reftitle.returnvalues; - - Returns the t-value, or &false; if failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-stat-innerproduct.xml b/reference/stats/functions/stats-stat-innerproduct.xml deleted file mode 100644 index cbfe91f099..0000000000 --- a/reference/stats/functions/stats-stat-innerproduct.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_stat_innerproduct - Returns the inner product of two vectors - - - &reftitle.description; - - floatstats_stat_innerproduct - arrayarr1 - arrayarr2 - - - Returns the inner product of arr1 and arr2. - - - - &reftitle.parameters; - - - - arr1 - - - The first array - - - - - arr2 - - - The second array - - - - - - - - - &reftitle.returnvalues; - - Returns the inner product of arr1 and arr2, - or &false; on failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-stat-paired-t.xml b/reference/stats/functions/stats-stat-paired-t.xml deleted file mode 100644 index b4a0e02873..0000000000 --- a/reference/stats/functions/stats-stat-paired-t.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - stats_stat_paired_t - Returns the t-value of the dependent t-test for paired samples - - - &reftitle.description; - - floatstats_stat_paired_t - arrayarr1 - arrayarr2 - - - Returns the t-value of the dependent t-test for paired samples - arr1 and arr2. - - - - &reftitle.parameters; - - - - arr1 - - - The first samples - - - - - arr2 - - - The second samples - - - - - - - - - &reftitle.returnvalues; - - Returns the t-value, or &false; if failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-stat-percentile.xml b/reference/stats/functions/stats-stat-percentile.xml deleted file mode 100644 index 35901a186d..0000000000 --- a/reference/stats/functions/stats-stat-percentile.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - stats_stat_percentile - Returns the percentile value - - - &reftitle.description; - - floatstats_stat_percentile - arrayarr - floatperc - - - Returns the perc-th percentile value of the array arr. - - - - &reftitle.parameters; - - - - arr - - - The input array - - - - - perc - - - The percentile - - - - - - - - - &reftitle.returnvalues; - - Returns the percentile values of the input array. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-stat-powersum.xml b/reference/stats/functions/stats-stat-powersum.xml deleted file mode 100644 index 29f1d83a5a..0000000000 --- a/reference/stats/functions/stats-stat-powersum.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - stats_stat_powersum - Returns the power sum of a vector - - - &reftitle.description; - - floatstats_stat_powersum - arrayarr - floatpower - - - Returns the sum of the power-th power of a vector represented as an array arr. - - - - &reftitle.parameters; - - - - arr - - - The input array - - - - - power - - - The power - - - - - - - - - &reftitle.returnvalues; - - Returns the power sum of the input array. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/functions/stats-variance.xml b/reference/stats/functions/stats-variance.xml deleted file mode 100644 index 8d28e43b1b..0000000000 --- a/reference/stats/functions/stats-variance.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - stats_variance - Returns the variance - - - &reftitle.description; - - floatstats_variance - arraya - boolsample&false; - - - Returns the variance of the values in a. - - - - &reftitle.parameters; - - - - a - - - The array of data to find the standard deviation for. Note that all - values of the array will be cast to float. - - - - - sample - - - Indicates if a represents a sample of the - population; defaults to &false;. - - - - - - - - - &reftitle.returnvalues; - - Returns the variance on success; &false; on failure. - - - - - - - - - - - - - - - - - - diff --git a/reference/stats/reference.xml b/reference/stats/reference.xml deleted file mode 100644 index 0328879932..0000000000 --- a/reference/stats/reference.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - Statistic &Functions; - - &reference.stats.entities.functions; - - - - diff --git a/reference/stats/setup.xml b/reference/stats/setup.xml deleted file mode 100644 index f95bf8a337..0000000000 --- a/reference/stats/setup.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - &reftitle.setup; - - -
- &reftitle.required; - - No external libraries are needed. The extension comes bundled with the libraries used. - -
- - - -
- &reftitle.install; - - &pecl.moved; - - - &pecl.info; - &url.pecl.package;stats. - - - &pecl.windows.download; - -
- - - -
- &reftitle.runtime; - &no.config; -
- - - -
- &reftitle.resources; - &no.resource; -
- - -
- - - diff --git a/reference/stats/versions.xml b/reference/stats/versions.xml deleted file mode 100644 index b5540ec717..0000000000 --- a/reference/stats/versions.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/reference/stomp/book.xml b/reference/stomp/book.xml index f3ece2050c..079679ad80 100644 --- a/reference/stomp/book.xml +++ b/reference/stomp/book.xml @@ -2,6 +2,7 @@ + Stomp Client Stomp diff --git a/reference/stomp/setup.xml b/reference/stomp/setup.xml index 6925e520eb..2d8fb2085c 100644 --- a/reference/stomp/setup.xml +++ b/reference/stomp/setup.xml @@ -6,7 +6,6 @@
&reftitle.required; - PECL/stomp requires PHP 5.2.2 or newer. The OpenSSL package >= 0.9.6 and the openssl extension may also be required to use stomp over SSL.
diff --git a/reference/stomp/stomp/abort.xml b/reference/stomp/stomp/abort.xml index 5391805d34..2267d1d521 100644 --- a/reference/stomp/stomp/abort.xml +++ b/reference/stomp/stomp/abort.xml @@ -53,11 +53,6 @@ - - &reftitle.notes; - &stomp.note.sync; - - &reftitle.examples; @@ -124,6 +119,10 @@ stomp_close($link); + + &reftitle.notes; + &stomp.note.sync; +
diff --git a/reference/stomp/stomp/ack.xml b/reference/stomp/stomp/ack.xml index 72818607da..33f11c0266 100644 --- a/reference/stomp/stomp/ack.xml +++ b/reference/stomp/stomp/ack.xml @@ -53,12 +53,6 @@ - - &reftitle.notes; - &stomp.note.transaction; - &stomp.note.sync; - - &reftitle.examples; @@ -154,6 +148,12 @@ stomp_close($link); + + &reftitle.notes; + &stomp.note.transaction; + &stomp.note.sync; + + - - Supported parameters - - - - - Parameters - Purpose - - - - - notification - - Name of user-defined callback function to be called whenever a stream triggers a notification. - Only supported for http:// and - ftp:// stream wrappers. - - - - options - - Array of options as in context options and - parameters. - - - - - - - &reftitle.returnvalues; diff --git a/reference/stream/functions/stream-get-filters.xml b/reference/stream/functions/stream-get-filters.xml index 817e867b09..f9d56636cc 100644 --- a/reference/stream/functions/stream-get-filters.xml +++ b/reference/stream/functions/stream-get-filters.xml @@ -16,6 +16,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/stream/functions/stream-get-line.xml b/reference/stream/functions/stream-get-line.xml index aa283fbee0..5e864209a8 100644 --- a/reference/stream/functions/stream-get-line.xml +++ b/reference/stream/functions/stream-get-line.xml @@ -11,14 +11,14 @@ stringstream_get_line resourcehandle intlength - stringending + stringending"" Gets a line from the given handle. Reading ends when length bytes have been read, when - the string specified by ending is found (which is + the non-empty string specified by ending is found (which is not included in the return value), or on EOF (whichever comes first). @@ -45,7 +45,10 @@ length - The number of bytes to read from the handle. + The maximum number of bytes to read from the handle. + Negative values are not supported. + Zero (0) means the default socket chunk size, + i.e. 8192 bytes. diff --git a/reference/stream/functions/stream-get-transports.xml b/reference/stream/functions/stream-get-transports.xml index d89df13413..4a8b0ebe0c 100644 --- a/reference/stream/functions/stream-get-transports.xml +++ b/reference/stream/functions/stream-get-transports.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/stream/functions/stream-get-wrappers.xml b/reference/stream/functions/stream-get-wrappers.xml index a7d205aa1c..5e34c5bb3b 100644 --- a/reference/stream/functions/stream-get-wrappers.xml +++ b/reference/stream/functions/stream-get-wrappers.xml @@ -16,6 +16,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/stream/functions/stream-set-blocking.xml b/reference/stream/functions/stream-set-blocking.xml index b01402c1fc..3e0224aab5 100644 --- a/reference/stream/functions/stream-set-blocking.xml +++ b/reference/stream/functions/stream-set-blocking.xml @@ -62,13 +62,6 @@ &reftitle.notes; - - - This function was previously called as - set_socket_blocking and later - socket_set_blocking but this usage is deprecated. - - On Windows, this has no affect on local files. Non-blocking IO for local files is not supported on Windows. diff --git a/reference/stream/functions/stream-socket-enable-crypto.xml b/reference/stream/functions/stream-socket-enable-crypto.xml index d1f6709287..6bd9baeb94 100644 --- a/reference/stream/functions/stream-socket-enable-crypto.xml +++ b/reference/stream/functions/stream-socket-enable-crypto.xml @@ -98,36 +98,6 @@ (only for non-blocking sockets). - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.6.0 - - Introduce STREAM_CRYPTO_METHOD_ANY_CLIENT, STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT, STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT, STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT, STREAM_CRYPTO_METHOD_ANY_SERVER, STREAM_CRYPTO_METHOD_TLSv1_0_SERVER, STREAM_CRYPTO_METHOD_TLSv1_1_SERVER, STREAM_CRYPTO_METHOD_TLSv1_2_SERVER. - - - - 5.6.0 - - The crypto_type is now optional. - - - - - - - &reftitle.examples; diff --git a/reference/stream/functions/stream-wrapper-register.xml b/reference/stream/functions/stream-wrapper-register.xml index b6ecf95f65..24851ec448 100644 --- a/reference/stream/functions/stream-wrapper-register.xml +++ b/reference/stream/functions/stream-wrapper-register.xml @@ -29,6 +29,7 @@ The wrapper name to be registered. + Valid protocol names must contain alphanumerics, dots (.), plusses (+), or hyphens (-) only. diff --git a/reference/stream/streamwrapper/construct.xml b/reference/stream/streamwrapper/construct.xml index 8e3bd3fcdd..317aa16eb3 100644 --- a/reference/stream/streamwrapper/construct.xml +++ b/reference/stream/streamwrapper/construct.xml @@ -10,7 +10,7 @@ &reftitle.description; - streamWrapper::__construct + public streamWrapper::__construct diff --git a/reference/stream/streamwrapper/destruct.xml b/reference/stream/streamwrapper/destruct.xml index 36cb403f72..f5a2a34a3f 100644 --- a/reference/stream/streamwrapper/destruct.xml +++ b/reference/stream/streamwrapper/destruct.xml @@ -10,7 +10,7 @@ &reftitle.description; - streamWrapper::__destruct + public streamWrapper::__destruct @@ -25,6 +25,13 @@ &no.function.parameters; + + &reftitle.returnvalues; + + &return.void; + + + - + strcasecmp Binary safe case-insensitive string comparison @@ -10,11 +10,13 @@ &reftitle.description; intstrcasecmp - stringstr1 - stringstr2 + stringstring1 + stringstring2 Binary safe case-insensitive string comparison. + The comparision is not locale aware; only ASCII letters are compared in a + case-insentive way. @@ -23,7 +25,7 @@ - str1 + string1 The first string @@ -31,7 +33,7 @@ - str2 + string2 The second string @@ -45,9 +47,9 @@ &reftitle.returnvalues; - Returns < 0 if str1 is less than - str2; > 0 if str1 - is greater than str2, and 0 if they are + Returns < 0 if string1 is less than + string2; > 0 if string1 + is greater than string2, and 0 if they are equal. @@ -87,7 +89,6 @@ if (strcasecmp($var1, $var2) == 0) { - - + strcmp Binary safe string comparison @@ -10,8 +10,8 @@ &reftitle.description; intstrcmp - stringstr1 - stringstr2 + stringstring1 + stringstring2 Note that this comparison is case sensitive. @@ -23,7 +23,7 @@ - str1 + string1 The first string. @@ -31,7 +31,7 @@ - str2 + string2 The second string. @@ -45,9 +45,9 @@ &reftitle.returnvalues; - Returns < 0 if str1 is less than - str2; > 0 if str1 - is greater than str2, and 0 if they are + Returns < 0 if string1 is less than + string2; > 0 if string1 + is greater than string2, and 0 if they are equal. @@ -87,7 +87,6 @@ if (strcmp($var1, $var2) !== 0) { - - + strncasecmp Binary safe case-insensitive string comparison of the first n characters @@ -10,9 +10,9 @@ &reftitle.description; intstrncasecmp - stringstr1 - stringstr2 - intlen + stringstring1 + stringstring2 + intlength This function is similar to strcasecmp, with the @@ -26,7 +26,7 @@ - str1 + string1 The first string. @@ -34,7 +34,7 @@ - str2 + string2 The second string. @@ -42,7 +42,7 @@ - len + length The length of strings to be used in the comparison. @@ -56,9 +56,9 @@ &reftitle.returnvalues; - Returns < 0 if str1 is less than - str2; > 0 if str1 is - greater than str2, and 0 if they are equal. + Returns < 0 if string1 is less than + string2; > 0 if string1 is + greater than string2, and 0 if they are equal. @@ -77,7 +77,6 @@ - - + strncmp Binary safe string comparison of the first n characters @@ -10,9 +10,9 @@ &reftitle.description; intstrncmp - stringstr1 - stringstr2 - intlen + stringstring1 + stringstring2 + intlength This function is similar to strcmp, with the @@ -29,7 +29,7 @@ - str1 + string1 The first string. @@ -37,7 +37,7 @@ - str2 + string2 The second string. @@ -45,7 +45,7 @@ - len + length Number of characters to use in the comparison. @@ -59,9 +59,9 @@ &reftitle.returnvalues; - Returns < 0 if str1 is less than - str2; > 0 if str1 - is greater than str2, and 0 if they are + Returns < 0 if string1 is less than + string2; > 0 if string1 + is greater than string2, and 0 if they are equal. @@ -81,7 +81,6 @@ - - - - Suhosin extension - Suhosin - - - &reftitle.intro; - - - Suhosin is an advanced protection - system for PHP installations. It was designed to protect servers and users - from known and unknown flaws in PHP applications and the PHP core. - - - - &reference.suhosin.setup; - &reference.suhosin.constants; - &reference.suhosin.reference; - - - - diff --git a/reference/suhosin/configure.xml b/reference/suhosin/configure.xml deleted file mode 100644 index 895649f92e..0000000000 --- a/reference/suhosin/configure.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - -
- &reftitle.install; - - - Some Linux distributions have Suhosin packages. There are also detailed installation instructions. - - - - There is no official Windows release. - - -
- - - diff --git a/reference/suhosin/constants.xml b/reference/suhosin/constants.xml deleted file mode 100644 index 1cd3c216e6..0000000000 --- a/reference/suhosin/constants.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - &reftitle.constants; - &extension.constants; - - - - S_MEMORY - (int) - - - - - - - - - - S_VARS - (int) - - - - - - - - - - S_FILES - (int) - - - - - - - - - - S_INCLUDE - (int) - - - - - - - - - - S_SQL - (int) - - - - - - - - - - S_EXECUTOR - (int) - - - - - - - - - - S_MAIL - (int) - - - - - - - - - - S_SESSION - (int) - - - - - - - - - - S_MISC - (int) - - - - - - - - - - S_INTERNAL - (int) - - - - - - - - - - S_ALL - (int) - - - - - - - - - - - diff --git a/reference/suhosin/functions/sha256-file.xml b/reference/suhosin/functions/sha256-file.xml deleted file mode 100644 index 2ef89bb829..0000000000 --- a/reference/suhosin/functions/sha256-file.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - sha256_file - Calculate the sha256 hash of given filename - - - - &reftitle.description; - - stringfalsesha256_file - stringfilename - boolraw_output - - - - - - - - - &reftitle.parameters; - - - - filename - - - Name of the file. - - - - - raw_output - - - Whether to return raw binary format (32 bytes). - - - - - - - - - &reftitle.returnvalues; - - Returns the hash&return.falseforfailure;. - - - - - &reftitle.notes; - - - This function is available only with Suhosin extension. You can also use - hash_file function with "sha256" algorithm. - - - - - - &reftitle.seealso; - - - sha256 - hash_file - - - - - - - diff --git a/reference/suhosin/functions/sha256.xml b/reference/suhosin/functions/sha256.xml deleted file mode 100644 index ed01802f46..0000000000 --- a/reference/suhosin/functions/sha256.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - sha256 - Calculate the sha256 hash of a string - - - - &reftitle.description; - - stringfalsesha256 - stringstr - boolraw_output - - - - - - - - - &reftitle.parameters; - - - - str - - - The string. - - - - - raw_output - - - Whether to return raw binary format (32 bytes). - - - - - - - - - &reftitle.returnvalues; - - Returns the hash&return.falseforfailure;. - - - - - &reftitle.notes; - - - This function is available only with Suhosin extension. You can also use - hash function with "sha256" algorithm. - - - - - - &reftitle.seealso; - - - sha256_file - hash - - - - - - - diff --git a/reference/suhosin/functions/suhosin-encrypt-cookie.xml b/reference/suhosin/functions/suhosin-encrypt-cookie.xml deleted file mode 100644 index 600a501b36..0000000000 --- a/reference/suhosin/functions/suhosin-encrypt-cookie.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - suhosin_encrypt_cookie - Encrypts a cookie value according to current cookie encrpytion setting - - - - &reftitle.description; - - stringfalsesuhosin_encrypt_cookie - stringname - stringvalue - - - - - - &warn.undocumented.func; - - - - - &reftitle.parameters; - - - - name - - - Cookie name. - - - - - value - - - Cookie value. - - - - - - - - - &reftitle.returnvalues; - - Returns the encrypted string&return.falseforfailure;. - - - - - - - diff --git a/reference/suhosin/ini.xml b/reference/suhosin/ini.xml deleted file mode 100644 index f39d4ad427..0000000000 --- a/reference/suhosin/ini.xml +++ /dev/null @@ -1,1726 +0,0 @@ - - - -
- &reftitle.runtime; - &extension.runtime; - - - Suhosin &ConfigureOptions; - - - - &Name; - &Default; - &Changeable; - &Changelog; - - - - - suhosin.log.syslog - - PHP_INI_PERDIR - - - - suhosin.log.syslog.facility - - PHP_INI_PERDIR - - - - suhosin.log.syslog.priority - - PHP_INI_PERDIR - - - - suhosin.log.sapi - 0 - PHP_INI_PERDIR - - - - suhosin.log.script - 0 - PHP_INI_PERDIR - - - - suhosin.log.script.name - - PHP_INI_PERDIR - - - - suhosin.log.use-x-forwarded-for - 0 - PHP_INI_PERDIR - - - - suhosin.log.phpscript - 0 - PHP_INI_PERDIR - - - - suhosin.log.phpscript.name - - PHP_INI_PERDIR - - - - suhosin.log.file - 0 - PHP_INI_PERDIR - - - - suhosin.log.file.name - - PHP_INI_PERDIR - - - - suhosin.log.phpscript.is_safe - 0 - PHP_INI_PERDIR - - - - suhosin.perdir - 0 - PHP_INI_SYSTEM - - - - suhosin.executor.include.max_traversal - 0 - PHP_INI_PERDIR - - - - suhosin.executor.include.whitelist - - PHP_INI_PERDIR - - - - suhosin.executor.include.blacklist - - PHP_INI_PERDIR - - - - suhosin.executor.include.allow_writable_files - 1 - PHP_INI_PERDIR - - - - suhosin.executor.eval.whitelist - - PHP_INI_PERDIR - - - - suhosin.executor.eval.blacklist - - PHP_INI_PERDIR - - - - suhosin.executor.func.whitelist - - PHP_INI_PERDIR - - - - suhosin.executor.func.blacklist - - PHP_INI_PERDIR - - - - suhosin.executor.disable_eval - 0 - PHP_INI_PERDIR - - - - suhosin.executor.disable_emodifier - 0 - PHP_INI_PERDIR - - - - suhosin.executor.allow_symlink - 0 - PHP_INI_PERDIR - - - - suhosin.executor.max_depth - 0 - PHP_INI_PERDIR - - - - suhosin.multiheader - 0 - PHP_INI_PERDIR - - - - suhosin.mail.protect - 0 - PHP_INI_PERDIR - - - - suhosin.memory_limit - 0 - PHP_INI_PERDIR - - - - suhosin.simulation - 0 - PHP_INI_PERDIR - - - - suhosin.filter.action - - PHP_INI_PERDIR - - - - suhosin.protectkey - 1 - PHP_INI_SYSTEM - - - - suhosin.coredump - 0 - PHP_INI_SYSTEM - - - - suhosin.stealth - 1 - PHP_INI_SYSTEM - - - - suhosin.apc_bug_workaround - 0 - PHP_INI_SYSTEM - - - - suhosin.disable.display_errors - 0 - PHP_INI_SYSTEM - - - - suhosin.request.max_vars - 1000 - PHP_INI_PERDIR - - - - suhosin.request.max_varname_length - 64 - PHP_INI_PERDIR - - - - suhosin.request.max_value_length - 1000000 - PHP_INI_PERDIR - - - - suhosin.request.max_array_depth - 50 - PHP_INI_PERDIR - - - - suhosin.request.max_totalname_length - 256 - PHP_INI_PERDIR - - - - suhosin.request.max_array_index_length - 64 - PHP_INI_PERDIR - - - - suhosin.request.disallow_nul - 1 - PHP_INI_PERDIR - - - - suhosin.request.disallow_ws - 0 - PHP_INI_PERDIR - - - - suhosin.cookie.max_vars - 100 - PHP_INI_PERDIR - - - - suhosin.cookie.max_name_length - 64 - PHP_INI_PERDIR - - - - suhosin.cookie.max_totalname_length - 256 - PHP_INI_PERDIR - - - - suhosin.cookie.max_value_length - 10000 - PHP_INI_PERDIR - - - - suhosin.cookie.max_array_depth - 50 - PHP_INI_PERDIR - - - - suhosin.cookie.max_array_index_length - 64 - PHP_INI_PERDIR - - - - suhosin.cookie.disallow_nul - 1 - PHP_INI_PERDIR - - - - suhosin.cookie.disallow_ws - 1 - PHP_INI_PERDIR - - - - suhosin.get.max_vars - 100 - PHP_INI_PERDIR - - - - suhosin.get.max_name_length - 64 - PHP_INI_PERDIR - - - - suhosin.get.max_totalname_length - 256 - PHP_INI_PERDIR - - - - suhosin.get.max_value_length - 512 - PHP_INI_PERDIR - - - - suhosin.get.max_array_depth - 50 - PHP_INI_PERDIR - - - - suhosin.get.max_array_index_length - 64 - PHP_INI_PERDIR - - - - suhosin.get.disallow_nul - 1 - PHP_INI_PERDIR - - - - suhosin.get.disallow_ws - 0 - PHP_INI_PERDIR - - - - suhosin.post.max_vars - 1000 - PHP_INI_PERDIR - - - - suhosin.post.max_name_length - 64 - PHP_INI_PERDIR - - - - suhosin.post.max_totalname_length - 256 - PHP_INI_PERDIR - - - - suhosin.post.max_value_length - 1000000 - PHP_INI_PERDIR - - - - suhosin.post.max_array_depth - 50 - PHP_INI_PERDIR - - - - suhosin.post.max_array_index_length - 64 - PHP_INI_PERDIR - - - - suhosin.post.disallow_nul - 1 - PHP_INI_PERDIR - - - - suhosin.post.disallow_ws - 0 - PHP_INI_PERDIR - - - - suhosin.upload.max_uploads - 25 - PHP_INI_PERDIR - - - - suhosin.upload.disallow_elf - 1 - PHP_INI_PERDIR - - - - suhosin.upload.disallow_binary - 0 - PHP_INI_PERDIR - - - - suhosin.upload.remove_binary - 0 - PHP_INI_PERDIR - - - - suhosin.upload.verification_script - - PHP_INI_PERDIR - - - - suhosin.sql.bailout_on_error - 0 - PHP_INI_PERDIR - - - - suhosin.sql.user_prefix - - PHP_INI_PERDIR - - - - suhosin.sql.user_postfix - - PHP_INI_PERDIR - - - - suhosin.sql.comment - 0 - PHP_INI_PERDIR - - - - suhosin.sql.opencomment - 0 - PHP_INI_PERDIR - - - - suhosin.sql.multiselect - 0 - PHP_INI_PERDIR - - - - suhosin.sql.union - 0 - PHP_INI_PERDIR - - - - suhosin.session.encrypt - 1 - PHP_INI_PERDIR - - - - suhosin.session.cryptkey - - PHP_INI_PERDIR - - - - suhosin.session.cryptua - 0 - PHP_INI_PERDIR - - - - suhosin.session.cryptdocroot - 1 - PHP_INI_PERDIR - - - - suhosin.session.cryptraddr - 0 - PHP_INI_PERDIR - - - - suhosin.session.checkraddr - 0 - PHP_INI_PERDIR - - - - suhosin.session.max_id_length - 128 - PHP_INI_PERDIR - - - - suhosin.cookie.encrypt - 0 - PHP_INI_PERDIR - - - - suhosin.cookie.cryptkey - - PHP_INI_ALL - - - - suhosin.cookie.cryptua - 1 - PHP_INI_PERDIR - - - - suhosin.cookie.cryptdocroot - 1 - PHP_INI_PERDIR - - - - suhosin.cookie.cryptraddr - 0 - PHP_INI_PERDIR - - - - suhosin.cookie.checkraddr - 0 - PHP_INI_PERDIR - - - - suhosin.cookie.cryptlist - - PHP_INI_PERDIR - - - - suhosin.cookie.plainlist - - PHP_INI_PERDIR - - - - suhosin.server.encode - 1 - PHP_INI_PERDIR - - - - suhosin.server.strip - 1 - PHP_INI_PERDIR - - - - suhosin.srand.ignore - 1 - PHP_INI_PERDIR - - - - suhosin.mt_srand.ignore - 1 - PHP_INI_PERDIR - - - - -
-
- - &ini.descriptions.title; - - - - - - suhosin.log.syslog - string - - - - - - - - - - suhosin.log.syslog.facility - string - - - - - - - - - - suhosin.log.syslog.priority - string - - - - - - - - - - suhosin.log.sapi - int - - - - - - - - - - suhosin.log.script - int - - - - - - - - - - suhosin.log.script.name - string - - - - - - - - - - suhosin.log.use-x-forwarded-for - int - - - - - - - - - - suhosin.log.phpscript - int - - - - - - - - - - suhosin.log.phpscript.name - string - - - - - - - - - - suhosin.log.file - int - - - - - - - - - - suhosin.log.file.name - string - - - - - - - - - - suhosin.log.phpscript.is_safe - int - - - - - - - - - - suhosin.perdir - int - - - - - - - - - - suhosin.executor.include.max_traversal - int - - - - - - - - - - suhosin.executor.include.whitelist - string - - - - - - - - - - suhosin.executor.include.blacklist - string - - - - - - - - - - suhosin.executor.include.allow_writable_files - int - - - - - - - - - - suhosin.executor.eval.whitelist - string - - - - - - - - - - suhosin.executor.eval.blacklist - string - - - - - - - - - - suhosin.executor.func.whitelist - string - - - - - - - - - - suhosin.executor.func.blacklist - string - - - - - - - - - - suhosin.executor.disable_eval - int - - - - - - - - - - suhosin.executor.disable_emodifier - int - - - - - - - - - - suhosin.executor.allow_symlink - int - - - - - - - - - - suhosin.executor.max_depth - int - - - - - - - - - - suhosin.multiheader - int - - - - - - - - - - suhosin.mail.protect - int - - - - - - - - - - suhosin.memory_limit - int - - - - - - - - - - suhosin.simulation - int - - - - - - - - - - suhosin.filter.action - string - - - - - - - - - - suhosin.protectkey - int - - - - - - - - - - suhosin.coredump - int - - - - - - - - - - suhosin.stealth - int - - - - - - - - - - suhosin.apc_bug_workaround - int - - - - - - - - - - suhosin.disable.display_errors - int - - - - - - - - - - suhosin.request.max_vars - int - - - - - - - - - - suhosin.request.max_varname_length - int - - - - - - - - - - suhosin.request.max_value_length - int - - - - - - - - - - suhosin.request.max_array_depth - int - - - - - - - - - - suhosin.request.max_totalname_length - int - - - - - - - - - - suhosin.request.max_array_index_length - int - - - - - - - - - - suhosin.request.disallow_nul - int - - - - - - - - - - suhosin.request.disallow_ws - int - - - - - - - - - - suhosin.cookie.max_vars - int - - - - - - - - - - suhosin.cookie.max_name_length - int - - - - - - - - - - suhosin.cookie.max_totalname_length - int - - - - - - - - - - suhosin.cookie.max_value_length - int - - - - - - - - - - suhosin.cookie.max_array_depth - int - - - - - - - - - - suhosin.cookie.max_array_index_length - int - - - - - - - - - - suhosin.cookie.disallow_nul - int - - - - - - - - - - suhosin.cookie.disallow_ws - int - - - - - - - - - - suhosin.get.max_vars - int - - - - - - - - - - suhosin.get.max_name_length - int - - - - - - - - - - suhosin.get.max_totalname_length - int - - - - - - - - - - suhosin.get.max_value_length - int - - - - - - - - - - suhosin.get.max_array_depth - int - - - - - - - - - - suhosin.get.max_array_index_length - int - - - - - - - - - - suhosin.get.disallow_nul - int - - - - - - - - - - suhosin.get.disallow_ws - int - - - - - - - - - - suhosin.post.max_vars - int - - - - - - - - - - suhosin.post.max_name_length - int - - - - - - - - - - suhosin.post.max_totalname_length - int - - - - - - - - - - suhosin.post.max_value_length - int - - - - - - - - - - suhosin.post.max_array_depth - int - - - - - - - - - - suhosin.post.max_array_index_length - int - - - - - - - - - - suhosin.post.disallow_nul - int - - - - - - - - - - suhosin.post.disallow_ws - int - - - - - - - - - - suhosin.upload.max_uploads - int - - - - - - - - - - suhosin.upload.disallow_elf - int - - - - - - - - - - suhosin.upload.disallow_binary - int - - - - - - - - - - suhosin.upload.remove_binary - int - - - - - - - - - - suhosin.upload.verification_script - string - - - - - - - - - - suhosin.sql.bailout_on_error - int - - - - - - - - - - suhosin.sql.user_prefix - string - - - - - - - - - - suhosin.sql.user_postfix - string - - - - - - - - - - suhosin.sql.comment - int - - - - - - - - - - suhosin.sql.opencomment - int - - - - - - - - - - suhosin.sql.multiselect - int - - - - - - - - - - suhosin.sql.union - int - - - - - - - - - - suhosin.session.encrypt - int - - - - - - - - - - suhosin.session.cryptkey - string - - - - - - - - - - suhosin.session.cryptua - int - - - - - - - - - - suhosin.session.cryptdocroot - int - - - - - - - - - - suhosin.session.cryptraddr - int - - - - - - - - - - suhosin.session.checkraddr - int - - - - - - - - - - suhosin.session.max_id_length - int - - - - - - - - - - suhosin.cookie.encrypt - int - - - - - - - - - - suhosin.cookie.cryptkey - string - - - - - - - - - - suhosin.cookie.cryptua - int - - - - - - - - - - suhosin.cookie.cryptdocroot - int - - - - - - - - - - suhosin.cookie.cryptraddr - int - - - - - - - - - - suhosin.cookie.checkraddr - int - - - - - - - - - - suhosin.cookie.cryptlist - string - - - - - - - - - - suhosin.cookie.plainlist - string - - - - - - - - - - suhosin.server.encode - int - - - - - - - - - - suhosin.server.strip - int - - - - - - - - - - suhosin.srand.ignore - int - - - - - - - - - - suhosin.mt_srand.ignore - int - - - - - - - - - - - - - There is a detailed description of configuration - directives on the project's web. - - -
- - diff --git a/reference/suhosin/reference.xml b/reference/suhosin/reference.xml deleted file mode 100644 index 34526e9928..0000000000 --- a/reference/suhosin/reference.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Suhosin &Functions; - - &reference.suhosin.entities.functions; - - - - diff --git a/reference/suhosin/setup.xml b/reference/suhosin/setup.xml deleted file mode 100644 index 5bbedd7428..0000000000 --- a/reference/suhosin/setup.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - &no.requirement; -
- - &reference.suhosin.configure; - - &reference.suhosin.ini; - -
- &reftitle.resources; - &no.resource; -
- -
- - diff --git a/reference/suhosin/versions.xml b/reference/suhosin/versions.xml deleted file mode 100644 index 9f45670a1a..0000000000 --- a/reference/suhosin/versions.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/reference/svm/book.xml b/reference/svm/book.xml index 09217667dc..2b0949168f 100644 --- a/reference/svm/book.xml +++ b/reference/svm/book.xml @@ -2,6 +2,7 @@ + Support Vector Machine SVM diff --git a/reference/svn/book.xml b/reference/svn/book.xml index a8f5c0efc5..07847a7e70 100644 --- a/reference/svn/book.xml +++ b/reference/svn/book.xml @@ -3,6 +3,7 @@ + Subversion SVN diff --git a/reference/svn/functions/svn-add.xml b/reference/svn/functions/svn-add.xml index 23ac373ea3..13443be214 100644 --- a/reference/svn/functions/svn-add.xml +++ b/reference/svn/functions/svn-add.xml @@ -65,11 +65,6 @@ - - &reftitle.notes; - &warn.experimental.func; - - + Swoole @@ -76,4 +77,4 @@ End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> \ No newline at end of file +--> diff --git a/reference/swoole/constants.xml b/reference/swoole/constants.xml index c1eae5f76f..782618020e 100644 --- a/reference/swoole/constants.xml +++ b/reference/swoole/constants.xml @@ -406,6 +406,90 @@ + + + SWOOLE_LOG_DEBUG + (int) + + + + Debug log. + Available as of swoole 2.1.2. + + + + + + SWOOLE_LOG_TRACE + (int) + + + + Trace log. + Available as of swoole 2.1.2. + + + + + + SWOOLE_LOG_INFO + (int) + + + + Info log. + Available as of swoole 2.1.2. + + + + + + SWOOLE_LOG_NOTICE + (int) + + + + Notice log. + Available as of swoole 2.1.2. + + + + + + SWOOLE_LOG_WARNING + (int) + + + + Warning log. + Available as of swoole 2.1.2. + + + + + + SWOOLE_LOG_ERROR + (int) + + + + Error log. + Available as of swoole 2.1.2. + + + + + + SWOOLE_LOG_NONE + (int) + + + + None log. + Available as of swoole 4.3.2. + + + diff --git a/reference/swoole/functions/swoole-async-readfile.xml b/reference/swoole/functions/swoole-async-readfile.xml index 659e1b8ee2..410f9f3e0c 100644 --- a/reference/swoole/functions/swoole-async-readfile.xml +++ b/reference/swoole/functions/swoole-async-readfile.xml @@ -52,7 +52,7 @@ content - The content readed from the file. + The content read from the file. diff --git a/reference/swoole/functions/swoole-async-set.xml b/reference/swoole/functions/swoole-async-set.xml index e635cb6c40..6b7f22b6b9 100644 --- a/reference/swoole/functions/swoole-async-set.xml +++ b/reference/swoole/functions/swoole-async-set.xml @@ -33,6 +33,13 @@ + + &reftitle.returnvalues; + + &return.void; + + +
- + - MysqlndUhPreparedStatement::__construct - The __construct purpose + swoole_clear_error + Clear errors in the socket or on the last error code &reftitle.description; - public MysqlndUhPreparedStatement::__construct + voidswoole_clear_error - + Clear errors in the socket or on the last error code. - - &warn.undocumented.func; - @@ -29,11 +26,9 @@ &reftitle.returnvalues; - + &return.void; - - - + - MysqlndUhConnection::shutdownServer - The shutdownServer purpose + swoole_error_log + Output error messages to the log &reftitle.description; - public voidMysqlndUhConnection::shutdownServer - stringMYSQLND_UH_RES_MYSQLND_NAME - stringlevel + voidswoole_error_log + intlevel + stringmsg - + Output error messages to the log. - - &warn.undocumented.func; - &reftitle.parameters; - MYSQLND_UH_RES_MYSQLND_NAME + level - + Log Level, constants can be used: SWOOLE_LOG_DEBUG, + SWOOLE_LOG_TRACE, + SWOOLE_LOG_INFO, + SWOOLE_LOG_NOTICE, + SWOOLE_LOG_WARNING, + SWOOLE_LOG_ERROR, + SWOOLE_LOG_NONE - level + msg - + Message content to be written to the log. @@ -47,11 +50,9 @@ &reftitle.returnvalues; - + &return.void; - - diff --git a/reference/sync/book.xml b/reference/sync/book.xml index bc25a8b854..4078c71cb3 100644 --- a/reference/sync/book.xml +++ b/reference/sync/book.xml @@ -2,6 +2,7 @@ + Sync Sync diff --git a/reference/sync/syncevent/construct.xml b/reference/sync/syncevent/construct.xml index 8c614ad3cb..2ea8a15fa0 100644 --- a/reference/sync/syncevent/construct.xml +++ b/reference/sync/syncevent/construct.xml @@ -16,7 +16,7 @@ boolprefire&false; - Constructs a named or unnamed event object. + Constructs a named or unnamed event object. @@ -27,13 +27,13 @@ name - The name of the event if this is a named event object. + The name of the event if this is a named event object. - If the name already exists, it must be able to be opened by the current user - that the process is running as or an exception will be thrown with a meaningless - error message. + If the name already exists, it must be able to be opened by the current user + that the process is running as or an exception will be thrown with a meaningless + error message. @@ -42,12 +42,12 @@ manual - Specifies whether or not the event object must be reset manually. + Specifies whether or not the event object must be reset manually. - Manual reset event objects allow all waiting processes through until the - object is reset. + Manual reset event objects allow all waiting processes through until the + object is reset. @@ -56,11 +56,11 @@ prefire - Specifies whether or not to prefire (signal) the event object. + Specifies whether or not to prefire (signal) the event object. - Only has impact if the calling process/thread is the first to create the object. + Only has impact if the calling process/thread is the first to create the object. @@ -71,8 +71,14 @@ &reftitle.returnvalues; - The new SyncEvent object. An exception is thrown if the event object cannot - be created or opened. + The new SyncEvent object. + + + + + &reftitle.errors; + + An exception is thrown if the event object cannot be created or opened. diff --git a/reference/sync/syncevent/fire.xml b/reference/sync/syncevent/fire.xml index a45c0d5b7a..5b0a2e9aad 100644 --- a/reference/sync/syncevent/fire.xml +++ b/reference/sync/syncevent/fire.xml @@ -14,8 +14,8 @@ - Fires/sets a SyncEvent object. Lets multiple threads through that are waiting - if the event object was created with a manual value of TRUE. + Fires/sets a SyncEvent object. Lets multiple threads through that are waiting + if the event object was created with a manual value of &true;. @@ -27,7 +27,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the event was fired, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncevent/reset.xml b/reference/sync/syncevent/reset.xml index 7a54b04c70..6864c209a8 100644 --- a/reference/sync/syncevent/reset.xml +++ b/reference/sync/syncevent/reset.xml @@ -14,7 +14,7 @@ - Resets a SyncEvent object that has been fired/set. Only valid for manual event objects. + Resets a SyncEvent object that has been fired/set. Only valid for manual event objects. @@ -26,7 +26,7 @@ &reftitle.returnvalues; - A boolean value of TRUE if the object was successfully reset, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncevent/wait.xml b/reference/sync/syncevent/wait.xml index c6ddd1ad02..2b70ca4d58 100644 --- a/reference/sync/syncevent/wait.xml +++ b/reference/sync/syncevent/wait.xml @@ -14,7 +14,7 @@ intwait-1 - Waits for the SyncEvent object to be fired. + Waits for the SyncEvent object to be fired. @@ -25,8 +25,8 @@ wait - The number of milliseconds to wait for the event to be fired. - A value of -1 is infinite. + The number of milliseconds to wait for the event to be fired. + A value of -1 is infinite. @@ -36,7 +36,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the event was fired, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncmutex/construct.xml b/reference/sync/syncmutex/construct.xml index 5ccb0e761c..972045d324 100644 --- a/reference/sync/syncmutex/construct.xml +++ b/reference/sync/syncmutex/construct.xml @@ -14,7 +14,7 @@ stringname - Constructs a named or unnamed countable mutex. + Constructs a named or unnamed countable mutex. @@ -25,13 +25,13 @@ name - The name of the mutex if this is a named mutex object. + The name of the mutex if this is a named mutex object. - If the name already exists, it must be able to be opened by the current user - that the process is running as or an exception will be thrown with a meaningless - error message. + If the name already exists, it must be able to be opened by the current user + that the process is running as or an exception will be thrown with a meaningless + error message. @@ -42,8 +42,14 @@ &reftitle.returnvalues; - The new SyncMutex object. An exception is thrown if the mutex cannot be - created or opened. + The new SyncMutex object. + + + + + &reftitle.errors; + + An exception is thrown if the mutex cannot be created or opened. diff --git a/reference/sync/syncmutex/lock.xml b/reference/sync/syncmutex/lock.xml index c31d120fd0..4056875940 100644 --- a/reference/sync/syncmutex/lock.xml +++ b/reference/sync/syncmutex/lock.xml @@ -14,8 +14,8 @@ intwait-1 - Obtains an exclusive lock on a SyncMutex object. - If the lock is already acquired, then this increments an internal counter. + Obtains an exclusive lock on a SyncMutex object. + If the lock is already acquired, then this increments an internal counter. @@ -26,8 +26,8 @@ wait - The number of milliseconds to wait for the exclusive lock. - A value of -1 is infinite. + The number of milliseconds to wait for the exclusive lock. + A value of -1 is infinite. @@ -37,7 +37,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the lock was obtained, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncmutex/unlock.xml b/reference/sync/syncmutex/unlock.xml index 6c6f304aed..025853696b 100644 --- a/reference/sync/syncmutex/unlock.xml +++ b/reference/sync/syncmutex/unlock.xml @@ -14,8 +14,8 @@ boolall&false; - Decreases the internal counter of a SyncMutex object. - When the internal counter reaches zero, the actual lock on the object is released. + Decreases the internal counter of a SyncMutex object. + When the internal counter reaches zero, the actual lock on the object is released. @@ -26,7 +26,7 @@ all - Specifies whether or not to set the internal counter to zero and therefore release the lock. + Specifies whether or not to set the internal counter to zero and therefore release the lock. @@ -36,7 +36,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the unlock operation was successful, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncreaderwriter/construct.xml b/reference/sync/syncreaderwriter/construct.xml index 4bb153fb73..1b049a14bf 100644 --- a/reference/sync/syncreaderwriter/construct.xml +++ b/reference/sync/syncreaderwriter/construct.xml @@ -15,7 +15,7 @@ boolautounlock&true; - Constructs a named or unnamed reader-writer object. + Constructs a named or unnamed reader-writer object. @@ -26,13 +26,13 @@ name - The name of the reader-writer if this is a named reader-writer object. + The name of the reader-writer if this is a named reader-writer object. - If the name already exists, it must be able to be opened by the current user - that the process is running as or an exception will be thrown with a meaningless - error message. + If the name already exists, it must be able to be opened by the current user + that the process is running as or an exception will be thrown with a meaningless + error message. @@ -41,15 +41,15 @@ autounlock - Specifies whether or not to automatically unlock the reader-writer at the - conclusion of the PHP script. + Specifies whether or not to automatically unlock the reader-writer at the + conclusion of the PHP script. - If an object is: A named reader-writer with an autounlock of FALSE, the - object is locked for either reading or writing, and the PHP script concludes - before the object is unlocked, then the underlying objects will end up in an - inconsistent state. + If an object is: A named reader-writer with an autounlock of FALSE, the + object is locked for either reading or writing, and the PHP script concludes + before the object is unlocked, then the underlying objects will end up in an + inconsistent state. @@ -60,8 +60,14 @@ &reftitle.returnvalues; - The new SyncReaderWriter object. An exception is thrown if the reader-writer - cannot be created or opened. + The new SyncReaderWriter object. + + + + + &reftitle.errors; + + An exception is thrown if the reader-writer cannot be created or opened. diff --git a/reference/sync/syncreaderwriter/readlock.xml b/reference/sync/syncreaderwriter/readlock.xml index cbcee0fa00..3cb436cf10 100644 --- a/reference/sync/syncreaderwriter/readlock.xml +++ b/reference/sync/syncreaderwriter/readlock.xml @@ -14,7 +14,7 @@ intwait-1 - Obtains a read lock on a SyncReaderWriter object. + Obtains a read lock on a SyncReaderWriter object. @@ -25,8 +25,8 @@ wait - The number of milliseconds to wait for a lock. - A value of -1 is infinite. + The number of milliseconds to wait for a lock. + A value of -1 is infinite. @@ -36,7 +36,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the lock was obtained, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncreaderwriter/readunlock.xml b/reference/sync/syncreaderwriter/readunlock.xml index 3e061ce9ac..02ac628672 100644 --- a/reference/sync/syncreaderwriter/readunlock.xml +++ b/reference/sync/syncreaderwriter/readunlock.xml @@ -14,7 +14,7 @@ - Releases a read lock on a SyncReaderWriter object. + Releases a read lock on a SyncReaderWriter object. @@ -26,7 +26,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the unlock operation was successful, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncreaderwriter/writelock.xml b/reference/sync/syncreaderwriter/writelock.xml index fecdab0858..3434cdb7fb 100644 --- a/reference/sync/syncreaderwriter/writelock.xml +++ b/reference/sync/syncreaderwriter/writelock.xml @@ -14,7 +14,7 @@ intwait-1 - Obtains an exclusive write lock on a SyncReaderWriter object. + Obtains an exclusive write lock on a SyncReaderWriter object. @@ -25,8 +25,8 @@ wait - The number of milliseconds to wait for a lock. - A value of -1 is infinite. + The number of milliseconds to wait for a lock. + A value of -1 is infinite. @@ -36,7 +36,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the lock was obtained, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncreaderwriter/writeunlock.xml b/reference/sync/syncreaderwriter/writeunlock.xml index 96d3b03bc3..ec4a4eb27d 100644 --- a/reference/sync/syncreaderwriter/writeunlock.xml +++ b/reference/sync/syncreaderwriter/writeunlock.xml @@ -14,7 +14,7 @@ - Releases a write lock on a SyncReaderWriter object. + Releases a write lock on a SyncReaderWriter object. @@ -26,7 +26,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the unlock operation was successful, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncsemaphore/construct.xml b/reference/sync/syncsemaphore/construct.xml index 075a1d8b38..7e62d1af6f 100644 --- a/reference/sync/syncsemaphore/construct.xml +++ b/reference/sync/syncsemaphore/construct.xml @@ -16,7 +16,7 @@ boolautounlock&true; - Constructs a named or unnamed semaphore. + Constructs a named or unnamed semaphore. @@ -27,13 +27,13 @@ name - The name of the semaphore if this is a named semaphore object. + The name of the semaphore if this is a named semaphore object. - If the name already exists, it must be able to be opened by the current user - that the process is running as or an exception will be thrown with a meaningless - error message. + If the name already exists, it must be able to be opened by the current user + that the process is running as or an exception will be thrown with a meaningless + error message. @@ -42,7 +42,7 @@ initialval - The initial value of the semaphore. This is the number of locks that may be obtained. + The initial value of the semaphore. This is the number of locks that may be obtained. @@ -50,14 +50,14 @@ autounlock - Specifies whether or not to automatically unlock the semaphore at the - conclusion of the PHP script. + Specifies whether or not to automatically unlock the semaphore at the + conclusion of the PHP script. - If an object is: A named semaphore with an autounlock of FALSE, the object is - locked, and the PHP script concludes before the object is unlocked, then the - underlying semaphore will end up in an inconsistent state. + If an object is: A named semaphore with an autounlock of &false;, the object is + locked, and the PHP script concludes before the object is unlocked, then the + underlying semaphore will end up in an inconsistent state. @@ -68,8 +68,14 @@ &reftitle.returnvalues; - The new SyncSemaphore object. An exception is thrown if the semaphore cannot - be created or opened. + The new SyncSemaphore object. + + + + + &reftitle.errors; + + An exception is thrown if the semaphore cannot be created or opened. diff --git a/reference/sync/syncsemaphore/lock.xml b/reference/sync/syncsemaphore/lock.xml index ac939c1096..a6a780918b 100644 --- a/reference/sync/syncsemaphore/lock.xml +++ b/reference/sync/syncsemaphore/lock.xml @@ -14,7 +14,7 @@ intwait-1 - Decreases the count of a SyncSemaphore object or waits until the semaphore becomes non-zero. + Decreases the count of a SyncSemaphore object or waits until the semaphore becomes non-zero. @@ -25,8 +25,8 @@ wait - The number of milliseconds to wait for the semaphore. - A value of -1 is infinite. + The number of milliseconds to wait for the semaphore. + A value of -1 is infinite. @@ -36,7 +36,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the lock operation was successful, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncsemaphore/unlock.xml b/reference/sync/syncsemaphore/unlock.xml index 5dd33ddf3c..8cd2d3a601 100644 --- a/reference/sync/syncsemaphore/unlock.xml +++ b/reference/sync/syncsemaphore/unlock.xml @@ -14,7 +14,7 @@ intprevcount - Increases the count of a SyncSemaphore object. + Increases the count of a SyncSemaphore object. @@ -25,7 +25,7 @@ prevcount - Returns the previous count of the semaphore. + Returns the previous count of the semaphore. @@ -35,7 +35,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the unlock operation was successful, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncsharedmemory/construct.xml b/reference/sync/syncsharedmemory/construct.xml index 7a5e6c599a..c0355b8cc8 100644 --- a/reference/sync/syncsharedmemory/construct.xml +++ b/reference/sync/syncsharedmemory/construct.xml @@ -15,7 +15,7 @@ intsize - Constructs a named shared memory object. + Constructs a named shared memory object. @@ -26,13 +26,13 @@ name - The name of the shared memory object. + The name of the shared memory object. - If the name already exists, it must be able to be opened by the current user - that the process is running as or an exception will be thrown with a meaningless - error message. + If the name already exists, it must be able to be opened by the current user + that the process is running as or an exception will be thrown with a meaningless + error message. @@ -41,11 +41,11 @@ size - The size, in bytes, of shared memory to reserve. + The size, in bytes, of shared memory to reserve. - The amount of memory cannot be resized later. Request sufficient storage up front. + The amount of memory cannot be resized later. Request sufficient storage up front. @@ -56,8 +56,14 @@ &reftitle.returnvalues; - The new SyncSharedMemory object. An exception is thrown if the shared memory - object cannot be created or opened. + The new SyncSharedMemory object. + + + + + &reftitle.errors; + + An exception is thrown if the shared memory object cannot be created or opened. diff --git a/reference/sync/syncsharedmemory/first.xml b/reference/sync/syncsharedmemory/first.xml index eb9ce13f2f..333e2d034a 100644 --- a/reference/sync/syncsharedmemory/first.xml +++ b/reference/sync/syncsharedmemory/first.xml @@ -14,7 +14,7 @@ - Retrieves the system-wide first instance status of a SyncSharedMemory object. + Retrieves the system-wide first instance status of a SyncSharedMemory object. @@ -26,7 +26,7 @@ &reftitle.returnvalues; - A boolean of TRUE if the object is the first instance system-wide, FALSE otherwise. + &return.success; diff --git a/reference/sync/syncsharedmemory/size.xml b/reference/sync/syncsharedmemory/size.xml index cf741f5ff7..ab572f0739 100644 --- a/reference/sync/syncsharedmemory/size.xml +++ b/reference/sync/syncsharedmemory/size.xml @@ -14,7 +14,7 @@ - Retrieves the shared memory size of a SyncSharedMemory object. + Retrieves the shared memory size of a SyncSharedMemory object. @@ -26,7 +26,7 @@ &reftitle.returnvalues; - An integer containing the size of the shared memory. This will be the same size that was passed to the constructor. + An integer containing the size of the shared memory. This will be the same size that was passed to the constructor. diff --git a/reference/sync/syncsharedmemory/write.xml b/reference/sync/syncsharedmemory/write.xml index 52e529cc87..eee4cd4ae6 100644 --- a/reference/sync/syncsharedmemory/write.xml +++ b/reference/sync/syncsharedmemory/write.xml @@ -15,7 +15,7 @@ intstart0 - Copies data to named shared memory. + Copies data to named shared memory. @@ -26,12 +26,12 @@ string - The data to write to shared memoy. + The data to write to shared memory. - If the size of the data exceeds the size of the shared memory, the number of - bytes written returned will be less than the length of the input. + If the size of the data exceeds the size of the shared memory, the number of + bytes written returned will be less than the length of the input. @@ -40,12 +40,12 @@ start - The start/offset, in bytes, to begin writing. + The start/offset, in bytes, to begin writing. - If the value is negative, the starting position will begin at the specified - number of bytes from the end of the shared memory segment. + If the value is negative, the starting position will begin at the specified + number of bytes from the end of the shared memory segment. @@ -56,7 +56,7 @@ &reftitle.returnvalues; - An integer containing the number of bytes written to shared memory. + An integer containing the number of bytes written to shared memory. diff --git a/reference/taint/book.xml b/reference/taint/book.xml index 9359b17a60..ef5fb3a784 100644 --- a/reference/taint/book.xml +++ b/reference/taint/book.xml @@ -2,6 +2,7 @@ + Taint Taint diff --git a/reference/tcpwrap/book.xml b/reference/tcpwrap/book.xml index cb3f55dec4..79a58c999f 100644 --- a/reference/tcpwrap/book.xml +++ b/reference/tcpwrap/book.xml @@ -2,6 +2,7 @@ + TCP Wrappers TCP diff --git a/reference/tidy/configure.xml b/reference/tidy/configure.xml index 7326a2fa47..2792a98ac3 100644 --- a/reference/tidy/configure.xml +++ b/reference/tidy/configure.xml @@ -3,7 +3,7 @@
&reftitle.install; - This extension is bundled with PHP 5 and greater, and is installed + This extension is bundled with PHP, and is installed using the configure option.
diff --git a/reference/tidy/ini.xml b/reference/tidy/ini.xml index 0f05beb349..d3c70a1903 100644 --- a/reference/tidy/ini.xml +++ b/reference/tidy/ini.xml @@ -26,7 +26,7 @@ tidy.clean_output "0" PHP_INI_USER - PHP_INI_PERDIR prior to PHP 5.4.0 + diff --git a/reference/tidy/tidy/getrelease.xml b/reference/tidy/tidy/getrelease.xml index 57c9524837..733503c56e 100644 --- a/reference/tidy/tidy/getrelease.xml +++ b/reference/tidy/tidy/getrelease.xml @@ -23,6 +23,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/tidy/tidynode.xml b/reference/tidy/tidynode.xml index 6439e59120..72df0b3ad4 100644 --- a/reference/tidy/tidynode.xml +++ b/reference/tidy/tidynode.xml @@ -122,26 +122,6 @@ - - - - - - &Version; - &Description; - - - - - 5.1.0 - line, column - and proprietary were added - - - - - - diff --git a/reference/tidy/tidynode/getparent.xml b/reference/tidy/tidynode/getparent.xml index 29f5e1e93e..e7c70a461e 100644 --- a/reference/tidy/tidynode/getparent.xml +++ b/reference/tidy/tidynode/getparent.xml @@ -17,6 +17,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/tidy/tidynode/haschildren.xml b/reference/tidy/tidynode/haschildren.xml index afbadb700d..7cfadd189a 100644 --- a/reference/tidy/tidynode/haschildren.xml +++ b/reference/tidy/tidynode/haschildren.xml @@ -15,6 +15,11 @@ Tells if the node has children. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/tidy/tidynode/hassiblings.xml b/reference/tidy/tidynode/hassiblings.xml index 7fbba5aa34..33db32b91d 100644 --- a/reference/tidy/tidynode/hassiblings.xml +++ b/reference/tidy/tidynode/hassiblings.xml @@ -15,6 +15,11 @@ Tells if the node has siblings. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/tidy/tidynode/isasp.xml b/reference/tidy/tidynode/isasp.xml index 1186557d7c..5d63bc2d68 100644 --- a/reference/tidy/tidynode/isasp.xml +++ b/reference/tidy/tidynode/isasp.xml @@ -15,6 +15,11 @@ Tells whether the current node is ASP. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/tidy/tidynode/iscomment.xml b/reference/tidy/tidynode/iscomment.xml index cb5f337d01..b61de8ca29 100644 --- a/reference/tidy/tidynode/iscomment.xml +++ b/reference/tidy/tidynode/iscomment.xml @@ -15,6 +15,11 @@ Tells if the node is a comment. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/tidy/tidynode/ishtml.xml b/reference/tidy/tidynode/ishtml.xml index 01cad60a05..e0db096f25 100644 --- a/reference/tidy/tidynode/ishtml.xml +++ b/reference/tidy/tidynode/ishtml.xml @@ -15,6 +15,11 @@ Tells if the node is an element node, but not the root node of the document. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/tidy/tidynode/isjste.xml b/reference/tidy/tidynode/isjste.xml index 597f326d47..a76fa3d796 100644 --- a/reference/tidy/tidynode/isjste.xml +++ b/reference/tidy/tidynode/isjste.xml @@ -15,6 +15,11 @@ Tells if the node is JSTE. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/tidy/tidynode/isphp.xml b/reference/tidy/tidynode/isphp.xml index 72f875973c..7a2291fd7d 100644 --- a/reference/tidy/tidynode/isphp.xml +++ b/reference/tidy/tidynode/isphp.xml @@ -15,6 +15,11 @@ Tells if the node is PHP. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/tidy/tidynode/istext.xml b/reference/tidy/tidynode/istext.xml index 1ac6631aa8..ac1c9223ff 100644 --- a/reference/tidy/tidynode/istext.xml +++ b/reference/tidy/tidynode/istext.xml @@ -15,6 +15,11 @@ Tells if the node represents a text (without any markup). + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/tokenizer/functions/token-name.xml b/reference/tokenizer/functions/token-name.xml index 82e8aa7e18..5e4bb8b670 100644 --- a/reference/tokenizer/functions/token-name.xml +++ b/reference/tokenizer/functions/token-name.xml @@ -56,18 +56,11 @@ echo token_name(T_FUNCTION); // -> "T_FUNCTION" - - &reftitle.seealso; - - - List of Parser Tokens - - - &reftitle.seealso; + List of Parser Tokens PhpToken::getTokenName diff --git a/reference/tokyo_tyrant/book.xml b/reference/tokyo_tyrant/book.xml deleted file mode 100644 index 370fa2b68f..0000000000 --- a/reference/tokyo_tyrant/book.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - tokyo_tyrant - tokyo_tyrant - - - &reftitle.intro; - - tokyo_tyrant extension provides a wrapper for Tokyo Tyrant client libraries. The extension - contains the normal key-value API and the table API. - - - - "Tokyo Tyrant is a package of network interface to the DBM called Tokyo Cabinet. Though the DBM has high performance, you might bother in case that multiple processes share the same database, or remote processes access the database. Thus, Tokyo Tyrant is provided for concurrent and remote connections to Tokyo Cabinet. It is composed of the server process managing a database and its access library for client applications." --Tokyo Tyrant documentation - - - - Tokyo Tyrant is written by Mikio Hirabayashi and is licensed under GNU Lesser General Public License. - - - - &reference.tokyo-tyrant.setup; - &reference.tokyo-tyrant.constants; - &reference.tokyo-tyrant.examples; - - &reference.tokyo-tyrant.tokyotyrant; - &reference.tokyo-tyrant.tokyotyranttable; - &reference.tokyo-tyrant.tokyotyrantquery; - &reference.tokyo-tyrant.tokyotyrantiterator; - &reference.tokyo-tyrant.tokyotyrantexception; - - - - - diff --git a/reference/tokyo_tyrant/configure.xml b/reference/tokyo_tyrant/configure.xml deleted file mode 100644 index a8e21bb018..0000000000 --- a/reference/tokyo_tyrant/configure.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - -
- &reftitle.install; - - - &pecl.info; - &url.pecl.package;tokyo_tyrant - - -
- Configure options - - --with-tokyo-tyrant[=DIR] DIR is the prefix to the Tokyo Tyrant installation - --with-tokyo-cabinet-dir[=DIR] DIR is the prefix to the Tokyo Cabinet installation - --disable-tokyo-tyrant-session Disable Tokyo Tyrant session handler support - -
- -
- Enabling the extension - - The extension can be enabled by adding extension=tokyo_tyrant.so to the INI-configuration - -
- -
- Running Tokyo Tyrant for the session handler - - ttserver -port 2000 -ext /path/to/expire.lua -extpc expire 30.0 '/tmp/sessions.tct#idx=ts:dec' - - - - expire.lua is included in the tokyo_tyrant extension source distribution - - -
- -
- Configuring session handler - - - tokyo_tyrant.session_salt="randomlongstring" - session.save_handler=tokyo_tyrant - session.save_path="tcp://hostname1:2000,tcp://hostname2:2000" - - - - - It is important to make sure that tokyo_tyrant.session_salt matches on all servers. - - -
- -
- How it works? - - The session handler creates a session id like the following: - 8b0e27a823fa4a6cf7246945b82c1d51-a5eadbbed1f2075952900628456bfd6830541629-0-5460 - - - - The parts from left to right: - - - - Session id - Generated session id - Checksum - Checksum of session salt, session id, node id and primary key - Node id - The id of the node where the session maps to - Primary key - The primary key of the row where the session is stored - - - - The checksum contains SHA1 sum of the node id, primary key, session id and the salt which is known only on the server side. This allows quick mapping of session id to node and primary key since there is no need to do an additional search. During session id regeneration only the parts 1 and 2 change but the mapping to the node and primary key stays constant. - - - In case some of the nodes fail tokyo_tyrant.allow_failover, tokyo_tyrant.fail_threshold and tokyo_tyrant.health_check_divisor INI-settings control the behavior during failover. If failover is allowed the session handler will map the session to a healthy node and creates a new empty session. - -
- -
- - - diff --git a/reference/tokyo_tyrant/constants.xml b/reference/tokyo_tyrant/constants.xml deleted file mode 100644 index b83851af8c..0000000000 --- a/reference/tokyo_tyrant/constants.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - &reftitle.constants; - - TokyoTyrant constants - - - - - diff --git a/reference/tokyo_tyrant/examples.xml b/reference/tokyo_tyrant/examples.xml deleted file mode 100644 index 35c2a54bc9..0000000000 --- a/reference/tokyo_tyrant/examples.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - &reftitle.examples; - - Basic usage - - - Putting and getting a key-value pair - -put("key", "value"); -echo $tt->get("key"); -?> -]]> - - &example.outputs; - - - - - - - - diff --git a/reference/tokyo_tyrant/ini.xml b/reference/tokyo_tyrant/ini.xml deleted file mode 100644 index 18cebc40bd..0000000000 --- a/reference/tokyo_tyrant/ini.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - -
- &reftitle.runtime; - &extension.runtime; - - - tokyo_tyrant &ConfigureOptions; - - - - &Name; - &Default; - &Changeable; - &Changelog; - - - - - tokyo_tyrant.default_timeout - 2.0 - PHP_INI_ALL - - - - tokyo_tyrant.session_salt - &null; - PHP_INI_ALL - - - - tokyo_tyrant.key_prefix - &null; - PHP_INI_ALL - - - - tokyo_tyrant.allow_failover - 1 - PHP_INI_ALL - - - - tokyo_tyrant.fail_threshold - 5 - PHP_INI_ALL - - - - tokyo_tyrant.health_check_divisor - 1000 - PHP_INI_ALL - - - - tokyo_tyrant.php_expiration - 0 - PHP_INI_ALL - - - - -
-
- - &ini.descriptions.title; - - - - - - tokyo_tyrant.default_timeout - int - - - - Default timeout when connecting to databases - - - - - - tokyo_tyrant.session_salt - string - - - - The secret that is used to salt session id - - - - - - tokyo_tyrant.key_prefix - string - - - - Prefix all keys with this string. The prefix is transparent - to the developer but helps making sure that keys won't collide if multiple - applications are using the same database. - - - - - - tokyo_tyrant.allow_failover - int - - - - Whether to allow session failover in case a server dies. - - - - - - tokyo_tyrant.fail_threshold - int - - - - How many read/write or connection failures is allowed - before server is marked as failed. - - - - - - tokyo_tyrant.health_check_divisor - int - - - - Defines the divisor for the health check probability. If there are failed - servers and the probability matches, the servers are health checked and - in case the server seems healthy, it will be added back to the pool. - - - - - - tokyo_tyrant.php_expiration - int - - - - Whether to use built in session expiration mechanism or delegate - the expiration to a lua-script on the server-side. - - - - - - -
diff --git a/reference/tokyo_tyrant/setup.xml b/reference/tokyo_tyrant/setup.xml deleted file mode 100644 index 24fac25b52..0000000000 --- a/reference/tokyo_tyrant/setup.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - - - Before using this extension Tokyo Cabinet and Tokyo Tyrant must be installed. - -
- - - &reference.tokyo-tyrant.configure; - - - - - &reference.tokyo-tyrant.ini; - - - -
- &reftitle.resources; - &no.resource; -
- -
- - - diff --git a/reference/tokyo_tyrant/tokyotyrant.xml b/reference/tokyo_tyrant/tokyotyrant.xml deleted file mode 100644 index 43ae609cb0..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant.xml +++ /dev/null @@ -1,690 +0,0 @@ - - - - - - The TokyoTyrant class - TokyoTyrant - - - - -
- &reftitle.intro; - - The main Tokyo Tyrant class - -
- - -
- &reftitle.classsynopsis; - - - - TokyoTyrant - - - - - TokyoTyrant - - - - &Constants; - - const - int - TokyoTyrant::RDBDEF_PORT - 1978 - - - const - int - TokyoTyrant::RDBQC_STREQ - 0 - - - const - int - TokyoTyrant::RDBQC_STRINC - 1 - - - const - int - TokyoTyrant::RDBQC_STRBW - 2 - - - const - int - TokyoTyrant::RDBQC_STREW - 3 - - - const - int - TokyoTyrant::RDBQC_STRAND - 4 - - - const - int - TokyoTyrant::RDBQC_STROR - 5 - - - const - int - TokyoTyrant::RDBQC_STROREQ - 6 - - - const - int - TokyoTyrant::RDBQC_STRRX - 7 - - - const - int - TokyoTyrant::RDBQC_NUMEQ - 8 - - - const - int - TokyoTyrant::RDBQC_NUMGT - 9 - - - const - int - TokyoTyrant::RDBQC_NUMGE - 10 - - - const - int - TokyoTyrant::RDBQC_NUMLT - 11 - - - const - int - TokyoTyrant::RDBQC_NUMLE - 12 - - - const - int - TokyoTyrant::RDBQC_NUMBT - 13 - - - const - int - TokyoTyrant::RDBQC_NUMOREQ - 14 - - - const - int - TokyoTyrant::RDBQC_NEGATE - 16777216 - - - const - int - TokyoTyrant::RDBQC_NOIDX - 33554432 - - - const - int - TokyoTyrant::RDBQO_STRASC - 0 - - - const - int - TokyoTyrant::RDBQO_STRDESC - 1 - - - const - int - TokyoTyrant::RDBQO_NUMASC - 2 - - - const - int - TokyoTyrant::RDBQO_NUMDESC - 3 - - - const - int - TokyoTyrant::RDBIT_LEXICAL - 0 - - - const - int - TokyoTyrant::RDBIT_DECIMAL - 1 - - - const - int - TokyoTyrant::RDBIT_TOKEN - 2 - - - const - int - TokyoTyrant::RDBIT_QGRAM - 3 - - - const - int - TokyoTyrant::RDBIT_OPT - 9998 - - - const - int - TokyoTyrant::RDBIT_VOID - 9999 - - - const - int - TokyoTyrant::RDBIT_KEEP - 16777216 - - - - const - int - TokyoTyrant::RDBQCFTS_PH - 15 - - - - const - int - TokyoTyrant::RDBQCFTS_AND - 16 - - - - const - int - TokyoTyrant::RDBQCFTS_OR - 17 - - - - const - int - TokyoTyrant::RDBQCFTS_EX - 18 - - - - const - int - TokyoTyrant::RDBXO_LCKREC - 1 - - - - const - int - TokyoTyrant::RDBXOLCK_GLB - 2 - - - - const - int - TokyoTyrant::RDBREC_INT - 1 - - - - const - int - TokyoTyrant::RDBREC_DBL - 2 - - - - const - int - TokyoTyrant::RDBMS_UNION - 0 - - - - const - int - TokyoTyrant::RDBMS_ISECT - 1 - - - - const - int - TokyoTyrant::RDBMS_DIFF - 2 - - - - const - int - TokyoTyrant::RDBT_RECON - 1 - - - &Methods; - - - - -
- - -
- &reftitle.constants; -
- TokyoTyrant Constants - - - - TokyoTyrant::RDBDEF_PORT - - The default port of the Tokyo Tyrant database - - - - - TokyoTyrant::RDBQC_STREQ - - string is equal to - - - - - TokyoTyrant::RDBQC_STRINC - - string is included in - - - - - TokyoTyrant::RDBQC_STRBW - - string begins with - - - - - TokyoTyrant::RDBQC_STREW - - string ends with - - - - - TokyoTyrant::RDBQC_STRAND - - string includes all tokens in - - - - - TokyoTyrant::RDBQC_STROR - - string includes at least one token in - - - - - TokyoTyrant::RDBQC_STROREQ - - string is equal to at least one token in - - - - - TokyoTyrant::RDBQC_STRRX - - string matches regular expressions of - - - - - TokyoTyrant::RDBQC_NUMEQ - - number is equal to - - - - - TokyoTyrant::RDBQC_NUMGT - - number is greater than - - - - - TokyoTyrant::RDBQC_NUMGE - - number is greater than or equal to - - - - - TokyoTyrant::RDBQC_NUMLT - - number is less than - - - - - TokyoTyrant::RDBQC_NUMLE - - number is less than or equal to - - - - - TokyoTyrant::RDBQC_NUMBT - - number is between two tokens of - - - - - TokyoTyrant::RDBQC_NUMOREQ - - number is equal to at least one token in - - - - - TokyoTyrant::RDBQC_NEGATE - - negation flag - - - - - TokyoTyrant::RDBQC_NOIDX - - no index flag - - - - - TokyoTyrant::RDBQO_STRASC - - string ascending - - - - - TokyoTyrant::RDBQO_STRDESC - - string descending - - - - - TokyoTyrant::RDBQO_NUMASC - - number ascending - - - - - TokyoTyrant::RDBQO_NUMDESC - - number descending - - - - - TokyoTyrant::RDBIT_LEXICAL - - lexical string - - - - - TokyoTyrant::RDBIT_DECIMAL - - decimal string - - - - - TokyoTyrant::RDBIT_TOKEN - - token inverted index (Tokyo Tyrant >= 1.1.29) - - - - - TokyoTyrant::RDBIT_QGRAM - - QGRAM inverted index (Tokyo Tyrant >= 1.1.29) - - - - - TokyoTyrant::RDBIT_OPT - - optimize - - - - - TokyoTyrant::RDBIT_VOID - - void - - - - - TokyoTyrant::RDBIT_KEEP - - keep existing index - - - - - TokyoTyrant::RDBQCFTS_PH - - full-text search with the phrase of (Tokyo Tyrant >= 1.1.29) - - - - - TokyoTyrant::RDBQCFTS_AND - - full-text search with all tokens in (Tokyo Tyrant >= 1.1.29) - - - - - TokyoTyrant::RDBQCFTS_OR - - full-text search with at least one token in (Tokyo Tyrant >= 1.1.29) - - - - - TokyoTyrant::RDBQCFTS_EX - - full-text search with the compound expression of (Tokyo Tyrant >= 1.1.29) - - - - - TokyoTyrant::RDBQCFTS_AND - - Metasearch union between records (Tokyo Tyrant >= 1.1.33) - - - - - TokyoTyrant::RDBQCFTS_OR - - Metasearch intersection between records (Tokyo Tyrant >= 1.1.33) - - - - - TokyoTyrant::RDBQCFTS_EX - - Metasearch difference between records (Tokyo Tyrant >= 1.1.33) - - - - - TokyoTyrant::RDBT_RECON - - Whether to reconnect on connection failure. - It is recommended to have this parameter on for persistent connections - - - - - TokyoTyrant::RDBXOLCK_REC - - record locking - - - - - TokyoTyrant::RDBXOLCK_GLB - - global locking - - - - - TokyoTyrant::RDBREC_INT - - record type int - - - - - TokyoTyrant::RDBREC_DBL - - record type float (double) - - - - - TokyoTyrant::TTE_SUCCESS - - success - - - - - TokyoTyrant::TTE_INVALID - - invalid operation - - - - - TokyoTyrant::TTE_NOHOST - - host not found - - - - - TokyoTyrant::TTE_REFUSED - - connection refused - - - - - TokyoTyrant::TTE_SEND - - send error - - - - - TokyoTyrant::TTE_RECV - - recv error - - - - - TokyoTyrant::TTE_KEEP - - record exist - - - - - TokyoTyrant::TTE_NOREC - - no record found - - - - - TokyoTyrant::TTE_MISC - - miscellaneous error - - - - -
-
- - - -
- - &reference.tokyo-tyrant.entities.tokyotyrant; - -
- - diff --git a/reference/tokyo_tyrant/tokyotyrant/add.xml b/reference/tokyo_tyrant/tokyotyrant/add.xml deleted file mode 100644 index 2c8132647a..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/add.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - TokyoTyrant::add - Adds to a numeric key - - - - &reftitle.description; - - public intfloatTokyoTyrant::add - stringkey - intfloatincrement - inttype0 - - - Adds to an int or double value. This increments the value by the given amount - and returns the new value. If the key does not exist a new key is created with - initial value of the increment parameter. - - - - - &reftitle.parameters; - - - - key - - - The string key - - - - - increment - - - The amount to increment - - - - - type - - - TokyoTyrant::RDBREC_INT or TokyoTyrant::RDBREC_DBL constant. - If this parameter is omitted the type is guessed from the increment - parameters type. - - - - - - - - - &reftitle.returnvalues; - - Returns the new value on success - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::add</methodname> example - -add("test", 3); - -/* String value is converted to double */ -echo $tt->add("test", "3.5", TokyoTyrant::RDBREC_DBL); -?> -]]> - - &example.outputs.similar; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrant::put - TokyoTyrant::putcat - TokyoTyrant::putkeep - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/connect.xml b/reference/tokyo_tyrant/tokyotyrant/connect.xml deleted file mode 100644 index fcbe9ce872..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/connect.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - TokyoTyrant::connect - Connect to a database - - - - &reftitle.description; - - public TokyoTyrantTokyoTyrant::connect - stringhost - intportTokyoTyrant::RDBDEF_PORT - arrayoptions - - - Connects to a remote database - - - - - &reftitle.parameters; - - - - host - - - The hostname - - - - - port - - - The port. Default: 1978 - - - - - options - - - Connection options: timeout (default: 5.0), reconnect (default: &true;) and persistent (default: &true;) - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::connect</methodname> example - -connect("localhost", TokyoTyrant::RDBDEF_PORT)->put("test", "value"); -?> -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrant::connectUri - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/connecturi.xml b/reference/tokyo_tyrant/tokyotyrant/connecturi.xml deleted file mode 100644 index 9458e11161..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/connecturi.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - TokyoTyrant::connectUri - Connects to a database - - - - &reftitle.description; - - public TokyoTyrantTokyoTyrant::connectUri - stringuri - - - Connects to a database using an uri - - - - - &reftitle.parameters; - - - - uri - - - An URI to the database. For example tcp://localhost:1979/ - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::connectUri</methodname> example - -connectUri("tcp://localhost:1978/")->put("test", "hi"); -?> -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrant::connect - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/construct.xml b/reference/tokyo_tyrant/tokyotyrant/construct.xml deleted file mode 100644 index 4287059c8b..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/construct.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - TokyoTyrant::__construct - Construct a new TokyoTyrant object - - - - &reftitle.description; - - public TokyoTyrant::__construct - stringhost - intportTokyoTyrant::RDBDEF_PORT - arrayoptions - - - Constructs a new TokyoTyrant object and optionally connects to the database - - - - - &reftitle.parameters; - - - - host - - - The hostname. Default: &null; - - - - - port - - - port number. Default: 1978 - - - - - options - - - Connection options: timeout (default: 5.0), reconnect (default: &true;) and persistent (default: &true;) - - - - - - - - - &reftitle.returnvalues; - - Throws TokyoTyrantException if connection to database fails - - - - - &reftitle.seealso; - - - TokyoTyrant::connect - TokyoTyrant::connectUri - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/copy.xml b/reference/tokyo_tyrant/tokyotyrant/copy.xml deleted file mode 100644 index 69a5f77a54..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/copy.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - TokyoTyrant::copy - Copies the database - - - - &reftitle.description; - - public TokyoTyrantTokyoTyrant::copy - stringpath - - - Makes a copy of the current database - - - - - &reftitle.parameters; - - - - path - - - Path to where to copy the database. The user running the remote - database must have a write access to the directory. - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::copy</methodname> example - -copy("/tmp/foobar.tct"); -?> -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrant::restore - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/ext.xml b/reference/tokyo_tyrant/tokyotyrant/ext.xml deleted file mode 100644 index 56ee571a43..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/ext.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - TokyoTyrant::ext - Execute a remote script - - - - &reftitle.description; - - public stringTokyoTyrant::ext - stringname - intoptions - stringkey - stringvalue - - - Executes a remote script extension. - - - - - &reftitle.parameters; - - - - name - - - Name of the function to execute - - - - - options - - - Either TokyoTyrant::RDBXO_LCKREC for record locking and - TokyoTyrant::RDBXO_LCKGLB for global locking. - - - - - key - - - The key to pass to the function - - - - - value - - - The value to pass to the function - - - - - - - - - &reftitle.returnvalues; - - Returns the result of the script function - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::ext</methodname> example - -ext("somefunc", TokyoTyrant::RDBXO_LCKREC, "some_key", "some_value"); -?> -]]> - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/fwmkeys.xml b/reference/tokyo_tyrant/tokyotyrant/fwmkeys.xml deleted file mode 100644 index 7062446e19..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/fwmkeys.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - TokyoTyrant::fwmKeys - Returns the forward matching keys - - - - &reftitle.description; - - public arrayTokyoTyrant::fwmKeys - stringprefix - intmax_recs - - - Returns the forward matching keys from the database - - - - - &reftitle.parameters; - - - - prefix - - - Prefix of the keys - - - - - max_recs - - - Maximum records to return - - - - - - - - - &reftitle.returnvalues; - - Returns an array of matching keys. The values are not returned - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::fwmKeys</methodname> example - -put("key_" . $i, "value_" . $i); -} - -/* Create 20 non-macthing keys */ -for ($i = 0; $i < 20; $i++) { - $tt->put("something_" . $i, "data_" . $i); -} - -/* Get five matching keys */ -var_dump($tt->fwmKeys("key_", 5)); -?> -]]> - - &example.outputs.similar; - - - string(5) "key_5" - [1]=> - string(6) "key_14" - [2]=> - string(5) "key_6" - [3]=> - string(6) "key_15" - [4]=> - string(5) "key_7" -} -]]> - - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/get.xml b/reference/tokyo_tyrant/tokyotyrant/get.xml deleted file mode 100644 index 6758a9d387..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/get.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - TokyoTyrant::get - The get purpose - - - - &reftitle.description; - - public mixedTokyoTyrant::get - mixedkeys - - - This method is used to return a value or multiple values. This method accepts a string - or an array as a value. - - - - - &reftitle.parameters; - - - - keys - - - A string key or an array of string keys - - - - - - - - - &reftitle.returnvalues; - - Returns a string or an array based on the given parameters. Throws a TokyoTyrantException - on error. If string is passed null is returned if the key is not found. In case an array - is given as an parameter only existing keys will be returned. It is not an error to pass - a key that does not exist. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::get</methodname> example - -put("key1", "value1"); -$tt->put("key2", "value2"); -var_dump($tt->get(array("key1", "key2"))); -var_dump($tt->get("key1")); -?> -]]> - - &example.outputs; - - - string(6) "value1" - ["key2"]=> - string(6) "value2" -} -string(6) "value1" -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrant::put - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/getiterator.xml b/reference/tokyo_tyrant/tokyotyrant/getiterator.xml deleted file mode 100644 index db912e8ee0..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/getiterator.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - TokyoTyrant::getIterator - Get an iterator - - - - &reftitle.description; - - public TokyoTyrantIteratorTokyoTyrant::getIterator - - - - Gets an iterator for iterating all keys / values in the database. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This method returns TokyoTyrantIterator object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::getIterator</methodname> example - -getIterator(); - -foreach ($it as $k => $v) { - -} -?> -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantTable::getQuery - TokyoTyrantTable::getIterator - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/num.xml b/reference/tokyo_tyrant/tokyotyrant/num.xml deleted file mode 100644 index 3d55bd5277..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/num.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - TokyoTyrant::num - Number of records in the database - - - - &reftitle.description; - - public intTokyoTyrant::num - - - - Returns the number of records in the database - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns number of records in the database - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::num</methodname> example - -num(); -?> -]]> - - &example.outputs.similar; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrant::stat - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/out.xml b/reference/tokyo_tyrant/tokyotyrant/out.xml deleted file mode 100644 index 0c993c7ab6..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/out.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - TokyoTyrant::out - Removes records - - - - &reftitle.description; - - public TokyoTyrantTokyoTyrant::out - mixedkeys - - - - Removes a record or multiple records. This method accepts a string for a single key - or an array of keys for multiple records. - - - - - &reftitle.parameters; - - - - keys - - - A string key or an array of string keys - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::out</methodname> example - -put("test1", "value1"); -$tt->put("test2", "value2"); - -$tt->out(array("test1", "test2")); -?> -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrant::put - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/put.xml b/reference/tokyo_tyrant/tokyotyrant/put.xml deleted file mode 100644 index 17be9df0ef..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/put.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - TokyoTyrant::put - Puts values - - - - &reftitle.description; - - public TokyoTyrantTokyoTyrant::put - mixedkeys - stringvalueNULL - - - Puts a key-value pair into the database or multiple key-value pairs. If keys is - string then the second parameter value defines the value. - The second parameter is mandatory if keys is a string. If the key exists the value - will be replaced with new value. - - - - - &reftitle.parameters; - - - - keys - - - A string key or an array of key-value pairs - - - - - value - - - The value in case a string key is used - - - - - - - - - &reftitle.returnvalues; - - This method returns a reference to the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::put</methodname> example - -put("key", "value"); - -/* Put key-value pairs, new value overwrites the old */ -$tt->put(array("key1" => "value1", "key" => "value2")); - -/* Get back one key */ -echo $tt->get("key"); -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrant::putKeep - TokyoTyrant::putCat - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/putcat.xml b/reference/tokyo_tyrant/tokyotyrant/putcat.xml deleted file mode 100644 index 14067ec0e3..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/putcat.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - TokyoTyrant::putCat - Concatenates to a record - - - - &reftitle.description; - - public TokyoTyrantTokyoTyrant::putCat - mixedkeys - stringvalue - - - Appends a value into existing key or multiple values if keys is an array. - The second parameter is mandatory if keys is a string. If the record does - not exist a new record is created. - - - - - &reftitle.parameters; - - - - keys - - - A string key or an array of key-value pairs - - - - - value - - - The value in case a string key is used - - - - - - - - - &reftitle.returnvalues; - - This method returns a reference to the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::putCat</methodname> example - -put("key", "value"); - -/* Concatenate single key-value pair */ -$tt->putCat("key", " has more data"); - -/* Echo the key */ -echo $tt->get("key"); -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrant::put - TokyoTyrant::putKeep - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/putkeep.xml b/reference/tokyo_tyrant/tokyotyrant/putkeep.xml deleted file mode 100644 index 0743193016..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/putkeep.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - TokyoTyrant::putKeep - Puts a record - - - - &reftitle.description; - - public TokyoTyrantTokyoTyrant::putKeep - mixedkeys - stringvalue - - - Puts a key-value pair into the database or multiple key-value pairs. If keys is - string then the second parameter value defines the value. - The second parameter is mandatory if keys is a string. If the key already - exists this method throws an exception indicating that the records exists. - - - - - &reftitle.parameters; - - - - keys - - - A string key or an array of key-value pairs - - - - - value - - - The string value - - - - - - - - - &reftitle.returnvalues; - - This method returns a reference to the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>tokyotyrant::putKeep</methodname> example - -put("key", "value"); - -try { - $tt->putKeep("key", "new value"); -} catch (TokyoTyrantException $e) { - if ($e->getCode() === TokyoTyrant::TTE_KEEP) { - echo "Existing record! Not modified\n"; - } else { - echo "Error: " , $e->getMessage() , "\n"; - } -} -echo $tt->get("key"); -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrant::put - TokyoTyrant::putCat - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/putnr.xml b/reference/tokyo_tyrant/tokyotyrant/putnr.xml deleted file mode 100644 index 8336a7ecfe..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/putnr.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - TokyoTyrant::putNr - Puts value - - - - &reftitle.description; - - public TokyoTyrantTokyoTyrant::putNr - mixedkeys - stringvalueNULL - - - Puts a key-value pair into the database or multiple key-value pairs. If keys is - string then the second parameter value defines the value. - The second parameter is mandatory if keys is a string. This method does not wait - for the response from the server. - - - - - &reftitle.parameters; - - - - keys - - - A string key or an array of key-value pairs - - - - - value - - - The value in case a string key is used - - - - - - - - - &reftitle.returnvalues; - - This method returns a reference to the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::putNr</methodname> example - -putNr("key", "value"); - -/* Put key-value pairs */ -$tt->putNr(array("key1" => "value1", "key2" => "value2")); - -/* Get back one key */ -echo $tt->get("key1"); -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrant::putNr - TokyoTyrant::putKeep - TokyoTyrant::putCat - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/putshl.xml b/reference/tokyo_tyrant/tokyotyrant/putshl.xml deleted file mode 100644 index a19e4734cd..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/putshl.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - TokyoTyrant::putShl - Concatenates to a record - - - - &reftitle.description; - - public mixedTokyoTyrant::putShl - stringkey - stringvalue - intwidth - - - Concatenate to a record and shift to left. - - - - - &reftitle.parameters; - - - - key - - - A string key - - - - - value - - - The value to concatenate - - - - - width - - - The width of the record - - - - - - - - - &reftitle.returnvalues; - - This method returns a reference to the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::putShl</methodname> example - -put("key", "just a long piece of data"); - -/* Concatenate and shift to left */ -$tt->putShl("key", " and string", 15); - -/* Echo the key */ -echo $tt->get("key"); -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrant::put - TokyoTyrant::putKeep - TokyoTyrant::putCat - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/restore.xml b/reference/tokyo_tyrant/tokyotyrant/restore.xml deleted file mode 100644 index 48183dc900..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/restore.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - TokyoTyrant::restore - Restore the database - - - - &reftitle.description; - - public mixedTokyoTyrant::restore - stringlog_dir - inttimestamp - boolcheck_consistency&true; - - - Restore the database from the update log. - - - - This method is not supported on 32bit platforms. - - - - - - &reftitle.parameters; - - - - log_dir - - - Directory where the log is - - - - - timestamp - - - Beginning timestamp with microseconds - - - - - check_consistency - - - Whether to check consistency: Default: &true; - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/setmaster.xml b/reference/tokyo_tyrant/tokyotyrant/setmaster.xml deleted file mode 100644 index db36b06b49..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/setmaster.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - TokyoTyrant::setMaster - Set the replication master - - - - &reftitle.description; - - public mixedTokyoTyrant::setMaster - stringhost - intport - inttimestamp - boolcheck_consistency&true; - - - Sets the replication master of the database - - - - This method is not supported on 32bit platforms. - - - - - - &reftitle.parameters; - - - - host - - - Hostname of the replication master. If &null; the replication is disabled. - - - - - port - - - Port of the replication master - - - - - timestamp - - - Beginning timestamp with microseconds - - - - - check_consistency - - - Whether to check consistency. - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::setMaster</methodname> example - -setMaster(NULL, 0, 0); -?> -]]> - - - - - - - &reftitle.seealso; - - - Classname::Method - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/size.xml b/reference/tokyo_tyrant/tokyotyrant/size.xml deleted file mode 100644 index 027ad96380..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/size.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - TokyoTyrant::size - Returns the size of the value - - - - &reftitle.description; - - public intTokyoTyrant::size - stringkey - - - Returns the size of a value by key - - - - - &reftitle.parameters; - - - - key - - - The key of which size to fetch - - - - - - - - - &reftitle.returnvalues; - - Returns the size of the key or throw TokyoTyrantException on error - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::size</methodname> example - -put("test_key", "12345"); - -echo $tt->size("test_key"); -?> -]]> - - &example.outputs; - - - - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/stat.xml b/reference/tokyo_tyrant/tokyotyrant/stat.xml deleted file mode 100644 index 6cc733d28d..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/stat.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - TokyoTyrant::stat - Get statistics - - - - &reftitle.description; - - public arrayTokyoTyrant::stat - - - - Returns statistics of the remote database - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns an array of key value pairs describing the statistics - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::stat</methodname> example - -stat()); -?> -]]> - - &example.outputs.similar; - - - string(6) "1.1.28" - ["libver"]=> - string(3) "311" - ["protver"]=> - string(4) "0.91" - ["os"]=> - string(5) "Linux" - ["time"]=> - string(17) "1247358357.665630" - ["pid"]=> - string(5) "14348" - ["sid"]=> - string(8) "59025947" - ["type"]=> - string(9) "on-memory" - ["path"]=> - string(1) "*" - ["rnum"]=> - string(1) "4" - ["size"]=> - string(6) "262856" - ["bigend"]=> - string(1) "0" - ["fd"]=> - string(1) "5" - ["loadavg"]=> - string(8) "0.000000" - ["memsize"]=> - string(8) "77328384" - ["memrss"]=> - string(7) "1183744" - ["ru_real"]=> - string(13) "162776.042152" - ["ru_user"]=> - string(8) "0.476029" - ["ru_sys"]=> - string(8) "8.652540" -} -]]> - - - - - - - &reftitle.seealso; - - - Classname::Method - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/sync.xml b/reference/tokyo_tyrant/tokyotyrant/sync.xml deleted file mode 100644 index c0dd19c56d..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/sync.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - TokyoTyrant::sync - Synchronize the database - - - - &reftitle.description; - - public mixedTokyoTyrant::sync - - - - Synchronizes the database on to the physical device - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/tune.xml b/reference/tokyo_tyrant/tokyotyrant/tune.xml deleted file mode 100644 index d69817c766..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/tune.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - TokyoTyrant::tune - Tunes connection values - - - - &reftitle.description; - - public TokyoTyrantTokyoTyrant::tune - floattimeout - intoptionsTokyoTyrant::RDBT_RECON - - - Tunes database connection options. - - - - - &reftitle.parameters; - - - - timeout - - - The objects timeout value (default: 5.0) - - - - - options - - - Bitmask of options to tune. This can be either 0 or TokyoTyrant::RDBT_RECON. - It is recommended not to change the second parameter. - - - - - - - - - &reftitle.returnvalues; - - This method returns a reference to the current object and throws TokyoTyrantException on failure. - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrant/vanish.xml b/reference/tokyo_tyrant/tokyotyrant/vanish.xml deleted file mode 100644 index 07278fe1d9..0000000000 --- a/reference/tokyo_tyrant/tokyotyrant/vanish.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - TokyoTyrant::vanish - Empties the database - - - - &reftitle.description; - - public mixedTokyoTyrant::vanish - - - - Empties a remote database - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrant::vanish</methodname> example - -vanish(); -?> -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrant::out - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantexception.xml b/reference/tokyo_tyrant/tokyotyrantexception.xml deleted file mode 100644 index 829bf7389e..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantexception.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - The TokyoTyrantException class - TokyoTyrantException - - - - -
- &reftitle.intro; - - TokyoTyrantException - -
- - -
- &reftitle.classsynopsis; - - - - tokyotyrantexception - - - - - tokyotyrantexception - - - - extends - Exception - - - - &Properties; - - protected - int - code - - - &InheritedProperties; - - - &InheritedMethods; - - - - - -
- - - -
- &reftitle.properties; - - - code - - The exception code. This can be compared to TokyoTyrant::TTE_* constants - - - -
- - - -
- -
- - diff --git a/reference/tokyo_tyrant/tokyotyrantiterator.xml b/reference/tokyo_tyrant/tokyotyrantiterator.xml deleted file mode 100644 index 4c64a5b852..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantiterator.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - The TokyoTyrantIterator class - TokyoTyrantIterator - - - - -
- &reftitle.intro; - - Provides an iterator for TokyoTyrant and TokyoTyrantTable objects. The iterator iterates over - all keys and values in the database. TokyoTyrantIterator was added in version 0.2.0. - -
- - -
- &reftitle.classsynopsis; - - - - TokyoTyrantIterator - - - - - TokyoTyrantIterator - - - - Iterator - - - - - Methods - - - Inherited methods - - - - - -
- -
- - &reference.tokyo-tyrant.entities.tokyotyrantiterator; - -
- - diff --git a/reference/tokyo_tyrant/tokyotyrantiterator/construct.xml b/reference/tokyo_tyrant/tokyotyrantiterator/construct.xml deleted file mode 100644 index 1c7e7cc189..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantiterator/construct.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - TokyoTyrantIterator::__construct - Construct an iterator - - - - &reftitle.description; - - public TokyoTyrantIterator::__construct - mixedobject - - - Construct a new TokyoTyrantIterator object. One connection can have multiple iterators but it is not quaranteed - that all items are traversed in that case. object parameter can be either an of instance - TokyoTyrant or TokyoTyrantTable. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Throws an exception if iterator initialization fails. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantIterator::__construct</methodname> example - -put(null, array("column1" => "some data", "column2" => "more data")); - -/* Construct an iterator */ -$it = new TokyoTyrantIterator($tt); - -foreach ($it as $value) { - var_dump($value); -} -?> -]]> - - &example.outputs; - - - string(9) "some data" - ["column2"]=> - string(9) "more data" -} -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantIterator::key - TokyoTyrantIterator::current - TokyoTyrantIterator::next - TokyoTyrantIterator::rewind - TokyoTyrantIterator::key - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantiterator/current.xml b/reference/tokyo_tyrant/tokyotyrantiterator/current.xml deleted file mode 100644 index 6ec67871fa..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantiterator/current.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - TokyoTyrantIterator::current - Get the current value - - - - &reftitle.description; - - public mixedTokyoTyrantIterator::current - - - - Returns the current value during iteration. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the current value on success and false on failure. - - - - - &reftitle.seealso; - - - TokyoTyrantIterator::valid - TokyoTyrantIterator::key - TokyoTyrantIterator::next - TokyoTyrantIterator::rewind - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantiterator/key.xml b/reference/tokyo_tyrant/tokyotyrantiterator/key.xml deleted file mode 100644 index 1bb96bc645..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantiterator/key.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - TokyoTyrantIterator::key - Returns the current key - - - - &reftitle.description; - - public mixedTokyoTyrantIterator::key - - - - Returns the current key. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the current key on success and false on failure. - - - - - &reftitle.seealso; - - - TokyoTyrantIterator::valid - TokyoTyrantIterator::current - TokyoTyrantIterator::next - TokyoTyrantIterator::rewind - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantiterator/next.xml b/reference/tokyo_tyrant/tokyotyrantiterator/next.xml deleted file mode 100644 index fa7fc6ab47..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantiterator/next.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - TokyoTyrantIterator::next - Move to next key - - - - &reftitle.description; - - public mixedTokyoTyrantIterator::next - - - - Move to next key during iteration and return it's value. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the next value on success and false on failure. - - - - - &reftitle.seealso; - - - TokyoTyrantIterator::valid - TokyoTyrantIterator::key - TokyoTyrantIterator::current - TokyoTyrantIterator::rewind - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantiterator/rewind.xml b/reference/tokyo_tyrant/tokyotyrantiterator/rewind.xml deleted file mode 100644 index 220d54d0a6..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantiterator/rewind.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - TokyoTyrantIterator::rewind - Rewinds the iterator - - - - &reftitle.description; - - public voidTokyoTyrantIterator::rewind - - - - Rewinds the iterator for new iteration. Called automatically at the beginning of foreach. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Throws TokyoTyrantException if iterator initialization fails. - - - - - &reftitle.seealso; - - - TokyoTyrantIterator::valid - TokyoTyrantIterator::current - TokyoTyrantIterator::next - TokyoTyrantIterator::rewind - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantiterator/valid.xml b/reference/tokyo_tyrant/tokyotyrantiterator/valid.xml deleted file mode 100644 index edbb27adf7..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantiterator/valid.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - TokyoTyrantIterator::valid - Rewinds the iterator - - - - &reftitle.description; - - public boolTokyoTyrantIterator::valid - - - - Checks whether the internal pointer points to valid element. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &true; if the current item is valid and &false; if not. - - - - - &reftitle.seealso; - - - TokyoTyrantIterator::key - TokyoTyrantIterator::current - TokyoTyrantIterator::next - TokyoTyrantIterator::rewind - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery.xml b/reference/tokyo_tyrant/tokyotyrantquery.xml deleted file mode 100644 index 42d34af223..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - The TokyoTyrantQuery class - TokyoTyrantQuery - - - - -
- &reftitle.intro; - - This class is used to query the table databases - -
- - -
- &reftitle.classsynopsis; - - - - TokyoTyrantQuery - - - - - TokyoTyrantQuery - - - - Iterator - - - - - - &Methods; - - - - -
- -
- - &reference.tokyo-tyrant.entities.tokyotyrantquery; - -
- - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/addcond.xml b/reference/tokyo_tyrant/tokyotyrantquery/addcond.xml deleted file mode 100644 index 6cf293ddd6..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/addcond.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - TokyoTyrantQuery::addCond - Adds a condition to the query - - - - &reftitle.description; - - public mixedTokyoTyrantQuery::addCond - stringname - intop - stringexpr - - - Adds a condition to the query. Condition can be something like: get all keys which value - matches expr. - - - - - &reftitle.parameters; - - - - name - - - Name of the column in the condition - - - - - op - - - The operator. One of the TokyoTyrant::RDBQC_* constants - - - - - expr - - - The expression - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantQuery::addCond</methodname> example - -put(null, array("column1" => "some data", "column2" => "something here")); -$tt->put(null, array("column1" => "more data", "column2" => "best data this far")); -$tt->put(null, array("column1" => "again data", "column3" => "not here")); -$tt->put(null, array("column45" => "random data", "column2" => "something along the lines")); -$tt->put(null, array("column21" => "test data", "column2" => "generating..")); -$tt->put(null, array("column1" => "foobar data", "column2" => "value here")); - -/* Get a new query object */ -$query = $tt->getQuery(); - -/* Add a search condition */ -$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something"); - -/* Dump the search results */ -var_dump($query->search()); -?> -]]> - - &example.outputs; - - - array(2) { - ["column1"]=> - string(9) "some data" - ["column2"]=> - string(14) "something here" - } - [4]=> - array(2) { - ["column45"]=> - string(11) "random data" - ["column2"]=> - string(25) "something along the lines" - } -} -]]> - - - - - - - &reftitle.seealso; - - - Classname::Method - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/construct.xml b/reference/tokyo_tyrant/tokyotyrantquery/construct.xml deleted file mode 100644 index e6fd0a1eb2..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/construct.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - TokyoTyrantQuery::__construct - Construct a new query - - - - &reftitle.description; - - public TokyoTyrantQuery::__construct - TokyoTyrantTabletable - - - Construct a new query object - - - - - &reftitle.parameters; - - - - table - - - TokyoTyrantTable object with active database connection - - - - - - - - - &reftitle.returnvalues; - - Returns a new TokyoTyrantQuery object and throws TokyoTyrantException on error - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantQuery::__construct</methodname> example - - -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantTable::getQuery - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/count.xml b/reference/tokyo_tyrant/tokyotyrantquery/count.xml deleted file mode 100644 index d6b4c9a465..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/count.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - TokyoTyrantQuery::count - Counts records - - - - &reftitle.description; - - public intTokyoTyrantQuery::count - - - - Returns a count of how many records a query returns. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns a count of matching rows and throws TokyoTyrantException on error - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantQuery::count</methodname> example - -put(null, array("column1" => "some data", "column2" => "something here")); -$tt->put(null, array("column1" => "more data", "column2" => "best data this far")); -$tt->put(null, array("column1" => "again data", "column3" => "not here")); -$tt->put(null, array("column45" => "random data", "column2" => "something along the lines")); -$tt->put(null, array("column21" => "test data", "column2" => "generating..")); -$tt->put(null, array("column1" => "foobar data", "column2" => "value here")); - -/* Get a new query object */ -$query = $tt->getQuery(); - -/* Add a search condition */ -$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something"); - -/* Count the results */ -var_dump($query->count()); -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::out - TokyoTyrantQuery::search - TokyoTyrantQuery::metaSearch - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/current.xml b/reference/tokyo_tyrant/tokyotyrantquery/current.xml deleted file mode 100644 index f8c11871eb..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/current.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - TokyoTyrantQuery::current - Returns the current element - - - - &reftitle.description; - - public arrayTokyoTyrantQuery::current - - - - Returns the current element. Part of Iterator interface - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the current row - - - - - &reftitle.examples; - - - TokyoTyrantQuery iterator example - -put(null, array("column1" => "some data", "column2" => "something here")); -$tt->put(null, array("column1" => "more data", "column2" => "best data this far")); -$tt->put(null, array("column1" => "again data", "column3" => "foobar here")); -$tt->put(null, array("column45" => "random data", "column2" => "something along the lines")); -$tt->put(null, array("column21" => "test data", "column2" => "generating..")); -$tt->put(null, array("column1" => "foobar data", "column2" => "value here")); - -/* Get a new query object */ -$query = $tt->getQuery(); - -/* Add a search condition */ -$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something"); - -/* Iterate the results */ -foreach ($query as $key => $value) { - echo "pk: $key, columns: ", count($value) ,"\n"; -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::addCond - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/hint.xml b/reference/tokyo_tyrant/tokyotyrantquery/hint.xml deleted file mode 100644 index 1424c1fc36..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/hint.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - TokyoTyrantQuery::hint - Get the hint string of the query - - - - &reftitle.description; - - public stringTokyoTyrantQuery::hint - - - - Get the hint string of the query. The hint string contains information about an executed query and - it could be compared to for example MySQL EXPLAIN statement. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This method always returns a string - - - - - &reftitle.examples; - - - TokyoTyrantQuery::hint example - -vanish(); - -for ($i = 0; $i < 11; $i++) { - $tt->put(null, array('a_col' => 'a' . $i, 'b_col' => 'b' . $i)); -} - -$query = $tt->getQuery(); -$query->addCond('a_col', TokyoTyrant::RDBQC_STRBW, 'a'); - -$query->search(); -var_dump($query->hint()); -?> -]]> - - &example.outputs.similar; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::addCond - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/key.xml b/reference/tokyo_tyrant/tokyotyrantquery/key.xml deleted file mode 100644 index c0c0be0a72..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/key.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - TokyoTyrantQuery::key - Returns the current key - - - - &reftitle.description; - - public stringTokyoTyrantQuery::key - - - - Returns the current key. Part of the Iterator interface - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the current key and throws TokyoTyrantException on error - - - - - &reftitle.examples; - - - TokyoTyrantQuery iterator example - -put(null, array("column1" => "some data", "column2" => "something here")); -$tt->put(null, array("column1" => "more data", "column2" => "best data this far")); -$tt->put(null, array("column1" => "again data", "column3" => "foobar here")); -$tt->put(null, array("column45" => "random data", "column2" => "something along the lines")); -$tt->put(null, array("column21" => "test data", "column2" => "generating..")); -$tt->put(null, array("column1" => "foobar data", "column2" => "value here")); - -/* Get a new query object */ -$query = $tt->getQuery(); - -/* Add a search condition */ -$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something"); - -/* Iterate the results */ -foreach ($query as $key => $value) { - echo "pk: $key, columns: ", count($value) ,"\n"; -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::addCond - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/metasearch.xml b/reference/tokyo_tyrant/tokyotyrantquery/metasearch.xml deleted file mode 100644 index 8456d6d377..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/metasearch.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - TokyoTyrantQuery::metaSearch - Retrieve records with multiple queries - - - - &reftitle.description; - - public arrayTokyoTyrantQuery::metaSearch - arrayqueries - inttype - - - Executes multiple queries on a database and returns matching records. The current object - is always the left most object in the search. - - - - - &reftitle.parameters; - - - - queries - - - Array of TokyoTyrantQuery objects - - - - - type - - - One of the TokyoTyrant::RDBMS_* constants - - - - - - - - - &reftitle.returnvalues; - - Returns the matching rows and throws TokyoTyrantException on error - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantQuery::metaSearch</methodname> example - -put('cherry', array('color' => 'red')); -$tt->put('strawberry', array('color' => 'red')); -$tt->put('apple', array('color' => 'green')); -$tt->put('lemon', array('color' => 'yellow')); - -/* First query */ -$query = $tt->getQuery(); -$query->addCond('color', TokyoTyrant::RDBQC_STREQ, 'red')->setOrder('color', TokyoTyrant::RDBQO_STRASC); - -/* Second query */ -$query1 = $tt->getQuery(); -$query1->addCond('color', TokyoTyrant::RDBQC_STREQ, 'yellow'); - -/* Get union between the queries */ -var_dump($query->metaSearch(array($query1), TokyoTyrant::RDBMS_UNION)); -?> -]]> - - &example.outputs; - - - array(1) { - ["color"]=> - string(3) "red" - } - ["strawberry"]=> - array(1) { - ["color"]=> - string(3) "red" - } - ["lemon"]=> - array(1) { - ["color"]=> - string(6) "yellow" - } -} -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::search - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/next.xml b/reference/tokyo_tyrant/tokyotyrantquery/next.xml deleted file mode 100644 index e56795b62e..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/next.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - TokyoTyrantQuery::next - Moves the iterator to next entry - - - - &reftitle.description; - - public arrayTokyoTyrantQuery::next - - - - Returns the next result in the resultset. Part of the Iterator interface. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the next row and throws TokyoTyrantException on error. - - - - - &reftitle.examples; - - - TokyoTyrantQuery iterator example - -put(null, array("column1" => "some data", "column2" => "something here")); -$tt->put(null, array("column1" => "more data", "column2" => "best data this far")); -$tt->put(null, array("column1" => "again data", "column3" => "foobar here")); -$tt->put(null, array("column45" => "random data", "column2" => "something along the lines")); -$tt->put(null, array("column21" => "test data", "column2" => "generating..")); -$tt->put(null, array("column1" => "foobar data", "column2" => "value here")); - -/* Get a new query object */ -$query = $tt->getQuery(); - -/* Add a search condition */ -$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something"); - -/* Iterate the results */ -foreach ($query as $key => $value) { - echo "pk: $key, columns: ", count($value) ,"\n"; -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::addCond - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/out.xml b/reference/tokyo_tyrant/tokyotyrantquery/out.xml deleted file mode 100644 index d93c2397bb..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/out.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - TokyoTyrantQuery::out - Removes records based on query - - - - &reftitle.description; - - public TokyoTyrantQueryTokyoTyrantQuery::out - - - - Removes all records that match the query. Works exactly like search but removes the records instead - of returning them. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantQuery::out</methodname> example - -put(null, array("column1" => "some data", "column2" => "something here")); -$tt->put(null, array("column1" => "more data", "column2" => "best data this far")); -$tt->put(null, array("column1" => "again data", "column3" => "foobar here")); -$tt->put(null, array("column45" => "random data", "column2" => "something along the lines")); -$tt->put(null, array("column21" => "test data", "column2" => "generating..")); -$tt->put(null, array("column1" => "foobar data", "column2" => "value here")); - -/* Get a new query object */ -$query = $tt->getQuery(); - -/* Add a search condition */ -$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something"); - -/* Remove matching records */ -$query->out(); -?> -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::addCond - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/rewind.xml b/reference/tokyo_tyrant/tokyotyrantquery/rewind.xml deleted file mode 100644 index d8bf0f006e..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/rewind.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - TokyoTyrantQuery::rewind - Rewinds the iterator - - - - &reftitle.description; - - public boolTokyoTyrantQuery::rewind - - - - Rewind the resultset and executes the query if it has not been executed. Part of the Iterator interface. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &true; - - - - - &reftitle.examples; - - - TokyoTyrantQuery iterator example - -put(null, array("column1" => "some data", "column2" => "something here")); -$tt->put(null, array("column1" => "more data", "column2" => "best data this far")); -$tt->put(null, array("column1" => "again data", "column3" => "foobar here")); -$tt->put(null, array("column45" => "random data", "column2" => "something along the lines")); -$tt->put(null, array("column21" => "test data", "column2" => "generating..")); -$tt->put(null, array("column1" => "foobar data", "column2" => "value here")); - -/* Get a new query object */ -$query = $tt->getQuery(); - -/* Add a search condition */ -$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something"); - -/* Iterate the results */ -foreach ($query as $key => $value) { - echo "pk: $key, columns: ", count($value) ,"\n"; -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::addCond - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/search.xml b/reference/tokyo_tyrant/tokyotyrantquery/search.xml deleted file mode 100644 index d2a361a8be..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/search.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - TokyoTyrantQuery::search - Searches records - - - - &reftitle.description; - - public arrayTokyoTyrantQuery::search - - - - Executes a search on the table database. Returns an array of arrays containing the matching records. - In the returned array the first level is the primary key of the data and the second level is the row data. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the matching rows and throws TokyoTyrantException on error - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantQuery::search</methodname> example - -put(null, array("column1" => "some data", "column2" => "something here")); -$tt->put(null, array("column1" => "more data", "column2" => "best data this far")); -$tt->put(null, array("column1" => "again data", "column3" => "not here")); -$tt->put(null, array("column45" => "random data", "column2" => "something along the lines")); -$tt->put(null, array("column21" => "test data", "column2" => "generating..")); -$tt->put(null, array("column1" => "foobar data", "column2" => "value here")); - -/* Get a new query object */ -$query = $tt->getQuery(); - -/* Add a search condition */ -$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something"); - -/* Dump the search results */ -var_dump($query->search()); -?> -]]> - - &example.outputs; - - - array(2) { - ["column1"]=> - string(9) "some data" - ["column2"]=> - string(14) "something here" - } - [4]=> - array(2) { - ["column45"]=> - string(11) "random data" - ["column2"]=> - string(25) "something along the lines" - } -} -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::out - TokyoTyrantQuery::metaSearch - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/setlimit.xml b/reference/tokyo_tyrant/tokyotyrantquery/setlimit.xml deleted file mode 100644 index 8c32e7c4fc..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/setlimit.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - TokyoTyrantQuery::setLimit - Limit results - - - - &reftitle.description; - - public mixedTokyoTyrantQuery::setLimit - intmax - intskip - - - Set the maximum amount of records to return on a query. - - - - - &reftitle.parameters; - - - - max - - - Maximum amount of records. Default: -1 - - - - - skip - - - How many records to skip from the start. Default: -1 - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/setorder.xml b/reference/tokyo_tyrant/tokyotyrantquery/setorder.xml deleted file mode 100644 index 00138c4ca1..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/setorder.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - TokyoTyrantQuery::setOrder - Orders results - - - - &reftitle.description; - - public mixedTokyoTyrantQuery::setOrder - stringname - inttype - - - Sets the order of a query - - - - - &reftitle.parameters; - - - - name - - - The column name to apply the ordering on. - - - - - type - - - The type can be one of the following - constants: - - - - - TokyoTyrant::RDBQO_STRASC - String ascending - - - - - TokyoTyrant::RDBQO_STRDESC - String descending - - - - - TokyoTyrant::RDBQO_NUMASC - Numberic ascending - - - - - TokyoTyrant::RDBQO_NUMDESC - String descending - - - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object. - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyrantquery/valid.xml b/reference/tokyo_tyrant/tokyotyrantquery/valid.xml deleted file mode 100644 index 7728e02335..0000000000 --- a/reference/tokyo_tyrant/tokyotyrantquery/valid.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - TokyoTyrantQuery::valid - Checks the validity of current item - - - - &reftitle.description; - - public boolTokyoTyrantQuery::valid - - - - Checks if the current item is valid. Part of the Iterator interface - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &true; if the current item is valid and &false; if not. - - - - - &reftitle.examples; - - - TokyoTyrantQuery iterator example - -put(null, array("column1" => "some data", "column2" => "something here")); -$tt->put(null, array("column1" => "more data", "column2" => "best data this far")); -$tt->put(null, array("column1" => "again data", "column3" => "foobar here")); -$tt->put(null, array("column45" => "random data", "column2" => "something along the lines")); -$tt->put(null, array("column21" => "test data", "column2" => "generating..")); -$tt->put(null, array("column1" => "foobar data", "column2" => "value here")); - -/* Get a new query object */ -$query = $tt->getQuery(); - -/* Add a search condition */ -$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something"); - -/* Iterate the results */ -foreach ($query as $key => $value) { - echo "pk: $key, columns: ", count($value) ,"\n"; -} -?> -]]> - - &example.outputs.similar; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::addCond - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable.xml b/reference/tokyo_tyrant/tokyotyranttable.xml deleted file mode 100644 index 2f8b10d599..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - The TokyoTyrantTable class - TokyoTyrantTable - - - - -
- &reftitle.intro; - - Provides an API to the table databases. A table database can be create using the following - command: ttserver -port 1979 /tmp/tt_table.tct. In Tokyo Tyrant the table - API is a schemaless database which can store arbitrary amount of key-value pairs under a single - primary key. - -
- - -
- &reftitle.classsynopsis; - - - - TokyoTyrantTable - - - - - TokyoTyrantTable - - - - extends - TokyoTyrant - - - - - &Methods; - - - &InheritedMethods; - - - - - -
- -
- - &reference.tokyo-tyrant.entities.tokyotyranttable; - -
- - diff --git a/reference/tokyo_tyrant/tokyotyranttable/add.xml b/reference/tokyo_tyrant/tokyotyranttable/add.xml deleted file mode 100644 index 50b52031a7..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/add.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - TokyoTyrantTable::add - Adds a record - - - - &reftitle.description; - - public voidTokyoTyrantTable::add - stringkey - mixedincrement - stringtype - - - This method is not supported with table databases. - - - - - &reftitle.parameters; - - - - key - - - The string key - - - - - increment - - - The amount to increment - - - - - type - - - TokyoTyrant::RDB_RECINT or TokyoTyrant::RDB_RECDBL constant. - If this parameter is omitted the type is guessed from the increment - parameters type. - - - - - - - - - &reftitle.returnvalues; - - This method throws an TokyoTyrantException if used through this class. - - - - - - &reftitle.seealso; - - - TokyoTyrant::add - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/genuid.xml b/reference/tokyo_tyrant/tokyotyranttable/genuid.xml deleted file mode 100644 index a8d8bb08c9..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/genuid.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - TokyoTyrantTable::genUid - Generate unique id - - - - &reftitle.description; - - public intTokyoTyrantTable::genUid - - - - Generates an unique id inside the table database. In table databases rows are referenced - using a numeric primary key. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns an unique id or throws TokyoTyrantException on error - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantTable::genUid</methodname> example - -genUid(); -?> -]]> - - &example.outputs.similar; - - - - - - - - - &reftitle.seealso; - - - TokyoTyrantTable::put - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/get.xml b/reference/tokyo_tyrant/tokyotyranttable/get.xml deleted file mode 100644 index 918c391754..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/get.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - TokyoTyrantTable::get - Get a row - - - - &reftitle.description; - - public arrayTokyoTyrantTable::get - mixedkeys - - - Gets a row from table database. keys is a single integer for - the primary key of the row or an array of integers for multiple rows. - - - - - &reftitle.parameters; - - - - keys - - - The primary key, can be a string or an integer - - - - - - - - - &reftitle.returnvalues; - - Returns the row as an array - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantTable::get</methodname> example - -put(null, array("column1" => "some data", "column2" => "more data")); - -/* Get the row back */ -var_dump($tt->get($index)); -?> -]]> - - &example.outputs; - - - string(9) "some data" - ["column2"]=> - string(9) "more data" -} -]]> - - - - - - - &reftitle.notes; - - - Starting from version 0.3.0 this method accepts array as parameter. Please note - that multi-get on tables is not binary-safe. - - - - - - &reftitle.seealso; - - - TokyoTyrantTable::put - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/getiterator.xml b/reference/tokyo_tyrant/tokyotyranttable/getiterator.xml deleted file mode 100644 index 8097449462..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/getiterator.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - TokyoTyrantTable::getIterator - Get an iterator - - - - &reftitle.description; - - public TokyoTyrantIteratorTokyoTyrantTable::getIterator - - - - Gets an iterator for iterating all keys / values in the database. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - This method returns TokyoTyrantIterator object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantTable::getIterator</methodname> example - -getIterator(); - -foreach ($it as $k => $v) { - var_dump($k, $v); -} -?> -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantTable::getQuery - TokyoTyrant::getIterator - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/getquery.xml b/reference/tokyo_tyrant/tokyotyranttable/getquery.xml deleted file mode 100644 index ef907a96f2..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/getquery.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - TokyoTyrantTable::getQuery - Get a query object - - - - &reftitle.description; - - public TokyoTyrantQueryTokyoTyrantTable::getQuery - - - - Get a query object to execute searches on the database - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns TokyoTyrantQuery on success and throws TokyoTyrantException on error - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantTable::getQuery</methodname> example - -put(null, array("column1" => "some data", "column2" => "more data")); -$table->put(null, array("something" => "value", "data" => "good data")); - -/* Get query object */ -$query = $table->getQuery(); - -/* Add condition to query */ -$query->addCond('data', TokyoTyrant::RDBQC_STREQ, 'good data'); - -/* Get matching rows */ -var_dump($query->search()); -?> -]]> - - &example.outputs.similar; - - - array(2) { - ["something"]=> - string(5) "value" - ["data"]=> - string(9) "good data" - } -} -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantQuery::search - TokyoTyrantQuery::out - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/out.xml b/reference/tokyo_tyrant/tokyotyranttable/out.xml deleted file mode 100644 index b666a008a5..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/out.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - TokyoTyrantTable::out - Remove records - - - - &reftitle.description; - - public voidTokyoTyrantTable::out - mixedkeys - - - - Removes records from a table database. - - - - - &reftitle.parameters; - - - - keys - - - A single integer key or an array of integers - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantTable::out</methodname> example - -put(null, array("column1" => "some data", "column2" => "more data")); - -/* Delete the row */ -$tt->out($index); -?> -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantTable::put - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/put.xml b/reference/tokyo_tyrant/tokyotyranttable/put.xml deleted file mode 100644 index d9881530eb..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/put.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - TokyoTyrantTable::put - Store a row - - - - &reftitle.description; - - public intTokyoTyrantTable::put - stringkey - arraycolumns - - - Puts a new row into the database. This method parameters are key which is - the primary key of the row, passing &null; will generate a new unique id. value - is an array containing the row contents which is usually key value pairs. - - - - - &reftitle.parameters; - - - - key - - - The primary key of the row - - - - - columns - - - The row contents - - - - - - - - - &reftitle.returnvalues; - - Returns the primary key on success and throws TokyoTyrantException on error - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantTable::put</methodname> example - -put(null, array("column1" => "some data", "column2" => "more data")); - -/* Get the row back */ -var_dump($tt->get($index)); - -/* Modify an existing row */ -$tt->put($index, array("column1" => "other data", "column2" => "better data")); - -/* Get the row back */ -var_dump($tt->get($index)); -?> -]]> - - &example.outputs; - - - string(9) "some data" - ["column2"]=> - string(9) "more data" -} -array(2) { - ["column1"]=> - string(10) "other data" - ["column2"]=> - string(11) "better data" -} -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantTable::get - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/putcat.xml b/reference/tokyo_tyrant/tokyotyranttable/putcat.xml deleted file mode 100644 index 869fb92550..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/putcat.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - TokyoTyrantTable::putCat - Concatenates to a row - - - - &reftitle.description; - - public voidTokyoTyrantTable::putCat - stringkey - arraycolumns - - - This method can be used to add new columns to existing records. Existing keys will be left unmodified - but any new columns will be appended to the row. Passing null as key will generate a new row. - - - - - &reftitle.parameters; - - - - key - - - The primary key of the row or &null; - - - - - columns - - - Array of row contents - - - - - - - - - &reftitle.returnvalues; - - Returns the primary key and throws TokyoTyrantException on error. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantTable::putCat</methodname> example - -put(null, array("column1" => "some data", "column2" => "more data")); - -/* Get the row back */ -var_dump($tt->get($index)); - -/* Modify an existing row */ -$tt->putcat($index, array("column1" => "something new", "new_column" => "other data")); - -/* Get the row back */ -var_dump($tt->get($index)); -?> -]]> - - &example.outputs; - - - string(9) "some data" - ["column2"]=> - string(9) "more data" -} -array(3) { - ["column1"]=> - string(9) "some data" - ["column2"]=> - string(9) "more data" - ["new_column"]=> - string(10) "other data" -} -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantTable::put - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/putkeep.xml b/reference/tokyo_tyrant/tokyotyranttable/putkeep.xml deleted file mode 100644 index 17b1da437a..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/putkeep.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - TokyoTyrantTable::putKeep - Put a new record - - - - &reftitle.description; - - public voidTokyoTyrantTable::putKeep - stringkey - arraycolumns - - - Puts a new record into the database. If the key already exists this method throws an exception - indicating that the records exists. - - - - - &reftitle.parameters; - - - - key - - - The primary key of the row or &null; - - - - - columns - - - Array of the row contents - - - - - - - - - &reftitle.returnvalues; - - Returns the primary key and throws TokyoTyrantException on error. - - - - - &reftitle.examples; - - - <methodname>TokyoTyrantTable::putKeep</methodname> example - -put(null, array("column1" => "some data", "column2" => "more data")); - -/* Get the row back */ -var_dump($tt->get($index)); - -try { - $tt->putKeep($index, array("column1" => "something new", "new_column" => "other data")); -} catch (TokyoTyrantException $e) { - if ($e->getCode() === TokyoTyrant::TTE_KEEP) { - echo "Existing record! Not modified\n"; - } else { - echo "Error: " , $e->getMessage() , "\n"; - } -} - -/* Get the row back */ -var_dump($tt->get($index)); -?> -]]> - - &example.outputs.similar; - - - string(9) "some data" - ["column2"]=> - string(9) "more data" -} -Existing record! Not modified -array(2) { - ["column1"]=> - string(9) "some data" - ["column2"]=> - string(9) "more data" -} -]]> - - - - - - - &reftitle.seealso; - - - TokyoTyrantTable::put - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/putnr.xml b/reference/tokyo_tyrant/tokyotyranttable/putnr.xml deleted file mode 100644 index 194721cb61..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/putnr.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - TokyoTyrantTable::putNr - Puts value - - - - &reftitle.description; - - public voidTokyoTyrantTable::putNr - mixedkeys - stringvalue - - - This method is not supported on table databases. Calling this method through TokyoTyrantTable - is considered an error and an TokyoTyrantException will be thrown. - - - - - &reftitle.parameters; - - - - keys - - - A string key or an array of key-value pairs - - - - - value - - - The value in case a string key is used - - - - - - - - - &reftitle.returnvalues; - - This method is not supported on table databases. Calling this method through TokyoTyrantTable - is considered an error and an TokyoTyrantException will be thrown. - - - - - &reftitle.seealso; - - - TokyoTyrant::putNr - TokyoTyrant::putKeep - TokyoTyrant::putCat - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/putshl.xml b/reference/tokyo_tyrant/tokyotyranttable/putshl.xml deleted file mode 100644 index 166f2482c0..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/putshl.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - TokyoTyrantTable::putShl - Concatenates to a record - - - - &reftitle.description; - - public voidTokyoTyrantTable::putShl - stringkey - stringvalue - intwidth - - - This method is not supported on table databases. Calling this method through TokyoTyrantTable - is considered an error and an TokyoTyrantException will be thrown. - - - - - &reftitle.parameters; - - - - key - - - A string key - - - - - value - - - The value to concatenate - - - - - width - - - The width of the record - - - - - - - - - &reftitle.returnvalues; - - This method is not supported on table databases. - - - - - &reftitle.seealso; - - - TokyoTyrant::put - TokyoTyrant::putKeep - TokyoTyrant::putCat - TokyoTyrantTable::put - TokyoTyrantTable::putKeep - TokyoTyrantTable::putCat - - - - - - - diff --git a/reference/tokyo_tyrant/tokyotyranttable/setindex.xml b/reference/tokyo_tyrant/tokyotyranttable/setindex.xml deleted file mode 100644 index 69b233dcfd..0000000000 --- a/reference/tokyo_tyrant/tokyotyranttable/setindex.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - TokyoTyrantTable::setIndex - Sets index - - - - &reftitle.description; - - public mixedTokyoTyrantTable::setIndex - stringcolumn - inttype - - - Sets an index on a specified column. The index type is one of the TokyoTyrant::RDBIT_* constants. - Passing TokyoTyrant::RDBIT_VOID removes the index. - - - - - &reftitle.parameters; - - - - column - - - The name of the column - - - - - type - - - The index type - - - - - - - - - &reftitle.returnvalues; - - This method returns the current object and throws TokyoTyrantException on failure. - - - - - - diff --git a/reference/tokyo_tyrant/versions.xml b/reference/tokyo_tyrant/versions.xml deleted file mode 100644 index a0df1b535c..0000000000 --- a/reference/tokyo_tyrant/versions.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reference/trader/book.xml b/reference/trader/book.xml index d3dd4c95bb..c4e96d51f1 100644 --- a/reference/trader/book.xml +++ b/reference/trader/book.xml @@ -2,6 +2,7 @@ + Technical Analysis for Traders Trader diff --git a/reference/trader/functions/trader-errno.xml b/reference/trader/functions/trader-errno.xml index 9eb380cc3a..e1cfc4da3c 100644 --- a/reference/trader/functions/trader-errno.xml +++ b/reference/trader/functions/trader-errno.xml @@ -1,6 +1,4 @@ - - trader_errno @@ -17,14 +15,18 @@ Get error code of the last operation. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; Returns the error code identified by one of the TRADER_ERR_* constants. - - - trader_get_compat @@ -17,15 +15,19 @@ Get compatibility mode which affects the way calculations are done by all the extension functions. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; Returns the compatibility mode id which can be identified by TRADER_COMPATIBILITY_* series of constants. - - + UI UI diff --git a/reference/ui/functions/ui.draw.text.font.fontfamilies.xml b/reference/ui/functions/ui.draw.text.font.fontfamilies.xml index a167424b23..db95341fc9 100644 --- a/reference/ui/functions/ui.draw.text.font.fontfamilies.xml +++ b/reference/ui/functions/ui.draw.text.font.fontfamilies.xml @@ -24,6 +24,13 @@ &no.function.parameters; + + &reftitle.returnvalues; + + Returns an &array; of valid font families for the current system. + + +
+ User Operations for Zend uopz diff --git a/reference/uopz/functions/uopz-set-mock.xml b/reference/uopz/functions/uopz-set-mock.xml index 51785beabc..f1880af321 100644 --- a/reference/uopz/functions/uopz-set-mock.xml +++ b/reference/uopz/functions/uopz-set-mock.xml @@ -51,6 +51,13 @@ + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.changelog; @@ -178,13 +185,13 @@ mockA - + &reftitle.seealso; uopz_get_mock uopz_unset_mock - +
diff --git a/reference/uopz/functions/uopz-unset-mock.xml b/reference/uopz/functions/uopz-unset-mock.xml index 1a73810173..c5a0f739d4 100644 --- a/reference/uopz/functions/uopz-unset-mock.xml +++ b/reference/uopz/functions/uopz-unset-mock.xml @@ -32,13 +32,20 @@ - + + &reftitle.returnvalues; + + &return.void; + + + + &reftitle.errors; A RuntimeException is thrown, if no mock was previously set for class. - + &reftitle.examples; @@ -74,13 +81,13 @@ A - + &reftitle.seealso; uopz_set_mock uopz_get_mock - +
diff --git a/reference/uopz/setup.xml b/reference/uopz/setup.xml index befbbf4b6c..97b71631c6 100644 --- a/reference/uopz/setup.xml +++ b/reference/uopz/setup.xml @@ -7,7 +7,7 @@
&reftitle.required; - uopz 2 requires PHP 5.4+. uopz 5.0 requires PHP 7. As of uopz 5.1, PHP 7.1+ is required. + As of uopz 5.0 PHP 7.0 is required. As of uopz 5.1, PHP 7.1+ is required.
diff --git a/reference/uopz/versions.xml b/reference/uopz/versions.xml index cd7b13ccfe..d90bfeacd6 100644 --- a/reference/uopz/versions.xml +++ b/reference/uopz/versions.xml @@ -9,33 +9,33 @@ - - + + - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + V8 Javascript Engine Integration V8js diff --git a/reference/v8js/setup.xml b/reference/v8js/setup.xml index 262c0be7f6..3e184b2396 100644 --- a/reference/v8js/setup.xml +++ b/reference/v8js/setup.xml @@ -7,7 +7,7 @@
&reftitle.required; - PHP 5.3.3+ and V8 library and headers installed in proper paths. + PHP and V8 library and headers installed in proper paths.
diff --git a/reference/var/functions/empty.xml b/reference/var/functions/empty.xml index abaaab4ed9..7f8317c188 100644 --- a/reference/var/functions/empty.xml +++ b/reference/var/functions/empty.xml @@ -25,14 +25,6 @@ Variable to be checked - - - Prior to PHP 5.5, empty only supports variables; - anything else will result in a parse error. In other words, the - following will not work: empty(trim($name)). - Instead, use trim($name) == false. - - No warning is generated if the variable does not exist. That means empty is essentially the @@ -80,10 +72,6 @@ if (isset($var)) { <function>empty</function> on String Offsets - - PHP 5.4 changes how empty behaves - when passed string offsets. - ]]> - &example.outputs.53; - - - - &example.outputs.54; + &example.outputs; + + + + get_debug_type + Gets the type name of a variable in a way that is suitable for debugging + + + + &reftitle.description; + + stringget_debug_type + mixedvalue + + + Returns the resolved name of the PHP variable value. + This function will resolve objects to their class name, resources to their + resource type name, and scalar values to their common name as would be used in type + declarations. + + + This function differs from gettype in that it returns type names + that are more consistent with actual usage, rather than those present for historical reasons. + + + + + &reftitle.parameters; + + + + value + + + The variable being type checked. + + + + + + + + + &reftitle.returnvalues; + + Possible values for the returned string are: + + + + + + Type + State + Return Value + Notes + + + + + null + + "null" + + - + + + Booleans (true or false) + + "bool" + + - + + + Integers + + "int" + + - + + + Floats + + "float" + + - + + + Strings + + "string" + + - + + + Arrays + + "array" + + - + + + Resources + + "resource (resourcename)" + + - + + + Resources (Closed) + + "resource (closed)" + + Example: A file stream after being closed with fclose. + + + Objects from Named Classes + + The full name of the class including its namespace e.g. Foo\Bar + + - + + + Objects from Anonymous Classes + + "class@anonymous" + + + Anonymous classes are those created through the $x = new class { ... } syntax + + + + + + + + + + + &reftitle.examples; + + + <function>get_debug_type</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + gettype + get_class + + + + + diff --git a/reference/var/functions/get-defined-vars.xml b/reference/var/functions/get-defined-vars.xml index bc309dd73e..f181170973 100644 --- a/reference/var/functions/get-defined-vars.xml +++ b/reference/var/functions/get-defined-vars.xml @@ -20,6 +20,10 @@ called. + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/var/functions/get-resource-id.xml b/reference/var/functions/get-resource-id.xml index 10bd990b23..408c8ed76c 100644 --- a/reference/var/functions/get-resource-id.xml +++ b/reference/var/functions/get-resource-id.xml @@ -12,7 +12,7 @@ &reftitle.description; intget_resource_id - resourceres + resourceresource This function provides a type-safe way for generating the integer identifier @@ -25,7 +25,7 @@ - res + resource The evaluated resource handle. @@ -39,11 +39,11 @@ &reftitle.returnvalues; - The int identifier for the given res. + The int identifier for the given resource. This function is essentially an int cast of - res to make it easier to retrieve the resource ID. + resource to make it easier to retrieve the resource ID. @@ -85,7 +85,6 @@ echo get_resource_id($handle);
- + Varnish Varnish diff --git a/reference/wddx/book.xml b/reference/wddx/book.xml index 06b2c0bbfd..31e56c32d6 100644 --- a/reference/wddx/book.xml +++ b/reference/wddx/book.xml @@ -1,6 +1,5 @@ - - + WDDX @@ -36,7 +35,6 @@ &reference.wddx.reference; - - - - Weak References - Weakref - - - &reftitle.intro; - - Weak references provide a non-intrusive gateway to ephemeral objects. Unlike - normal (strong) references, weak references do not prevent the garbage - collector from freeing that object. For this reason, an object may be - destroyed even though a weak reference to that object still exists. In such - conditions, the weak reference seamlessly becomes invalid. - - - - - <classname>Weakref</classname> usage example - -valid()) { - echo "Object still exists!\n"; - var_dump($r1->get()); -} else { - echo "Object is dead!\n"; -} - -unset($o1); - -if ($r1->valid()) { - echo "Object still exists!\n"; - var_dump($r1->get()); -} else { - echo "Object is dead!\n"; -} -?> -]]> - - &example.outputs; - - - - - - - - &reference.weakref.setup; - &reference.weakref.weakref; - &reference.weakref.weakmap; - - - - - diff --git a/reference/weakref/setup.xml b/reference/weakref/setup.xml deleted file mode 100644 index acd55dcd16..0000000000 --- a/reference/weakref/setup.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - &reftitle.setup; - -
- &reftitle.required; - &no.requirement; -
- -
- &reftitle.install; - - &pecl.moved; - - - &pecl.info; - &url.pecl.package;weakref. - - - &pecl.windows.download; - -
- -
- &reftitle.resources; - &no.resource; -
- -
- - - diff --git a/reference/weakref/versions.xml b/reference/weakref/versions.xml deleted file mode 100644 index 2fee18ecf7..0000000000 --- a/reference/weakref/versions.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reference/weakref/weakmap.xml b/reference/weakref/weakmap.xml deleted file mode 100644 index c0728a80a9..0000000000 --- a/reference/weakref/weakmap.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - The WeakMap class - WeakMap - - - - -
- &reftitle.intro; - - - -
- - -
- &reftitle.classsynopsis; - - - - WeakMap - - - - - WeakMap - - - - Countable - - - - ArrayAccess - - - - Iterator - - - - - - &Methods; - - - - -
- -
- &reftitle.examples; - - - <classname>Weakmap</classname> usage example - - - - &example.outputs; - - - - - -
- - -
- - &reference.weakref.entities.weakmap; - -
- - diff --git a/reference/weakref/weakmap/current.xml b/reference/weakref/weakmap/current.xml deleted file mode 100644 index f9e3e6ba44..0000000000 --- a/reference/weakref/weakmap/current.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - WeakMap::current - Returns the current value under iteration - - - - &reftitle.description; - - public mixedWeakMap::current - - - - Returns the current value being iterated on in the map. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The value currently being iterated on. - - - - - - - diff --git a/reference/weakref/weakmap/key.xml b/reference/weakref/weakmap/key.xml deleted file mode 100644 index 2c9649dbe6..0000000000 --- a/reference/weakref/weakmap/key.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - WeakMap::key - Returns the current key under iteration - - - - &reftitle.description; - - public objectWeakMap::key - - - - Returns the object serving as key in the map, at the current iterating - position. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - The object key currently being iterated. - - - - - - - diff --git a/reference/weakref/weakmap/next.xml b/reference/weakref/weakmap/next.xml deleted file mode 100644 index df2baeb5d5..0000000000 --- a/reference/weakref/weakmap/next.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - WeakMap::next - Advances to the next map element - - - - &reftitle.description; - - public voidWeakMap::next - - - - Advances to the next map element. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - &return.void; - - - - - - - diff --git a/reference/weakref/weakmap/rewind.xml b/reference/weakref/weakmap/rewind.xml deleted file mode 100644 index d4b3d214dd..0000000000 --- a/reference/weakref/weakmap/rewind.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - WeakMap::rewind - Rewinds the iterator to the beginning of the map - - - - &reftitle.description; - - public voidWeakMap::rewind - - - - Rewinds the iterator to the beginning of the map. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - &return.void; - - - - - - - diff --git a/reference/weakref/weakmap/valid.xml b/reference/weakref/weakmap/valid.xml deleted file mode 100644 index f923d57ef2..0000000000 --- a/reference/weakref/weakmap/valid.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - WeakMap::valid - Returns whether the iterator is still on a valid map element - - - - &reftitle.description; - - public boolWeakMap::valid - - - - Returns whether the iterator is still on a valid map element. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &true; if the iterator is on a valid element that can be - accessed, &false; otherwise. - - - - - diff --git a/reference/weakref/weakref.xml b/reference/weakref/weakref.xml deleted file mode 100644 index 6f8c2b6de8..0000000000 --- a/reference/weakref/weakref.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - The WeakRef class - WeakRef - - - - -
- &reftitle.intro; - - The WeakRef class provides a gateway to objects without preventing the garbage collector from freeing those objects. - It also provides a way to turn a weak reference into a strong one. - - - - The class WeakRef is not to be confused with the class - WeakReference. - - -
- - -
- &reftitle.classsynopsis; - - - - WeakRef - - - - - - WeakRef - - - - - - &Methods; - - - - -
- -
- &reftitle.examples; - - - <classname>WeakRef</classname> usage example - -valid()) { - echo "Object still exists!\n"; - var_dump($r1->get()); -} else { - echo "Object is dead!\n"; -} - -unset($o1); - -if ($r1->valid()) { - echo "Object still exists!\n"; - var_dump($r1->get()); -} else { - echo "Object is dead!\n"; -} -?> -]]> - - &example.outputs; - - - - - -
- - -
- - &reference.weakref.entities.weakref; - -
- - - diff --git a/reference/weakref/weakref/acquire.xml b/reference/weakref/weakref/acquire.xml deleted file mode 100644 index 0224a6d700..0000000000 --- a/reference/weakref/weakref/acquire.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Weakref::acquire - Acquires a strong reference on that object - - - - &reftitle.description; - - public boolWeakref::acquire - - - - Acquires a strong reference on that object, virtually turning the weak - reference into a strong one. - - - The Weakref instance maintains an internal acquired - counter to track outstanding strong references. If the call to - Weakref::acquire is successful, this counter - will be incremented by one. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &true; if the reference was valid and could be turned into a strong - reference, &false; otherwise. - - - - - &reftitle.examples; - - - <methodname>Weakref::acquire</methodname> example - -acquire(); - -echo "Unsetting o1...\n"; -unset($o1); - -$o2 = $r1->get(); - -$r1->release(); - -echo "Unsetting o2...\n"; -unset($o2); -?> -]]> - - &example.outputs; - - - - - - - - - Nested acquire/release example - -acquire(); - -echo " Unsetting...\n"; -unset($o1); - -echo " Acquiring...\n"; -$r1->acquire(); - -echo " Acquiring...\n"; -$r1->acquire(); - -echo " Releasing...\n"; -$r1->release(); - -echo " Releasing...\n"; -$r1->release(); - -echo "Releasing...\n"; -$r1->release(); - -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - Weakref::release - - - - - - - diff --git a/reference/weakref/weakref/construct.xml b/reference/weakref/weakref/construct.xml deleted file mode 100644 index 967de94054..0000000000 --- a/reference/weakref/weakref/construct.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - Weakref::__construct - Constructs a new weak reference - - - - &reftitle.description; - - public Weakref::__construct - objectobject - - - Constructs a new weak reference. - - - - - &reftitle.parameters; - - - - object - - - The object to reference. - - - - - - - - - &reftitle.returnvalues; - - &return.void; - - - - - &reftitle.examples; - - - <methodname>Weakref::__construct</methodname> example - -valid()) { - echo "Object still exists!\n"; - var_dump($r1->get()); -} else { - echo "Object is dead!\n"; -} - -unset($o1); - -if ($r1->valid()) { - echo "Object still exists!\n"; - var_dump($r1->get()); -} else { - echo "Object is dead!\n"; -} -?> -]]> - - &example.outputs; - - - - - - - - - diff --git a/reference/weakref/weakref/get.xml b/reference/weakref/weakref/get.xml deleted file mode 100644 index 34c4e8834b..0000000000 --- a/reference/weakref/weakref/get.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - Weakref::get - Returns the object pointed to by the weak reference - - - - &reftitle.description; - - public objectWeakref::get - - - - Returns the object pointed to by the weak reference. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns the object if the reference is still valid, &null; otherwise. - - - - - &reftitle.seealso; - - - Weakref::valid - - - - - - - diff --git a/reference/weakref/weakref/release.xml b/reference/weakref/weakref/release.xml deleted file mode 100644 index d22a47030e..0000000000 --- a/reference/weakref/weakref/release.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Weakref::release - Releases a previously acquired reference - - - - &reftitle.description; - - public boolWeakref::release - - - - Releases a previously acquired reference, potentially turning a strong - reference back into a weak reference. - - - The Weakref instance maintains an internal acquired - counter to track outstanding strong references. If the call to - Weakref::release is successful, this counter - will be decremented by one. Once this counter reaches zero, the strong - reference is turned back into a weak reference. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &true; if the reference was previously acquired and thus could be - released, &false; otherwise. - - - - - &reftitle.examples; - - - <methodname>Weakref::release</methodname> example - -acquire(); - -echo "Unsetting o1...\n"; -unset($o1); - -$o2 = $r1->get(); - -$r1->release(); - -echo "Unsetting o2...\n"; -unset($o2); -?> -]]> - - &example.outputs; - - - - - - - - - &reftitle.seealso; - - - Weakref::acquire - - - - - - - diff --git a/reference/weakref/weakref/valid.xml b/reference/weakref/weakref/valid.xml deleted file mode 100644 index 261eda270a..0000000000 --- a/reference/weakref/weakref/valid.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - Weakref::valid - Checks whether the object referenced still exists - - - - &reftitle.description; - - public boolWeakref::valid - - - - Checks whether the object referenced still exists. - - - - - &reftitle.parameters; - &no.function.parameters; - - - - &reftitle.returnvalues; - - Returns &true; if the object still exists and is thus still accessible via - Weakref::get, &false; otherwise. - - - - - &reftitle.seealso; - - - Weakref::get - - - - - - - diff --git a/reference/win32service/book.xml b/reference/win32service/book.xml index d6a9cef710..824f939994 100644 --- a/reference/win32service/book.xml +++ b/reference/win32service/book.xml @@ -2,6 +2,7 @@ + win32service diff --git a/reference/win32service/functions/win32-create-service.xml b/reference/win32service/functions/win32-create-service.xml index bdf4cb3ca1..b88150086f 100644 --- a/reference/win32service/functions/win32-create-service.xml +++ b/reference/win32service/functions/win32-create-service.xml @@ -6,6 +6,7 @@ win32_create_service Creates a new service entry in the SCM database + &reftitle.description; @@ -18,6 +19,7 @@ privileges are required for this to succeed. + &reftitle.parameters; @@ -300,60 +302,108 @@ - + &reftitle.errors; - A ValueError is thrown if the; + A ValueError is thrown if the value of service parameter is empty. - A ValueError is thrown if the; + A ValueError is thrown if the value of path parameter is missing or empty. - A ValueError is thrown if the; + A ValueError is thrown if the value of svc_type parameter is wrong. - A ValueError is thrown if the; + A ValueError is thrown if the value of start_type parameter is wrong. - A ValueError is thrown if the; + A ValueError is thrown if the value of error_control parameter is wrong. - A ValueError is thrown if the; + A ValueError is thrown if the value of base_priority parameter is wrong. - A ValueError is thrown if the; + A ValueError is thrown if the value of recovery_delay parameter is not between 0 and PHP_INT_MAX. - A ValueError is thrown if the; + A ValueError is thrown if the value of recovery_action_1 parameter is wrong. - A ValueError is thrown if the; + A ValueError is thrown if the value of recovery_action_2 parameter is wrong. - A ValueError is thrown if the; + A ValueError is thrown if the value of recovery_action_3 parameter is wrong. - A ValueError is thrown if the; + A ValueError is thrown if the value of recovery_reset_period parameter is not between 0 and PHP_INT_MAX. A Win32ServiceException is thrown on error. - - + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + PECL win32service 1.0.0 + + Throws a ValueError on invalid data in parameters, + previously &false; was returned. + + + + PECL win32service 1.0.0 + + Throws a Win32ServiceException on error, + previously a + Win32 Error Code + was returned. + + + + PECL win32service 1.0.0 + + The return type is now void, previously it was mixed. + + + + PECL win32service 0.4.0 + + The dependencies, recovery_delay, + recovery_action_1, recovery_action_2, + recovery_action_3, recovery_reset_period, + recovery_enabled, recovery_reboot_msg + and recovery_command parameters have been added. + + + + + + + &reftitle.examples; @@ -431,57 +481,6 @@ debug_zval_dump($x); - - - &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - PECL win32service 1.0.0 - - Throws a ValueError on invalid data in parameters, - previously &false; was returned. - - - - PECL win32service 1.0.0 - - Throws a Win32ServiceException on error, - previously a - Win32 Error Code - was returned. - - - - PECL win32service 1.0.0 - - The return type is now void, previously it was mixed. - - - - PECL win32service 0.4.0 - - The dependencies, recovery_delay, - recovery_action_1, recovery_action_2, - recovery_action_3, recovery_reset_period, - recovery_enabled, recovery_reboot_msg - and recovery_command parameters have been added. - - - - - - - - &reftitle.seealso; diff --git a/reference/win32service/functions/win32-delete-service.xml b/reference/win32service/functions/win32-delete-service.xml index 57151b82f5..e61db7d01f 100644 --- a/reference/win32service/functions/win32-delete-service.xml +++ b/reference/win32service/functions/win32-delete-service.xml @@ -27,6 +27,7 @@ + &reftitle.parameters; @@ -61,39 +62,19 @@ - - + &reftitle.errors; - A ValueError is thrown if the; + A ValueError is thrown if the value of servicename parameter is empty. A Win32ServiceException is thrown on error. - - - - &reftitle.examples; - - - A <function>win32_delete_service</function> example - - Deletes the dummyphp service. - - - -]]> - - - - + &reftitle.changelog; @@ -131,7 +112,26 @@ win32_delete_service('dummyphp'); - + + + + &reftitle.examples; + + + A <function>win32_delete_service</function> example + + Deletes the dummyphp service. + + + +]]> + + + + &reftitle.seealso; diff --git a/reference/win32service/functions/win32-get-last-control-message.xml b/reference/win32service/functions/win32-get-last-control-message.xml index 735f0f1404..473d8945e7 100644 --- a/reference/win32service/functions/win32-get-last-control-message.xml +++ b/reference/win32service/functions/win32-get-last-control-message.xml @@ -26,6 +26,12 @@ + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; @@ -52,7 +58,7 @@ - + &reftitle.errors; Prior to version 1.0.0, if the SAPI is not "cli", this function emits an @@ -63,9 +69,9 @@ Win32ServiceException if SAPI is not "cli" - + - + &reftitle.changelog; @@ -103,7 +109,7 @@ - + &reftitle.seealso; diff --git a/reference/win32service/functions/win32-pause-service.xml b/reference/win32service/functions/win32-pause-service.xml index 962f0ac0ab..be00cdefd4 100644 --- a/reference/win32service/functions/win32-pause-service.xml +++ b/reference/win32service/functions/win32-pause-service.xml @@ -58,7 +58,7 @@ &reftitle.errors; - A ValueError is thrown if the; + A ValueError is thrown if the value of servicename parameter is empty. diff --git a/reference/win32service/functions/win32-query-service-status.xml b/reference/win32service/functions/win32-query-service-status.xml index 0c12cd4661..8507757a96 100644 --- a/reference/win32service/functions/win32-query-service-status.xml +++ b/reference/win32service/functions/win32-query-service-status.xml @@ -133,7 +133,7 @@ ServiceFlags - The dwServiceFlags. See Win32Service Service Service Flag Constants. + The dwServiceFlags. See Win32Service Service Flag Constants. @@ -146,7 +146,7 @@ &reftitle.errors; - A ValueError is thrown if the; + A ValueError is thrown if the value of servicename parameter is empty. diff --git a/reference/win32service/functions/win32-send-custom-control.xml b/reference/win32service/functions/win32-send-custom-control.xml index 0cc0d2da67..6ce9a17aea 100644 --- a/reference/win32service/functions/win32-send-custom-control.xml +++ b/reference/win32service/functions/win32-send-custom-control.xml @@ -69,11 +69,11 @@ E_ERROR level error. - A ValueError is thrown if the; + A ValueError is thrown if the value of servicename parameter is empty. - A ValueError is thrown if the; + A ValueError is thrown if the value of control parameter is not between 128 and 255. diff --git a/reference/win32service/functions/win32-start-service-ctrl-dispatcher.xml b/reference/win32service/functions/win32-start-service-ctrl-dispatcher.xml index 2d26a17bf9..8110a9ee10 100644 --- a/reference/win32service/functions/win32-start-service-ctrl-dispatcher.xml +++ b/reference/win32service/functions/win32-start-service-ctrl-dispatcher.xml @@ -41,6 +41,7 @@ + &reftitle.parameters; @@ -77,7 +78,7 @@ - + &reftitle.errors; Prior to version 1.0.0, if the SAPI is not "cli", this function emits an @@ -88,41 +89,9 @@ Win32ServiceException if SAPI is not "cli" - - - - &reftitle.examples; - - - A <function>win32_start_service_ctrl_dispatcher</function> example - - Check if the service is runnig under the SCM. - - - -]]> - - - - + &reftitle.changelog; @@ -172,7 +141,39 @@ while (WIN32_SERVICE_CONTROL_STOP != win32_get_last_control_message()) { - + + + + &reftitle.examples; + + + A <function>win32_start_service_ctrl_dispatcher</function> example + + Check if the service is runnig under the SCM. + + + +]]> + + + + &reftitle.seealso; diff --git a/reference/wincache/book.xml b/reference/wincache/book.xml index 7c9ce4c084..5077707ba2 100644 --- a/reference/wincache/book.xml +++ b/reference/wincache/book.xml @@ -2,6 +2,7 @@ + Windows Cache for PHP WinCache @@ -32,7 +33,7 @@ Support for opcode caching was removed in Wincache 2.0.0, all users who wish to have an opcache should use the OPcache extension - that is included with PHP as of PHP 5.5.0. + that is included with PHP. diff --git a/reference/wincache/functions/wincache-fcache-meminfo.xml b/reference/wincache/functions/wincache-fcache-meminfo.xml index cdeb01e71f..3af238a713 100644 --- a/reference/wincache/functions/wincache-fcache-meminfo.xml +++ b/reference/wincache/functions/wincache-fcache-meminfo.xml @@ -17,6 +17,12 @@ Retrieves information about memory usage by file cache. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/wincache/functions/wincache-ocache-meminfo.xml b/reference/wincache/functions/wincache-ocache-meminfo.xml index 4fba4f666d..0406a32ba9 100644 --- a/reference/wincache/functions/wincache-ocache-meminfo.xml +++ b/reference/wincache/functions/wincache-ocache-meminfo.xml @@ -17,6 +17,12 @@ Retrieves information about memory usage by opcode cache. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/wincache/functions/wincache-rplist-fileinfo.xml b/reference/wincache/functions/wincache-rplist-fileinfo.xml index 2c1d87ff41..3bf66a9ac2 100644 --- a/reference/wincache/functions/wincache-rplist-fileinfo.xml +++ b/reference/wincache/functions/wincache-rplist-fileinfo.xml @@ -18,6 +18,23 @@ and corresponding absolute file paths. + + + &reftitle.parameters; + + + + summaryonly + + + + + + + + + + &reftitle.returnvalues; @@ -53,6 +70,7 @@ + &reftitle.examples; diff --git a/reference/wincache/functions/wincache-rplist-meminfo.xml b/reference/wincache/functions/wincache-rplist-meminfo.xml index f93b9246ef..6e7d276f19 100644 --- a/reference/wincache/functions/wincache-rplist-meminfo.xml +++ b/reference/wincache/functions/wincache-rplist-meminfo.xml @@ -17,6 +17,12 @@ Retrieves information about memory usage by resolve file path cache. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/wincache/functions/wincache-scache-meminfo.xml b/reference/wincache/functions/wincache-scache-meminfo.xml index 1a797c366d..b54d622d4e 100644 --- a/reference/wincache/functions/wincache-scache-meminfo.xml +++ b/reference/wincache/functions/wincache-scache-meminfo.xml @@ -17,6 +17,12 @@ Retrieves information about memory usage by session cache. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/wincache/functions/wincache-ucache-clear.xml b/reference/wincache/functions/wincache-ucache-clear.xml index 6216bb2ed0..1a3826a556 100644 --- a/reference/wincache/functions/wincache-ucache-clear.xml +++ b/reference/wincache/functions/wincache-ucache-clear.xml @@ -17,12 +17,19 @@ Clears/deletes all the values stored in the user cache. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; &return.success; + &reftitle.examples; diff --git a/reference/wincache/functions/wincache-ucache-meminfo.xml b/reference/wincache/functions/wincache-ucache-meminfo.xml index 8b68a7a981..82d406c2a6 100644 --- a/reference/wincache/functions/wincache-ucache-meminfo.xml +++ b/reference/wincache/functions/wincache-ucache-meminfo.xml @@ -17,6 +17,12 @@ Retrieves information about memory usage by user cache. + + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/wkhtmltox/book.xml b/reference/wkhtmltox/book.xml index ab9edc59f3..4a79d0cc5f 100644 --- a/reference/wkhtmltox/book.xml +++ b/reference/wkhtmltox/book.xml @@ -1,7 +1,8 @@ - + + wkhtmltox wkhtmltox @@ -20,7 +21,6 @@ &reference.wkhtmltox.wkhtmltox.image.converter; - + xattr diff --git a/reference/xdiff/book.xml b/reference/xdiff/book.xml index 1c50f463b6..f2e785bb0d 100644 --- a/reference/xdiff/book.xml +++ b/reference/xdiff/book.xml @@ -2,6 +2,7 @@ + xdiff diff --git a/reference/xhprof/book.xml b/reference/xhprof/book.xml index f05e59d16b..3dd17a123f 100644 --- a/reference/xhprof/book.xml +++ b/reference/xhprof/book.xml @@ -2,6 +2,7 @@ + Hierarchical Profiler Xhprof diff --git a/reference/xlswriter/book.xml b/reference/xlswriter/book.xml index 20dbe0a81a..2a30d78a15 100644 --- a/reference/xlswriter/book.xml +++ b/reference/xlswriter/book.xml @@ -2,6 +2,7 @@ + XLSWriter diff --git a/reference/xml/functions/xml-get-current-byte-index.xml b/reference/xml/functions/xml-get-current-byte-index.xml index 814f9a9a5d..0eea0b67d8 100644 --- a/reference/xml/functions/xml-get-current-byte-index.xml +++ b/reference/xml/functions/xml-get-current-byte-index.xml @@ -42,16 +42,6 @@ - - &reftitle.notes; - - - This function returns byte index according to UTF-8 encoded text - disregarding if input is in another encoding. - - - - &reftitle.changelog; @@ -69,6 +59,16 @@ + + &reftitle.notes; + + + This function returns byte index according to UTF-8 encoded text + disregarding if input is in another encoding. + + + + &reftitle.seealso; diff --git a/reference/xml/functions/xml-parse-into-struct.xml b/reference/xml/functions/xml-parse-into-struct.xml index 8844cbb046..faac6b47a6 100644 --- a/reference/xml/functions/xml-parse-into-struct.xml +++ b/reference/xml/functions/xml-parse-into-struct.xml @@ -168,7 +168,7 @@ Array Event-driven parsing (based on the expat library) can get complicated when you have an XML document that is complex. This function does not produce a DOM style object, but it - generates structures amenable of being transversed in a tree + generates structures amenable of being traversed in a tree fashion. Thus, we can create objects representing the data in the XML file easily. Let's consider the following XML file representing a small database of aminoacids information: @@ -224,7 +224,7 @@ class AminoAcid { function readDatabase($filename) { // read the XML database of aminoacids - $data = implode("", file($filename)); + $data = file_get_contents($filename); $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); diff --git a/reference/xml/functions/xml-parser-create-ns.xml b/reference/xml/functions/xml-parser-create-ns.xml index f3e00e2dbd..c2a4d447c1 100644 --- a/reference/xml/functions/xml-parser-create-ns.xml +++ b/reference/xml/functions/xml-parser-create-ns.xml @@ -30,8 +30,7 @@ The input encoding is automatically detected, so that the encoding parameter specifies only the output - encoding. In PHP 5.0.0 and 5.0.1, the default output charset is - ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported + encoding. The default output charset is UTF-8. The supported encodings are ISO-8859-1, UTF-8 and US-ASCII. diff --git a/reference/xml/functions/xml-parser-create.xml b/reference/xml/functions/xml-parser-create.xml index 858e39a32c..57e3fb8734 100644 --- a/reference/xml/functions/xml-parser-create.xml +++ b/reference/xml/functions/xml-parser-create.xml @@ -27,15 +27,12 @@ encoding - The optional encoding specifies the character - encoding for the input/output in PHP 4. Starting from PHP 5, the input + The input encoding is automatically detected, so that the encoding parameter specifies only the output - encoding. In PHP 4, the default output encoding is the same as the - input charset. If empty string is passed, the parser attempts to identify + encoding. If empty string is passed, the parser attempts to identify which encoding the document is encoded in by looking at the heading 3 or - 4 bytes. In PHP 5.0.0 and 5.0.1, the default output charset is - ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported + 4 bytes. The default output charset is UTF-8. The supported encodings are ISO-8859-1, UTF-8 and US-ASCII. diff --git a/reference/xml/functions/xml-set-default-handler.xml b/reference/xml/functions/xml-set-default-handler.xml index 9c50e61c1e..04acbae0f2 100644 --- a/reference/xml/functions/xml-set-default-handler.xml +++ b/reference/xml/functions/xml-set-default-handler.xml @@ -85,6 +85,13 @@ + + &reftitle.returnvalues; + + &return.success; + + + &reftitle.changelog; @@ -102,13 +109,6 @@ - - &reftitle.returnvalues; - - &return.success; - - - + XML diff and merge XMLDiff diff --git a/reference/xmlreader/constants.xml b/reference/xmlreader/constants.xml index ee8f033f72..a8895d7381 100644 --- a/reference/xmlreader/constants.xml +++ b/reference/xmlreader/constants.xml @@ -3,12 +3,6 @@ &reftitle.constants; &extension.constants; - - - XMLReader uses class constants since PHP 5.1. Prior releases use global - constants in the form XMLREADER_ELEMENT. - - XMLReader Node Types diff --git a/reference/xmlreader/setup.xml b/reference/xmlreader/setup.xml index 40dc82304e..111b8f0f19 100644 --- a/reference/xmlreader/setup.xml +++ b/reference/xmlreader/setup.xml @@ -15,11 +15,7 @@
&reftitle.install; - The XMLReader extension was initially a PECL extension for PHP 5. It was later - moved to the PHP source (bundled) as of PHP 5.1.0, and later enabled by default - as of PHP 5.1.2. - - + The XMLReader ships with PHP source. &installation.enabled.disable; diff --git a/reference/xmlreader/xmlreader/close.xml b/reference/xmlreader/xmlreader/close.xml index 3ccad17bcc..3117cb5209 100644 --- a/reference/xmlreader/xmlreader/close.xml +++ b/reference/xmlreader/xmlreader/close.xml @@ -15,6 +15,10 @@ Closes the input the XMLReader object is currently parsing. + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/xmlreader/xmlreader/getattribute.xml b/reference/xmlreader/xmlreader/getattribute.xml index 047a6e4fa1..d29bf17304 100644 --- a/reference/xmlreader/xmlreader/getattribute.xml +++ b/reference/xmlreader/xmlreader/getattribute.xml @@ -32,6 +32,14 @@ + + &reftitle.returnvalues; + + The value of the attribute, or &null; if no attribute with the given + name is found or not positioned on an element node. + + + &reftitle.changelog; @@ -54,14 +62,6 @@ - - &reftitle.returnvalues; - - The value of the attribute, or &null; if no attribute with the given - name is found or not positioned on an element node. - - - &reftitle.seealso; diff --git a/reference/xmlreader/xmlreader/getattributeno.xml b/reference/xmlreader/xmlreader/getattributeno.xml index 6ebc141bbb..ec9ec2de7d 100644 --- a/reference/xmlreader/xmlreader/getattributeno.xml +++ b/reference/xmlreader/xmlreader/getattributeno.xml @@ -37,37 +37,11 @@ &reftitle.returnvalues; - The value of the attribute, or an empty string (before PHP 5.6) or &null; - (from PHP 5.6 onwards) if no attribute exists at + The value of the attribute, or &null; if no attribute exists at index or is not positioned on the element. - - &reftitle.changelog; - - - -
- - &Version; - &Description; - - - - - 5.6.0 - - XMLReader::getAttributeNo now returns &null; - if the attribute doesn't exist. - - - - - - - - &reftitle.seealso; diff --git a/reference/xmlreader/xmlreader/getattributens.xml b/reference/xmlreader/xmlreader/getattributens.xml index 630212c022..db4b4ab8bf 100644 --- a/reference/xmlreader/xmlreader/getattributens.xml +++ b/reference/xmlreader/xmlreader/getattributens.xml @@ -45,8 +45,7 @@ &reftitle.returnvalues; - The value of the attribute, or an empty string (before PHP 5.6) or &null; - (from PHP 5.6 onwards) if no attribute with the given + The value of the attribute, or &null; if no attribute with the given name and namespace is found or not positioned of element. @@ -70,13 +69,6 @@ This function can no longer return &false;. - - 5.6.0 - - XMLReader::getAttributeNS now returns &null; - if the attribute doesn't exist. - - diff --git a/reference/xmlreader/xmlreader/isvalid.xml b/reference/xmlreader/xmlreader/isvalid.xml index 16bb9f59f1..841ca7aab9 100644 --- a/reference/xmlreader/xmlreader/isvalid.xml +++ b/reference/xmlreader/xmlreader/isvalid.xml @@ -15,6 +15,10 @@ Returns a boolean indicating if the document being parsed is currently valid. + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/xmlreader/xmlreader/movetoelement.xml b/reference/xmlreader/xmlreader/movetoelement.xml index 09e2d4a96e..5926b81ae4 100644 --- a/reference/xmlreader/xmlreader/movetoelement.xml +++ b/reference/xmlreader/xmlreader/movetoelement.xml @@ -15,6 +15,10 @@ Moves cursor to the parent Element of current Attribute. + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/xmlreader/xmlreader/movetofirstattribute.xml b/reference/xmlreader/xmlreader/movetofirstattribute.xml index a14c1659b7..036c4e207c 100644 --- a/reference/xmlreader/xmlreader/movetofirstattribute.xml +++ b/reference/xmlreader/xmlreader/movetofirstattribute.xml @@ -15,6 +15,10 @@ Moves cursor to the first Attribute. + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/xmlreader/xmlreader/movetonextattribute.xml b/reference/xmlreader/xmlreader/movetonextattribute.xml index 9bd5c14b36..61a23f75fb 100644 --- a/reference/xmlreader/xmlreader/movetonextattribute.xml +++ b/reference/xmlreader/xmlreader/movetonextattribute.xml @@ -16,6 +16,10 @@ moves to first attribute if positioned on an Element. + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/xmlreader/xmlreader/read.xml b/reference/xmlreader/xmlreader/read.xml index a05cdef1b4..c5462a6378 100644 --- a/reference/xmlreader/xmlreader/read.xml +++ b/reference/xmlreader/xmlreader/read.xml @@ -15,6 +15,10 @@ Moves cursor to the next node in the document. + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; diff --git a/reference/xmlrpc/book.xml b/reference/xmlrpc/book.xml index 10db5e7f04..83c78204cc 100644 --- a/reference/xmlrpc/book.xml +++ b/reference/xmlrpc/book.xml @@ -1,9 +1,9 @@ - + - + XML-RPC diff --git a/reference/xmlrpc/functions/xmlrpc-set-type.xml b/reference/xmlrpc/functions/xmlrpc-set-type.xml index 16f87b2fd9..c64a2b512b 100644 --- a/reference/xmlrpc/functions/xmlrpc-set-type.xml +++ b/reference/xmlrpc/functions/xmlrpc-set-type.xml @@ -50,6 +50,13 @@ + + &reftitle.errors; + + Issues E_WARNING with type unsupported by XMLRPC. + + + &reftitle.examples; @@ -85,13 +92,6 @@ echo xmlrpc_encode($params); - - &reftitle.errors; - - Issues E_WARNING with type unsupported by XMLRPC. - - - + Yac Yac diff --git a/reference/yac/yac/construct.xml b/reference/yac/yac/construct.xml index f65d9cad95..fc414bbe76 100644 --- a/reference/yac/yac/construct.xml +++ b/reference/yac/yac/construct.xml @@ -44,7 +44,14 @@ --> - + + &reftitle.errors; + + Throws an Exception if Yac is not enabled. Throws + Exception if prefix exceeds + max key length of 48 (YAC_MAX_KEY_LEN) bytes. + + diff --git a/reference/yaconf/book.xml b/reference/yaconf/book.xml index a3273fa605..2bd59cde81 100644 --- a/reference/yaconf/book.xml +++ b/reference/yaconf/book.xml @@ -2,6 +2,7 @@ + Yaconf Yaconf @@ -43,7 +44,7 @@ arr.0=val arr[]=val ;use PHP constants version=PHP_VERION -;use enviroment +;use environment env=${PATH} ]]> diff --git a/reference/yaf/book.xml b/reference/yaf/book.xml index 4e8a1de4f9..a38b4091ce 100644 --- a/reference/yaf/book.xml +++ b/reference/yaf/book.xml @@ -2,6 +2,7 @@ + Yet Another Framework Yaf @@ -11,9 +12,6 @@ The Yet Another Framework (Yaf) extension is a PHP framework that is used to develop web applications. - - Yaf requires PHP 5.2.1 or greater. Earlier versions may not work. - A simple Yaf benchmark can be found at Yaf Performance. diff --git a/reference/yaf/ini.xml b/reference/yaf/ini.xml index df704c420b..6692264923 100644 --- a/reference/yaf/ini.xml +++ b/reference/yaf/ini.xml @@ -256,7 +256,7 @@ - Only works as of PHP 5.3, if this value is On, All classes of Yaf will + If this value is On, All classes of Yaf will named in namespace style. diff --git a/reference/yaf/yaf-action-abstract.xml b/reference/yaf/yaf-action-abstract.xml index 6079f0de87..7ace6e927e 100644 --- a/reference/yaf/yaf-action-abstract.xml +++ b/reference/yaf/yaf-action-abstract.xml @@ -17,9 +17,8 @@ can also be a Yaf_Action_Abstract class. - Since there should be a entry point which can be called by Yaf (as of PHP 5.3, - there is a new magic method __invoke, but Yaf is not only works with PHP 5.3+, - Yaf choose another magic method execute), you must implement the abstract method + Since there should be a entry point which can be called by Yaf, + you must implement the abstract method Yaf_Action_Abstract::execute in your custom action class. diff --git a/reference/yaf/yaf-loader.xml b/reference/yaf/yaf-loader.xml index 31172c01cf..50e6cb40b3 100644 --- a/reference/yaf/yaf-loader.xml +++ b/reference/yaf/yaf-loader.xml @@ -100,7 +100,6 @@ class BarNon_Test - As of PHP 5.3, you can use namespace: Load namespace class example diff --git a/reference/yaf/yaf_application/bootstrap.xml b/reference/yaf/yaf_application/bootstrap.xml index a7a47a76b1..9c2d51efdf 100644 --- a/reference/yaf/yaf_application/bootstrap.xml +++ b/reference/yaf/yaf_application/bootstrap.xml @@ -73,7 +73,7 @@ class Bootstrap extends Yaf_Bootstrap_Abstract { bootstrap(); diff --git a/reference/yaf/yaf_application/construct.xml b/reference/yaf/yaf_application/construct.xml index da2b1304fd..0e8c32f09b 100644 --- a/reference/yaf/yaf_application/construct.xml +++ b/reference/yaf/yaf_application/construct.xml @@ -105,7 +105,7 @@ ap.modules=Index bootstrap()->run(); diff --git a/reference/yaf/yaf_controller_abstract/forward.xml b/reference/yaf/yaf_controller_abstract/forward.xml index 67621a13d9..3a2d6521f2 100644 --- a/reference/yaf/yaf_controller_abstract/forward.xml +++ b/reference/yaf/yaf_controller_abstract/forward.xml @@ -4,24 +4,24 @@ Yaf_Controller_Abstract::forward - Foward to another action + Forward to another action &reftitle.description; - public voidYaf_Controller_Abstract::forward + public boolYaf_Controller_Abstract::forward stringaction arrayparamters - public voidYaf_Controller_Abstract::forward + public boolYaf_Controller_Abstract::forward stringcontroller stringaction arrayparamters - public voidYaf_Controller_Abstract::forward + public boolYaf_Controller_Abstract::forward stringmodule stringcontroller stringaction @@ -77,6 +77,13 @@ + + &reftitle.returnvalues; + + &return.success; + + + &reftitle.examples; @@ -113,14 +120,6 @@ class IndexController extends Yaf_Controller_Abstract - - - &reftitle.returnvalues; - - return FALSE on failure - - - &reftitle.seealso; diff --git a/reference/yaf/yaf_dispatcher/autorender.xml b/reference/yaf/yaf_dispatcher/autorender.xml index f8bcd868ad..7d28115c59 100644 --- a/reference/yaf/yaf_dispatcher/autorender.xml +++ b/reference/yaf/yaf_dispatcher/autorender.xml @@ -37,7 +37,7 @@ since 2.2.0, if this parameter is not given, then the current state - will be renturned + will be returned @@ -56,7 +56,7 @@ &reftitle.examples; - <function>Yaf_Dispatcher::autoRender</function>example + <function>Yaf_Dispatcher::autoRender</function> example While the application.dispatcher.throwException is On(you can also calling to Yaf_Dispatcher::throwException(TRUE) to enable it), Yaf will throw Exception when - error occurrs instead of trigger error. + error occurs instead of trigger error. then if you enable Yaf_Dispatcher::catchException(also can enabled by set @@ -49,7 +49,7 @@ &reftitle.examples; - <function>Yaf_Dispatcher::catchException</function>example + <function>Yaf_Dispatcher::catchException</function> example Response Routing takes place exactly once, using the values in the request object - when dispatch() is called. Dispatching takes place in a loop; a request may + when Yaf_Dispatcher::dispatch is called. Dispatching takes place in a loop; a request may either indicate multiple actions to dispatch, or the controller or a plugin may reset the request object to force additional actions to dispatch(see Yaf_Plugin_Abstract. When all is done, the diff --git a/reference/yaf/yaf_dispatcher/flushinstantly.xml b/reference/yaf/yaf_dispatcher/flushinstantly.xml index 7f12170f75..654e4db851 100644 --- a/reference/yaf/yaf_dispatcher/flushinstantly.xml +++ b/reference/yaf/yaf_dispatcher/flushinstantly.xml @@ -32,7 +32,7 @@ since 2.2.0, if this parameter is not given, then the current state - will be renturned + will be returned diff --git a/reference/yaf/yaf_dispatcher/getapplication.xml b/reference/yaf/yaf_dispatcher/getapplication.xml index ef8a62509c..d399563d28 100644 --- a/reference/yaf/yaf_dispatcher/getapplication.xml +++ b/reference/yaf/yaf_dispatcher/getapplication.xml @@ -4,7 +4,7 @@ Yaf_Dispatcher::getApplication - Retrive the application + Retrieve the application @@ -14,7 +14,7 @@ - Retrive the Yaf_Application instance. same as + Retrieve the Yaf_Application instance. same as Yaf_Application::app. diff --git a/reference/yaf/yaf_dispatcher/registerplugin.xml b/reference/yaf/yaf_dispatcher/registerplugin.xml index f7c41f32fe..7403eed8f0 100644 --- a/reference/yaf/yaf_dispatcher/registerplugin.xml +++ b/reference/yaf/yaf_dispatcher/registerplugin.xml @@ -47,7 +47,7 @@ &reftitle.examples; - <function>Yaf_Dispatcher::registerPlugin</function>example + <function>Yaf_Dispatcher::registerPlugin</function> example Set error handler for Yaf. when application.dispatcher.throwException - is off, Yaf will trigger catchable error while unexpected errors occrred. + is off, Yaf will trigger catchable error while unexpected errors occurred. Thus, this error handler will be called while the error raise. diff --git a/reference/yaf/yaf_dispatcher/setview.xml b/reference/yaf/yaf_dispatcher/setview.xml index 49f80d2715..0f4b8633c5 100644 --- a/reference/yaf/yaf_dispatcher/setview.xml +++ b/reference/yaf/yaf_dispatcher/setview.xml @@ -27,7 +27,7 @@ view - A Yaf_View_Interface instance + A Yaf_View_Interface instance @@ -44,7 +44,7 @@ &reftitle.examples; - <function>A custom View engine</function>example + <function>A custom View engine</function> example - <function>Yaf_Dispatcher::setView</function>example + <function>Yaf_Dispatcher::setView</function> example boolflag - Siwtch on/off exception throwing while unexpected error occurring. + Switch on/off exception throwing while unexpected error occurring. When this is on, Yaf will throwing exceptions instead of triggering catchable errors. @@ -49,7 +49,7 @@ &reftitle.examples; - <function>Yaf_Dispatcher::throwexception</function>example + <function>Yaf_Dispatcher::throwexception</function> example path - a string of path, it it better to use abosolute path here for performance + a string of path, it is better to use abosolute path here for performance diff --git a/reference/yaf/yaf_request_abstract/getlanguage.xml b/reference/yaf/yaf_request_abstract/getlanguage.xml index 21b2e72182..419e299472 100644 --- a/reference/yaf/yaf_request_abstract/getlanguage.xml +++ b/reference/yaf/yaf_request_abstract/getlanguage.xml @@ -4,7 +4,7 @@ Yaf_Request_Abstract::getLanguage - Retrieve client's prefered language + Retrieve client's preferred language diff --git a/reference/yaf/yaf_response_abstract/appendbody.xml b/reference/yaf/yaf_response_abstract/appendbody.xml index a0c625202b..d8979f76f5 100644 --- a/reference/yaf/yaf_response_abstract/appendbody.xml +++ b/reference/yaf/yaf_response_abstract/appendbody.xml @@ -82,12 +82,6 @@ Hello World &reftitle.seealso; Yaf_Config_Ini - - - - - &reftitle.seealso; - Yaf_Response_Abstract::getBody Yaf_Response_Abstract::setBody Yaf_Response_Abstract::prependBody @@ -95,7 +89,6 @@ Hello World - + &reftitle.examples; @@ -64,14 +75,6 @@ - - &reftitle.returnvalues; - - - - - - + YAML Data Serialization Yaml diff --git a/reference/yar/book.xml b/reference/yar/book.xml index c7a7bc1c5d..8008475333 100644 --- a/reference/yar/book.xml +++ b/reference/yar/book.xml @@ -2,6 +2,7 @@ + Yet Another RPC Framework Yar diff --git a/reference/yaz/book.xml b/reference/yaz/book.xml index 1a64671284..2b48ccd559 100644 --- a/reference/yaz/book.xml +++ b/reference/yaz/book.xml @@ -2,6 +2,7 @@ + YAZ diff --git a/reference/yaz/functions/yaz-record.xml b/reference/yaz/functions/yaz-record.xml index 572921fd16..9b4c7767ad 100644 --- a/reference/yaz/functions/yaz-record.xml +++ b/reference/yaz/functions/yaz-record.xml @@ -279,10 +279,6 @@ echo $res; ]]> - - For PHP 5 the XSL extension must be used - instead of Sablotron XSLT. - diff --git a/reference/zip/configure.xml b/reference/zip/configure.xml index e5d223d0f2..1104ebdc81 100644 --- a/reference/zip/configure.xml +++ b/reference/zip/configure.xml @@ -13,26 +13,24 @@ configure option. Previously, zip support had to be enabled by using the configure option. - - - As of PHP 5.6.0 a - configure option has been added to use a system libzip installation. libzip - version 0.11 is required, with 0.11.2 or later recommended. + As of PHP 7.4.0, the bundled libzip is removed. As of PHP 7.3.0, building against the bundled libzip is discouraged, but still possible by adding to the configuration. - As of PHP 7.4.0, the bundled libzip is removed. + + + A + configure option has been added to use a system libzip installation. libzip + version 0.11 is required, with 0.11.2 or later recommended.
Windows - As of PHP 5.3 this extension is built-in. Before, - Windows users need to enable php_zip.dll inside - of &php.ini; in order to use these functions. + This extension is built-in.
diff --git a/reference/zip/constants.xml b/reference/zip/constants.xml index 6da33d7a3b..edc5287bd7 100644 --- a/reference/zip/constants.xml +++ b/reference/zip/constants.xml @@ -943,7 +943,7 @@ - Since PHP 5.6.0, PECL zip 1.12.4 + Since PECL zip 1.12.4 diff --git a/reference/zip/ziparchive/registercancelcallback.xml b/reference/zip/ziparchive/registercancelcallback.xml index 70209b86c8..d6a9e397d0 100644 --- a/reference/zip/ziparchive/registercancelcallback.xml +++ b/reference/zip/ziparchive/registercancelcallback.xml @@ -6,6 +6,7 @@ ZipArchive::registerCancelCallback Register a callback to allow cancellation during archive close. + &reftitle.description; @@ -17,6 +18,7 @@ Register a callback function to allow cancellation during archive close. + &reftitle.parameters; @@ -32,6 +34,7 @@ + &reftitle.returnvalues; @@ -39,15 +42,6 @@ - - &reftitle.notes; - - - This function is only available if built against libzip ≥ 1.6.0. - - - - &reftitle.examples; @@ -73,6 +67,15 @@ if ($zip->open('php.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE)) { + + &reftitle.notes; + + + This function is only available if built against libzip ≥ 1.6.0. + + + + &reftitle.seealso; @@ -81,6 +84,7 @@ if ($zip->open('php.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE)) { + diff --git a/reference/zmq/book.xml b/reference/zmq/book.xml index c32821cc36..d7d7ed1682 100644 --- a/reference/zmq/book.xml +++ b/reference/zmq/book.xml @@ -2,6 +2,7 @@ + ZMQ 0MQ messaging diff --git a/reference/zmq/zmqcontext/construct.xml b/reference/zmq/zmqcontext/construct.xml index 9847398588..1fe6719657 100644 --- a/reference/zmq/zmqcontext/construct.xml +++ b/reference/zmq/zmqcontext/construct.xml @@ -44,7 +44,14 @@ - + + + &reftitle.errors; + + Throws ZMQContextException if context initialization fails. + + + &reftitle.examples; @@ -77,13 +84,6 @@ $message = $socket->recv(); - - &reftitle.returnvalues; - - Throws ZMQContextException if context initialization fails. - - - + ZooKeeper ZooKeeper diff --git a/reference/zookeeper/functions/zookeeper_dispatch.xml b/reference/zookeeper/functions/zookeeper_dispatch.xml index 43800a8f78..f0c3be2045 100644 --- a/reference/zookeeper/functions/zookeeper_dispatch.xml +++ b/reference/zookeeper/functions/zookeeper_dispatch.xml @@ -5,6 +5,7 @@ zookeeper_dispatch Calls callbacks for pending operations + &reftitle.description; @@ -28,6 +29,18 @@ + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.errors; diff --git a/reference/zookeeper/setup.xml b/reference/zookeeper/setup.xml index ca22dd76a3..91ed2b3050 100644 --- a/reference/zookeeper/setup.xml +++ b/reference/zookeeper/setup.xml @@ -8,10 +8,8 @@
&reftitle.required; - This extension requires ZooKeeper C Binding (version 3.4.1 or greater). For more information, see ZooKeeper Programmer's Guide. - - - This extension requires PHP version 5.2.0 or higher. Since 0.6.0, it requires PHP version 7.0.0 or higher. + This extension requires ZooKeeper C Binding (version 3.4.1 or greater). + For more information, see ZooKeeper Programmer's Guide.
diff --git a/reference/zookeeper/zookeeper/close.xml b/reference/zookeeper/zookeeper/close.xml index 654f4e4e3e..a61fb26eab 100644 --- a/reference/zookeeper/zookeeper/close.xml +++ b/reference/zookeeper/zookeeper/close.xml @@ -16,6 +16,18 @@
+ + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.errors; diff --git a/reference/zookeeper/zookeeper/connect.xml b/reference/zookeeper/zookeeper/connect.xml index b885e4b71c..92032d9353 100644 --- a/reference/zookeeper/zookeeper/connect.xml +++ b/reference/zookeeper/zookeeper/connect.xml @@ -52,6 +52,13 @@ + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.errors; diff --git a/reference/zookeeper/zookeeper/construct.xml b/reference/zookeeper/zookeeper/construct.xml index 68d3889369..dbb69ba72c 100644 --- a/reference/zookeeper/zookeeper/construct.xml +++ b/reference/zookeeper/zookeeper/construct.xml @@ -51,6 +51,13 @@ + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.errors; diff --git a/reference/zookeeper/zookeeper/getclientid.xml b/reference/zookeeper/zookeeper/getclientid.xml index 31732224ba..8fcc5281cf 100644 --- a/reference/zookeeper/zookeeper/getclientid.xml +++ b/reference/zookeeper/zookeeper/getclientid.xml @@ -16,6 +16,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/zookeeper/zookeeper/getconfig.xml b/reference/zookeeper/zookeeper/getconfig.xml index 9344b004a3..a9ed2c8fa5 100644 --- a/reference/zookeeper/zookeeper/getconfig.xml +++ b/reference/zookeeper/zookeeper/getconfig.xml @@ -16,10 +16,15 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; - Returns instance of ZookeeperConfig. + Returns instance of ZookeeperConfig. diff --git a/reference/zookeeper/zookeeper/getrecvtimeout.xml b/reference/zookeeper/zookeeper/getrecvtimeout.xml index f46ebe7460..d5005319f3 100644 --- a/reference/zookeeper/zookeeper/getrecvtimeout.xml +++ b/reference/zookeeper/zookeeper/getrecvtimeout.xml @@ -16,6 +16,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/zookeeper/zookeeper/getstate.xml b/reference/zookeeper/zookeeper/getstate.xml index aae4411453..3ba10cac8e 100644 --- a/reference/zookeeper/zookeeper/getstate.xml +++ b/reference/zookeeper/zookeeper/getstate.xml @@ -16,6 +16,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/zookeeper/zookeeper/isrecoverable.xml b/reference/zookeeper/zookeeper/isrecoverable.xml index 74aa500083..8625cbbecf 100644 --- a/reference/zookeeper/zookeeper/isrecoverable.xml +++ b/reference/zookeeper/zookeeper/isrecoverable.xml @@ -19,6 +19,11 @@ + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; diff --git a/reference/zookeeper/zookeeperconfig/add.xml b/reference/zookeeper/zookeeperconfig/add.xml index 8e58ecdf8b..17df9df74d 100644 --- a/reference/zookeeper/zookeeperconfig/add.xml +++ b/reference/zookeeper/zookeeperconfig/add.xml @@ -49,6 +49,13 @@ + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.errors; diff --git a/reference/zookeeper/zookeeperconfig/remove.xml b/reference/zookeeper/zookeeperconfig/remove.xml index c942fee84b..c686583c26 100644 --- a/reference/zookeeper/zookeeperconfig/remove.xml +++ b/reference/zookeeper/zookeeperconfig/remove.xml @@ -48,6 +48,13 @@ + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.errors; diff --git a/reference/zookeeper/zookeeperconfig/set.xml b/reference/zookeeper/zookeeperconfig/set.xml index 1adf9e5463..e0e904cf99 100644 --- a/reference/zookeeper/zookeeperconfig/set.xml +++ b/reference/zookeeper/zookeeperconfig/set.xml @@ -48,6 +48,13 @@ + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.errors; diff --git a/security/cgi-bin.xml b/security/cgi-bin.xml index a940e74dc2..4050d59940 100644 --- a/security/cgi-bin.xml +++ b/security/cgi-bin.xml @@ -84,9 +84,9 @@ these configuration options. If your web server does not allow you to do redirects, or the server does not have a way to communicate to the PHP binary that the request is a safely - redirected request, you can specify the option --enable-force-cgi-redirect - to the configure script. You still have to make sure your PHP + redirected request, you can enable the + cgi.force_redirect + ini directive. You still have to make sure your PHP scripts do not rely on one or another way of calling the script, neither by directly http://my.host/cgi-bin/php/dir/script.php @@ -216,9 +216,8 @@ AddHandler php-script .php To get PHP to handle PATH_INFO and PATH_TRANSLATED information correctly with this - setup, the PHP parser should be compiled with the --enable-discard-path - configure option. + setup, the cgi.discard_path + ini directive has to be enabled. diff --git a/security/sessions.xml b/security/sessions.xml index 855dc52c1e..da087d8c19 100644 --- a/security/sessions.xml +++ b/security/sessions.xml @@ -5,7 +5,7 @@ It is important keeping HTTP session management secure. Session - releated security is described in + related security is described in Session Security section of Session module reference.