Back to MVCFactoryAwareTrait class

Method getMVCFactory

protected \Joomla\CMS\MVC\Factory\MVCFactoryInterface
getMVCFactory
()
Returns the MVC factory.
Returns
  • \Joomla\CMS\MVC\Factory\MVCFactoryInterface
Since
  • 4.0.0
-
  • \UnexpectedValueException

Method getMVCFactory - Source code

/**
 * Returns the MVC factory.
 *
 * @return  MVCFactoryInterface
 *
 * @since   4.0.0
 * @throws  \UnexpectedValueException
 */
protected function getMVCFactory() : MVCFactoryInterface
{
    if ($this->mvcFactory) {
        return $this->mvcFactory;
    }
    throw new \UnexpectedValueException('MVC Factory not set in ' . __CLASS__);
}