PHP_LoadFunctions


PHP_LoadFunctions{( pathOrXMLString )}


 

Description


Allows you to load custom plug-in functions.

 

Parameters


pathOrXMLString (optional)
The absolute path or PHPx relative path of an XML file or directory of XML files to load. You can also specify the XML as a string. If this parameter is not included, all XML files from the PHPx directory will be loaded.

 

Return


Returns the list of functions that were loaded.

 

Errors


300 Invalid package path
301 Invalid package file
302 No package files found in specified folder
310 Invalid save path

 

Example 1 - Load file from PHPx folder (relative path)
PHP_LoadFunctions( "PHPx_Encryption.xml" )
/*
Returns:
Encryption
    Encr_Decrypt ( password ; text )
    Encr_Encrypt ( password ; text )
    Encr_Version {( option )}
*/

Change Log

VersionDescription
3.0.0Function now returns the package name followed by an indented list of the functions that were loaded from the package.
3.0.0

Added support for store-last-code attribute in the execute-params tag for the PHPx XML format. This allows the function developer to choose whether or not their code can be viewed using the PHP_GetLastCode function. In some cases you may store sensitive information in your code or you may simply want to hide your kung foo. The following XML snippet shows how to set this attribute to off:

<execute-params timeout="60" keep-memory="0" execute-to-container="0" store-last-code="0"/>

3.0.0

Added support for function-prefix attribute in the package tag for the PHPx XML format. This allows you to specify a custom prefix to be used instead of the default "PHPx_". If you don't want a prefix to be added, you can set the value to an empty string (function-prefix=""). Keep in mind that the internal FileMaker function ID is based on the function name. If you change or remove the prefix, the function name will change and a different internal ID will be used. You will then need to update any calculations that were previously stored before the name was changed. The following XML snippet shows how to set the function prefix to Acme:

<package abbreviation="Tst" license-level="1" name="Test" version="1.0.0" function-prefix="Acme">