Download the PHP package crisu83/yii-caviar without Composer

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

Caviar

Code generation with logic-less templates for Yii.

Caviar vs Gii

You might be wondering why you should use Caviar instead of Gii, so let us take a look at how they differ from each other.

The main disadvantage with Gii is that it is troublesome to write templates for it. Have you ever looked at one of its templates? If you have you know that they are quite hard to read. Compare the following template in Gii to the corresponding template in Caviar.

Caviar uses plain text (.txt files) templates, which are compiled into php files to apply separation of concerns. This means that all logic must be contained in the generator and that only strings can be passed to the template. Instead of doing logical operations within the template we do them in the generator when we create the data for the template. You can take a look at the model generator for an example on this.

Convinced? Follow the instructions below to install Caviar.

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Usage

Add the a command to your console application configuration:

When that is done you can use it to generate code:

Where generator is the name of the generator, context is the name of your application (e.g. app) and subject is a name for the item that will be generated.

You can view the command help by running the following command:

Or the help for a particular generator by appending (or ) to your command:

Disable namespaces

Caviar uses namespaces by default, mainly because it has a proven to be a good practice in large scale applications, but it also allows you to easily disable namespaces for all generators.

Disabling namespaces for all generators can easily be done by adding the following to your configuration:

Fancy UI

Caviar has a fancy UI, here are a few screenshots showing the UI.

Generators

The following generators are already supported:

The following generators are planned to be included in the first release:


All versions of yii-caviar with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 crisu83/yii-caviar contains the following files

Loading the files please wait ....