@@ -9,6 +9,9 @@ |
||
9 | 9 | return jBlockEnd($_type, $_parameters); |
10 | 10 | } |
11 | 11 | |
12 | + /** |
|
13 | + * @param string $_path |
|
14 | + */ |
|
12 | 15 | function jBlockFile( $_path, $_parameters = [] ) { |
13 | 16 | try { |
14 | 17 | $temp = Parser::parseFile($_path, $_parameters); |
@@ -1,4 +1,7 @@ |
||
1 | 1 | <?php |
2 | + /** |
|
3 | + * @param integer $number |
|
4 | + */ |
|
2 | 5 | function jateErrorHandler($number, $message, $file, $line) { |
3 | 6 | if (!(error_reporting() & $number)) { |
4 | 7 | return false; |
@@ -3,6 +3,10 @@ |
||
3 | 3 | class Connection { |
4 | 4 | public $database; |
5 | 5 | public $info; |
6 | + |
|
7 | + /** |
|
8 | + * @param JConfig $_object |
|
9 | + */ |
|
6 | 10 | public function __construct( $_object ) { |
7 | 11 | if(!is_object($_object)) |
8 | 12 | throw new InvalidArgumentException("Parameter must be an object."); |
@@ -47,6 +47,10 @@ |
||
47 | 47 | if(!(file_exists($_file) || $this->isCorrectUrl($_file))) |
48 | 48 | throw new JException("File [$_file] not found."); |
49 | 49 | } |
50 | + |
|
51 | + /** |
|
52 | + * @param string $_url |
|
53 | + */ |
|
50 | 54 | protected function isCorrectUrl( $_url ) { |
51 | 55 | return strpos(@get_headers($_url)[0],'200') === false ? false : true; |
52 | 56 | } |
@@ -83,6 +83,11 @@ |
||
83 | 83 | $this->tags["js"] = $this->getJs(); |
84 | 84 | $this->tags["jsVar"] = $this->getJsVars(); |
85 | 85 | } |
86 | + |
|
87 | + /** |
|
88 | + * @param string $_function |
|
89 | + * @param string $_extenction |
|
90 | + */ |
|
86 | 91 | protected function getRequire( $_function, $_extenction) { |
87 | 92 | $temp = []; |
88 | 93 | $filesRequired = $this->getFilesRequired(); |
@@ -1,8 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | abstract class ParserAbstract { |
3 | + |
|
4 | + /** |
|
5 | + * @param string $_text |
|
6 | + */ |
|
3 | 7 | public function drawText( $_text, $_parameters = [] ) { |
4 | 8 | return $this->draw(trim($_text), $_parameters); |
5 | 9 | } |
10 | + |
|
11 | + /** |
|
12 | + * @param string $_text |
|
13 | + */ |
|
6 | 14 | abstract public function draw( $_text, $_parameters = [] ); |
7 | 15 | } |
8 | 16 | ?> |
@@ -2,6 +2,10 @@ discard block |
||
2 | 2 | requireComponents("Adapters"); |
3 | 3 | jRequire("../JException/JException.php"); |
4 | 4 | class Parser { |
5 | + |
|
6 | + /** |
|
7 | + * @param string $_type |
|
8 | + */ |
|
5 | 9 | private static function setParser ( $_type ) { |
6 | 10 | $parser = null; |
7 | 11 | $_type = strtolower($_type); |
@@ -27,6 +31,10 @@ discard block |
||
27 | 31 | } |
28 | 32 | return $parser; |
29 | 33 | } |
34 | + |
|
35 | + /** |
|
36 | + * @param string $_text |
|
37 | + */ |
|
30 | 38 | public static function parseText( $_text, $_parameters = [], $_type = "html" ) { |
31 | 39 | if(!is_string($_text) || !is_string($_type)) |
32 | 40 | throw new JException("Parameter must be a string."); |
@@ -22,6 +22,10 @@ |
||
22 | 22 | throw new JException($e->getMessage(), 1); |
23 | 23 | } |
24 | 24 | } |
25 | + |
|
26 | + /** |
|
27 | + * @param Connection $_connection |
|
28 | + */ |
|
25 | 29 | public function addConnectionMan( $_connection, $_name = "default") { |
26 | 30 | if(!is_object($_connection) || !is_a($_connection, "Connection")) |
27 | 31 | throw new JException("Parameter must be a Connection object.", 1); |