Skip to content

Commit

Permalink
Fixing autocomplete on token model
Browse files Browse the repository at this point in the history
  • Loading branch information
mennodekker committed Sep 3, 2013
1 parent 42b5987 commit c503db4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion application/models/Token.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
<?php

/**
*
* For code completion we add the available scenario's here
*
* @method incomplete() incomplete() Select only uncompleted tokens
* @method Token usable() usable() Select usable tokens: valid daterange and userleft > 0
*/
class Token extends Dynamic
{
public function __construct($scenario = 'insert', $surveyId = null)
{
parent::__construct($scenario, $surveyId);
}

/**
* Get the token model
*
* @param string $className Normally you specify null here
* @param int $surveyId
* @return Token
* @throws Exception
*/
public static function model($className = null, $surveyId = null)
{
if (!is_numeric($surveyId))
Expand Down

0 comments on commit c503db4

Please sign in to comment.