Download the PHP package horizom/core without Composer

On this page you can find all versions of the php package horizom/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package core

horizom/core

Total Downloads Latest Stable Version License PHP Version PHPUnit

The core of the Horizom framework - a PSR-oriented PHP 8 micro-framework built around a DI container, a service provider system, a router, and a PSR-15 middleware pipeline.

Note: This repository contains the Horizom core code. To create a complete application, see the main repository horizom/app.


Table of Contents


Requirements

Dependency Minimum version
PHP 8.0
ext-mbstring *
ext-openssl *

Installation


Quick Start


Architecture


Components

Application (App)

App is the framework's central singleton. It orchestrates the DI container, the middleware dispatcher, and the router.

Service Binding

PSR-15 Middlewares

Configuration

Running


Configuration (Config)

Config extends Illuminate\Support\Collection with default values merged automatically at construction time.

Default values:

Key Default value
app.name 'Horizom'
app.env 'development'
app.base_url 'http://localhost:8000'
app.timezone 'UTC'
app.locale 'en_US'
app.exception_handler false
app.display_exception false
providers []
aliases []

DI Container (Container)

Container extends DI\Container (php-di) by adding service provider management.


Service Providers

Service providers encapsulate feature initialization. Two methods are available: register() for DI binding and boot() for post-registration initialization.

Registration in configuration:

Default providers:

Provider Role
CoreServiceProvider Defines the HORIZOM_* constants
ExceptionServiceProvider Configures exception handling (Ignition)
ViewServiceProvider Initializes the Blade template engine

Facades

Facades provide convenient static access to container services without tight coupling.

Creating a Custom Facade


Middlewares

All middlewares implement Psr\Http\Server\MiddlewareInterface.

BodyParsingMiddleware

Automatically parses the request body according to Content-Type.

Content-Type Result
application/json array
application/x-www-form-urlencoded array
application/xml / text/xml SimpleXMLElement

ContentLengthMiddleware

Automatically adds the Content-Length header if it is missing.

ExceptionHandlingMiddleware

Delegates unhandled exceptions to an ExceptionHandler injected through DI.


Blade View (View)

Adapter around illuminate/view to use the Blade template engine without Laravel.

Through the global helper:

Through the facade:


Helpers

Global functions available throughout the application.

Function Description
app() Returns the App instance
config($key, $def) Reads a configuration value
url($path) Generates an absolute URL
asset($path) Generates the URL for a public asset
view($name, $data) Renders a view and writes it to output
bcrypt($value) Hashes a value with Bcrypt
base_path($path) Absolute path from the project root
storage_path($path) Path to storage/
public_path($path) Path to public/
resources_path($path) Path to resources/

Tests

The suite covers:

Class Test cases
Config Default values, merging, read/write/exists
Container Registration, force-register, boot, isLoaded
ServiceProvider provides, when, register, boot, defaultProviders
VersionException Default message, code, \Throwable chaining
BodyParsingMiddleware JSON, form-encoded, unknown type, custom parser
ContentLengthMiddleware Header injection, no overwrite when already present
ExceptionHandlingMiddleware Pass-through, delegation, request context propagation

License

Horizom Core is open-source software released under the MIT license.


All versions of core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-mbstring Version *
ext-openssl Version *
http-interop/http-factory-guzzle Version ^1.0
horizom/dispatcher Version ^5.2
horizom/http Version ^5.2
horizom/routing Version ^5.2
illuminate/config Version ^8.0
illuminate/collections Version ^8.0
illuminate/contracts Version ^8.0
illuminate/container Version ^8.0
illuminate/support Version ^8.0
illuminate/view Version ^8.0
middlewares/utils Version ^3.2
nyholm/psr7 Version ^1.5
php-di/invoker Version ^2.1
php-di/php-di Version ^6.0
psr/container Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0
psr/http-server-handler Version ^1.0
spatie/ignition Version ^1.12
vlucas/phpdotenv Version ^5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package horizom/core contains the following files

Loading the files please wait ...