From f3e1ba99bba31e3d83173d7481f2e66724aa9fc6 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Mon, 2 May 2005 19:50:53 +0000 Subject: [PATCH] Define runkit_import() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@185666 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/runkit/constants.xml | 31 ++++++-- reference/runkit/functions/runkit-import.xml | 79 ++++++++++++++++++++ 2 files changed, 102 insertions(+), 8 deletions(-) create mode 100644 reference/runkit/functions/runkit-import.xml diff --git a/reference/runkit/constants.xml b/reference/runkit/constants.xml index 7b8c8d1bdc..ebc9f47481 100644 --- a/reference/runkit/constants.xml +++ b/reference/runkit/constants.xml @@ -1,5 +1,5 @@ - +
&reftitle.constants; @@ -12,7 +12,9 @@ - runkit_import flag + runkit_import flag indicating + that normal functions should be imported from the + specified file. @@ -23,7 +25,9 @@ - runkit_import flag + runkit_import flag indicating + that class methods should be imported from the + specified file. @@ -34,7 +38,10 @@ - runkit_import flag + runkit_import flag indicating + that class constants should be imported from the + specified file. Note that this flag is only meaningful + in PHP versions 5.1.0 and above. @@ -45,7 +52,9 @@ - runkit_import flag + runkit_import flag indicating + that class standard properties should be imported + from the specified file. @@ -56,18 +65,24 @@ - runkit_import flag + runkit_import flag representing + a bitwise OR of the RUNKIT_IMPORT_CLASS_* + constants. - RUNKIT_IMPORT_OVERRIDE + RUNKIT_IMPORT_OVERRIDE (integer) - runkit_import flag + runkit_import flag indicating that + if any of the imported functions, methods, constants, + or properties already exist, they should be replaced with + the new definitions. If this flag is not set, then any + imported definitions which already exist will be discarded. diff --git a/reference/runkit/functions/runkit-import.xml b/reference/runkit/functions/runkit-import.xml new file mode 100644 index 0000000000..5ca34ddbc1 --- /dev/null +++ b/reference/runkit/functions/runkit-import.xml @@ -0,0 +1,79 @@ + + + + + + runkit_import + + Process a PHP file importing function and class definitions, overwriting where appropriate + + + + &reftitle.description; + + boolrunkit_import + stringfilename + intflags + + + Similar to include however any code residing outside + of a function or class is simply ignored. + Additionally, depending on the value of flags, + any functions or classes which already exist in the currently running environment + will be automatically overwritten by their new definitions. + + + + + &reftitle.parameters; + + + + filename + + + Filename to import function and class definitions from + + + + + flags + + + Bitwise OR of the RUNKIT_IMPORT_* family of constants. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + +