CoreFiles by mySites.guru
AbstractEvent.php44 lines, 1,109 bytes, from Joomla_4.4.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 4.4.0-alpha1
md5
969b762a917cf67d7ec986cbef3aff2e
sha1
610658307c382264ab278bff46632178fa8424f5
sha256
51768179eccb3cc57448d0da32f30e14016065e9590437acd55fcca2284655e7
<?php

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

namespace Joomla\CMS\Event\WebAsset;

use BadMethodCallException;
use Joomla\CMS\Event\AbstractImmutableEvent;

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

/**
 * Event class for WebAsset events
 *
 * @since  4.0.0
 */
abstract class AbstractEvent extends AbstractImmutableEvent
{
    /**
     * Constructor.
     *
     * @param   string  $name       The event name.
     * @param   array   $arguments  The event arguments.
     *
     * @throws  BadMethodCallException
     *
     * @since   4.0.0
     */
    public function __construct($name, array $arguments = [])
    {
        if (!\array_key_exists('subject', $arguments)) {
            throw new BadMethodCallException("Argument 'subject' of event {$this->name} is required but has not been provided");
        }

        parent::__construct($name, $arguments);
    }
}

The same content is in 8 releases, Joomla 4.3.2-rc1 to 4.4.0-alpha2. See them all, or every version of this file.