cvs: phpdoc /en/reference/var/functions import-request-variables.xml is-callable.xml settype.xml

From: Date: Sat, 02 Jun 2007 19:28:01 +0000
Subject: cvs: phpdoc /en/reference/var/functions import-request-variables.xml is-callable.xml settype.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969376513@lists.php.net to get a copy of this message
didou Sat Jun 2 19:28:01 2007 UTC Modified files: /phpdoc/en/reference/var/functions import-request-variables.xml is-callable.xml settype.xml Log: Switch to new doc style (tm) # anyone for a make test ?

http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/var/functions/import-request-variables.xml?r1=1.10&r2=1.11&diff_format=u Index: phpdoc/en/reference/var/functions/import-request-variables.xml diff -u phpdoc/en/reference/var/functions/import-request-variables.xml:1.10 phpdoc/en/reference/var/functions/import-request-variables.xml:1.11 --- phpdoc/en/reference/var/functions/import-request-variables.xml:1.10 Mon Dec 15 16:54:11 2003 +++ phpdoc/en/reference/var/functions/import-request-variables.xml Sat Jun 2 19:28:01 2007 @@ -1,80 +1,117 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- splitted from ./en/functions/var.xml, last change in rev 1.34 --> - <refentry id="function.import-request-variables"> - <refnamediv> - <refname>import_request_variables</refname> - <refpurpose>Import GET/POST/Cookie variables into the global scope</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>import_request_variables</methodname> - <methodparam><type>string</type><parameter>types</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>prefix</parameter></methodparam> - </methodsynopsis> - <simpara> - Imports GET/POST/Cookie variables into the global scope. It is - useful if you disabled - <link linkend="ini.register-globals">register_globals</link>, - but would like to see some variables in the global scope. - </simpara> - <simpara> - Using the <parameter>types</parameter> parameter, you can - specify which request variables to import. You can use - 'G', 'P' and 'C' characters respectively for GET, POST and - Cookie. These characters are not case sensitive, so you - can also use any combination of 'g', 'p' and 'c'. POST - includes the POST uploaded file information. Note that the - order of the letters matters, as when using "gp", the POST - variables will overwrite GET variables with the same - name. Any other letters than GPC are discarded. - </simpara> - <simpara> - The <parameter>prefix</parameter> parameter is used as a variable - name prefix, prepended before all variable's name imported into the - global scope. So if you have a GET value named "userid", and provide - a prefix "pref_", then you'll get a global variable named - $pref_userid. - </simpara> - <simpara> - If you're interested in importing other variables - into the global scope, such as SERVER, consider using - <function>extract</function>. - </simpara> - <note> - <para> - Although the <parameter>prefix</parameter> parameter is - optional, you will get an - <link linkend="internal.e-notice">E_NOTICE</link> level error if - you specify no prefix, or specify an empty string as a - prefix. This is a possible security hazard. Notice - level errors are not displayed using the default - <link linkend="ini.error-reporting">error reporting</link> - level. - </para> - </note> - <informalexample> - <programlisting role="php"> +<!-- $Revision: 1.11 $ --> +<refentry id="function.import-request-variables"> + <refnamediv> + <refname>import_request_variables</refname> + <refpurpose>Import GET/POST/Cookie variables into the global scope</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>import_request_variables</methodname> + <methodparam><type>string</type><parameter>types</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>prefix</parameter></methodparam> + </methodsynopsis> + <para> + Imports GET/POST/Cookie variables into the global scope. It is useful if + you disabled <link linkend="ini.register-globals">register_globals</link>, + but would like to see some variables in the global scope. + </para> + <para> + If you're interested in importing other variables into the global scope, + such as SERVER, consider using <function>extract</function>. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>types</parameter></term> + <listitem> + <para> + Using the <parameter>types</parameter> parameter, you can specify + which request variables to import. You can use 'G', 'P' and 'C' + characters respectively for GET, POST and Cookie. These characters are + not case sensitive, so you can also use any combination of 'g', 'p' + and 'c'. POST includes the POST uploaded file information. + </para> + <note> + <para> + Note that the order of the letters matters, as when using "gp", the + POST variables will overwrite GET variables with the same name. Any + other letters than GPC are discarded. + </para> + </note> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>prefix</parameter></term> + <listitem> + <para> + Variable name prefix, prepended before all variable's name imported + into the global scope. So if you have a GET value named "userid", and + provide a prefix "pref_", then you'll get a global variable named + <varname>$pref_userid</varname>. + </para> + <note> + <para> + Although the <parameter>prefix</parameter> parameter is optional, you + will get an <link linkend="internal.e-notice">E_NOTICE</link> level + error if you specify no prefix, or specify an empty string as a + prefix. This is a possible security hazard. Notice level errors are + not displayed using the default <link + linkend="ini.error-reporting">error reporting</link> level. + </para> + </note> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>import_request_variables</function> example</title> + <programlisting role="php"> <![CDATA[ <?php // This will import GET and POST vars // with an "rvar_" prefix -import_request_variables("gP", "rvar_"); +import_request_variables("gp", "rvar_"); echo $rvar_foo; ?> ]]> - </programlisting> - </informalexample> - <simpara> - See also <link linkend="reserved.variables.request">$_REQUEST</link>, - <link linkend="ini.register-globals">register_globals</link>, - <link linkend="language.variables.predefined">Predefined Variables</link>, - and <function>extract</function>. - </simpara> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><link linkend="reserved.variables.request">$_REQUEST</link></member> + <member><link linkend="ini.register-globals">register_globals</link></member> + <member><link linkend="language.variables.predefined">Predefined Variables</link></member> + <member><function>extract</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/var/functions/is-callable.xml?r1=1.10&r2=1.11&diff_format=u Index: phpdoc/en/reference/var/functions/is-callable.xml diff -u phpdoc/en/reference/var/functions/is-callable.xml:1.10 phpdoc/en/reference/var/functions/is-callable.xml:1.11 --- phpdoc/en/reference/var/functions/is-callable.xml:1.10 Mon Aug 29 15:46:34 2005 +++ phpdoc/en/reference/var/functions/is-callable.xml Sat Jun 2 19:28:01 2007 @@ -1,51 +1,85 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- splitted from ./en/functions/var.xml, last change in rev 1.87 --> - <refentry id="function.is-callable"> - <refnamediv> - <refname>is_callable</refname> - <refpurpose> - Verify that the contents of a variable can be called as a function - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>is_callable</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>syntax_only</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter role="reference">callable_name</parameter></methodparam> - </methodsynopsis> - <para> - Verify that the contents of a variable can be called as a function. - This can check that a simple variable contains the name of a valid - function, or that an array contains a properly encoded object and - function name. - </para> - <para> - The <parameter>var</parameter> parameter can be either the name of a function stored in - a string variable, or an object and the name of a method within the - object, like this: - <screen>array($SomeObject, 'MethodName')</screen> - </para> - <para> - If the <parameter>syntax_only</parameter> argument is &true; the - function only verifies that <parameter>var</parameter> might be a - function or method. It will only reject simple variables that are - not strings, or an array that does not have a valid structure to be - used as a callback. The valid ones are supposed to have only 2 - entries, the first of which is an object or a string, and the - second a string. - </para> - <para> - The <parameter>callable_name</parameter> argument receives the - "callable name". In the example below it's - "someClass:someMethod". Note, however, that despite the - implication that someClass::SomeMethod() is a callable static - method, this is not the case. - </para> - <informalexample> - <programlisting role="php"> +<!-- $Revision: 1.11 $ --> +<refentry id="function.is-callable"> + <refnamediv> + <refname>is_callable</refname> + <refpurpose> + Verify that the contents of a variable can be called as a function + </refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>is_callable</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>syntax_only</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter role="reference">callable_name</parameter></methodparam> + </methodsynopsis> + <para> + Verify that the contents of a variable can be called as a function. + This can check that a simple variable contains the name of a valid + function, or that an array contains a properly encoded object and + function name. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + Can be either the name of a function stored in a string variable, or + an object and the name of a method within the object, like this: + <screen>array($SomeObject, 'MethodName')</screen> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>syntax_only</parameter></term> + <listitem> + <para> + If set to &true; the function only verifies that + <parameter>var</parameter> might be a function or method. It will only + reject simple variables that are not strings, or an array that does + not have a valid structure to be used as a callback. The valid ones + are supposed to have only 2 entries, the first of which is an object + or a string, and the second a string. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>callable_name</parameter></term> + <listitem> + <para> + Receives the "callable name". In the example below it is + "someClass:someMethod". Note, however, that despite the implication + that someClass::SomeMethod() is a callable static method, this is not + the case. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if <parameter>var</parameter> is callable, &false; + otherwise. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>is_callable</function> example</title> + <programlisting role="php"> <![CDATA[ <?php // How to check a variable to see if it can be called @@ -87,14 +121,22 @@ ?> ]]> - </programlisting> - </informalexample> - <para> - See also <function>function_exists</function> and - <function>method_exists</function>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>function_exists</function></member> + <member><function>method_exists</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/var/functions/settype.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/var/functions/settype.xml diff -u phpdoc/en/reference/var/functions/settype.xml:1.7 phpdoc/en/reference/var/functions/settype.xml:1.8 --- phpdoc/en/reference/var/functions/settype.xml:1.7 Wed Nov 10 08:30:47 2004 +++ phpdoc/en/reference/var/functions/settype.xml Sat Jun 2 19:28:01 2007 @@ -1,70 +1,99 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/var.xml, last change in rev 1.2 --> - <refentry id="function.settype"> - <refnamediv> - <refname>settype</refname> - <refpurpose>Set the type of a variable</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>settype</methodname> - <methodparam><type>mixed</type><parameter role="reference">var</parameter></methodparam> - <methodparam><type>string</type><parameter>type</parameter></methodparam> - </methodsynopsis> - <para> - Set the type of variable <parameter>var</parameter> to - <parameter>type</parameter>. - </para> - <para> - Possibles values of <parameter>type</parameter> are: - <itemizedlist> - <listitem> - <simpara> - "boolean" (or, since PHP 4.2.0, "bool") - </simpara> - </listitem> - <listitem> - <simpara> - "integer" (or, since PHP 4.2.0, "int") - </simpara> - </listitem> - <listitem> - <simpara> - "float" (only possible since PHP 4.2.0, for older versions use the - deprecated variant "double") - </simpara> - </listitem> - <listitem> - <simpara> - "string" - </simpara> - </listitem> - <listitem> - <simpara> - "array" - </simpara> - </listitem> - <listitem> - <simpara> - "object" - </simpara> - </listitem> - <listitem> - <simpara> - "null" (since PHP 4.2.0) - </simpara> - </listitem> - </itemizedlist> - </para> - <para> - &return.success; - </para> - <para> - <example> - <title><function>settype</function> example</title> - <programlisting role="php"> +<!-- $Revision: 1.8 $ --> +<refentry id="function.settype"> + <refnamediv> + <refname>settype</refname> + <refpurpose>Set the type of a variable</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>settype</methodname> + <methodparam><type>mixed</type><parameter role="reference">var</parameter></methodparam> + <methodparam><type>string</type><parameter>type</parameter></methodparam> + </methodsynopsis> + <para> + Set the type of variable <parameter>var</parameter> to + <parameter>type</parameter>. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + The variable being converted. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para> + Possibles values of <parameter>type</parameter> are: + <itemizedlist> + <listitem> + <simpara> + "boolean" (or, since PHP 4.2.0, "bool") + </simpara> + </listitem> + <listitem> + <simpara> + "integer" (or, since PHP 4.2.0, "int") + </simpara> + </listitem> + <listitem> + <simpara> + "float" (only possible since PHP 4.2.0, for older versions use the + deprecated variant "double") + </simpara> + </listitem> + <listitem> + <simpara> + "string" + </simpara> + </listitem> + <listitem> + <simpara> + "array" + </simpara> + </listitem> + <listitem> + <simpara> + "object" + </simpara> + </listitem> + <listitem> + <simpara> + "null" (since PHP 4.2.0) + </simpara> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>settype</function> example</title> + <programlisting role="php"> <![CDATA[ <?php $foo = "5bar"; // string @@ -74,16 +103,23 @@ settype($bar, "string"); // $bar is now "1" (string) ?> ]]> - </programlisting> - </example> - </para> - <para> - See also <function>gettype</function>, - <link linkend="language.types.typecasting">type-casting</link> and - <link linkend="language.types.type-juggling">type-juggling</link>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>gettype</function></member> + <member><link linkend="language.types.typecasting">type-casting</link></member> + <member><link linkend="language.types.type-juggling">type-juggling</link></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables:
« previous php.doc (#969376513) next »