GithubHelp home page GithubHelp logo

geekwolverine / micro-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juststeveking/micro-core

0.0 0.0 0.0 57 KB

A collection of core components to be used within the micro boilerplate for slim framework.

PHP 100.00%

micro-core's Introduction

Micro Core

A collection of core components to be used within the Micro boilerplate for slim framework.

The aim of this package is to provide a consistent way to start the SlimPHP project, allowing you to implement the concrete implementations based off of Interfaces provided by the core.

Interfaces

The main interface is our KernelContract, this is the entrypoint to the application. It is where Slim is built and where we add our container.

It is recommended here that you do something like this:

use JustSteveKing\Micro\Contracts\KernelContract;
use JustSteveKing\Micro\Kernel;
use Psr\Container\ContainerInterface;

return [
    KernelContract::class => function (ContainerInterface $container) {
        return Kernel::boot(
            basePath: __DIR__ . '/../', // this is the path to the root of your project.
            container: $container, // this will be the build container.
        );
    },
];

In the example above we are adding an entry into our container for the Kernel, using the default provided kernel and passing in the base options. You can easily override this Kernel class yourself - just ensure it implements the same Interface.

micro-core's People

Contributors

juststeveking avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.