WELCOME TO KURUMI FRAMEWORK
355 |Simple framework for Koneksi.php
357 |-
358 |
359 |
- Documentation 360 | 361 |
- Lincense MIT 362 |
├── .env.example ├── .gitignore ├── README.md ├── app ├── Controllers │ └── HomeController.php └── Models │ └── User.php ├── config └── database.php ├── database ├── .gitignore └── Migrations │ └── UserMigration.php ├── kurumi ├── public ├── .htaccess ├── css │ └── styles.css ├── index.php ├── js │ └── welcome.js ├── logo.png └── manifest.json ├── resources └── views │ ├── layouts │ └── main.kurumi.php │ └── welcome.kurumi.php ├── routes └── web.php ├── storage └── framework │ └── views │ └── .gitignore ├── vendor ├── autoload.php ├── kurumi │ ├── Consoles │ │ └── Kurumi.php │ ├── Functions │ │ ├── dd.php │ │ ├── load.php │ │ ├── redirect.php │ │ └── view.php │ ├── Http │ │ ├── Add.php │ │ ├── Parser.php │ │ ├── Route.php │ │ ├── RouteInterface.php │ │ ├── Start.php │ │ └── pages │ │ │ └── 404.php │ ├── Kurumi │ │ ├── Component.php │ │ ├── File.php │ │ ├── Haniel.php │ │ ├── Layouts.php │ │ └── TemplateInheritance.php │ └── Variable │ │ └── define.php ├── rasiel │ ├── Connect.php │ └── Migration │ │ ├── Migrate.php │ │ └── MigrationQuery.php ├── whoops │ ├── Exception │ │ ├── ErrorException.php │ │ ├── Formatter.php │ │ ├── Frame.php │ │ ├── FrameCollection.php │ │ └── Inspector.php │ ├── Handler │ │ ├── CallbackHandler.php │ │ ├── Handler.php │ │ ├── HandlerInterface.php │ │ ├── JsonResponseHandler.php │ │ ├── PlainTextHandler.php │ │ ├── PrettyPageHandler.php │ │ └── XmlResponseHandler.php │ ├── Resources │ │ ├── css │ │ │ ├── prism.css │ │ │ └── whoops.base.css │ │ ├── images │ │ │ └── bg-header.jpg │ │ ├── js │ │ │ ├── clipboard.min.js │ │ │ ├── prism.js │ │ │ ├── whoops.base.js │ │ │ └── zepto.min.js │ │ └── views │ │ │ ├── env_details.html.php │ │ │ ├── frame_code.html.php │ │ │ ├── frame_list.html.php │ │ │ ├── frames_container.html.php │ │ │ ├── frames_description.html.php │ │ │ ├── header.html.php │ │ │ ├── header_outer.html.php │ │ │ ├── layout.html.php │ │ │ ├── panel_details.html.php │ │ │ ├── panel_details_outer.html.php │ │ │ ├── panel_left.html.php │ │ │ └── panel_left_outer.html.php │ ├── Run.php │ ├── RunInterface.php │ └── Util │ │ ├── HtmlDumperOutput.php │ │ ├── Misc.php │ │ ├── SystemFacade.php │ │ └── TemplateHelper.php └── zafkiel │ └── Classloader.php └── zafkiel.php /.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_NAME= 2 | DATABASE_USER=root 3 | DATABASE_PASSWORD= 4 | DATABASE_HOST=127.0.0.1 5 | DIALECT=mysql 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | /node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
5 |
6 |
😍 eh abang sayang
257 | @elseif ( $nakanoNino === "istri miko" ): 258 |Betsuniiii >////<
259 | @else: 260 |ayangku siapa? 🗿
261 | @endif 262 |{{ $name }}
272 | @endeach 273 | ``` 274 | 275 |Simple framework for Koneksi.php
357 |Simple framework for Koneksi.php
9 |404
-------------------------------------------------------------------------------- /vendor/kurumi/Kurumi/Component.php: -------------------------------------------------------------------------------- 1 | name component to the @extendContent 23 | * 24 | */ 25 | protected $component; 26 | 27 | /** 28 | * 29 | * @data -> method khusus untuk menangani data 30 | * 31 | */ 32 | protected $data; 33 | 34 | /** 35 | * 36 | * @extendContent string -> method untuk mengirimkan name component 37 | * ke @component 38 | * @component string 39 | * 40 | */ 41 | public function extendContent(string $component, $data = []) 42 | { 43 | $this->component = $component; 44 | $this->data = $data; 45 | $this->render(); 46 | } 47 | 48 | /** 49 | * 50 | * @render -> method untuk merender @component ( name_compoent ) 51 | * 52 | * 53 | */ 54 | 55 | public function render() 56 | { 57 | foreach ($this->data as $key => $value) { 58 | $$key = $value; 59 | } 60 | 61 | $path = __DIR__ . PATH_VIEW_STORAGE . "components." . trim($this->component) . ".kurumi.php"; 62 | if (file_exists($path)) { 63 | include $path; 64 | } else { 65 | throw new Exception("component `<" . trim($this->component) . "/> tidak ditemukan!"); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /vendor/kurumi/Kurumi/File.php: -------------------------------------------------------------------------------- 1 | input_files = array_merge( 40 | glob("{$this->input_directory}*.kurumi.php"), 41 | glob("{$this->input_directory}**/*.kurumi.php"), 42 | glob("{$this->input_directory}**/**/*.kurumi.php"), 43 | glob("{$this->input_directory}**/**/**/*.kurumi.php"), 44 | ); 45 | $this->output_files = glob("{$this->output_directory}*.php"); 46 | 47 | $this->sterilize(); 48 | $this->generate(); 49 | } 50 | 51 | 52 | /** 53 | * Menyesuaikan file input dan output 54 | * -> ambil nama file yang berakhiran '.kurumi.php' # (str_replace) 55 | * -> cek adakah file input # (file_exists) 56 | * -> hapus file output bila tidak ada di folder input # (unlink) 57 | * @return void 58 | */ 59 | public function sterilize(): void 60 | { 61 | foreach ($this->output_files as $file) { 62 | $base_name = str_replace('.kurumi.php', '', basename($file)); 63 | 64 | $output_dir = $this->output_directory . $base_name; 65 | $input_dir = $this->input_directory . str_replace('.', '/', $base_name); 66 | 67 | if (!file_exists("$input_dir.kurumi.php")) { 68 | unlink("$output_dir.kurumi.php"); 69 | } 70 | } 71 | } 72 | 73 | 74 | /** 75 | * Method untuk membuat file baru dengan 76 | * directive yang telah diubah menjadi kode php oleh Haniel. 77 | * -> ambil nama file tanpa direktorinya 78 | * -> ubah simbol / menjadi . # (str_replace) 79 | * -> ambil isi file # (file_get_contents) 80 | * -> buat file di folder output # (fopen, fwrite, fclose) 81 | * @return void 82 | */ 83 | public function generate(): void 84 | { 85 | foreach ($this->input_files as $file) { 86 | $filename = str_replace($this->input_directory, '', $file); 87 | $filename = str_replace('/', '.', $filename); 88 | 89 | $contents = file_get_contents($file); 90 | 91 | $file_new = fopen($this->output_directory . $filename, 'w'); 92 | fwrite($file_new, Haniel::transform($contents)); 93 | fclose($file_new); 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /vendor/kurumi/Kurumi/Haniel.php: -------------------------------------------------------------------------------- 1 | {{ 'hello' }} ==> 16 | | -> {! 'hello' !} ==> 17 | | -> { $var = 123 } ==> 18 | | -> @if (true): ==> 19 | | -> @elif (true): ==> 20 | | -> @else: ==> 21 | | -> @endif ==> 22 | | -> @each ($items as $i): ==> 23 | | -> @endeach ==> 24 | | -> @include ('home') ==> 25 | | -> @asset ('style.css') ==> 26 | | -> @slot ==> 27 | | -> @method ("put") ==> 28 | | -> @css ("index.css") ==> 29 | | -> @javascript ("main.js") ==> 30 | */ 31 | 32 | class Haniel 33 | { 34 | private static string $contents; 35 | 36 | private static function _parse($pattern, $replace, bool $isPHP = TRUE): void 37 | { 38 | if ($isPHP) { 39 | $replace = "\n"; 40 | } 41 | 42 | self::$contents = preg_replace($pattern, $replace, self::$contents); 43 | } 44 | 45 | public static function transform(string $contents): string 46 | { 47 | self::$contents = $contents; 48 | 49 | self::_parse('/\{{([\s\S]*?)\}}/', 'echo htmlspecialchars($1)'); 50 | self::_parse('/\{!([\s\S]*?)\!}/', 'echo $1'); 51 | self::_parse('/\{([\s\S]*?)\}/', '$1'); 52 | self::_parse('/@if\s*\((.*)\)\s*:\s*/', 'if ($1):'); 53 | self::_parse('/@elif\s*\((.*)\)\s*:\s*/', 'elseif ($1):'); 54 | self::_parse('/\@else\s*:\s*/', 'else:'); 55 | self::_parse('/@endif/', 'endif;'); 56 | self::_parse('/@each\s*\((.*)\)\s*:\s*/', 'foreach($1):'); 57 | self::_parse('/@endeach/', 'endforeach;'); 58 | self::_parse('/@include\s*\((.*)\)\s*/', 'require __DIR__ . "/" . $1 . ".kurumi.php"'); 59 | self::_parse('/\@asset\s*\((.*)\)\s*/', 'echo $1'); 60 | self::_parse('/@slot(.*)/', 'include $slot'); 61 | self::_parse('/@method\s*\((.*)\)\s*/', '', FALSE); 62 | self::_parse('/@css\s*\((.*)\)\s*/', '', FALSE); 63 | self::_parse('/@javascript\s*\((.*)\)\s*/', '', FALSE); 64 | self::_parse('/@deus\s*\((.*)\)\s*/', '$this->deusContent($1)'); 65 | self::_parse('/@extends\s*\((.*)\)\s*/', '$__deus->extendContent($1)'); 66 | self::_parse('/@section\s*\((.*)\)\s*/', '$__deus->startContent($1)'); 67 | self::_parse('/@endsection/', '$__deus->stopContent()'); 68 | self::_parse('/@component\s*\((.*)\)\s*/', '$this->slot($1)'); 69 | // self::_parse('/Key | 14 |Value | 15 |
escape($k) ?> | 20 |dump($value) ?> | 21 |
escape($code) ?>
38 |
39 |
40 |
41 | dumpArgs($frame); ?>
42 |
43 |