Download the PHP package sizuhiko/cake_fabricate without Composer

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

Build Status Coverage Status Total Downloads Latest Stable Version

CakeFabricate plugin for CakePHP

CakeFabricate is adaptor for Fabricate, and integrate Fabricate(version 2) to CakePHP3.

If you want use CakePHP4, please check cakephp4 branch.

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

Usage

At first, Fabricate require to config for using. In app/tests/bootstrap.php, add followings :

APIs

CakeFabricateAdaptor has options. The options set with constructor.

Configuration

Supported Options

CakeFabricateAdaptor::OPTION_FILTER_KEY

OPTION_FILTER_KEY If true, not generate any primary key for auto incrementation id.

Default: false

OPTION_VALIDATE

Indicates whether or not to validate when create new entity. see: CakePHP's Entity::newEntity()

Default: false

Generate model attributes as array (not saved)

Fabricate::attributes_for(:name, :number_of_generation, :array_or_callback) generate only attributes.

Example App

Entities:

Tables:

Associations:

PostsTable has many UsersTable as Author

Example

Generate a entity instance (not saved)

Fabricate::build(:name, :array_or_callback) generate a entity instance (using Table::newInstance).

Example

Generate records to database

Fabricate::create(:name, :number_of_generation, :array_or_callback) generate and save records to database.

Example

Associations

It's possible to set up associations(hasOne/hasMany/belongsTo) within Fabricate::create(). You can also specify a FabricateContext::association(). It will generate the attributes, and set(merge) it in the current array.

Usage

Any more features

Please see documentation of Fabricate.

Contributing to this Library

Please feel free to contribute to the library with new issues, requests, unit tests and code fixes or new features. If you want to contribute some code, create a feature branch from develop, and send us your pull request.


All versions of cake_fabricate with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
cakephp/cakephp Version ~3.6
sizuhiko/fabricate Version ~2.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 sizuhiko/cake_fabricate contains the following files

Loading the files please wait ....