@@ -11,6 +11,10 @@ |
||
11 | 11 | function arrayHtmlParser($_array) { |
12 | 12 | return travelStringArray($_array,"htmlParser"); |
13 | 13 | } |
14 | + |
|
15 | + /** |
|
16 | + * @param string $_function |
|
17 | + */ |
|
14 | 18 | function travelStringArray ( $_array, $_function ) { |
15 | 19 | if (is_array($_array)) { |
16 | 20 | foreach ($_array as $k => $v) { |
@@ -17,6 +17,10 @@ |
||
17 | 17 | }); |
18 | 18 | return $temp; |
19 | 19 | } |
20 | + |
|
21 | + /** |
|
22 | + * @param Closure $_function |
|
23 | + */ |
|
20 | 24 | function fetchInSubFolder( $_dir = "./", $_function) { |
21 | 25 | $temp = []; |
22 | 26 | if (is_dir($_dir)) { |
@@ -1,6 +1,14 @@ |
||
1 | 1 | <?php |
2 | 2 | interface ConnectionAdapterInterface { |
3 | + |
|
4 | + /** |
|
5 | + * @return void |
|
6 | + */ |
|
3 | 7 | public function __construct( $_srv, $_db, $_usr, $_pass); |
8 | + |
|
9 | + /** |
|
10 | + * @return boolean |
|
11 | + */ |
|
4 | 12 | public function query( $_query ); |
5 | 13 | public function queryFetch( $_query ); |
6 | 14 | public function queryArray( $_query ); |
@@ -1,4 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | + /** |
|
3 | + * @param string $_path |
|
4 | + */ |
|
2 | 5 | function requireComponent( $_path, $_local = true ) { |
3 | 6 | $path = getJFolder($_path, $_local, debug_backtrace()); |
4 | 7 | if(file_exists($path) && isPhp($path)) |
@@ -26,6 +29,10 @@ discard block |
||
26 | 29 | $info = pathinfo($_file); |
27 | 30 | return ($info["extension"] == "php") || ($info["extension"] == "PHP"); |
28 | 31 | } |
32 | + |
|
33 | + /** |
|
34 | + * @param string $_path |
|
35 | + */ |
|
29 | 36 | function requireModules( $_path, $_local = true ) { |
30 | 37 | $path = getJFolder($_path, $_local, debug_backtrace()); |
31 | 38 | $subFolders = subFolderDir($path); |
@@ -36,6 +43,10 @@ discard block |
||
36 | 43 | $path = getJFolder($_path, $_local, debug_backtrace()); |
37 | 44 | require_once( $path ); |
38 | 45 | } |
46 | + |
|
47 | + /** |
|
48 | + * @param boolean $_local |
|
49 | + */ |
|
39 | 50 | function getJFolder( $_path, $_local, $_stack ) { |
40 | 51 | if($_local) { |
41 | 52 | $stackInfo = $_stack; |
@@ -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; |
@@ -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."); |