When I control click into a php function, it drives me to its definition and I can see the documentation and the function declaration, but no logic inside. The brackets are empty. I would like to know how if its posible to do something similar in my code and how it can be done.
What i dont understand is that there is no code inside this class file, and no include statements, but the methods works when I use them in my code. And when I click onto these methods I'm linked to this file. How can I do something similar or how does it works?? This is an exmample of what I would like to do:
/**
* Retrieve item from the server
* @link http://www.php.net/manual/en/memcache.get.php
* @param key string <p>
* The key or array of keys to fetch.
* </p>
* @param flags int[optional] <p>
* If present, flags fetched along with the values will be written to this parameter. These
* flags are the same as the ones given to for example Memcache::set.
* The lowest byte of the int is reserved for pecl/memcache internal usage (e.g. to indicate
* compression and serialization status).
* </p>
* @return string the string associated with the key or
* an array of found key-value pairs when key is an array.
* Returns false on failure, key is not found or
* key is an empty array.
*/
public function get ($key, &$flags = null) {}
/**
* Delete item from the server
* @link http://www.php.net/manual/en/memcache.delete.php
* @param key string <p>
* The key associated with the item to delete.
* </p>
* @param timeout int[optional] <p>
* This deprecated parameter is not supported, and defaults to 0 seconds.
* Do not use this parameter.
* </p>
* @return bool Returns true on success or false on failure.
*/
public function delete ($key, $timeout = null) {}