Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickpr committed Feb 10, 2020
2 parents 60bc3f4 + 98efd86 commit 95b1cb5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/50-api-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ Functions are freely added in a plugin (you can use existing one to just add one

Add the function parameters in the plugin->functions array :

- $functions[<name>]['function'] : Name of the function to be called in this class
- $functions[<name>]['params'] : Description of input parameters of function.
- $functions[<name>]['description'] : Description. Can be multiline.
- $functions[name]['function'] : Name of the function to be called in this class
- $functions[name]['params'] : Description of input parameters of function.
- $functions[name]['description'] : Description. Can be multiline.

Create in the plugin class a new function :

`public function functionName(array $params) : bool`

where

- functionName = $functions[<name>]['function']
- functionName = $functions[name]['function']
- $params = params passed by rule. The function MUST check params and throw exception on error.
- return an evaluation
- return an evaluation as boolean

Example with inNetwork function
-------------------------------
Expand Down

0 comments on commit 95b1cb5

Please sign in to comment.