Download the PHP package enicore/ravenapi without Composer

On this page you can find all versions of the php package enicore/ravenapi. 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 ravenapi

Raven API Framework

Raven API is a lightweight PHP framework for building APIs quickly and efficiently. It provides essential tools for handling requests, managing sessions, interacting with databases, routing, and more, all wrapped in a modular structure ideal for API development.

Installation

To copy from a local directory, add the following configuration in your composer.json:

Usage

In , initialize the program:

Directory structure

Classes will be auto-loaded according to their namespaces relative to . For example:

Routing

The requests will be routed to controllers based on the POST or GET values: "controller" and "action". For example:

Controllers will be loaded from the namespace. Their class names must be suffixed with , and the action methods must be suffixed with . For example:

Parameters can be obtained by using the class, for example:

The controller action should return an array of parameters that will be passed back to the frontend:

The above result will be returned as:

You can also use the class to send the same response:

To send an error response, use the method (with optional data that can be passed as the second parameter):

Error responses are returned with header 200 just like successful responses, but with the "success" parameter set to false. The above response will be returned as:

Authentication

By default, all routes require authentication. To allow access to a route without authentication, add the annotation to the method:

Dependency Injection

To use dependency injection in your classes, use the trait:

This will make all the framework singletons directly available in the class. The injected classes will be created on first access. Controllers inheriting from and Models inheriting from already use the trait.

Injection is done using the magic method. If your class already uses this method for other purposes, you can inject the dependencies manually calling in the constructor of the class. In this case, all the dependencies will be created right away.

To access the dependencies directly, use their method, for example:

License

Raven API is licensed under the MIT License. See LICENSE for more information.


All versions of ravenapi with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-pdo Version *
ext-openssl Version *
ext-zlib Version *
ext-fileinfo Version *
ext-gd Version *
ext-intl Version *
enshrined/svg-sanitize Version ^0.15.4
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 enicore/ravenapi contains the following files

Loading the files please wait ....