first commit

This commit is contained in:
2025-06-17 11:53:18 +02:00
commit 9f0f7ba12b
8804 changed files with 1369176 additions and 0 deletions

View File

@ -0,0 +1,70 @@
<?php
/**
* Part of the Joomla Framework Application Package
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Application\Event;
use Joomla\Application\AbstractApplication;
use Joomla\Application\ApplicationEvents;
/**
* Event class thrown when an application error occurs.
*
* @since 2.0.0
*/
class ApplicationErrorEvent extends ApplicationEvent
{
/**
* The Throwable object with the error data.
*
* @var \Throwable
* @since 2.0.0
*/
private $error;
/**
* Event constructor.
*
* @param \Throwable $error The Throwable object with the error data.
* @param AbstractApplication $application The active application.
*
* @since 2.0.0
*/
public function __construct(\Throwable $error, AbstractApplication $application)
{
parent::__construct(ApplicationEvents::ERROR, $application);
$this->error = $error;
}
/**
* Get the error object.
*
* @return \Throwable
*
* @since 2.0.0
*/
public function getError(): \Throwable
{
return $this->error;
}
/**
* Set the error object.
*
* @param \Throwable $error The error object to set to the event.
*
* @return void
*
* @since 2.0.0
*/
public function setError(\Throwable $error): void
{
$this->error = $error;
}
}

View File

@ -0,0 +1,56 @@
<?php
/**
* Part of the Joomla Framework Application Package
*
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Application\Event;
use Joomla\Application\AbstractApplication;
use Joomla\Event\Event;
/**
* Base event class for application events.
*
* @since 2.0.0
*/
class ApplicationEvent extends Event
{
/**
* The active application.
*
* @var AbstractApplication
* @since 2.0.0
*/
private $application;
/**
* Event constructor.
*
* @param string $name The event name.
* @param AbstractApplication $application The active application.
*
* @since 2.0.0
*/
public function __construct(string $name, AbstractApplication $application)
{
parent::__construct($name);
$this->application = $application;
}
/**
* Get the active application.
*
* @return AbstractApplication
*
* @since 2.0.0
*/
public function getApplication(): AbstractApplication
{
return $this->application;
}
}