ApiMVCFactory
Extends MVCFactoryFactory to create MVC objects based on a namespace. Note that in an API Application model and table objects will be created from their administrator counterparts.
since |
4.0.0 |
---|---|
package |
Joomla CMS |
Methods
__construct
The namespace must be like: Joomla\Component\Content
__construct( namespace) :
since |
4.0.0 |
---|
Arguments
- namespace
string
The namespace
Response
mixed
createController
Method to load and return a controller object.
createController( name, prefix, mixed||string|int 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<string|int, mixed>
The configuration array for the controller- app
CMSApplicationInterface
The app- input
Input
The input
Response
createModel
Method to load and return a model object.
createModel( name, prefix = '', mixed||string|int config = []) : \Joomla\CMS\MVC\Model\ModelInterface
since |
4.0.0 |
---|---|
throws |
|
Arguments
- name
string
The name of the model.- prefix
string
Optional model prefix.- config
array<string|int, mixed>
Optional configuration array for the model.
Response
ModelInterface
The model object
createTable
Method to load and return a table object.
createTable( name, prefix = '', mixed||string|int config = []) : \Joomla\CMS\Table\Table
since |
4.0.0 |
---|---|
throws |
|
Arguments
- name
string
The name of the table.- prefix
string
Optional table prefix.- config
array<string|int, mixed>
Optional configuration array for the table.
Response
Table
The table object
createView
Method to load and return a view object.
createView( name, prefix = '', type = '', mixed||string|int 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<string|int, mixed>
Optional configuration array for the view.
Response
ViewInterface
The view object
getCacheControllerFactory
Get the CacheControllerFactoryInterface.
getCacheControllerFactory() : \Joomla\CMS\Cache\CacheControllerFactoryInterface
getClassName
Returns a standard classname, if the class doesn't exist null is returned.
getClassName( suffix, 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
getMailerFactory
Get the MailerFactoryInterface.
getMailerFactory() : \Joomla\CMS\Mail\MailerFactoryInterface
since |
4.4.0 |
---|---|
throws |
|
Response
getSiteRouter
Get the site router.
getSiteRouter() : \Joomla\CMS\Router\SiteRouter
since |
4.2.0 |
---|---|
throws |
|
Response
getUserFactory
Get the UserFactoryInterface.
getUserFactory() : \Joomla\CMS\User\UserFactoryInterface
since |
4.4.0 |
---|---|
throws |
|
Response
setCacheControllerFactory
Set the cache controller factory to use.
setCacheControllerFactory(\Joomla\CMS\Cache\CacheControllerFactoryInterface cacheControllerFactory = null) :
since |
4.2.0 |
---|
Arguments
- cacheControllerFactory
CacheControllerFactoryInterface
The cache controller factory to use.
Response
void
setCacheControllerOnObject
Sets the internal cache controller on the given object.
setCacheControllerOnObject( object) :
since |
4.2.0 |
---|
Arguments
- object
object
The object
Response
void
setDispatcherOnObject
Sets the internal event dispatcher on the given object.
setDispatcherOnObject( object) :
since |
4.2.0 |
---|
Arguments
- object
object
The object
Response
void
setFormFactory
Set the form factory to use.
setFormFactory(\Joomla\CMS\Form\FormFactoryInterface formFactory = null) :
setFormFactoryOnObject
Sets the internal form factory on the given object.
setFormFactoryOnObject( object) :
since |
4.0.0 |
---|
Arguments
- object
object
The object
Response
void
setMailerFactory
Set the mailer factory to use.
setMailerFactory(\Joomla\CMS\Mail\MailerFactoryInterface mailerFactory = null) :
since |
4.4.0 |
---|
Arguments
- mailerFactory
MailerFactoryInterface|null
The mailer factory to use.
Response
void
setMailerFactoryOnObject
Sets the internal mailer factory on the given object.
setMailerFactoryOnObject( object) :
since |
4.4.0 |
---|
Arguments
- object
object
The object
Response
void
setRouterOnObject
Sets the internal router on the given object.
setRouterOnObject( object) :
since |
4.2.0 |
---|
Arguments
- object
object
The object
Response
void
setSiteRouter
Set the router to use.
setSiteRouter(\Joomla\CMS\Router\SiteRouter router) :
setUserFactory
Set the user factory to use.
setUserFactory(\Joomla\CMS\User\UserFactoryInterface userFactory) :
setUserFactoryOnObject
Sets the internal user factory on the given object.
setUserFactoryOnObject( object) :
since |
4.4.0 |
---|
Arguments
- object
object
The object
Response
void
Properties
cacheControllerFactory
CacheControllerFactoryInterface
namespace
The namespace to create the objects from.
since |
4.0.0 |
---|
Type(s)
string