Skip to content

Commit

Permalink
Added Nette\Caching\Cache generic stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
adaamz committed Apr 27, 2020
1 parent fe39d82 commit e5b5c36
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ parameters:
stubFiles:
- stubs/Application/Routers/RouteList.stub
- stubs/Application/UI/Component.stub
- stubs/Caching/Cache.stub
- stubs/ComponentModel/IComponent.stub
- stubs/Database/ResultSet.stub
- stubs/Database/Table/ActiveRow.stub
Expand Down
53 changes: 53 additions & 0 deletions stubs/Caching/Cache.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php

namespace Nette\Caching;

class Cache
{

/**
* @template TFallback
* @param mixed $key
* @param (callable(mixed): TFallback)|null $fallback
* @return TFallback
*/
public function load($key, callable $fallback = null)
{

}

/**
* @template TData
* @param mixed $key
* @param TData $data
* @param array|null $dependencies
* @return TData
*/
public function save($key, $data, array $dependencies = null)
{

}

/**
* @template TFunction
* @param callable(mixed): TFunction $function
* @return TFunction
*/
public function call(callable $function)
{

}

/**
* @template TFunction
* @param callable(mixed): TFunction $function
* @param array|null $dependencies
*
* @return \Closure(mixed): TFunction
*/
public function wrap(callable $function, array $dependencies = null): \Closure
{

}

}

0 comments on commit e5b5c36

Please sign in to comment.