@@ -19,6 +19,9 @@ discard block |
||
19 | 19 | protected static $templatePath, |
20 | 20 | $globals = []; |
21 | 21 | |
22 | + /** |
|
23 | + * @param string $path |
|
24 | + */ |
|
22 | 25 | public function __construct($path=null,$options=[]){ |
23 | 26 | self::$templatePath = ($path ? rtrim($path,'/') : __DIR__) . '/'; |
24 | 27 | } |
@@ -57,6 +60,9 @@ discard block |
||
57 | 60 | class PHPContext { |
58 | 61 | protected $data = []; |
59 | 62 | |
63 | + /** |
|
64 | + * @param string $path |
|
65 | + */ |
|
60 | 66 | public function __construct($data=[], $path=null){ |
61 | 67 | $this->data = $data; |
62 | 68 | } |
@@ -2,6 +2,10 @@ |
||
2 | 2 | |
3 | 3 | class RouteTest extends PHPUnit_Framework_TestCase { |
4 | 4 | |
5 | + /** |
|
6 | + * @param string $uri |
|
7 | + * @param string $method |
|
8 | + */ |
|
5 | 9 | private function mock_request($uri, $method){ |
6 | 10 | Filter::remove('core.request.method'); |
7 | 11 | Filter::remove('core.request.URI'); |
@@ -57,6 +57,9 @@ discard block |
||
57 | 57 | fwrite($this->socket, $payload); |
58 | 58 | } |
59 | 59 | |
60 | + /** |
|
61 | + * @param integer $code |
|
62 | + */ |
|
60 | 63 | protected function expectCode($code){ |
61 | 64 | |
62 | 65 | $this->lastMessage = ''; |
@@ -98,6 +101,9 @@ discard block |
||
98 | 101 | $this->attachments[] = $file; |
99 | 102 | } |
100 | 103 | |
104 | + /** |
|
105 | + * @param string $body |
|
106 | + */ |
|
101 | 107 | protected function SMTPmail($to,$subject,$body,$heads=''){ |
102 | 108 | $this->connect(); |
103 | 109 | $this->expectCode(220); |
@@ -118,6 +118,7 @@ |
||
118 | 118 | |
119 | 119 | /** |
120 | 120 | * Load the model from the persistence layer |
121 | + * @param integer $pk |
|
121 | 122 | * @return mixed The retrieved object |
122 | 123 | */ |
123 | 124 | public static function load($pk){ |
@@ -16,10 +16,16 @@ discard block |
||
16 | 16 | protected static $connections = [], |
17 | 17 | $current = 'default'; |
18 | 18 | |
19 | + /** |
|
20 | + * @param string $name |
|
21 | + */ |
|
19 | 22 | public static function register($name, $dsn, $username=null, $password=null, $options=[]){ |
20 | 23 | return self::$connections[$name] = new SQLConnection($dsn, $username, $password, $options); |
21 | 24 | } |
22 | 25 | |
26 | + /** |
|
27 | + * @param string $dsn |
|
28 | + */ |
|
23 | 29 | public static function connect($dsn, $username=null, $password=null, $options=[]){ |
24 | 30 | return self::register('default', $dsn, $username, $password, $options); |
25 | 31 | } |
@@ -41,6 +47,9 @@ discard block |
||
41 | 47 | } else return false; |
42 | 48 | } |
43 | 49 | |
50 | + /** |
|
51 | + * @param string $name |
|
52 | + */ |
|
44 | 53 | public static function using($name){ |
45 | 54 | if (empty(self::$connections[$name])) throw new \Exception("[SQL] Unknown connection named '$name'."); |
46 | 55 | return self::$connections[$name]; |