Download the PHP package fproject/yii2-restx without Composer

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

yii2-restx

Extended Yii2 Framework RESTful for F-Project server sites

Latest Stable Version Total Downloads Latest Unstable Version Build License

What is it?

ActiveController

Yii2-restx provides class fproject\rest\ActiveController which extends yii\rest\ActiveController with additional REST endpoints and methods in order to work with F-Project framework Flex clients.

By default, the following actions are supported:

You may disable some of these actions by overriding actions() and unsetting the corresponding actions.

To add a new action, either override actions() by appending a new action class or write a new action method. Make sure you also override verbs() to properly declare what HTTP methods are allowed by the new action.

You should usually override checkAccess() to check whether the current user has the privilege to perform the specified action against the specified model.

UrlRule

Yii2-RESTx also provides class fproject\rest\UrlRule to config URL rule for active controllers to accept extended routes.

Class UrlRule is provided to simplify the creation of URL rules for RESTful API support.

The simplest usage of UrlRule is to declare a rule like the following in the application configuration,

The above code will create a whole set of URL rules supporting the following RESTful API endpoints:

You may configure only and/or except to disable some of the above rules. You may configure patterns to completely redefine your own list of rules. You may configure controller with multiple controller IDs to generate rules for all these controllers. For example, the following code will disable the delete rule and generate rules for both user and post controllers:

The property controller is required and should represent one or multiple controller IDs. Each controller ID should be prefixed with the module ID if the controller is within a module. The controller ID used in the pattern will be automatically pluralized (e.g. user becomes users as shown in the above examples).

Installation

The preferred way to install this extension is through composer.

composer.phar require fproject/yii2-restx:"*"

Usage

Samples

See the sample project in this GitHub repository: https://github.com/fproject/fprj-test-server-yii2

Links


All versions of yii2-restx with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
yiisoft/yii2 Version *
fproject/yii2-common Version *
ext-json Version *
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 fproject/yii2-restx contains the following files

Loading the files please wait ....