A Small modular PHP framework Build for web applications

Overview

MagmaCore__

This project is in active development. So is evolving constantly. As soon project gets to stable point. Due notice will be given

Composer Check

Note MagmaCoreStarter requires the MagmaCore__ framework as its dependency. Ensure all dependency is present within your composer.json file.

composer require magmacore/magmacore
composer require phpunit/phpunit
composer require phpmailer/phpmailer
composer require symfony/console

Env Check

By default the MagmaCoreStarter package comes with a .envExample file. You should rename this to .env and ensure the following fields are filled out.

DB_DRIVER=mysql - the database default driver - This is only mysql for the time being
DB_HOST=127.0.0.1 - the address for your webserver. Provided by your web host provider
DB_NAME=lavacms - the name of your database
DB_USER=root - the secure username for your database
DB_PASSWORD= - By default local development doesn't require a password LIVE SERVERS DOES!!!
DB_PREFIX=__magmaCore__ - a prefix which gets append to your database table names
DB_PORT=3306 - defaults database port

Installation

The main package can be installed using composer from your terminal.

composer require magmacore/magmacore-starter

Getting Started

There's 2 .htaccess file the first one located within the main root directory. Which takes the incoming request which routes this to the **public/index.php file. This index.php file handles the initialization of the application. This file is also used to load all the main component within the framework i.e session, cache, routing, error-handling etc...

Your basic index file should look like below.

require_once 'include.php';

use MagmaCore\Utility\Yaml;
use MagmaCore\Logger\LogLevel;
use MagmaCore\Base\BaseApplication;

try {
    BaseApplication::getInstance()
        ->setPath(ROOT_PATH)
        ->setConfig(Yaml::file('app'))
        ->setErrorHandler(Yaml::file('app')['error_handler'], E_ALL)
        ->setSession(Yaml::file('app')['session'], null, true)
        ->setCookie([])
        ->setCache(Yaml::file('app')['cache'], null, true)
        ->setRoutes(Yaml::file('routes'))
        ->setLogger(LOG_PATH, Yaml::file('app')['logger_handler']['file'], LogLevel::DEBUG, [])
        ->setContainerProviders(Yaml::file('providers'))
        ->run();
} catch (Exception $e) {
    echo $e->getMessage();
}
You might also like...
Elgg is an open source rapid development framework for socially aware web applications.

Elgg Elgg is an open source rapid development framework for socially aware web applications. Features Well-documented core API that allows developers

Asynchronous & Fault-tolerant PHP Framework for Distributed Applications.
Asynchronous & Fault-tolerant PHP Framework for Distributed Applications.

Kraken PHP Framework ~ Release the Kraken! Note: This repository contains the core of the Kraken Framework. If you want to start developing new applic

Asynchronous server-side framework for network applications implemented in PHP using libevent

phpDaemon https://github.com/kakserpom/phpdaemon Asynchronous framework in PHP. It has a huge number of features. Designed for highload. Each worker i

Mind is the PHP code framework designed for developers. It offers a variety of solutions for creating design patterns, applications and code frameworks.
Mind is the PHP code framework designed for developers. It offers a variety of solutions for creating design patterns, applications and code frameworks.

Mind Mind is the PHP code framework designed for developers. It offers a variety of solutions for creating design patterns, applications and code fram

Framework for building extensible server-side progressive applications for modern PHP.
Framework for building extensible server-side progressive applications for modern PHP.

Chevere 🔔 Subscribe to the newsletter to don't miss any update regarding Chevere. Framework for building extensible server-side progressive applicati

An issue tracking tool based on hyperf+reactjs for small and medium-sized enterprises, open-source and free, similar to Jira.
An issue tracking tool based on hyperf+reactjs for small and medium-sized enterprises, open-source and free, similar to Jira.

介绍 本项目以 actionview 为蓝本,使用 Hyperf 框架进行重写。 本项目为 Hyperf 框架的 DEMO 项目 原 ActionView 介绍 English | 中文 一个类Jira的问题需求跟踪工具,前端基于reactjs+redux、后端基于php laravel-frame

LODSPeaKr is a framework for creating Linked Data applications in a simple and easy way

LODSPeaKr is a framework for creating Linked Data applications in a simple and easy way. You can see several applications created using LODSPeaKr.

This extension provides a view renderer for Pug templates for Yii framework 2.0 applications.

This extension provides a view renderer for Pug templates for Yii framework 2.0 applications.

Releases(1.4.0)
Owner
Ricardo Miller
Ricardo Miller
TrailLamp is a lightweight, easy-to-use Php MVC framework that can be used to build web applications and REST APIs.

TrailLamp Introduction TrailLamp is a lightweight, easy-to-use Php MVC framework that can be used to build web applications and REST APIs. Installatio

Etorojah Okon 14 Jun 10, 2022
StaticPHP - Simple, modular php framework

StaticPHP Simple, modular php framework. Requirements PHP 8.1+ Twig 3.0+ Installation There are two ways to start using StaticPHP framework: Docker <-

Gints Murāns 24 Jun 20, 2022
FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Ruby on Rails.

FlyCubePHP FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Rub

Anton 1 Dec 21, 2021
Framework X – the simple and fast micro framework for building reactive web applications that run anywhere.

Framework X Framework X – the simple and fast micro framework for building reactive web applications that run anywhere. Quickstart Documentation Tests

Christian Lück 620 Jan 7, 2023
🍃Termwind allows you to build unique and beautiful PHP command-line applications, using the Tailwind CSS API

Termwind allows you to build unique and beautiful PHP command-line applications, using the Tailwind CSS API. In short, it's like Tailwind CSS, but for the PHP command-line applications.

Nuno Maduro 1.8k Jan 3, 2023
A magic PHP framework. Build reactive web apps without writing HTML, CSS, or JavaScript! Powered by Tailwind, Alpine, Laravel, & Livewire.

Malzahar A magic PHP framework. Build reactive web apps without writing HTML, CSS, or JavaScript! Powered by Tailwind, Alpine, Laravel, & Livewire. Re

null 26 Nov 17, 2022
Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.

Slim Framework Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs. Installation It's recommended

Slim Framework 11.5k Jan 4, 2023
Woski is a fast and simple lightweight PHP Framework for building applications in the realm of the web.

Woski is a simple fast PHP framework for the Realm The Project Installation Clone the repository $ composer create-project clintonnzedimma/woski myApp

Clinton Nzedimma 19 Aug 15, 2022
Biny is a tiny, high-performance PHP framework for web applications

Biny is high performance. Framework comes default with response time of less than 1ms. Stand-alone QPS easily up to 3000.

Tencent 1.7k Dec 9, 2022
Easy to use, fast extendable small PHP Framework, like the one you ever missed. The skeleton-APP

About Tufu-Framework Easy to use, fast extendable PHP Framework, like the one you ever missed. Features included such as: Twig and extensions. Fast ro

Giacomo Barbalinardo 0 Jul 2, 2022