@@ -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) { |
@@ -1,27 +1,27 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | function utf8ize($_array) { |
| 3 | - return travelStringArray($_array,"utf8_encode"); |
|
| 3 | + return travelStringArray($_array, "utf8_encode"); |
|
| 4 | 4 | } |
| 5 | 5 | function unutf8ize($_array) { |
| 6 | - return travelStringArray($_array,"utf8_decode"); |
|
| 6 | + return travelStringArray($_array, "utf8_decode"); |
|
| 7 | 7 | } |
| 8 | 8 | function arraySlash($_array) { |
| 9 | - return travelStringArray($_array,"addslashes"); |
|
| 9 | + return travelStringArray($_array, "addslashes"); |
|
| 10 | 10 | } |
| 11 | 11 | function arrayHtmlParser($_array) { |
| 12 | - return travelStringArray($_array,"htmlParser"); |
|
| 12 | + return travelStringArray($_array, "htmlParser"); |
|
| 13 | 13 | } |
| 14 | - function travelStringArray ( $_array, $_function ) { |
|
| 14 | + function travelStringArray($_array, $_function) { |
|
| 15 | 15 | if (is_array($_array)) { |
| 16 | 16 | foreach ($_array as $k => $v) { |
| 17 | 17 | $_array[$k] = travelStringArray($v, $_function); |
| 18 | 18 | } |
| 19 | - } else if (is_string ($_array)) { |
|
| 20 | - return call_user_func($_function,$_array); |
|
| 19 | + } else if (is_string($_array)) { |
|
| 20 | + return call_user_func($_function, $_array); |
|
| 21 | 21 | } |
| 22 | 22 | return $_array; |
| 23 | 23 | } |
| 24 | - function arrayDepth( $_array ) { |
|
| 24 | + function arrayDepth($_array) { |
|
| 25 | 25 | $maxDepth = 1; |
| 26 | 26 | foreach ($_array as $value) { |
| 27 | 27 | if (is_array($value)) { |
@@ -33,12 +33,12 @@ discard block |
||
| 33 | 33 | } |
| 34 | 34 | return $maxDepth; |
| 35 | 35 | } |
| 36 | - function arrayDump( $_array, $_name = "Array", $_tab = " " ) { |
|
| 36 | + function arrayDump($_array, $_name = "Array", $_tab = " ") { |
|
| 37 | 37 | $position = preg_replace('/ /', '', $_tab, 1); |
| 38 | 38 | echo "$position<span style=\"color:rgb(230,0,0)\">$_name:</span><br>"; |
| 39 | 39 | foreach ($_array as $k => $i) |
| 40 | - if(is_array($i)) |
|
| 41 | - arrayDump( $i, $k, " $_tab" ); |
|
| 40 | + if (is_array($i)) |
|
| 41 | + arrayDump($i, $k, " $_tab"); |
|
| 42 | 42 | else |
| 43 | 43 | echo "$_tab<b>$k:</b> $i<br>"; |
| 44 | 44 | } |
@@ -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,41 +1,41 @@ |
||
| 1 | 1 | <?php |
| 2 | - function subFolder( $_dir = "./" ) { |
|
| 2 | + function subFolder($_dir = "./") { |
|
| 3 | 3 | $temp = fetchInSubFolder($_dir, function() { |
| 4 | 4 | return true; |
| 5 | 5 | }); |
| 6 | 6 | return $temp; |
| 7 | 7 | } |
| 8 | - function subFolderFile( $_dir = "./" ) { |
|
| 9 | - $temp = fetchInSubFolder($_dir, function( $_file ) { |
|
| 8 | + function subFolderFile($_dir = "./") { |
|
| 9 | + $temp = fetchInSubFolder($_dir, function($_file) { |
|
| 10 | 10 | return !is_dir($_file); |
| 11 | 11 | }); |
| 12 | 12 | return $temp; |
| 13 | 13 | } |
| 14 | - function subFolderDir( $_dir = "./" ) { |
|
| 15 | - $temp = fetchInSubFolder($_dir, function( $_file ) { |
|
| 14 | + function subFolderDir($_dir = "./") { |
|
| 15 | + $temp = fetchInSubFolder($_dir, function($_file) { |
|
| 16 | 16 | return !is_file($_file); |
| 17 | 17 | }); |
| 18 | 18 | return $temp; |
| 19 | 19 | } |
| 20 | - function fetchInSubFolder( $_dir = "./", $_function) { |
|
| 20 | + function fetchInSubFolder($_dir = "./", $_function) { |
|
| 21 | 21 | $temp = []; |
| 22 | 22 | if (is_dir($_dir)) { |
| 23 | 23 | if ($dirOpened = opendir($_dir)) { |
| 24 | 24 | while (($file = readdir($dirOpened)) !== false) |
| 25 | - if( ($file !='.')&&($file !='..') ) |
|
| 26 | - if($_function($file)) |
|
| 27 | - array_push($temp,$file); |
|
| 25 | + if (($file != '.') && ($file != '..')) |
|
| 26 | + if ($_function($file)) |
|
| 27 | + array_push($temp, $file); |
|
| 28 | 28 | closedir($dirOpened); |
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | return $temp; |
| 32 | 32 | } |
| 33 | - function requireSubfolder( $_dir = "./" ) { |
|
| 33 | + function requireSubfolder($_dir = "./") { |
|
| 34 | 34 | $temp = subFolderFile($_dir); |
| 35 | 35 | foreach ($temp as $i) |
| 36 | 36 | jRequire($_dir."/".$i); |
| 37 | 37 | } |
| 38 | - function require_js( $_dir = "./" ) { |
|
| 38 | + function require_js($_dir = "./") { |
|
| 39 | 39 | $tempArray = []; |
| 40 | 40 | $temp = subFolderFile($_dir); |
| 41 | 41 | foreach ($temp as $i) |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | - function htmlParser( $_str) { |
|
| 2 | + function htmlParser($_str) { |
|
| 3 | 3 | return htmlentities($_str, ENT_QUOTES | ENT_IGNORE, "UTF-8"); |
| 4 | 4 | } |
| 5 | 5 | ?> |
@@ -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)) |
@@ -6,6 +9,10 @@ discard block |
||
| 6 | 9 | else |
| 7 | 10 | requireError($_path); |
| 8 | 11 | } |
| 12 | + |
|
| 13 | + /** |
|
| 14 | + * @param string $_path |
|
| 15 | + */ |
|
| 9 | 16 | function requireComponents( $_path, $_local = true ) { |
| 10 | 17 | $path = getJFolder($_path, $_local, debug_backtrace()); |
| 11 | 18 | if(file_exists($path)) { |
@@ -38,6 +45,10 @@ discard block |
||
| 38 | 45 | $path = getJFolder($_path, $_local, debug_backtrace()); |
| 39 | 46 | require_once( $path ); |
| 40 | 47 | } |
| 48 | + |
|
| 49 | + /** |
|
| 50 | + * @param boolean $_local |
|
| 51 | + */ |
|
| 41 | 52 | function getJFolder( $_path, $_local, $_stack ) { |
| 42 | 53 | if($_local) { |
| 43 | 54 | $stackInfo = $_stack; |
@@ -1,45 +1,45 @@ |
||
| 1 | 1 | <?php |
| 2 | - function requireComponent( $_path, $_local = true ) { |
|
| 2 | + function requireComponent($_path, $_local = true) { |
|
| 3 | 3 | $path = getJFolder($_path, $_local, debug_backtrace()); |
| 4 | - if(file_exists($path) && isPhp($path)) |
|
| 4 | + if (file_exists($path) && isPhp($path)) |
|
| 5 | 5 | jRequire($path, false, 0); |
| 6 | 6 | else |
| 7 | 7 | requireError($_path); |
| 8 | 8 | } |
| 9 | - function requireComponents( $_path, $_local = true ) { |
|
| 9 | + function requireComponents($_path, $_local = true) { |
|
| 10 | 10 | $path = getJFolder($_path, $_local, debug_backtrace()); |
| 11 | - if(file_exists($path)) { |
|
| 11 | + if (file_exists($path)) { |
|
| 12 | 12 | $files = subFolderFile($path); |
| 13 | 13 | foreach ($files as $i) { |
| 14 | - if(isPhp($path."/".$i)) |
|
| 14 | + if (isPhp($path."/".$i)) |
|
| 15 | 15 | requireComponent($path."/".$i, false, 0); |
| 16 | 16 | } |
| 17 | 17 | } else |
| 18 | 18 | requireError($_path); |
| 19 | 19 | } |
| 20 | - function requireError( $_path ) { |
|
| 20 | + function requireError($_path) { |
|
| 21 | 21 | global $DEBUG; |
| 22 | - if( $DEBUG == 1 ) |
|
| 22 | + if ($DEBUG == 1) |
|
| 23 | 23 | echo "Error load ($_path)<br>"; |
| 24 | 24 | } |
| 25 | - function isPhp ( $_file ) { |
|
| 26 | - if(!is_file($_file)) return false; |
|
| 25 | + function isPhp($_file) { |
|
| 26 | + if (!is_file($_file)) return false; |
|
| 27 | 27 | $info = pathinfo($_file); |
| 28 | 28 | return ($info["extension"] == "php") || ($info["extension"] == "PHP"); |
| 29 | 29 | } |
| 30 | - function requireModules( $_path, $_local = true ) { |
|
| 30 | + function requireModules($_path, $_local = true) { |
|
| 31 | 31 | $path = getJFolder($_path, $_local, debug_backtrace()); |
| 32 | 32 | $subFolders = subFolderDir($path); |
| 33 | 33 | foreach ($subFolders as $i) { |
| 34 | 34 | requireComponents($path."/".$i, false, 0); |
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | - function jRequire( $_path, $_local = true ) { |
|
| 37 | + function jRequire($_path, $_local = true) { |
|
| 38 | 38 | $path = getJFolder($_path, $_local, debug_backtrace()); |
| 39 | - require_once( $path ); |
|
| 39 | + require_once($path); |
|
| 40 | 40 | } |
| 41 | - function getJFolder( $_path, $_local, $_stack ) { |
|
| 42 | - if($_local) { |
|
| 41 | + function getJFolder($_path, $_local, $_stack) { |
|
| 42 | + if ($_local) { |
|
| 43 | 43 | $stackInfo = $_stack; |
| 44 | 44 | $folder = dirname($stackInfo[0]["file"]); |
| 45 | 45 | $file = "$folder/$_path"; |
@@ -1,15 +1,15 @@ |
||
| 1 | 1 | <?php |
| 2 | - function getGitLog( $_dir = "./" ) { |
|
| 3 | - if(!file_exists($_dir)) |
|
| 2 | + function getGitLog($_dir = "./") { |
|
| 3 | + if (!file_exists($_dir)) |
|
| 4 | 4 | return []; |
| 5 | 5 | $currentDir = getcwd(); |
| 6 | 6 | chdir($_dir); |
| 7 | 7 | $gitHistory = []; |
| 8 | 8 | $gitLogs = []; |
| 9 | 9 | $gitPath = str_replace('\\', '/', exec("git rev-parse --show-toplevel")); |
| 10 | - $rootPath = str_replace('\\', '/', getcwd ()); |
|
| 10 | + $rootPath = str_replace('\\', '/', getcwd()); |
|
| 11 | 11 | $lastHash = null; |
| 12 | - if( $gitPath != $rootPath ) { |
|
| 12 | + if ($gitPath != $rootPath) { |
|
| 13 | 13 | chdir($currentDir); |
| 14 | 14 | return []; |
| 15 | 15 | } |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | parent::__construct(); |
| 5 | 5 | } |
| 6 | 6 | public function getPage() { |
| 7 | - $request = $this->parameters["app"]->server["REQUEST_URI"]; |
|
| 8 | - $base = $this->parameters["app"]->server["RELATIVE"]; |
|
| 7 | + $request = $this->parameters["app"]->server["REQUEST_URI"]; |
|
| 8 | + $base = $this->parameters["app"]->server["RELATIVE"]; |
|
| 9 | 9 | $url = str_replace($base, "", $request); |
| 10 | 10 | $url = explode("/", $url); |
| 11 | 11 | return $url; |
@@ -10,9 +10,9 @@ discard block |
||
| 10 | 10 | public $parameters; |
| 11 | 11 | public function __construct() { |
| 12 | 12 | $this->name = get_class($this); |
| 13 | - $this->modules = []; |
|
| 13 | + $this->modules = []; |
|
| 14 | 14 | $this->files = []; |
| 15 | - $this->required = []; |
|
| 15 | + $this->required = []; |
|
| 16 | 16 | $this->data = []; |
| 17 | 17 | $this->tags = []; |
| 18 | 18 | $this->connection = null; |
@@ -22,43 +22,43 @@ discard block |
||
| 22 | 22 | // abstract public function init(); |
| 23 | 23 | // abstract public function draw(); |
| 24 | 24 | public function getCss() { |
| 25 | - return $this->getRequire("getCss",".css"); |
|
| 25 | + return $this->getRequire("getCss", ".css"); |
|
| 26 | 26 | } |
| 27 | 27 | public function getJs() { |
| 28 | - return $this->getRequire("getJs",".js"); |
|
| 28 | + return $this->getRequire("getJs", ".js"); |
|
| 29 | 29 | } |
| 30 | 30 | public function getJsVariables() { |
| 31 | 31 | $temp = []; |
| 32 | 32 | foreach ($this->required as $i) |
| 33 | 33 | if (is_array($i)) |
| 34 | - array_push($temp,$i); |
|
| 34 | + array_push($temp, $i); |
|
| 35 | 35 | foreach ($this->modules as $i) |
| 36 | - $temp = array_merge( $temp, $i->getJsVariables() ); |
|
| 36 | + $temp = array_merge($temp, $i->getJsVariables()); |
|
| 37 | 37 | foreach ($this->files as $i) |
| 38 | 38 | if (is_array($i)) |
| 39 | - array_push($temp,$i); |
|
| 39 | + array_push($temp, $i); |
|
| 40 | 40 | return $temp; |
| 41 | 41 | } |
| 42 | - public function addModules( $_mods ) { |
|
| 42 | + public function addModules($_mods) { |
|
| 43 | 43 | foreach ($_mods as $value) |
| 44 | 44 | $this->addModule($value); |
| 45 | 45 | } |
| 46 | - public function addModule( $_mod ) { |
|
| 46 | + public function addModule($_mod) { |
|
| 47 | 47 | $this->modules[$_mod->name] = $_mod; |
| 48 | 48 | $this->modules[$_mod->name]->parameters = &$this->parameters; |
| 49 | 49 | } |
| 50 | - public function addFiles( $_files ) { |
|
| 50 | + public function addFiles($_files) { |
|
| 51 | 51 | foreach ($_files as $value) |
| 52 | 52 | $this->addFile($value); |
| 53 | 53 | } |
| 54 | - public function addFile( $_file ) { |
|
| 54 | + public function addFile($_file) { |
|
| 55 | 55 | array_push($this->files, $_file); |
| 56 | 56 | } |
| 57 | - public function addFilesRequired( $_files ) { |
|
| 57 | + public function addFilesRequired($_files) { |
|
| 58 | 58 | foreach ($_files as $value) |
| 59 | 59 | $this->addFileRequired($value); |
| 60 | 60 | } |
| 61 | - public function addFileRequired( $_file ) { |
|
| 61 | + public function addFileRequired($_file) { |
|
| 62 | 62 | array_push($this->required, $_file); |
| 63 | 63 | } |
| 64 | 64 | protected function addDipendences() { |
@@ -66,16 +66,16 @@ discard block |
||
| 66 | 66 | $this->tags["js"] = $this->getJs(); |
| 67 | 67 | $this->tags["jsVariables"] = $this->getJsVariables(); |
| 68 | 68 | } |
| 69 | - protected function getRequire( $_function, $_extenction) { |
|
| 69 | + protected function getRequire($_function, $_extenction) { |
|
| 70 | 70 | $temp = []; |
| 71 | 71 | foreach ($this->required as $i) |
| 72 | 72 | if (!is_array($i) && strpos($i, $_extenction) !== FALSE) |
| 73 | - array_push($temp,$i); |
|
| 73 | + array_push($temp, $i); |
|
| 74 | 74 | foreach ($this->modules as $i) |
| 75 | - $temp = array_merge( $temp, $i->$_function() ); |
|
| 75 | + $temp = array_merge($temp, $i->$_function()); |
|
| 76 | 76 | foreach ($this->files as $i) |
| 77 | 77 | if (!is_array($i) && strpos($i, $_extenction) !== FALSE) |
| 78 | - array_push($temp,$i); |
|
| 78 | + array_push($temp, $i); |
|
| 79 | 79 | return $temp; |
| 80 | 80 | } |
| 81 | 81 | } |
@@ -66,6 +66,11 @@ |
||
| 66 | 66 | $this->tags["js"] = $this->getJs(); |
| 67 | 67 | $this->tags["jsVariables"] = $this->getJsVariables(); |
| 68 | 68 | } |
| 69 | + |
|
| 70 | + /** |
|
| 71 | + * @param string $_function |
|
| 72 | + * @param string $_extenction |
|
| 73 | + */ |
|
| 69 | 74 | protected function getRequire( $_function, $_extenction) { |
| 70 | 75 | $temp = []; |
| 71 | 76 | foreach ($this->required as $i) |
@@ -8,13 +8,13 @@ discard block |
||
| 8 | 8 | $menu = $this->queryFetch("SELECT * FROM menu WHERE flag_active = 1 ORDER BY `order`"); |
| 9 | 9 | $temp = []; |
| 10 | 10 | foreach ($menu as $i) { |
| 11 | - if($i["fk_menu"] == 0) { |
|
| 11 | + if ($i["fk_menu"] == 0) { |
|
| 12 | 12 | $pk_menu = $i["pk_menu"]; |
| 13 | 13 | array_push($temp, array("label" => $i["label"], "link" => $i["link"], "submenu" => [], "relative" => false)); |
| 14 | 14 | $submenu = $this->queryFetch("SELECT * FROM menu WHERE fk_menu = $pk_menu ORDER BY `order`"); |
| 15 | - if($submenu) |
|
| 15 | + if ($submenu) |
|
| 16 | 16 | foreach ($submenu as $j) |
| 17 | - array_push( $temp[count($temp)-1]["submenu"], array("label" => $j["label"], "link" => $j["link"], "submenu" => [], "relative" => false) ); |
|
| 17 | + array_push($temp[count($temp) - 1]["submenu"], array("label" => $j["label"], "link" => $j["link"], "submenu" => [], "relative" => false)); |
|
| 18 | 18 | } |
| 19 | 19 | } |
| 20 | 20 | $this->tags["menu"] = $temp; |
@@ -23,15 +23,15 @@ discard block |
||
| 23 | 23 | public function draw() { |
| 24 | 24 | $temp = ""; |
| 25 | 25 | $host = $this->parameters["app"]->server["HTTP_HOST"]; |
| 26 | - $uri = $this->parameters["app"]->server["REQUEST_URI"]; |
|
| 27 | - $actualLink = "http://$host$uri"; |
|
| 28 | - $relative = $this->parameters["app"]->server["RELATIVE"]; |
|
| 26 | + $uri = $this->parameters["app"]->server["REQUEST_URI"]; |
|
| 27 | + $actualLink = "http://$host$uri"; |
|
| 28 | + $relative = $this->parameters["app"]->server["RELATIVE"]; |
|
| 29 | 29 | foreach ($this->tags["menu"] as $i) { |
| 30 | 30 | $prePath = ""; |
| 31 | - if($i["relative"]) |
|
| 31 | + if ($i["relative"]) |
|
| 32 | 32 | $prePath = $relative; |
| 33 | 33 | $active = $this->isSubString($actualLink, array_merge(array_column($i["submenu"], 'link'), array($i["link"]))) ? "active" : ""; |
| 34 | - if( is_array($i["submenu"]) && count($i["submenu"])<1) |
|
| 34 | + if (is_array($i["submenu"]) && count($i["submenu"]) < 1) |
|
| 35 | 35 | $temp .= "<li class='$active'><a href='$prePath$i[link]'>$i[label]</a></li>"; |
| 36 | 36 | else { |
| 37 | 37 | $temp .= "<li class='dropdown $active'>"; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | '<ul class="dropdown-menu">'; |
| 44 | 44 | foreach ($i["submenu"] as $j) { |
| 45 | 45 | $prePath = ""; |
| 46 | - if($j["relative"]) |
|
| 46 | + if ($j["relative"]) |
|
| 47 | 47 | $prePath = $relative; |
| 48 | 48 | $temp .= "<li><a href='$prePath$j[link]'>$j[label]</a></li>"; |
| 49 | 49 | } |
@@ -52,18 +52,18 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | return $temp; |
| 54 | 54 | } |
| 55 | - protected function isSubString( $_string, $_list) { |
|
| 55 | + protected function isSubString($_string, $_list) { |
|
| 56 | 56 | $success = false; |
| 57 | 57 | foreach ($_list as $i) |
| 58 | - if(strpos($_string,$i) !== false) |
|
| 58 | + if (strpos($_string, $i) !== false) |
|
| 59 | 59 | $success = true; |
| 60 | 60 | return $success; |
| 61 | 61 | } |
| 62 | 62 | public function loginWithUser() { |
| 63 | 63 | $this->init(); |
| 64 | 64 | $temp = []; |
| 65 | - if(!isset($_SESSION["username"])) |
|
| 66 | - $_SESSION["username"] ="guest"; |
|
| 65 | + if (!isset($_SESSION["username"])) |
|
| 66 | + $_SESSION["username"] = "guest"; |
|
| 67 | 67 | $user = $_SESSION["username"]; |
| 68 | 68 | $blackList = $this->queryFetch( |
| 69 | 69 | "SELECT user.*,user_section.* |
@@ -78,10 +78,10 @@ discard block |
||
| 78 | 78 | $success = true; |
| 79 | 79 | $k = $i["label"]; |
| 80 | 80 | foreach ($blackList as $j) |
| 81 | - if( $j["section"] == $k) |
|
| 81 | + if ($j["section"] == $k) |
|
| 82 | 82 | $success = false; |
| 83 | - if($success) |
|
| 84 | - array_push($temp,$i); |
|
| 83 | + if ($success) |
|
| 84 | + array_push($temp, $i); |
|
| 85 | 85 | } |
| 86 | 86 | $this->tags["menu"] = $temp; |
| 87 | 87 | } |
@@ -9,6 +9,10 @@ |
||
| 9 | 9 | public function drawFile( $_template ) { |
| 10 | 10 | return $this->draw($_template); |
| 11 | 11 | } |
| 12 | + |
|
| 13 | + /** |
|
| 14 | + * @param string $_template |
|
| 15 | + */ |
|
| 12 | 16 | public function drawText( $_template ) { |
| 13 | 17 | return $this->draw(trim($_template)); |
| 14 | 18 | } |
@@ -6,13 +6,13 @@ |
||
| 6 | 6 | public function __construct() { |
| 7 | 7 | parent::__construct(); |
| 8 | 8 | } |
| 9 | - public function drawFile( $_template ) { |
|
| 9 | + public function drawFile($_template) { |
|
| 10 | 10 | return $this->draw($_template); |
| 11 | 11 | } |
| 12 | - public function drawText( $_template ) { |
|
| 12 | + public function drawText($_template) { |
|
| 13 | 13 | return $this->draw(trim($_template)); |
| 14 | 14 | } |
| 15 | - public function draw( $_template ) { |
|
| 15 | + public function draw($_template) { |
|
| 16 | 16 | $Parsedown = new Parsedown\Parsedown(); |
| 17 | 17 | $page = $Parsedown->text($_template); |
| 18 | 18 | return $page; |