Skip to content

Latest commit

 

History

History
107 lines (81 loc) · 2.18 KB

README.md

File metadata and controls

107 lines (81 loc) · 2.18 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

Component

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 {
}