Download the PHP package codemix/restyii without Composer

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

Restyii

A RESTful HATEOAS compliant extension for Yii. Allows your application to serve and accept JSON, JSONP, XML, CSV or HTML using the same code. The JSON and XML variants are based on the HAL media type.

WARNING: Pre-alpha software, use at your own risk.

Installation.

Install using composer. Requires php 5.3 or later.

Restyii makes use of a custom WebApplication that replaces the Yii default. For this reason it's necessary to replace existing calls to

Yii::createWebApplication($config)

with

Yii::createApplication('Restyii\\Web\\Application', $config)

in your index.php file.

Server Configuration.

Example Restyii server application config

<?php
Yii::setPathOfAlias('vendor', __DIR__.'/../../vendor'); // the path to the composer vendors dir
return array(
  'name' => 'Restyii Demo',
  'description' => 'This is a description of the application!',
  'import' => array(
    'application.resources.*',
  ),
  'modules' => array(
      'gii'=>array(
          'class'=>'system.gii.GiiModule',
          'password'=>'yourSecretPassword',
          // If removed, Gii defaults to localhost only. Edit carefully to taste.
          'ipFilters'=>array('127.0.0.1','::1'),
          'generatorPaths'=>array(
              'vendor.codemix.restyii.gii-templates',
          ),
      ),
  ),
  'components' => array(
        'urlManager' => array(
            'rules' => array(
                '' => array('/default/index'),
                array('class' => 'Restyii\\Web\\UrlRule'),
             ),
        ),
  ),
);

Restyii comes with a Gii code generator that makes generating resources easy.

Client Configuration.

Example Restyii client application config

<?php
return array(
  'name' => 'Restyii Client Demo',
  'import' => array(
    'application.resources.*',
  ),
  'components' => array(
        'api' => array(
            'class' => 'Restyii\\Client\\Connection',
            'baseUrl' => 'http://yourapihostname/',
        ),
        ...
  ),
);

RAVE

Restyii follows the RAVE application architecture. RAVE is quite similar to MVC, but there are some important differences, RAVE stands for:

Importantly, Resources, Actions, Views and Events all describe themselves. This allows the RAVE application to be self-documenting.

Resources

Resources are analogous to the Model in MVC, but they have some key differences.

In RAVE, the bulk of your business logic should be placed in resources, RAVE embraces the fat model approach.

Actions

Actions are analogous to the operations performed by a Controller in MVC.

Actions usually operate either on individual resources or collections of resources.

Views

RAVE Views are effectively identical to views in MVC. In Restyii they are used to decorate data (usually as HTML) when the client requests something other than XML, JSON etc.

Events

Events are triggered by resources when they change state in some way, such as when a particular model is created or updated. RAVE events are usually published to a message bus or a pub/sub channel to allow communication with other processes in the application, for example, to allow 'realtime' notifications in the browser.

Differences from standard Yii applications

In order to implement RAVE, Restyii applications require several changes to the standard Yii way of doing things.

Some important ones:


All versions of restyii with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.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 codemix/restyii contains the following files

Loading the files please wait ....