MVCFactory
Implements MVCFactoryInterface, FormFactoryAwareInterface, SiteRouterAwareInterfaceFactory 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) : mixed
since |
4.0.0 |
---|
Arguments
- namespace
string
The namespace
Response
mixed
createController
Method to load and return a controller object.
createController(string name, string prefix, array config, \Joomla\CMS\Application\CMSApplicationInterface app, \Joomla\Input\Input input) : \Joomla\CMS\MVC\Controller\ControllerInterface
since |
3.10.0 |
---|---|
throws |
|
Arguments
- name
string
The name of the controller- prefix
string
The controller prefix- config
array
The configuration array for the controller- app
\Joomla\CMS\Application\CMSApplicationInterface
The app- input
\Joomla\Input\Input
The input
Response
\Joomla\CMS\MVC\Controller\ControllerInterface
createModel
Method to load and return a model object.
createModel(string name, string prefix = '', array config = []) : \Joomla\CMS\MVC\Model\ModelInterface
since |
3.10.0 |
---|---|
throws |
|
Arguments
- name
string
The name of the model.- prefix
string
Optional model prefix.- config
array
Optional configuration array for the model.
Response
\Joomla\CMS\MVC\Model\ModelInterface
The model object
createTable
Method to load and return a table object.
createTable(string name, string prefix = '', array config = []) : \Joomla\CMS\Table\Table
since |
3.10.0 |
---|---|
throws |
|
Arguments
- name
string
The name of the table.- prefix
string
Optional table prefix.- config
array
Optional configuration array for the table.
Response
\Joomla\CMS\Table\Table
The table object
createView
Method to load and return a view object.
createView(string name, string prefix = '', string type = '', array config = []) : \Joomla\CMS\MVC\View\ViewInterface
since |
3.10.0 |
---|---|
throws |
|
Arguments
- name
string
The name of the view.- prefix
string
Optional view prefix.- type
string
Optional type of view.- config
array
Optional configuration array for the view.
Response
\Joomla\CMS\MVC\View\ViewInterface
The view object
getCacheControllerFactory
Get the CacheControllerFactoryInterface.
getCacheControllerFactory() : \Joomla\CMS\Cache\CacheControllerFactoryInterface
since |
4.2.0 |
---|
Response
\Joomla\CMS\Cache\CacheControllerFactoryInterface
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
string
The suffix- prefix
string
The prefix
Response
string|null
The class name
getFormFactory
Get the FormFactoryInterface.
getFormFactory() : \Joomla\CMS\Form\FormFactoryInterface
since |
4.0.0 |
---|---|
throws |
|
Response
\Joomla\CMS\Form\FormFactoryInterface
getSiteRouter
Get the site router.
getSiteRouter() : \Joomla\CMS\Router\SiteRouter
since |
4.2.0 |
---|---|
throws |
|
Response
\Joomla\CMS\Router\SiteRouter
setCacheControllerFactory
Set the cache controller factory to use.
setCacheControllerFactory(\Joomla\CMS\Cache\CacheControllerFactoryInterface cacheControllerFactory = null) : void
since |
4.2.0 |
---|
Arguments
- cacheControllerFactory
\Joomla\CMS\Cache\CacheControllerFactoryInterface
The cache controller factory to use.
setCacheControllerOnObject
Sets the internal cache controller on the given object.
setCacheControllerOnObject(object object) : void
since |
4.2.0 |
---|
Arguments
- object
object
The object
setDispatcherOnObject
Sets the internal event dispatcher on the given object.
setDispatcherOnObject(object object) : void
since |
4.2.0 |
---|
Arguments
- object
object
The object
setFormFactory
Set the form factory to use.
setFormFactory(\Joomla\CMS\Form\FormFactoryInterface formFactory = null) : $this
since |
4.0.0 |
---|
Arguments
- formFactory
\Joomla\CMS\Form\FormFactoryInterface
The form factory to use.
Response
$this
setFormFactoryOnObject
Sets the internal form factory on the given object.
setFormFactoryOnObject(object object) : void
since |
4.0.0 |
---|
Arguments
- object
object
The object
setRouterOnObject
Sets the internal router on the given object.
setRouterOnObject(object object) : void
since |
4.2.0 |
---|
Arguments
- object
object
The object
setSiteRouter
Set the router to use.
setSiteRouter(\Joomla\CMS\Router\SiteRouter router) : void
since |
4.2.0 |
---|
Arguments
- router
\Joomla\CMS\Router\SiteRouter
The router to use.
Properties
cacheControllerFactory
CacheControllerFactoryInterface