PHPackages                             zorncbllr/php-mono - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. zorncbllr/php-mono

ActiveProject[Framework](/categories/framework)

zorncbllr/php-mono
==================

A Fast, Powerful, and Object Oriented PHP Web Framework.

019PHP

Since Mar 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/zorncbllr/php-mono)[ Packagist](https://packagist.org/packages/zorncbllr/php-mono)[ RSS](/packages/zorncbllr-php-mono/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

MONO - PHP FRAMEWORK
====================

[](#mono---php-framework)

Mono is a powerful, fast, and lightweight PHP framework designed to simplify and accelerate web application development. It leverages an object-oriented approach and adheres to the MVC (Model-View-Controller) architecture, ensuring a clean and modular codebase. Mono also includes a robust command-line interface (CLI) to streamline development tasks.

---

Features
--------

[](#features)

- **Object-Oriented Design**: Promotes reusable and maintainable code.
- **MVC Architecture**: Separates application logic, user interface, and data, fostering scalability.
- **Built-in Command-Line Interface**: Enables developers to manage the project, generate files, and execute tasks efficiently.
- **Hybrid Routing System**: Combines file-based routing with route attributes for flexibility and high performance.
- **Built-in ORM (Object-Relational Mapping)**: Simplifies database interactions with an intuitive and efficient abstraction layer.
- **Twig Templating Engine Integration**: Supports dynamic and flexible rendering of views with the Twig templating engine.
- **Customizable and Lightweight**: Suitable for projects of all sizes, from small-scale applications to enterprise-level solutions.

---

Getting Started
---------------

[](#getting-started)

### Prerequisites

[](#prerequisites)

Ensure that your system meets the following requirements:

- **PHP Version**: PHP 8.0 or higher.
- **Composer**: Installed globally for dependency management.
- **Node**: Installed globally for dependency management.

---

Creating a New Mono Project
---------------------------

[](#creating-a-new-mono-project)

To start a new Mono project, use the following Composer command:

```
composer create-project zorncbllr/php-mono  -s dev
```

Use npm install to install node dependencies.

```
cd
npm install
```

What Happens?

This command will download and set up a fresh Mono project in the directory. All required dependencies will be installed automatically. Serving the Project To quickly serve your project in a local development environment, Mono provides an easy-to-use CLI command.

Steps to Serve:
---------------

[](#steps-to-serve)

Navigate to the root directory of your Mono project.

Run one of the following commands:

```
composer run dev
```

What Happens?

The command starts a local development server, typically accessible at .

This eliminates the need to configure external web servers during development.

Creating a Controller
---------------------

[](#creating-a-controller)

Controllers are a vital part of the MVC architecture. Mono simplifies the creation of controllers through its CLI.

Generating a Controller
-----------------------

[](#generating-a-controller)

Run one of the following commands to generate a new controller:

```
php mono -g con
```

or

```
php mono gen controller
```

or

```
php mono generate controller
```

What Happens?

A new PHP file named .php is created in the controllers directory.

The file contains a boilerplate controller class with a default route handler for the index action.

Example: Generated Controller

Below is an example of a generated Home controller:

```
