Download the PHP package muffin/sti without Composer

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

Sti

Build Status Coverage Total Downloads

Single Table Inheritance for CakePHP ORM.

[...] a way to emulate object-oriented inheritance in a relational database. When mapping from a database table to an object in an object-oriented language, a field in the database identifies what class in the hierarchy the object belongs to.

(source: Wikipedia)

Install

Using Composer:

You then need to load the plugin. You can use the console command:

Usage

Then create a class for every type of entity:

The entity that was previously defined to be the 'default' one will need to use the StiAwareTrait:

Optionally, you can create classes for your tables that extend the parent table to encapsulate business logic:

I said optionally, because if the only thing you need is some extra validation rules, you could define those on the parent table. For example, to add custom rules to chefs:

New entities

The behavior will automatically add helper methods for creating entities of different types (i.e. newChef()). There are different ways of creating new entities, all are valid and depending on the cases, you might need one or the other:

Note

For the above examples to work using (*chef), you need to add a custom rule to the Inflector:

Patches & Features

To ensure your PRs are considered for upstream, you MUST follow the CakePHP coding standards.

Bugs & Feedback

http://github.com/usemuffin/sti/issues

License

Copyright (c) 2015-Present, Use Muffin and licensed under The MIT License.


All versions of sti with dependencies

PHP Build Version
Package Version
Requires cakephp/cakephp Version ^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 muffin/sti contains the following files

Loading the files please wait ....