__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\MVC\Model;

use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\LegacyErrorHandlingTrait;
use Joomla\CMS\Object\LegacyPropertyManagementTrait;
use Joomla\Filesystem\Path;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Base class for a Joomla Model
 *
 * @since  4.0.0
 */
#[\AllowDynamicProperties]
abstract class BaseModel implements ModelInterface, StatefulModelInterface
{
    use StateBehaviorTrait;
    use LegacyModelLoaderTrait;
    use LegacyErrorHandlingTrait;
    use LegacyPropertyManagementTrait;


    /**
     * The model (base) name
     *
     * @var    string
     * @since  4.0.0
     */
    protected $name;

    /**
     * The include paths
     *
     * @var   array
     * @since  4.0.0
     */
    protected static $paths;

    /**
     * Constructor
     *
     * @param   array  $config  An array of configuration options (name, state, ignore_request).
     *
     * @since   4.0.0
     * @throws  \Exception
     */
    public function __construct($config = [])
    {
        // Set the view name
        if (empty($this->name)) {
            if (\array_key_exists('name', $config)) {
                $this->name = $config['name'];
            } else {
                $this->name = $this->getName();
            }
        }

        // Set the model state
        if (\array_key_exists('state', $config)) {
            $this->state = $config['state'];
        }

        // Set the internal state marker - used to ignore setting state from the request
        if (!empty($config['ignore_request'])) {
            $this->__state_set = true;
        }
    }

    /**
     * Add a directory where \JModelLegacy should search for models. You may
     * either pass a string or an array of directories.
     *
     * @param   mixed   $path    A path or array[sting] of paths to search.
     * @param   string  $prefix  A prefix for models.
     *
     * @return  array  An array with directory elements. If prefix is equal to '', all directories are returned.
     *
     * @since       3.0
     *
     * @deprecated  4.3 will be removed in 6.0
     *              Will be removed without replacement. Get the model through the MVCFactory + namespace instead
     *
     * @see LegacyModelLoaderTrait::getInstance()
     */
    public static function addIncludePath($path = '', $prefix = '')
    {
        if (!isset(self::$paths)) {
            self::$paths = [];
        }

        if (!isset(self::$paths[$prefix])) {
            self::$paths[$prefix] = [];
        }

        if (!isset(self::$paths[''])) {
            self::$paths[''] = [];
        }

        if (!empty($path)) {
            foreach ((array) $path as $includePath) {
                if (!\in_array($includePath, self::$paths[$prefix])) {
                    array_unshift(self::$paths[$prefix], Path::clean($includePath));
                }

                if (!\in_array($includePath, self::$paths[''])) {
                    array_unshift(self::$paths[''], Path::clean($includePath));
                }
            }
        }

        return self::$paths[$prefix];
    }

    /**
     * Method to get the model name
     *
     * The model name. By default parsed using the classname or it can be set
     * by passing a $config['name'] in the class constructor
     *
     * @return  string  The name of the model
     *
     * @since   4.0.0
     * @throws  \Exception
     */
    public function getName()
    {
        if (empty($this->name)) {
            $r = null;

            if (!preg_match('/Model(.*)/i', \get_class($this), $r)) {
                throw new \Exception(Text::sprintf('JLIB_APPLICATION_ERROR_GET_NAME', __METHOD__), 500);
            }

            $this->name = str_replace(['\\', 'model'], '', strtolower($r[1]));
        }

        return $this->name;
    }
}

Filemanager

Name Type Size Permission Actions
Exception Folder 0775
AdminModel.php File 52.89 KB 0664
BaseDatabaseModel.php File 13.86 KB 0664
BaseModel.php File 3.99 KB 0664
DatabaseAwareTrait.php File 1.96 KB 0664
DatabaseModelInterface.php File 654 B 0664
FormBehaviorTrait.php File 6.69 KB 0664
FormModel.php File 7.6 KB 0664
FormModelInterface.php File 836 B 0664
ItemModel.php File 1.22 KB 0664
ItemModelInterface.php File 668 B 0664
LegacyModelLoaderTrait.php File 5.74 KB 0664
ListModel.php File 22.49 KB 0664
ListModelInterface.php File 649 B 0664
ModelInterface.php File 630 B 0664
State.php File 3.6 KB 0664
StateBehaviorTrait.php File 2.54 KB 0664
StatefulModelInterface.php File 1.17 KB 0664
WorkflowBehaviorTrait.php File 11.09 KB 0664
WorkflowModelInterface.php File 3.35 KB 0664
Filemanager