@@ -9,53 +9,53 @@ discard block |
||
| 9 | 9 | public $connection; |
| 10 | 10 | public function __construct() { |
| 11 | 11 | $this->name = get_class($this); |
| 12 | - $this->modules = []; |
|
| 12 | + $this->modules = []; |
|
| 13 | 13 | $this->files = []; |
| 14 | - $this->required = []; |
|
| 14 | + $this->required = []; |
|
| 15 | 15 | $this->data = []; |
| 16 | 16 | $this->tags = []; |
| 17 | - $this->connection = null; |
|
| 17 | + $this->connection = null; |
|
| 18 | 18 | } |
| 19 | 19 | // abstract public function config(); |
| 20 | 20 | // abstract public function init(); |
| 21 | 21 | // abstract public function draw(); |
| 22 | 22 | public function getCss() { |
| 23 | - return $this->getRequire("getCss",".css"); |
|
| 23 | + return $this->getRequire("getCss", ".css"); |
|
| 24 | 24 | } |
| 25 | 25 | public function getJs() { |
| 26 | - return $this->getRequire("getJs",".js"); |
|
| 26 | + return $this->getRequire("getJs", ".js"); |
|
| 27 | 27 | } |
| 28 | 28 | public function getJsVariables() { |
| 29 | 29 | $temp = []; |
| 30 | 30 | foreach ($this->required as $i) |
| 31 | 31 | if (is_array($i)) |
| 32 | - array_push($temp,$i); |
|
| 32 | + array_push($temp, $i); |
|
| 33 | 33 | foreach ($this->modules as $i) |
| 34 | - $temp = array_merge( $temp, $i->getJsVariables() ); |
|
| 34 | + $temp = array_merge($temp, $i->getJsVariables()); |
|
| 35 | 35 | foreach ($this->files as $i) |
| 36 | 36 | if (is_array($i)) |
| 37 | - array_push($temp,$i); |
|
| 37 | + array_push($temp, $i); |
|
| 38 | 38 | return $temp; |
| 39 | 39 | } |
| 40 | - public function addModules( $_mods ) { |
|
| 40 | + public function addModules($_mods) { |
|
| 41 | 41 | foreach ($_mods as $value) |
| 42 | 42 | $this->addModule($value); |
| 43 | 43 | } |
| 44 | - public function addModule( $_mod ) { |
|
| 44 | + public function addModule($_mod) { |
|
| 45 | 45 | $this->modules[$_mod->name] = $_mod; |
| 46 | 46 | } |
| 47 | - public function addFiles( $_files ) { |
|
| 47 | + public function addFiles($_files) { |
|
| 48 | 48 | foreach ($_files as $value) |
| 49 | 49 | $this->addFile($value); |
| 50 | 50 | } |
| 51 | - public function addFile( $_file ) { |
|
| 51 | + public function addFile($_file) { |
|
| 52 | 52 | array_push($this->files, $_file); |
| 53 | 53 | } |
| 54 | - public function addFilesRequired( $_files ) { |
|
| 54 | + public function addFilesRequired($_files) { |
|
| 55 | 55 | foreach ($_files as $value) |
| 56 | 56 | $this->addFileRequired($value); |
| 57 | 57 | } |
| 58 | - public function addFileRequired( $_file ) { |
|
| 58 | + public function addFileRequired($_file) { |
|
| 59 | 59 | array_push($this->required, $_file); |
| 60 | 60 | } |
| 61 | 61 | protected function addDipendences() { |
@@ -63,16 +63,16 @@ discard block |
||
| 63 | 63 | $this->tags["js"] = $this->getJs(); |
| 64 | 64 | $this->tags["jsVariables"] = $this->getJsVariables(); |
| 65 | 65 | } |
| 66 | - protected function getRequire( $_function, $_extenction) { |
|
| 66 | + protected function getRequire($_function, $_extenction) { |
|
| 67 | 67 | $temp = []; |
| 68 | 68 | foreach ($this->required as $i) |
| 69 | 69 | if (!is_array($i) && strpos($i, $_extenction) !== FALSE) |
| 70 | - array_push($temp,$i); |
|
| 70 | + array_push($temp, $i); |
|
| 71 | 71 | foreach ($this->modules as $i) |
| 72 | - $temp = array_merge( $temp, $i->$_function() ); |
|
| 72 | + $temp = array_merge($temp, $i->$_function()); |
|
| 73 | 73 | foreach ($this->files as $i) |
| 74 | 74 | if (!is_array($i) && strpos($i, $_extenction) !== FALSE) |
| 75 | - array_push($temp,$i); |
|
| 75 | + array_push($temp, $i); |
|
| 76 | 76 | return $temp; |
| 77 | 77 | } |
| 78 | 78 | } |