MVCFactory
Implements MVCFactoryInterfaceFactory to create MVC objects based on a namespace.
| since |
3.10.0 |
|---|---|
| package |
Joomla CMS |
Methods
__construct
The namespace must be like: Joomla\Component\Content
__construct(string namespace, \Joomla\CMS\Application\CMSApplication application) : mixed
| since |
3.10.0 |
|---|
Arguments
- namespace
stringThe namespace.- application
\Joomla\CMS\Application\CMSApplicationThe application
Response
mixed
createModel
Method to load and return a model object.
createModel(string name, string prefix = '', array config = array()) : \Joomla\CMS\MVC\Model\BaseModel
| since |
3.10.0 |
|---|---|
| throws |
|
Arguments
- name
stringThe name of the model.- prefix
stringOptional model prefix.- config
arrayOptional configuration array for the model.
Response
\Joomla\CMS\MVC\Model\BaseModelThe model object
createTable
Method to load and return a table object.
createTable(string name, string prefix = '', array config = array()) : \Joomla\CMS\Table\Table
| since |
3.10.0 |
|---|---|
| throws |
|
Arguments
- name
stringThe name of the table.- prefix
stringOptional table prefix.- config
arrayOptional configuration array for the table.
Response
\Joomla\CMS\Table\TableThe table object
createView
Method to load and return a view object.
createView(string name, string prefix = '', string type = '', array config = array()) : \Joomla\CMS\MVC\View\HtmlView
| since |
3.10.0 |
|---|---|
| throws |
|
Arguments
- name
stringThe name of the view.- prefix
stringOptional view prefix.- type
stringOptional type of view.- config
arrayOptional configuration array for the view.
Response
\Joomla\CMS\MVC\View\HtmlViewThe view object
getClassName
Returns a standard classname, if the class doesn't exist null is returned.
getClassName(string suffix, string prefix) : string|null
| since |
3.10.0 |
|---|
Arguments
- suffix
stringThe suffix- prefix
stringThe prefix
Response
string|nullThe class name
Properties
namespace
The namespace to create the objects from.
Type(s)
string
application
The application.
Type(s)
\Joomla\CMS\Application\CMSApplication