Back to Joomla project (class list)

Class MVCFactory - list of methods

Factory to create MVC objects based on a namespace.

Extends

Direct known subclasses

Package: Joomla\CMS\MVC\Factory
Copyright: (C) 2017 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE
Located at: Joomla/MVC/Factory/MVCFactory.php
Project: Joomla

Method Summary

public
(mixed $namespace)

The namespace must be like: Joomla\Component\Content
Parameters
  • string $namespace The namespace
Since
  • 4.0.0
Show source code of this method: __construct Source Code

public \Joomla\CMS\MVC\Controller\ControllerInterface
(mixed $name, mixed $prefix, array $config, \Joomla\CMS\Application\CMSApplicationInterface $app, \Joomla\Input\Input $input)

Method to load and return a controller object.
Parameters
  • string $name The name of the controller
  • string $prefix The controller prefix
  • array $config The configuration array for the controller
  • \Joomla\CMS\Application\CMSApplicationInterface $app The app
  • \Joomla\Input\Input $input The input
Returns
  • \Joomla\CMS\MVC\Controller\ControllerInterface
Since
  • 3.10.0
-
  • \Exception
Show source code of this method: createController Source Code

public \Joomla\CMS\MVC\Model\ModelInterface
(mixed $name, mixed $prefix = '', array $config = [])

Method to load and return a model object.
Parameters
  • string $name The name of the model.
  • string $prefix Optional model prefix.
  • array $config Optional configuration array for the model.
Returns
  • \Joomla\CMS\MVC\Model\ModelInterface The model object
Since
  • 3.10.0
-
  • \Exception
Show source code of this method: createModel Source Code

public \Joomla\CMS\MVC\View\ViewInterface
(mixed $name, mixed $prefix = '', mixed $type = '', array $config = [])

Method to load and return a view object.
Parameters
  • string $name The name of the view.
  • string $prefix Optional view prefix.
  • string $type Optional type of view.
  • array $config Optional configuration array for the view.
Returns
  • \Joomla\CMS\MVC\View\ViewInterface The view object
Since
  • 3.10.0
-
  • \Exception
Show source code of this method: createView Source Code

public \Joomla\CMS\Table\Table
(mixed $name, mixed $prefix = '', array $config = [])

Method to load and return a table object.
Parameters
  • string $name The name of the table.
  • string $prefix Optional table prefix.
  • array $config Optional configuration array for the table.
Returns
  • \Joomla\CMS\Table\Table The table object
Since
  • 3.10.0
-
  • \Exception
Show source code of this method: createTable Source Code

protected string|null
(string $suffix, string $prefix)

Returns a standard classname, if the class doesn't exist null is returned.
Parameters
  • string $suffix The suffix
  • string $prefix The prefix
Returns
  • string|null The class name
Since
  • 3.10.0
Show source code of this method: getClassName Source Code

private void
(mixed $object)

Sets the internal form factory on the given object.
Parameters
  • object $object The object
Returns
  • void
Since
  • 4.0.0
Show source code of this method: setFormFactoryOnObject Source Code

private void
(mixed $object)

Sets the internal event dispatcher on the given object.
Parameters
  • object $object The object
Returns
  • void
Since
  • 4.1.0
Show source code of this method: setDispatcherOnObject Source Code

Properties Summary

private string
$namespace
The namespace to create the objects from.
Since
  • 4.0.0

Tags Summary

Since
3.10.0