Skip to content

Instantly share code, notes, and snippets.

@iMasonite
Created August 30, 2020 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iMasonite/7d71e24ed25a72fa42973794478022e7 to your computer and use it in GitHub Desktop.
Save iMasonite/7d71e24ed25a72fa42973794478022e7 to your computer and use it in GitHub Desktop.
<?php
/**
* This file was created in order to remove the unknown function definition errors when using Wincache.
*
* This provides method signatures for Wincache to be seen by Visual Studio Code Intellisense.
*
* @author iMasonite <https://github.com/iMasonite>
*
* @link <https://keneti.com>
* @link <https://github.com/iMasonite>
*
* @license <http://opensource.org/licenses/gpl-license.php> GNU Public License
*
* @since PHP 7.4.1 | Wincache 2.0.0.8 - Build Date Jan 22 2020 18:52:19 | 1.0 30-08-2020
*
*/
die($_SERVER['PHP_SELF'] . " Should not be included in any files, only placed in the working directory to be 'Seen' by Visual Studio Code Intellisense");
/**
* Retrieves information about files cached in the file cache.
*
* @param mixed $summaryonly
* @return array
* @link https://www.php.net/manual/en/function.wincache-fcache-fileinfo.php
*/
function wincache_fcache_fileinfo(bool $summaryonly = false): array {
return array();
}
/**
* Retrieves information about file cache memory usage.
*
* @return array
* @link https://www.php.net/manual/en/function.wincache-fcache-meminfo.php
*/
function wincache_fcache_meminfo(): array {
return array();
}
/**
* Acquires an exclusive lock on a given key.
*
* @param mixed $key
* @param mixed $isglobal
* @return bool
* @link https://www.php.net/manual/en/function.wincache-lock.php
*/
function wincache_lock(string $key, bool $isglobal = false): bool {
return false;
}
/**
* Refreshes the cache entries for the cached files.
*
* @param mixed $files
* @return bool
* @link https://www.php.net/manual/en/function.wincache-refresh-if-changed.php
*/
function wincache_refresh_if_changed(array $files = null): bool {
return false;
}
/**
* Retrieves information about resolve file path cache.
*
* @param mixed $summaryonly
* @return array
* @link https://www.php.net/manual/en/function.wincache-rplist-fileinfo.php
*/
function wincache_rplist_fileinfo(bool $summaryonly = false): array {
return array();
}
/**
* Retrieves information about memory usage by the resolve file path cache.
*
* @return array
* @link https://www.php.net/manual/en/function.wincache-rplist-meminfo.php
*/
function wincache_rplist_meminfo(): array {
return array();
}
/**
* Retrieves information about files cached in the session cache.
*
* @param mixed $summaryonly
* @return array
* @link https://www.php.net/manual/en/function.wincache-scache-info.php
*/
function wincache_scache_info(bool $summaryonly = false): array {
return array();
}
/**
* Retrieves information about session cache memory usage.
*
* @return array
* @link https://www.php.net/manual/en/function.wincache-scache-meminfo.php
*/
function wincache_scache_meminfo(): array {
return array();
}
/**
* Adds a variable in user cache only if variable does not already exist in the cache.
*
* @param mixed $key
* @param mixed $value
* @param int $ttl
* @return mixed
* @link https://www.php.net/manual/en/function.wincache-ucache-add.php
*/
function wincache_ucache_add($key, $value, $ttl = 0) {
}
/**
* Compares the variable with old value and assigns new value to it.
*
* @param string $key
* @param int $old_value
* @param int $new_value
* @return bool
* @link https://www.php.net/manual/en/function.wincache-ucache-cas.php
*/
function wincache_ucache_cas(string $key, int $old_value, int $new_value): bool {
return false;
}
/**
* Deletes entire content of the user cache.
*
* @return bool
* @link https://www.php.net/manual/en/function.wincache-ucache-clear.php
*/
function wincache_ucache_clear(): bool {
return false;
}
/**
* Decrements the value associated with the key.
*
* @param string $key
* @param int $dec_by
* @param bool $success
* @return mixed
* @link https://www.php.net/manual/en/function.wincache-ucache-dec.php
*/
function wincache_ucache_dec(string $key, int $dec_by = 1, bool &$success) {
}
/**
* Deletes variables from the user cache.
*
* @param mixed $key
* @return bool
* @link https://www.php.net/manual/en/function.wincache-ucache-delete.php
*/
function wincache_ucache_delete($key): bool {
return false;
}
/**
* Checks if a variable exists in the user cache.
*
* @param mixed $key
* @return bool
* @link https://www.php.net/manual/en/function.wincache-ucache-exists.php
*/
function wincache_ucache_exists(string $key): bool {
return false;
}
/**
* Gets a variable stored in the user cache.
*
* @param mixed $key
* @param bool $success
* @return mixed
* @link https://www.php.net/manual/en/function.wincache-ucache-get.php
*/
function wincache_ucache_get($key, bool &$success) {
}
/**
* Increments the value associated with the key.
*
* @param mixed $key
* @param mixed $inc_by
* @param mixed $success
* @return mixed
* @link https://www.php.net/manual/en/function.wincache-ucache-get.php
*/
function wincache_ucache_inc(string $key, int $inc_by = 1, bool &$success) {
}
/**
* Retrieves information about data stored in the user cache.
*
* @param bool $summaryonly
* @param string $key
* @return array
* @link https://www.php.net/manual/en/function.wincache-ucache-info.php
*/
function wincache_ucache_info(bool $summaryonly = false, string $key = null): array {
return array();
}
/**
* Retrieves information about memory usage by user cache.
*
* @return array
* @link https://www.php.net/manual/en/function.wincache-ucache-info.php
*/
function wincache_ucache_meminfo(): array {
return array();
}
/**
* Adds a variable in user cache and overwrites a variable if it already exists in the cache.
*
* @param mixed $key
* @param mixed $value
* @param int $ttl
* @return bool
* @link https://www.php.net/manual/en/function.wincache-ucache-info.php
*/
function wincache_ucache_set($key, $value, int $ttl = 0): bool {
return false;
}
/**
* Releases an exclusive lock on a given key.
*
* @param mixed $key
* @return bool
* @link https://www.php.net/manual/en/function.wincache-ucache-info.php
*/
function wincache_unlock(string $key): bool {
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment