Initial commit

This commit is contained in:
2025-08-04 16:33:07 +03:30
commit f798e8e35c
9595 changed files with 1208683 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
<?php
namespace Illuminate\Cache\Events;
abstract class CacheEvent
{
/**
* The name of the cache store.
*
* @var string|null
*/
public $storeName;
/**
* The key of the event.
*
* @var string
*/
public $key;
/**
* The tags that were assigned to the key.
*
* @var array
*/
public $tags;
/**
* Create a new event instance.
*
* @param string|null $storeName
* @param string $key
* @param array $tags
* @return void
*/
public function __construct($storeName, $key, array $tags = [])
{
$this->storeName = $storeName;
$this->key = $key;
$this->tags = $tags;
}
/**
* Set the tags for the cache event.
*
* @param array $tags
* @return $this
*/
public function setTags($tags)
{
$this->tags = $tags;
return $this;
}
}

View File

@@ -0,0 +1,29 @@
<?php
namespace Illuminate\Cache\Events;
class CacheHit extends CacheEvent
{
/**
* The value that was retrieved.
*
* @var mixed
*/
public $value;
/**
* Create a new event instance.
*
* @param string|null $storeName
* @param string $key
* @param mixed $value
* @param array $tags
* @return void
*/
public function __construct($storeName, $key, $value, array $tags = [])
{
parent::__construct($storeName, $key, $tags);
$this->value = $value;
}
}

View File

@@ -0,0 +1,8 @@
<?php
namespace Illuminate\Cache\Events;
class CacheMissed extends CacheEvent
{
//
}

View File

@@ -0,0 +1,8 @@
<?php
namespace Illuminate\Cache\Events;
class ForgettingKey extends CacheEvent
{
//
}

View File

@@ -0,0 +1,8 @@
<?php
namespace Illuminate\Cache\Events;
class KeyForgetFailed extends CacheEvent
{
//
}

View File

@@ -0,0 +1,8 @@
<?php
namespace Illuminate\Cache\Events;
class KeyForgotten extends CacheEvent
{
//
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Illuminate\Cache\Events;
class KeyWriteFailed extends CacheEvent
{
/**
* The value that would have been written.
*
* @var mixed
*/
public $value;
/**
* The number of seconds the key should have been valid.
*
* @var int|null
*/
public $seconds;
/**
* Create a new event instance.
*
* @param string|null $storeName
* @param string $key
* @param mixed $value
* @param int|null $seconds
* @param array $tags
* @return void
*/
public function __construct($storeName, $key, $value, $seconds = null, $tags = [])
{
parent::__construct($storeName, $key, $tags);
$this->value = $value;
$this->seconds = $seconds;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Illuminate\Cache\Events;
class KeyWritten extends CacheEvent
{
/**
* The value that was written.
*
* @var mixed
*/
public $value;
/**
* The number of seconds the key should be valid.
*
* @var int|null
*/
public $seconds;
/**
* Create a new event instance.
*
* @param string|null $storeName
* @param string $key
* @param mixed $value
* @param int|null $seconds
* @param array $tags
* @return void
*/
public function __construct($storeName, $key, $value, $seconds = null, $tags = [])
{
parent::__construct($storeName, $key, $tags);
$this->value = $value;
$this->seconds = $seconds;
}
}

View File

@@ -0,0 +1,8 @@
<?php
namespace Illuminate\Cache\Events;
class RetrievingKey extends CacheEvent
{
//
}

View File

@@ -0,0 +1,28 @@
<?php
namespace Illuminate\Cache\Events;
class RetrievingManyKeys extends CacheEvent
{
/**
* The keys that are being retrieved.
*
* @var array
*/
public $keys;
/**
* Create a new event instance.
*
* @param string|null $storeName
* @param array $keys
* @param array $tags
* @return void
*/
public function __construct($storeName, $keys, array $tags = [])
{
parent::__construct($storeName, $keys[0] ?? '', $tags);
$this->keys = $keys;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Illuminate\Cache\Events;
class WritingKey extends CacheEvent
{
/**
* The value that will be written.
*
* @var mixed
*/
public $value;
/**
* The number of seconds the key should be valid.
*
* @var int|null
*/
public $seconds;
/**
* Create a new event instance.
*
* @param string|null $storeName
* @param string $key
* @param mixed $value
* @param int|null $seconds
* @param array $tags
* @return void
*/
public function __construct($storeName, $key, $value, $seconds = null, $tags = [])
{
parent::__construct($storeName, $key, $tags);
$this->value = $value;
$this->seconds = $seconds;
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace Illuminate\Cache\Events;
class WritingManyKeys extends CacheEvent
{
/**
* The keys that are being written.
*
* @var mixed
*/
public $keys;
/**
* The value that is being written.
*
* @var mixed
*/
public $values;
/**
* The number of seconds the keys should be valid.
*
* @var int|null
*/
public $seconds;
/**
* Create a new event instance.
*
* @param string|null $storeName
* @param array $keys
* @param array $values
* @param int|null $seconds
* @param array $tags
* @return void
*/
public function __construct($storeName, $keys, $values, $seconds = null, $tags = [])
{
parent::__construct($storeName, $keys[0], $tags);
$this->keys = $keys;
$this->values = $values;
$this->seconds = $seconds;
}
}