mirror of
https://github.com/flarum/core.git
synced 2025-08-12 03:14:33 +02:00
Move events to Flarum\Settings\Event namespace
This commit is contained in:
36
src/Settings/Event/Deserializing.php
Normal file
36
src/Settings/Event/Deserializing.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Settings\Event;
|
||||
|
||||
/**
|
||||
* Prepare settings for display in the client.
|
||||
*
|
||||
* This event is fired when settings have been retrieved from the database and
|
||||
* are being unserialized for display in the client.
|
||||
*/
|
||||
class Deserializing
|
||||
{
|
||||
/**
|
||||
* The settings array to be unserialized.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $settings;
|
||||
|
||||
/**
|
||||
* @param array $settings The settings array to be unserialized.
|
||||
*/
|
||||
public function __construct(&$settings)
|
||||
{
|
||||
$this->settings = &$settings;
|
||||
}
|
||||
}
|
39
src/Settings/Event/Saved.php
Normal file
39
src/Settings/Event/Saved.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Settings\Event;
|
||||
|
||||
class Saved
|
||||
{
|
||||
/**
|
||||
* The setting key that was set.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $key;
|
||||
|
||||
/**
|
||||
* The setting value that was set.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $value;
|
||||
|
||||
/**
|
||||
* @param string $key The setting key that was set.
|
||||
* @param string $value The setting value that was set.
|
||||
*/
|
||||
public function __construct($key, $value)
|
||||
{
|
||||
$this->key = $key;
|
||||
$this->value = $value;
|
||||
}
|
||||
}
|
39
src/Settings/Event/Serializing.php
Normal file
39
src/Settings/Event/Serializing.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Settings\Event;
|
||||
|
||||
class Serializing
|
||||
{
|
||||
/**
|
||||
* The settings key being saved.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $key;
|
||||
|
||||
/**
|
||||
* The settings value to save.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $value;
|
||||
|
||||
/**
|
||||
* @param string $key The settings key being saved.
|
||||
* @param string $value The settings value to save.
|
||||
*/
|
||||
public function __construct($key, &$value)
|
||||
{
|
||||
$this->key = $key;
|
||||
$this->value = &$value;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user