correct docstrings

This commit is contained in:
coderkun 2015-03-06 11:09:35 +01:00
commit 2c0e68b194
78 changed files with 275 additions and 62 deletions

View file

@ -27,7 +27,8 @@
/** /**
* Get the layout if it was explicitly defined. * Get the layout if it was explicitly defined.
* *
* @return string Layout of the IntermediateAgent * @param string $agentName Agent name
* @return string Layout of the IntermediateAgent
*/ */
public static function getLayout($agentName) public static function getLayout($agentName)
{ {

View file

@ -74,7 +74,7 @@
* @throws ControllerNotValidException * @throws ControllerNotValidException
* @throws ControllerNotFoundException * @throws ControllerNotFoundException
* @param Request $request Current request * @param Request $request Current request
* @param Response $respone Current response * @param Response $response Current response
* @param Logger $log Log-system * @param Logger $log Log-system
*/ */
protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null) protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null)

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: user. * Action: user.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function user(\nre\core\Request $request, \nre\core\Response $response) public function user(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -33,6 +36,9 @@
/** /**
* Action: character. * Action: character.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function character(\nre\core\Request $request, \nre\core\Response $response) public function character(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: questgroup. * Action: questgroup.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function questgroup(\nre\core\Request $request, \nre\core\Response $response) public function questgroup(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -34,6 +37,9 @@
/** /**
* Action: edit. * Action: edit.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function edit(\nre\core\Request $request, \nre\core\Response $response) public function edit(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -43,6 +49,9 @@
/** /**
* Action: edittexts. * Action: edittexts.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function edittexts(\nre\core\Request $request, \nre\core\Response $response) public function edittexts(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -52,6 +61,9 @@
/** /**
* Action: delete. * Action: delete.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function delete(\nre\core\Request $request, \nre\core\Response $response) public function delete(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: quest. * Action: quest.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function quest(\nre\core\Request $request, \nre\core\Response $response) public function quest(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -34,6 +37,9 @@
/** /**
* Action: submissions. * Action: submissions.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function submissions(\nre\core\Request $request, \nre\core\Response $response) public function submissions(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -43,6 +49,9 @@
/** /**
* Action: submission. * Action: submission.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function submission(\nre\core\Request $request, \nre\core\Response $response) public function submission(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -52,6 +61,9 @@
/** /**
* Action: create. * Action: create.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function create(\nre\core\Request $request, \nre\core\Response $response) public function create(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -61,6 +73,9 @@
/** /**
* Action: edit. * Action: edit.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function edit(\nre\core\Request $request, \nre\core\Response $response) public function edit(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -70,6 +85,9 @@
/** /**
* Action: edittask. * Action: edittask.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function edittask(\nre\core\Request $request, \nre\core\Response $response) public function edittask(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -79,6 +97,9 @@
/** /**
* Action: edittexts. * Action: edittexts.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function edittexts(\nre\core\Request $request, \nre\core\Response $response) public function edittexts(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -88,6 +109,9 @@
/** /**
* Action: delete. * Action: delete.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function delete(\nre\core\Request $request, \nre\core\Response $response) public function delete(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -33,6 +36,9 @@
/** /**
* Action: user. * Action: user.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function user(\nre\core\Request $request, \nre\core\Response $response) public function user(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -23,6 +23,13 @@
/**
* Construct a new AjaxAgent.
*
* @param Request $request Current request
* @param Response $response Current response
* @param Logger $log Logger instance
*/
protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null) protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null)
{ {
parent::__construct($request, $response, $log); parent::__construct($request, $response, $log);
@ -34,6 +41,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -42,6 +52,11 @@
/**
* Set requested language.
*
* @param Request $request Current request
*/
private function setLanguage(\nre\core\Request $request) private function setLanguage(\nre\core\Request $request)
{ {
// Set domain // Set domain

View file

@ -23,6 +23,13 @@
/**
* Construct a new BinaryAgent.
*
* @param Request $request Current request
* @param Response $response Current response
* @param Logger $log Logger instance
*/
protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null) protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null)
{ {
parent::__construct($request, $response, $log); parent::__construct($request, $response, $log);
@ -31,6 +38,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -23,6 +23,13 @@
/**
* Construct a new HtmlAgent.
*
* @param Request $request Current request
* @param Response $response Current response
* @param Logger $log Logger instance
*/
protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null) protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null)
{ {
parent::__construct($request, $response, $log); parent::__construct($request, $response, $log);
@ -34,6 +41,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -47,6 +57,11 @@
/**
* Set requested language.
*
* @param Request $request Current request
*/
private function setLanguage(\nre\core\Request $request) private function setLanguage(\nre\core\Request $request)
{ {
// Set domain // Set domain

View file

@ -25,6 +25,10 @@
/** /**
* Construct a new HtmlmailAgent. * Construct a new HtmlmailAgent.
*
* @param Request $request Current request
* @param Response $response Current response
* @param Logger $log Logger instance
*/ */
protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null) protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null)
{ {
@ -34,6 +38,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -25,6 +25,10 @@
/** /**
* Construct a new TextmailAgent. * Construct a new TextmailAgent.
*
* @param Request $request Current request
* @param Response $response Current response
* @param Logger $log Logger instance
*/ */
protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null) protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null)
{ {
@ -36,6 +40,9 @@
/** /**
* Action: index. * Action: index.
*
* @param Request $request Current request
* @param Response $response Current response
*/ */
public function index(\nre\core\Request $request, \nre\core\Response $response) public function index(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -223,7 +223,7 @@
* Handle a error which cannot be handles by the system (and * Handle a error which cannot be handles by the system (and
* HTTP 503). * HTTP 503).
* *
* $param Exception $exception Occurred exception * @param Exception $exception Occurred exception
*/ */
private function errorService($exception) private function errorService($exception)
{ {

View file

@ -83,11 +83,11 @@
* Send an email. * Send an email.
* *
* @throws MailingException * @throws MailingException
* @param string $from Sender of mail
* @param mixed $to One (string) or many (array) receivers * @param mixed $to One (string) or many (array) receivers
* @param string $subject Subject of mail * @param string $messageAction Message Action
* @param string $message Message of mail
* @param boolean $html Whether mail should be formatted as HTML or not * @param boolean $html Whether mail should be formatted as HTML or not
* @param array $params Parameters to pass
* @param Linker $linker Linker instance
*/ */
public static function sendMail($to, $messageAction, $html=false, $params=null, $linker=null) public static function sendMail($to, $messageAction, $html=false, $params=null, $linker=null)
{ {

View file

@ -78,7 +78,7 @@
* @throws QuesttypeControllerNotFoundException * @throws QuesttypeControllerNotFoundException
* @param string $questtypeName Name of the QuesttypeAgent to instantiate * @param string $questtypeName Name of the QuesttypeAgent to instantiate
* @param Request $request Current request * @param Request $request Current request
* @param Response $respone Current respone * @param Response $response Current respone
* @param Logger $log Log-system * @param Logger $log Log-system
*/ */
public static function factory($questtypeName, \nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null) public static function factory($questtypeName, \nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null)
@ -190,7 +190,7 @@
* @throws QuesttypeControllerNotValidException * @throws QuesttypeControllerNotValidException
* @throws QuesttypeControllerNotFoundException * @throws QuesttypeControllerNotFoundException
* @param Request $request Current request * @param Request $request Current request
* @param Response $respone Current response * @param Response $response Current response
* @param Logger $log Log-system * @param Logger $log Log-system
*/ */
protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null) protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null)

View file

@ -23,6 +23,13 @@
/**
* Construct a new ToplevlAgent
*
* @param Request $request Current request
* @param Response $response Current response
* @param Logger $log Logger instance
*/
protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null) protected function __construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log=null)
{ {
parent::__construct($request, $response, $log); parent::__construct($request, $response, $log);

View file

@ -56,6 +56,8 @@
/** /**
* Use a ToplevelAgent for HTML-mail * Use a ToplevelAgent for HTML-mail
*
* @param bool $html Whether to use HTML or not
*/ */
public function setHTML($html=true) public function setHTML($html=true)
{ {
@ -80,6 +82,8 @@
/** /**
* Set the Action for the message to render. * Set the Action for the message to render.
*
* @param string $messageAgent Agent to handle the message
*/ */
public function setMessage($messageAgent) public function setMessage($messageAgent)
{ {

View file

@ -154,6 +154,8 @@
* Check user permissions. * Check user permissions.
* *
* @throws AccessDeniedException * @throws AccessDeniedException
* @param Request $request Current request
* @param Response $response Current response
*/ */
private function checkPermission(\nre\core\Request $request, \nre\core\Response $response) private function checkPermission(\nre\core\Request $request, \nre\core\Response $response)
{ {

View file

@ -151,6 +151,7 @@
* @param string $controllerName Name of the QuesttypeController to instantiate * @param string $controllerName Name of the QuesttypeController to instantiate
* @param string $layoutName Name of the current Layout * @param string $layoutName Name of the current Layout
* @param string $action Current Action * @param string $action Current Action
* @param Agent $agent Corresponding Agent
*/ */
public static function factory($controllerName, $layoutName, $action, $agent) public static function factory($controllerName, $layoutName, $action, $agent)
{ {

View file

@ -126,6 +126,8 @@
* Check user permissions. * Check user permissions.
* *
* @throws AccessDeniedException * @throws AccessDeniedException
* @param Request $request Current request
* @param Response $response Current response
*/ */
private function checkPermission(\nre\core\Request $request, \nre\core\Response $response) private function checkPermission(\nre\core\Request $request, \nre\core\Response $response)
{ {
@ -155,6 +157,10 @@
/** /**
* Check for newly achieved Achievements. * Check for newly achieved Achievements.
*
* @param Request $request Current request
* @param Response $response Current response
* @param array $checkConditions Conditions to check
*/ */
protected function checkAchievements(\nre\core\Request $request, \nre\core\Response $response, $checkConditions=null) protected function checkAchievements(\nre\core\Request $request, \nre\core\Response $response, $checkConditions=null)
{ {

View file

@ -44,6 +44,10 @@
/** /**
* Construct a new exception. * Construct a new exception.
*
* @param string $nestedMessage Nested message
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($nestedMessage=null, $message=self::MESSAGE, $code=self::CODE) function __construct($nestedMessage=null, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -44,6 +44,10 @@
/** /**
* Construct a new exception. * Construct a new exception.
*
* @param int $error Nested error message
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($error, $message=self::MESSAGE, $code=self::CODE) function __construct($error, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -37,6 +37,9 @@
/** /**
* Construct a new exception. * Construct a new exception.
*
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($message=self::MESSAGE, $code=self::CODE) function __construct($message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -46,6 +46,8 @@
* Construct a new exception. * Construct a new exception.
* *
* @param string $questtypeName Name of the QuesttypeAgent that was not found * @param string $questtypeName Name of the QuesttypeAgent that was not found
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE) function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -46,6 +46,8 @@
* Construct a new exception. * Construct a new exception.
* *
* @param string $questtypeName Name of the invalid QuesttypeAgent * @param string $questtypeName Name of the invalid QuesttypeAgent
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE) function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -46,6 +46,8 @@
* Construct a new exception. * Construct a new exception.
* *
* @param string $questtypeName Name of the QuesttypeController that was not found * @param string $questtypeName Name of the QuesttypeController that was not found
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE) function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -46,6 +46,8 @@
* Construct a new exception. * Construct a new exception.
* *
* @param string $questtypeName Name of the invalid QuesttypeController * @param string $questtypeName Name of the invalid QuesttypeController
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE) function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -46,6 +46,8 @@
* Construct a new exception. * Construct a new exception.
* *
* @param string $questtypeName Name of the QuesttypeModel that was not found * @param string $questtypeName Name of the QuesttypeModel that was not found
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE) function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -46,6 +46,8 @@
* Construct a new exception. * Construct a new exception.
* *
* @param string $questtypeName Name of the invalid QuesttypeModel * @param string $questtypeName Name of the invalid QuesttypeModel
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE) function __construct($questtypeName, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -46,6 +46,8 @@
* Construct a new exception. * Construct a new exception.
* *
* @param string $nestedException Nested exception * @param string $nestedException Nested exception
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($nestedException, $message=self::MESSAGE, $code=self::CODE) function __construct($nestedException, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -44,6 +44,10 @@
/** /**
* Construct a new exception. * Construct a new exception.
*
* @param string $type Type of file
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($type, $message=self::MESSAGE, $code=self::CODE) function __construct($type, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -67,6 +67,7 @@
* *
* @throws IdNotFoundException * @throws IdNotFoundException
* @param string $seminaryUrl URL-Title of a Seminary * @param string $seminaryUrl URL-Title of a Seminary
* @param string $all Whether to list all Characters at once or not (optional)
*/ */
public function index($seminaryUrl, $all=null) public function index($seminaryUrl, $all=null)
{ {

View file

@ -66,7 +66,8 @@
* *
* @param array $receiver User that the message will be send to * @param array $receiver User that the message will be send to
* @param array $seminary Seminary which the Character was created for * @param array $seminary Seminary which the Character was created for
* @param array $newCharacter Newly registered user * @param arary $user User of the newly registered Character
* @param array $newCharacter Newly registered Character
*/ */
public function characterregistration($receiver, $seminary, $user, $newCharacter) public function characterregistration($receiver, $seminary, $user, $newCharacter)
{ {

View file

@ -26,6 +26,8 @@
/** /**
* Action: index. * Action: index.
*
* @param $array $user User receiving mail
*/ */
public function index($user) public function index($user)
{ {

View file

@ -1108,46 +1108,6 @@
} }
/**
* Action: createmedia.
* TODO only temporary for easier data import.
*
* Display a form for creating new Seminary media.
*
* @param string $seminaryUrl URL-title of Seminary
*/
public function createmedia($seminaryUrl)
{
// Get seminary
$seminary = $this->Seminaries->getSeminaryByUrl($seminaryUrl);
// Create media
$mediaId = null;
$error = null;
if($this->request->getRequestMethod() == 'POST' && !is_null($this->request->getPostParam('submit')))
{
$file = $_FILES['file'];
$error = $file['error'];
if(empty($error))
{
$mediaId = $this->Media->createQuestMedia(
$this->Auth->getUserId(),
$seminary['id'],
$file['name'],
$this->request->getPostParam('description'),
$file['type'],
$file['tmp_name']
);
}
}
// Pass data to view
$this->set('seminary', $seminary);
$this->set('mediaid', $mediaId);
}
/** /**

View file

@ -74,6 +74,7 @@
* @throws IdNotFoundException * @throws IdNotFoundException
* @param string $seminaryUrl URL-title of Seminary * @param string $seminaryUrl URL-title of Seminary
* @param string $uploadUrl URL-name of the upload * @param string $uploadUrl URL-name of the upload
* @param string $action Current action (optional)
*/ */
public function seminary($seminaryUrl, $uploadUrl, $action=null) public function seminary($seminaryUrl, $uploadUrl, $action=null)
{ {

View file

@ -49,6 +49,8 @@
/** /**
* Action: index. * Action: index.
*
* @param string $all Whether to list all users at once or not (optional)
*/ */
public function index($all=null) public function index($all=null)
{ {

View file

@ -64,8 +64,8 @@
* Load the class of an Agent. * Load the class of an Agent.
* *
* @static * @static
* @throws AgentNotFoundException * @throws \nre\exceptions\AgentNotFoundException
* @throws AgentNotValidException * @throws \nre\exceptions\AgentNotValidException
* @param string $agentName Name of the Agent to load * @param string $agentName Name of the Agent to load
*/ */
public static function load($agentName) public static function load($agentName)
@ -500,7 +500,8 @@
/** /**
* Handle the exception of a SubAgent. * Handle the exception of a SubAgent.
* *
* @param string $label Name of the original Agent * @param array $subAgent Original (Sub-) Agent
* @param Request $request Current request
* @param Excepiton $exception Occurred exception * @param Excepiton $exception Occurred exception
* @return array InlineError-SubAgent * @return array InlineError-SubAgent
*/ */

View file

@ -93,6 +93,7 @@
* @param string $controllerName Name of the Controller to instantiate * @param string $controllerName Name of the Controller to instantiate
* @param string $layoutName Name of the current Layout * @param string $layoutName Name of the current Layout
* @param string $action Current Action * @param string $action Current Action
* @param string $agent Corresponding Agent
*/ */
public static function factory($controllerName, $layoutName, $action, $agent) public static function factory($controllerName, $layoutName, $action, $agent)
{ {

View file

@ -55,6 +55,7 @@
* Instantiate a Driver (Factory Pattern). * Instantiate a Driver (Factory Pattern).
* *
* @param string $driverName Name of the Driver to instantiate * @param string $driverName Name of the Driver to instantiate
* @param array $config Configuration settings
*/ */
public static function factory($driverName, $config) public static function factory($driverName, $config)
{ {

View file

@ -215,8 +215,8 @@
* *
* @param Request $request Current request * @param Request $request Current request
* @param Response $response Current response * @param Response $response Current response
* @param bool $absolute Create absolute link
* @param string $anchor Anchor on target * @param string $anchor Anchor on target
* @param bool $absolute Create absolute link
* @return string Created link * @return string Created link
*/ */
private static function createLink(Request $request, Response $response, $anchor=null, $absolute=false) private static function createLink(Request $request, Response $response, $anchor=null, $absolute=false)

View file

@ -46,6 +46,8 @@
* Construct a new exception * Construct a new exception
* *
* @param string $className Name of the class that was not found * @param string $className Name of the class that was not found
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($className, $message=self::MESSAGE, $code=self::CODE) function __construct($className, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -46,6 +46,8 @@
* Construct a new exception. * Construct a new exception.
* *
* @param string $className Name of the invalid class * @param string $className Name of the invalid class
* @param string $message Error message
* @param int $code Error code
*/ */
function __construct($className, $message=self::MESSAGE, $code=self::CODE) function __construct($className, $message=self::MESSAGE, $code=self::CODE)
{ {

View file

@ -132,9 +132,10 @@
/** /**
* Get seldom Achievements. * Get seldom Achievements.
* *
* @param int $seminaryId ID of Seminary * @param int $seminaryId ID of Seminary
* @param int $count Number of Achievements to retrieve * @param int $count Number of Achievements to retrieve
* @return array List of seldom Achievements * @param bool $alsoWithDeadline Include Achievements with deadline (optional)
* @return array List of seldom Achievements
*/ */
public function getSeldomAchievements($seminaryId, $count, $alsoWithDeadline=true) public function getSeldomAchievements($seminaryId, $count, $alsoWithDeadline=true)
{ {
@ -161,6 +162,7 @@
* Get all achieved Achievements for a Character. * Get all achieved Achievements for a Character.
* *
* @param int $characterId ID of Character * @param int $characterId ID of Character
* @param bool $alsoWithDeadline Include Achievements with deadline (optional)
* @return array Achievements data * @return array Achievements data
*/ */
public function getAchievedAchievementsForCharacter($characterId, $alsoWithDeadline=true) public function getAchievedAchievementsForCharacter($characterId, $alsoWithDeadline=true)

View file

@ -193,6 +193,7 @@
* Get Character groups for a Character groups-group. * Get Character groups for a Character groups-group.
* *
* @param int $groupsgroupId ID of the Character groups-group * @param int $groupsgroupId ID of the Character groups-group
* @param string $sortorder Field to sort by (optional)
* @return array Character groups * @return array Character groups
*/ */
public function getGroupsForGroupsgroup($groupsgroupId, $sortorder='name') public function getGroupsForGroupsgroup($groupsgroupId, $sortorder='name')

View file

@ -92,6 +92,7 @@
* Get Characters for a Seminary. * Get Characters for a Seminary.
* *
* @param int $seminaryId ID of the Seminary * @param int $seminaryId ID of the Seminary
* @param bool $onlyWithRole Only Characters that have at least one role assigned (optional)
* @return array Characters * @return array Characters
*/ */
public function getCharactersForSeminary($seminaryId, $onlyWithRole=false) public function getCharactersForSeminary($seminaryId, $onlyWithRole=false)
@ -356,9 +357,10 @@
/** /**
* Get Characters with the most amount of Achievements. * Get Characters with the most amount of Achievements.
* *
* @param int $seminaryId ID of Seminary * @param int $seminaryId ID of Seminary
* @param int $conut Amount of Characters to retrieve * @param int $conut Amount of Characters to retrieve
* @return array List of Characters * @param bool $alsoWithDeadline Include Achievements with deadline (optional)
* @return array List of Characters
*/ */
public function getCharactersWithMostAchievements($seminaryId, $count, $alsoWithDeadline=true) public function getCharactersWithMostAchievements($seminaryId, $count, $alsoWithDeadline=true)
{ {
@ -458,6 +460,7 @@
* Get the inferior $count Characters in the ranking. * Get the inferior $count Characters in the ranking.
* *
* @param int $seminaryId ID of Seminary * @param int $seminaryId ID of Seminary
* @param int characterId ID of Character
* @param int $xps XP-value of Character * @param int $xps XP-value of Character
* @param int $count Count of Characters to determine * @param int $count Count of Characters to determine
* @return array List of inferior Characters * @return array List of inferior Characters

View file

@ -811,7 +811,7 @@
} }
/* /**
* Calculate the total amount of achievable XPs for a Quest and * Calculate the total amount of achievable XPs for a Quest and
* its following Quests by choosing the path with the highest * its following Quests by choosing the path with the highest
* amount of XPs. * amount of XPs.

View file

@ -62,7 +62,8 @@
/** /**
* Get a Questgroup hierarchy by its URL. * Get a Questgroup hierarchy by its URL.
* *
* throws IdNotFoundException * @throws IdNotFoundException
* @param int $seminaryId ID of Seminary
* @param int $questgroupshierarchyURL URL of a Questgroup hierarchy * @param int $questgroupshierarchyURL URL of a Questgroup hierarchy
* @return array Questgroup hierarchy * @return array Questgroup hierarchy
*/ */

View file

@ -394,6 +394,7 @@
* @param int $seminaryId ID of Seminary * @param int $seminaryId ID of Seminary
* @param int $questgroupId ID of Questgroup (optional) * @param int $questgroupId ID of Questgroup (optional)
* @param int $questtypeId ID of Questtype (optional) * @param int $questtypeId ID of Questtype (optional)
* @param string $title Part of the title to filter for (optional)
* @return int Count of Quests for this Seminary * @return int Count of Quests for this Seminary
*/ */
public function getCountForQuestsForSeminaryByOpenSubmissions($seminaryId, $questgroupId=null, $questtypeId=null, $title=null) public function getCountForQuestsForSeminaryByOpenSubmissions($seminaryId, $questgroupId=null, $questtypeId=null, $title=null)
@ -425,6 +426,7 @@
* @param int $seminaryId ID of Seminary * @param int $seminaryId ID of Seminary
* @param int $questgroupId ID of Questgroup (optional) * @param int $questgroupId ID of Questgroup (optional)
* @param int $questtypeId ID of Questtype (optional) * @param int $questtypeId ID of Questtype (optional)
* @param string $title Part of title to filter for (optional)
* @param int $limit Limit amount of Quests (optional) * @param int $limit Limit amount of Quests (optional)
* @param int $offset Offset (optional) * @param int $offset Offset (optional)
* @return array Quests for this Seminary * @return array Quests for this Seminary

View file

@ -149,6 +149,13 @@
} }
/**
* Get the Questtext that was last entered by a Character.
*
* @param int $characterId ID of Character
* @param array $questtexts List of Questtexts to look into
* @return array Questtext data
*/
public function pickQuesttextLastEnteredByCharacter($characterId, $questtexts) public function pickQuesttextLastEnteredByCharacter($characterId, $questtexts)
{ {
if(count($questtexts) == 0) { if(count($questtexts) == 0) {

View file

@ -106,7 +106,7 @@
} }
/* /**
* Calculate sum of XPs for a Seminary. * Calculate sum of XPs for a Seminary.
* *
* @param int $seminaryId ID of Seminary * @param int $seminaryId ID of Seminary

View file

@ -82,6 +82,7 @@
/** /**
* Get Seminary Character fields of a Character. * Get Seminary Character fields of a Character.
* *
* @param int $fieldId ID of Seminary Character field
* @param int $characterId ID of the Character * @param int $characterId ID of the Character
* @return array Seminary Character fields * @return array Seminary Character fields
*/ */

View file

@ -248,6 +248,8 @@
* Create a new user. * Create a new user.
* *
* @param string $username Username of the user to create * @param string $username Username of the user to create
* @param string $prename Prename of the user to create
* @param string $surname Surname of the user to create
* @param string $email EMail-Address of the user to create * @param string $email EMail-Address of the user to create
* @param string $password Password of the user to create * @param string $password Password of the user to create
* @return int ID of the newly created user * @return int ID of the newly created user
@ -303,8 +305,11 @@
* @throws DatamodelException * @throws DatamodelException
* @param int $userId ID of the user to delete * @param int $userId ID of the user to delete
* @param string $username New name of user * @param string $username New name of user
* @param string $prename Prename of the user to create
* @param string $surname Surname of the user to create
* @param string $email Changed email-address of user * @param string $email Changed email-address of user
* @param string $password Changed plaintext password of user * @param string $password Changed plaintext password of user
* @param bool $mailing Whether to activate mailing or not
*/ */
public function editUser($userId, $username, $prename, $surname, $email, $password, $mailing) public function editUser($userId, $username, $prename, $surname, $email, $password, $mailing)
{ {

View file

@ -74,6 +74,7 @@
* @param array $questgroup Current Questgroup data * @param array $questgroup Current Questgroup data
* @param array $quest Current Quest data * @param array $quest Current Quest data
* @param array $character Current Character data * @param array $character Current Character data
* @param array $answers Character answers for the Quest
* @return boolean True/false for a right/wrong answer or null for moderator evaluation * @return boolean True/false for a right/wrong answer or null for moderator evaluation
*/ */
public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers) public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers)

View file

@ -75,6 +75,7 @@
* @param array $questgroup Current Questgroup data * @param array $questgroup Current Questgroup data
* @param array $quest Current Quest data * @param array $quest Current Quest data
* @param array $character Current Character data * @param array $character Current Character data
* @param array $answers Character answers for the Quest
* @return boolean True/false for a right/wrong answer or null for moderator evaluation * @return boolean True/false for a right/wrong answer or null for moderator evaluation
*/ */
public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers) public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers)

View file

@ -102,6 +102,7 @@
* @param array $questgroup Current Questgroup data * @param array $questgroup Current Questgroup data
* @param array $quest Current Quest data * @param array $quest Current Quest data
* @param array $character Current Character data * @param array $character Current Character data
* @param array $answers Character answers for the Quest
* @return boolean True/false for a right/wrong answer or null for moderator evaluation * @return boolean True/false for a right/wrong answer or null for moderator evaluation
*/ */
public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers) public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers)

View file

@ -86,6 +86,7 @@
* @param array $questgroup Current Questgroup data * @param array $questgroup Current Questgroup data
* @param array $quest Current Quest data * @param array $quest Current Quest data
* @param array $character Current Character data * @param array $character Current Character data
* @param array $answers Character answers for the Quest
* @return boolean True/false for a right/wrong answer or null for moderator evaluation * @return boolean True/false for a right/wrong answer or null for moderator evaluation
*/ */
public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers) public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers)

View file

@ -82,6 +82,7 @@
* @param array $questgroup Current Questgroup data * @param array $questgroup Current Questgroup data
* @param array $quest Current Quest data * @param array $quest Current Quest data
* @param array $character Current Character data * @param array $character Current Character data
* @param array $answers Character answers for the Quest
* @return boolean True/false for a right/wrong answer or null for moderator evaluation * @return boolean True/false for a right/wrong answer or null for moderator evaluation
*/ */
public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers) public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers)

View file

@ -34,8 +34,10 @@
* *
* @param int $seminaryId ID of Seminary * @param int $seminaryId ID of Seminary
* @param int $questId ID of Quest * @param int $questId ID of Quest
* @param int $userId ID of user
* @param int $characterId ID of Character * @param int $characterId ID of Character
* @param array $file Submitted upload * @param array $file Submitted upload
* @param string $filename Name of submitted file
*/ */
public function setCharacterSubmission($seminaryId, $questId, $userId, $characterId, $file, $filename) public function setCharacterSubmission($seminaryId, $questId, $userId, $characterId, $file, $filename)
{ {

View file

@ -74,6 +74,7 @@
* @param array $questgroup Current Questgroup data * @param array $questgroup Current Questgroup data
* @param array $quest Current Quest data * @param array $quest Current Quest data
* @param array $character Current Character data * @param array $character Current Character data
* @param array $answers Character answers for the Quest
* @return boolean True/false for a right/wrong answer or null for moderator evaluation * @return boolean True/false for a right/wrong answer or null for moderator evaluation
*/ */
public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers) public function matchAnswersOfCharacter($seminary, $questgroup, $quest, $character, $answers)