[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/MVC/Model/ -> LegacyModelLoaderTrait.php (summary)

Joomla! Content Management System

Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 174 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 functions

  _createFileName()
  getInstance()
  addTablePath()
  createModelFromComponent()

Functions
Functions that are not part of a class:

_createFileName($type, $parts = array()   X-Ref
Create the filename for a resource

param: string  $type   The resource type to create the filename for.
param: array   $parts  An associative array of filename information.
return: string  The filename

getInstance($type, $prefix = '', $config = array()   X-Ref
Returns a Model object, always creating it

param: string  $type    The model type to instantiate
param: string  $prefix  Prefix for the model class name. Optional.
param: array   $config  Configuration array for model. Optional.
return: self|boolean   A \JModelLegacy instance or false on failure

addTablePath($path)   X-Ref
Adds to the stack of model table paths in LIFO order.

param: mixed  $path  The directory as a string or directories as an array to add.
return: void

createModelFromComponent($type, $prefix = '', $config = [])   X-Ref
Returns a Model object by loading the component from the prefix.

param: string  $type    The model type to instantiate
param: string  $prefix  Prefix for the model class name. Optional.
param: array   $config  Configuration array for model. Optional.
return: ModelInterface|null   A ModelInterface instance or null on failure



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer