LegacyFactory
实现 MVCFactoryInterface在遗留模式下创建 MVC 对象的工厂。
使用类本身的静态 getInstance 函数。旧的无命名空间扩展设置的行为。
| 自 | 3.10.0 | 
|---|---|
| 包 | Joomla CMS | 
方法
createController
加载并返回控制器对象的方法。
createController( name, prefix, mixed||string|int config, \Joomla\CMS\Application\CMSApplicationInterface app, \Joomla\Input\Input input) : \Joomla\CMS\MVC\Controller\ControllerInterface
| 自 | 4.0.0 | 
|---|---|
| 抛出 | 
 | 
参数
- name
- string控制器的名称
- prefix
- string控制器的前缀
- config
- array<string|int, mixed>控制器的配置数组
- app
- input
- Input输入
响应
createModel
加载并返回模型对象的方法。
createModel( name, prefix = '', mixed||string|int config = []) : \Joomla\CMS\MVC\Model\ModelInterface
| 自 | 3.10.0 | 
|---|---|
| 抛出 | 
 | 
参数
- name
- string模型的名称。
- prefix
- string可选的模型前缀。
- config
- array<string|int, mixed>模型的可选配置数组。
响应
ModelInterface模型对象
createTable
加载并返回表对象的方法。
createTable( name, prefix = 'Table', mixed||string|int config = []) : \Joomla\CMS\Table\Table
| 自 | 3.10.0 | 
|---|---|
| 抛出 | 
 | 
参数
- name
- string表的名称。
- prefix
- string可选的表前缀。
- config
- array<string|int, mixed>表的可选配置数组。
响应
Table表对象
createView
加载并返回视图对象的方法。
createView( name, prefix = '', type = '', mixed||string|int config = []) : \Joomla\CMS\MVC\View\ViewInterface
| 自 | 3.10.0 | 
|---|---|
| 抛出 | 
 | 
参数
- name
- string视图的名称。
- prefix
- string可选的视图前缀。
- type
- string可选的视图类型。
- config
- array<string|int, mixed>视图的可选配置数组。
响应
ViewInterface视图对象