{"id":14973873,"url":"https://github.com/sherifabdlnaby/ciro","last_synced_at":"2025-10-27T02:31:41.701Z","repository":{"id":98972640,"uuid":"115346161","full_name":"sherifabdlnaby/Ciro","owner":"sherifabdlnaby","description":"MVC PHP Framework to kickstart personal projects. Designed to be simple and lightweight. Demonstrate core building blocks for a PHP Framework.","archived":false,"fork":false,"pushed_at":"2018-05-16T18:09:31.000Z","size":1540,"stargazers_count":23,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-11T09:05:38.052Z","etag":null,"topics":["custom-routing","layouts","mongodb","mvc-framework","mysql","php","php-framework","php5","php7","pretty-urls","psql"],"latest_commit_sha":null,"homepage":"https://sherifabdlnaby.github.io/Ciro-PHP-Framework/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sherifabdlnaby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-12-25T15:08:50.000Z","updated_at":"2023-03-27T15:03:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d27cbf5-9a05-46cc-8653-7440460a5452","html_url":"https://github.com/sherifabdlnaby/Ciro","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherifabdlnaby%2FCiro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherifabdlnaby%2FCiro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherifabdlnaby%2FCiro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherifabdlnaby%2FCiro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sherifabdlnaby","download_url":"https://codeload.github.com/sherifabdlnaby/Ciro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219861939,"owners_count":16555980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-routing","layouts","mongodb","mvc-framework","mysql","php","php-framework","php5","php7","pretty-urls","psql"],"created_at":"2024-09-24T13:49:36.930Z","updated_at":"2025-10-27T02:31:35.917Z","avatar_url":"https://github.com/sherifabdlnaby.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![header](https://user-images.githubusercontent.com/16992394/35495122-0022aab8-04c8-11e8-8d3c-410aafd331d3.jpg)\n\n# Ciro PHP Framework\nCiro is a MVC PHP Framework to kickstart projects rapidly, it's designed to be simple, configurable, modular, decoupled, extensible and lightweight to make it easier to build better and easily maintained PHP code.\n\n\nOut of the box Ciro comes with :\n- **Namespaced PSR-4 structure**\n- **Single Entry Point PHP App**\n- **Pretty Urls Support**\n- **Default Routes**\n- **Custom Routes**\n- **Views Layouts**\n- **Alerts \u0026 Flash Messages**\n- **Custom Error Pages**\n- **Exceptions \u0026 Errors Handler** with logging\n- Database helper classes for **Mysqli**, **PDO**, and **MongoDB**\n- **Composer's autoloading**\n- for **Views**, default template comes with \n    - **Bootstrap 4**\n    - **Jquery 3.2.1** \n    - **Font Awesome 5**\n    \n    \nCiro comes with a template project with a simple authentication system to kickstart developing for you project or prototype.\n\nOnline example of the framework template project: https://ciro-framework.herokuapp.com\n\n---- \n# Index\n\n- [Requirements](#requirements)\n- [Kickstart Installation](#kickstart-installation)\n- [Template Project](#template-project)\n- [Documentation](#documentation)\n    - [1. Project Structure](#1--project-structure)\n    - [2. Routing](#2--routing)\n    - [3. Controllers](#3--controllers)\n    - [4. Session \u0026 Alerts](#4--session-and-alerts)\n    - [5. Layouts and Views](#5--layouts-and-views)\n    - [6. Exception \u0026 Error Handler](#6--exception-and-error-handler)\n    - [7. Database Classes](#7--database-classes)\n- [License](#license)\n\n\n# Requirements\n\n- PHP 5.6 or greater.\n    * (PHP 7.0+ if you're using MongoDB helper class)\n- Apache Web Server or equivalent with mod rewrite support.\n\n# Kickstart Installation\n1. Download Ciro PHP Framework \n2. Download \u0026 install XAMPP with PHP 5.6+ (7.0+ Recommended) from [Here](https://www.apachefriends.org/download.html \"Download Xampp\").\n3. Copy Ciro PHP Framework folder contents to `C:\\xampp\\htdocs` for windows or `/Applications/XAMPP/xamppfiles/htdocs` for mac.\n4. **OR** Configure XAMPP's Apache's `httpd.conf` Directory root to Ciro's Directory, see instructions: [Here](https://stackoverflow.com/questions/18902887/how-to-configuring-a-xampp-web-server-for-different-root-directory \"Stackoverflow\").\n5. Open XAMPP and start both Apache and Mysql.\n6. Go to [localhost](http://localhost \"Go to Localhost\") and start developing!\n\n\n* To Use the pre-made Login/Register, and you're **using SQL** (not Mongo) you must create the database and tables in SQL.\n    - Go to `http://localhost/phpmyadmin` and execute the query in `sql_database_script.sql` that exists in the root directory. \n\n* To Use the pre-made Login/Register, and you want to be **using MongoDB** you must install `mongodb extension` and `MongoDB PHP Library` using composer, instructions [Here](#mongodb-installation).\nalso replace `Models/UserRepository.php` with `Models\\.disabled.mongo.userrepository.class.php` to use the MongoDB version.\n\n# Template Project\n- The Framework comes with a blank template project contains a Homepage and a simple extensible User's Register/Login/View with 3 variants of 'User Repository' depending on your Database and extension of choice.\n    - `Mysqli` version for MySql. \n    - `PDO` Version for PDO supported RDBMS(s).\n    - `MongoDB` version (php 7.0+).\n\n All configurable via the config files.\n \n \n- Online preview of the framework template project: https://ciro-framework.herokuapp.com\n\n![homepage](https://user-images.githubusercontent.com/16992394/35495101-d3b9e9e6-04c7-11e8-8afd-dbae75cf8a1b.jpg)\n \n___________\n\n# Documentation\n\n\n## 1- Project Structure\n\nThe Project Structure follows namespaced PSR-4 specifications. \n\n```text\n+---Config              \u003c- Contains Configurations Files.\n+---Controllers         \u003c- Contains a Dir for each Route each contains this Route's Controllers.  \n+---Core                \u003c- Contains Core Classes for the framework\n+---Logs                \u003c- Contains Logs created by the scripts (e.g Exception Handler logs)\n+---Models              \u003c- Contains Models (can be sub-directoried using namespaces using PSR-4 specs. \n+---Utilities           \u003c- Contains Utility Classes. \n+---Vendor              \u003c- Composer's Vendor Dir, contains autoloader code and third-party packeges.        \n+---Views               \u003c- Contains Views, a Dir for each route, each contains a Dir for each Controller.\n|   +---_FullMessages     \u003c- Contains Full Messages HTML designs.\n|   +---_Layouts          \u003c- Contains Layouts       \n+---Webroot             \u003c- Public Dir contains the single point of entry of the program, and all public assets.\n```\n\n___________\n\n## 2- Routing\n\n### 2.1 Default Route\n\nIn Ciro a default URL route has the following structure:\n```\nhttp://example.io/{route}/{controller}/{action}/{param1?}/{param2?}/...\n```\nThis url resolves to the method `{action}` of controller `{controller}` in namespace `controllers/{route}` so in PHP OOP notation corresponds to: \n```php\nApp\\Controllers\\{route}\\{controller} -\u003e {action}\n```\n\nIn configuration _`Config/config.php`_, you can specify A 'default_route' so if a url doesn't contain a route, the program will route according to default route. by default the 'default_route' is 'Web'.\nSo, a typical URL using default route will have the following structure:\n```\nhttp://example.io/{controller}/{action}/{param1?}/{param2?}/...\n```\nso in PHP OOP notation corresponds to: \n```php\nApp\\Controllers\\Web\\{controller} -\u003e {action}\n```\n\nAnother example:\n```text\n                                        for $id\nhttp://example.io/{controller}/{action}/{param1}\nhttp://example.io/  Product   /  View  /  6800  \n```\n\n* if the Url doesn't specify `{action}`, the program to route to the 'default_action' specified in 'Config/config.php'.\n\n* if the Url doesn't specify `{controller}`, the program to route to the 'default_controller' specified in 'Config/config.php'.\n\n* to add a new route and access it using default routing, you must add it in **`Config/config.php`** Routing table.\n\n#### Passing Params to Controllers\nGiven this url for example: \n```text\n                                        for $id   $color\nhttp://example.io/{controller}/{action}/{param1}/{param2}\nhttp://example.io/  Product   /  View  /  6800  /  red\n```\n\n- Params are accessible inside the Controller's method via **`$this -\u003e params[0..*]`** array, for example **`$this-\u003eparams[0]`** holds the value of **`{param1}`** in the url above.\n\n- Another way to access params inside the Controller's method is by adding arguments to the controller's method itself.\nusing the same example above, if **`ProductController -\u003e View`** is defined like this:\n    ```php\n    class ProductController extends WebController {\n        public function view($id, $color = 'white'){\n            /* controller's method code here */\n        }\n    }\n    ```\n\n**`$id`** will have the value of _`{param1}`_, **`$color`** will have the value of _`{param2}`_ and so on...\n\n**Notice** that if `{param2}` wasn't in the URL, `$color` will use the default value specified, however if `{param1}` wasn't in the URL, the Program is going to render a **`404: Not Found`** Message because `$id` has no default value specified in the controller's method. \n\n### 2.2 Custom Routes\n\n- Custom Routes give you the possibility to **specify a URL with a specific pattern** that if matched the URL is routed to the specified **`{route}\\{controller}::{action}`** with the proper specified params.\n- Custom Routes can be Enabled/Disabled in **`Config/config.php`**.\n- You can specify a custom route for every REST HTTP Verb e.g(` GET, POST, PUT, DELETE, etc` ) or specify a custom route for All possible HTTP verbs using:\n    ```php\n    // for GET requests\n    Route::get($uri, $route, $controller, $action);\n    \n    // same for POST, PUT, DELETE, etc requests\n    Route::post(), Route::put(), Route::delete(), Route::patch(), Route::options();\n    \n    // for ALL requests\n    Route::all();\n    ```\n\n- Custom Routes are defined in **/Config/routes.php**.\n\n    ```php\n    Route::get('custom/route/{id}/{name}/{language?}','Web', 'Home', 'CustomRouteAction');\n    ```\n    Any URL that matches `custom/route/{id}/{name}/{language?}` will be routed to: **Route: `Web`**  **Controller: `Home`**  **Action: `CustomRouteAction`**.\n    \n#### Passing params using custom routes:\n- Params should be surrounded by curly braces **`{ name }`**, optional params should have a **`'?'`** at the end of their names **`{ optinoalParam? }`**.\n- Params are accessible inside the Controller's method via **`$this -\u003e params[0..*]`** array and are ordered respectively to the order of them in the URL.\n    - in the above example,` $this -\u003e param[0] `corresponds to `{id}`, `$this -\u003e param[1]` corresponds to `{name}`, etc\n- If Controller's method has params defined, params are passed to this method ordered respectively to the order of them in the URL.\n\nA Controller's Method of a custom route should be defined as follows:\n```php\nclass HomeController extends WebController {\n    public function CustomRouteAction($id, $name, $language = 'default'){\n        /* controller's method code here */\n    }\n}\n```\n**Note** in the above example: **`{language?}`** is an optional param, optional params should have a **`'?'`** at the end of their names, and should have a default value in the Controller's method, otherwise if the param is missing, the program will render a **`404: Not Found`** Message because an optional param was not given and has no default value.\n\n#### General Pattern Routing:\n\nWhen setting a custom route, you can put a variable param in the target `route`, `controller` or `action` to create a more 'general' custom route.\n\nExample:\n```php\nRoute::get('custom/{var_controller}/pattern/{action}/{param1}','Web', '{var_controller}', '{action}');\n```\n\nAny URL that matches `custom/{var_controller}/pattern/{action}/{param1}`\n\nwill be routed to: **Route: `Web`**,  **Controller: `{var_controller}`** , **Action: `{action}`** and params will not include neither `{var_controller}` nor `{action}` because they were used in the routing.\n\nso if a request with URL = **custom/`Account`/pattern/`View`/`sherifabdlnaby`** came it\nwill be routed to: **Route: `Web`**,  **Controller: `Account`** , **Action: `View`** and params[0] = '`sherifabdlnaby`'\n\n    \n    \n    \n    \n___________\n    \n    \n    \n    \n    \n## 3- Controllers\n\n- Controller are responsible for processing users requests and returning the output for the user either as a HTML for `WebControllers`, or JsonResult for `ApiControllers`, or redirect to another destination.\n\n- Controllers Directory should match the controller's namespace and should be as follows **`Controllers\\{route}\\{ControllerName}Controller.php`** and using the namespace **`App\\Controllers\\{route}`** where `{route}` is the route where this controller belongs to.\n```text\n+---Controllers\n|   +---Api     \u003c-- Api route dir.\n|   |    HomeController.php     \u003c-- Home Controller for API route.\n|   |       \n|   \\---Web     \u003c--  Web (Default) route dir.\n|        AccountController.php\n|        HomeController.php     \u003c-- Home Controller for Web default route.\n```\n- a controller has 4 protected variables that it utilizes:\n    ```php\n    $params;   // array() that holds method's params\n    $model;    // controller's model\n    $data;     // the $data array() is what is passed to the controller's view.\n    $meta;     // the $meta array() is what is passed to $layout meta section (for WebControllers Only)\n    ```\n    \n- The output of a controller (and what the user sees) is what is **returned** via it.\n\n- Controllers in Ciro have various functions to use when returning output inside controllers to ease these tasks.\n### Controllers Functions\n\n#### 1. render()\n\nRender will render an HTML webpage using a layout, a layout contains header, metadata section, alerts, body, and footer.\nThe body section of the layout is determined according the controller's method viewpath. \n\nThe controller's view uses the $data[] array to render its elements, and the metadata section uses the $meta[] array.\n\n```php\nrender($layout = null, $viewPath = null, \u0026$data = null, \u0026$meta = null);\n```\n| Arg       | Description                                     | Default-value                                         |\n|-----------|-------------------------------------------------|-------------------------------------------------------|\n| `$layout`   | Specifies the view layout used to render        | Default layout specified in `config.php`              |\n| `$viewPath` | Specifies the path for the view to render       | View determined according to Controller's method name |\n| `$data`     | the `$data` array() view will have access too   | The Controller's own `$data` array()                  |\n| `$meta`     | the `$meta` array() layout will have access too | The Controller's own `$meta` array()                  |\n\n**return** **`$this-\u003erender();`** without any given arguments (using default values) will be sufficient in 90% of the cases.\n\nBasic usage of $this -\u003e render();\n```php\nclass AccountController extends WebController {\n    public function View($username){\n        $this -\u003e data['name'] = $username;\n        return $this-\u003erender();\n    }\n}\n```\n\n#### 2. renderFullError() | renderFullMessage()\n\nrenderFullError and renderFullMessage will render a custom message/error page. if a status code is given in 2nd parameter the controller send the corresponding HTTP status code header and renders this code's view.\n\n```php\nfunction renderFullError($message, $statusCode = null, $layout = null);\nfunction renderFullMessage($message, $statusCode = null, $layout = null);\n```\n| Arg         | Description                                     | Default-value                                         |\n|-------------|-------------------------------------------------|-------------------------------------------------------|\n| `$message`    | A message to be rendered in the view.           | NONE (Required field)                                 |\n| `$statusCode` | HTTP Status Code                                | null                                                  |\n| `$layout`     | Specifies the view layout used to render        | Default layout specified in `config.php`              |\n\nBasic usage of $this -\u003e renderFullError() / renderFullMessage();\n```php\nclass AccountController extends WebController {\n    public function View($username){\n        if(/* User Found */)\n            return $this-\u003erender();\n        else\n            return $this-\u003erenderFullError('User not found!', 404);\n    }\n}\n```\n\n\u003e if any exception was raised during script execution the framework will render a 500 Internal Server Error custom error page.\n\n#### 3. redirect()\n\nWhen returning $this -\u003e return() from a controller's no output is sent to the user but the user is redirected to the given URL. \n\n```php\n function redirect($path);\n```\n\n| Arg         | Description                                     | Default-value                                         |\n|-------------|-------------------------------------------------|-------------------------------------------------------|\n| $path       | A `Relative` or `Full` Path to be redirected to     | NONE (Required field)                                 |\n\n\nBasic usage of $this -\u003e redirect();\n```php\nclass AccountController extends WebController {\n    public function Login($username, $password){\n        if(/* Login Success */)\n            return $this-\u003eredirect('/');   // redirect to homepage.\n        else\n            return $this-\u003erenderFullMessage('Incorrect Username or Password', 401);\n    }\n}\n```\n\n#### 4. verifyLoggedIn() / verifyNotLoggedIn()\n\nCheck if User is/n't logged in, redirect to homepage/login if not.  \n\nThese functions are not used by return statement, however it stops script if they are redirecting the user, which means any code below this functions will not be executed if their validation is false;\n\n```php\n function verifyLoggedIn();\n function verifyNotLoggedIn();\n```\n\nBasic usage of $this -\u003e verifyLoggedIn() / verifyNotLoggedIn();\n```php\nclass AccountController extends WebController {\n    public function Login($username, $password){\n    \n        $this -\u003e verifyNotLoggedIn();   //Redirects to Homepage if user is already logged in.\n        \n        if(/* Login Success */)\n            return $this-\u003eredirect('/');\n        else\n            return $this-\u003erenderFullMessage('Incorrect Username or Password', 401);\n    }\n}\n```\n___________\n\n## 4- Session and Alerts\n\nThe Session Class is an extensible class that will manage the usage of $_`SESSION` across the programs to enforce single responsibility principle.\n```php\n/* Save Parameters to $_SESSION, use for Login */\npublic static function saveLoginSession($_id, $username);\n\n/* Return TRUE if user is logged On */\npublic static function isLoggedIn();\n\n/* Unset and Destroy current Session, use for logout */\npublic static function destroyLoginSession();\n\n/* Add Error Alerts to be rendered to user when controller's $this -\u003e render() is called */\npublic static function addErrorAlert($errorAlert);\n\n/* Add Warning Alerts to be rendered to user when controller's $this -\u003e render() is called */\npublic static function addWarningAlert($warningAlert);\n\n/* Add info Alerts to be rendered to user when controller's $this -\u003e render() is called */\npublic static function addInfoAlert($infoAlert);\n\n/* Add success Alerts to be rendered to user when controller's $this -\u003e render() is called  */\npublic static function addSuccessAlert($successAlert);\n\n```\n\n### What are alerts ?\n- Alerts are flash messages saved in user's sessions, alerts can then be showed to user either by rendering as an HTML or encoding them in JSON in-case of an API.\n\n- Alerts can be used to show errors about form-validation, or a message if a process succeeded or failed.\n\n- Alerts have their own section in any layout, Controller -\u003e render() function will render any alerts stored in User Session. \n\n- There are 4 types of Alerts:\n    - **Error Alerts**, used in displaying errors.\n    - **Warning Alerts**, used in displaying warnings.\n    - **Info Alerts**, used in displaying information, hint or a notice.\n    - **SuccessAlert**, used in displaying success operations.\n    \n![alerts](https://user-images.githubusercontent.com/16992394/35495100-d3191b06-04c7-11e8-88a2-cbcc6ee5bdcd.jpg)\n    \n ___________     \n    \n## 5- Layouts and Views\n\n### 5.1 Layouts\n\nA Layout is the structure of the HTML webpage, it consists of 5 sections\n\n| Section  | Description  |\n|----------|--------------|\n| meta    | This section renders HTML metadata tags for title, desc and SEO tags. metadata passed and filled by Controller and is accessible in the $meta array() |\n| header  | This section renders the page Header  |\n| alerts  | This section renders alerts stored in user's session if any  |\n| content | This section renders Main part of the page, and has its data passed and filled by the controller  |\n| footer  | This section renders the page footer  |\n\n#### A Layout Directory Structure\n```text\n+---Views      \n|   \\---_Layouts    \n|       \\---default             \u003c-- Layout root directory.\n|       |   |   footer.html     \n|       |   |   header.html\n|       |   |   layout.html\n|       |   |   meta.html\n|       |   \\---alerts          \u003c-- alerts directory.\n|       |           errors.html\n|       |           infos.html\n|       |           successes.html\n|       |           warnings.html\n|       \\---anotherLayout\n```\n\nlayout.html is the final file rendered when rendering the layout, it is the structure of which goes over which, etc\nand any CSS/JS that are used in this layout must be included in layout.html such as Bootstrap CSS and JS\n\n#### Basic layout.html structure\n```html    \n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n    \u003chead\u003e\n        \u003c?= $data['meta'] ?\u003e\n    \u003clink rel=\"stylesheet\" href=\"/bootstrap/css/bootstrap.min.css\"\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003c?= $data['header'] ?\u003e\n        \u003c?= $data['alerts'] ?\u003e\n        \u003c?= $data['content'] ?\u003e\n        \u003c?= $data['footer'] ?\u003e\n        \u003cscript src=\"/bootstrap/js/bootstrap.min.js\"\u003e\u003c/script\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\n![layout](https://user-images.githubusercontent.com/16992394/35495104-da074ec4-04c7-11e8-915b-ec0e224a352f.jpg)\n\n### 5.2 Views\nA view is the output of a web controller's action, a view has a $data assoc array which is passed by the controller, It is used to pass data between controller and view.\nthe view location must match the controller path/namespace structure.\n\n- Example for action **`View`** of **`Account Controller`** in the **`Web`** Route\n\n```text\n+---Controllers\n|   +---Api\n|   |       HomeController.php\n|   |       \n|   \\---Web\n|           AccountController.php  \u003c-- Account Controller of Web route in Controllers\\Web\n|           HomeController.php   \n|      \n+---Views\n|   +---Web\n|   |   +---Account  \u003c-- Account Controller View Dir in Controller\\Web\\Account\n|   |   |       Index.html\n|   |   |       Login.html\n|   |   |       Register.html\n|   |   |       View.html   \u003c-- The View for action 'View', of 'Account Controller' in the 'Web' Route\n|   |   |       \n|   |   \\---Home\n|   |           About.html\n|   |           Index.html\n```\n\n___________\n\n## 6- Exception and Error Handler\n- Exception \u0026 Error Handler can be Enabled/Disabled in **`Config/config.php`**.\n- Exception \u0026 Error handler will convert any error to an ErrorException.\n- If Enabled in configurations, Exception Handler will log any uncaught exceptions or errors.\n- Logs file directory is specified in configurations too.\n\n___________\n\n## 7- Database Classes\nDatabase Helper classes are used to get a singleton instance for Database connections, where connection credentials are store in config files.\n\n#### Classes (in namespace App\\Core)\n\n| Class       | Extension | Description  |\n|-------------|-----------|--------------|\n| DBPdo       | `PDO`       | A Singleton Class for PDO DB Extension, PDO can be used to connect to various RDBMs like MySql, MariaDB, or PostgreSQL, connection credentials set at **`Config\\pdo.php`** and enabled at **`Config/config.php`** |\n| DBSql       | `Mysqli`    | A Singleton Class for Mysqli Extension, connection credentials for mysql set at **`Config\\mysqli.php`** and enabled at **`Config/config.php`** |\n| DBMongo     | `mongodb` using `MongoDB PHP Library` (Php 7.0+)  | A Singleton Class for a connection of MongoDB PHP Library that is built around low-level `mongodb` extension, credentials are stored at **`Config\\mongo.php`** and enabled at **`Config/config.php`** |\n\n- **Note:** DBMongo requires **`mongodb`** extension and **`MongoDB PHP Library`**, which both requires PHP 7.0+\n\n#### MongoDB Installation\n- to install **mongodb** extension : http://php.net/manual/en/mongodb.installation.php\n- to install **MongoDB PHP Library** : https://docs.mongodb.com/php-library/current/tutorial/install-php-library/\n    - Composer: `composer require mongodb/mongodb`\n    * Ciro is already using composer autoload, just run the command above and you're cool.\n\n___________\n\n\n# License\nCiro PHP Framework is under the MIT License, you can view the license [Here](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsherifabdlnaby%2Fciro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsherifabdlnaby%2Fciro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsherifabdlnaby%2Fciro/lists"}