Download the PHP package zaek/framy without Composer

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

Framy

Simple php framework will be useful for creating provisional endpoints in frontend development.

Start

Create entrypoint for you scripts and define configuration as mentioned in the next part

Routing

You can overwrite default router calling the setRouter method

Router syntax:

Method

Method must be one of the following: GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|CLI
Skip the method definition mean that URI is accessible by any of knowing methods

Response type

You could specify response type

URI

URI may be static...

...or dynamic

where dynamic group defines with the expression:

Target

Target can be a callback function, an array contains function name, an array with class name and method name (method must be static for class names not object), or an object implements \Zaek\Framy\Action interface

Examples

REST

REST route creates following links:

Route key uses as route key e.g. for /projects is project_id, for /users is user_id etc.

Prefix

For grouping URIs by prefix you can use class RoutePrefix:

RoutePrefix handles as array, so you can group prefixes inside other prefix and combine RoutePrefix with standard route:

Example for versioning:

Proxy

Proxying all responses in group with a callback:

Config

Name Type Default Value Description
homeDir string $_SERVER['DOCUMENT_ROOT'] The root directory of web server
routes array - List of routing rules will be applyed
dataDir string - The directory where will be store all data (built-in file-based DB)
useDefault bool true Use default framework settings (see below in section default setup)

Default setup

The default functionality provided by Framy will place:

User with the following properties
Status=ok in JSON response

Every action has JSON response will be complete with {status:'ok'} flag

Routes to api

Built-in sign-up action is placed in ./bin directory. The useDefault option will add the route to such script.

Built-in API

URI Method Params Return
/framy/signUp POST login
password
email
{userId:(int)}

All versions of framy with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
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 zaek/framy contains the following files

Loading the files please wait ....