Skip to content

Commit

Permalink
refs #4121 added simple parameter and example link
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Oct 5, 2013
1 parent ad2ff1d commit e65ef12
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions plugins/CoreConsole/templates/api/API.php
Expand Up @@ -32,11 +32,22 @@ static public function getInstance()
}

/**
* Get Answer to Life. Please remove if you do not need this API method.
* @return integer
* Example method. Please remove if you do not need this API method.
* You can call this API method like this:
* /index.php?module=API&method=PLUGINNAME.getAnswerToLife
* /index.php?module=API&method=PLUGINNAME.getAnswerToLife?truth=0
*
* @param bool $truth
*
* @return bool
*/
public function getAnswerToLife()
public function getAnswerToLife($truth = true)
{
return 42;
if ($truth) {

return 42;
}

return 24;
}
}

0 comments on commit e65ef12

Please sign in to comment.