Skip to content

Latest commit

 

History

History
104 lines (79 loc) · 2.13 KB

README.md

File metadata and controls

104 lines (79 loc) · 2.13 KB

Shim plugin - Usage

Preconditions

See Preconditions.

Installation

Upgrade Guide

Main shims

These will most likely all be ported over to future releases.

Database

Datasource

Controller

TestSuite

BC shims

The following shims are only in place for 3.x => 4.x => 5.x and can possibly be removed in the future.

Controller

Helper

Inflector

ORM

Table

Extend the Shim plugin Table class to get the functionality:

namespace App\Model\Table;

use Shim\Model\Table\Table as Table;

/**
 * App\Model\Table\MyTable class
 */
class MyTable extends Table {
}

In case you are using an app Table class yourself, you can just make this one extend the Shim plugin Table class:

namespace App\Model\Table;

use Shim\Model\Table\Table as ShimTable;

/**
 * App\Model\Table\Table class
 */
class Table extends ShimTable {
}

And then all your tables can extend your own app Table class:

namespace App\Model\Table;

/**
 * App\Model\Table\MyTable class
 */
class MyTable extends Table {
}

Controller

Component

You can extend the Shim plugin Component class to have the controller available inside by default:

namespace Shim\Controller\Component;

use Shim\Controller\Component\Component;

/**
 * App\Controller\Component\MyController class
 */
class MyComponent extends Component {
}