Skip to content

Commit 3434ecc

Browse files
committed
Added Nette\Caching\Cache generic stubs
1 parent fe39d82 commit 3434ecc

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

extension.neon

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ parameters:
22
stubFiles:
33
- stubs/Application/Routers/RouteList.stub
44
- stubs/Application/UI/Component.stub
5+
- stubs/Caching/Cache.stub
56
- stubs/ComponentModel/IComponent.stub
67
- stubs/Database/ResultSet.stub
78
- stubs/Database/Table/ActiveRow.stub

stubs/Caching/Cache.php

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
3+
namespace Nette\Caching;
4+
5+
class Cache
6+
{
7+
8+
/**
9+
* @template TFallback
10+
* @param mixed $key
11+
* @param (callable(mixed): TFallback)|null $fallback
12+
* @return TFallback
13+
*/
14+
public function load($key, callable $fallback = null)
15+
{
16+
17+
}
18+
19+
/**
20+
* @template TData
21+
* @param mixed $key
22+
* @param TData $data
23+
* @param array|null $dependencies
24+
* @return TData
25+
*/
26+
public function save($key, $data, array $dependencies = null)
27+
{
28+
29+
}
30+
31+
/**
32+
* @template TFunction
33+
* @param callable(mixed): TFunction $function
34+
* @return TFunction
35+
*/
36+
public function call(callable $function)
37+
{
38+
39+
}
40+
41+
/**
42+
* @template TFunction
43+
* @param callable(mixed): TFunction $function
44+
* @param array|null $dependencies
45+
*
46+
* @return \Closure(mixed): TFunction
47+
*/
48+
public function wrap(callable $function, array $dependencies = null): \Closure
49+
{
50+
51+
}
52+
53+
}

0 commit comments

Comments
 (0)