Mecha CMS

Learn.

Files

Author: Taufik Nurrohman · 248 Views

Tweet

Files and folders structure.

.\
 ├── engine\
 │   ├── kernel\
 │   │   └── …
 │   ├── plug\
 │   │   └── …
 │   ├── ignite.php
 │   └── fire.php
 ├── lot\
 │   ├── asset\
 │   │   └── …
 │   ├── cache\
 │   ├── extend\
 │   │   ├── …
 │   │   └── plugin\
 │   │       ├── engine\
 │   │       └── lot\
 │   │           └── worker\
 │   │               ├── …
 │   │               ├── art\
 │   │               └── markdown\
 │   ├── language\
 │   │   ├── …
 │   │   └── en-us.page
 │   ├── page\
 │   │   └── …
 │   ├── shield\
 │   │   ├── …
 │   │   └── document\
 │   └── state\
 │       └── config.php
 ├── .htaccess
 ├── favicon.ico
 ├── index.php
 └── LICENSE
  • Mecha consists of two main folders, they are named as engine and lot.
  • The engine folder is exists to be used as the way it is named: to store the engine. Classes and their function helpers are stored in this folder.
  • The lot folder is used to store the site data. This is the storage folder. It consists of an asset folder used to store static files and folders that are accessible in the public; a cache folder to store cache files that are generated by the engine, extensions or plugins; an extend folder to store the site extensions; a language folder to store the language data; a page folder to store the pages; a shield folder to store the site themes; and a state folder to store the saved configuration data.
  • Each folders within the lot folder will have their own PHP constant that is generated automatically. For example, the page folder will have a PAGE constant with value of .\www\lot\page and the language folder will have a LANGUAGE constant with value of .\www\lot\language. Adding a foo folder here will automatically adds a new constant called FOO with value of .\www\lot\foo. This “folder to constant” conversions are works by replacing lower–cased words into upper–cased words, - to _ and . to __.

An extension folder is stored in lot\extend that is normally will be structured like this:

my-extension\
 ├── engine\
 │   ├── kernel\
 │   │   └── …
 │   ├── plug\
 │   │   └── …
 │   └── fire.php
 ├── lot\
 │   ├── asset\
 │   │   └── …
 │   ├── language\
 │   │   ├── …
 │   │   └── en-us.page
 │   └── state\
 │       └── config.php
 └── index.php

Related: Extension

A plugin folder is stored in lot\extend\plugin\lot\worker that is normally will be structured like this:

my-plugin\
 ├── engine\
 │   ├── kernel\
 │   │   └── …
 │   ├── plug\
 │   │   └── …
 │   └── fire.php
 ├── lot\
 │   ├── asset\
 │   │   └── …
 │   ├── language\
 │   │   ├── …
 │   │   └── en-us.page
 │   └── state\
 │       └── config.php
 └── index.php

Related: Plugin

A shield folder is stored in lot\shield that is normally will be structured like this:

my-shield\
 ├── asset\
 │   ├── css\
 │   │   ├── my-shield.css
 │   │   └── my-shield.min.css
 │   └── js\
 │       ├── my-shield.js
 │       └── my-shield.min.js
 ├── state\
 │   └── config.php
 ├── 404.php
 ├── about.page
 ├── footer.php
 ├── header.php
 ├── index.php
 ├── page.php
 └── pages.php

Related: Shield

0 Comments

No comments yet.