Last active
August 29, 2015 14:05
-
-
Save MadFaill/970f6601d899da42d77a to your computer and use it in GitHub Desktop.
PHPStorm \MogileFS syntax+autocomplete+typehint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class MogileFS | |
* | |
* Специально для PHPStorm | |
* При использовании mogilefs.so - нет автокомплита и хинтинга для \MogileFS | |
* Собственно, по такому случаю - написан данный класс. | |
* Он несет исключительно информационную нагрузку. | |
*/ | |
class MogileFS | |
{ | |
public function __construct() {} | |
/** | |
* @param string $host | |
* @param int $port | |
* @param string $domain | |
* @param float $timeout | |
* | |
* @return bool | |
*/ | |
public function connect($host, $port, $domain, $timeout=0.0) {} | |
/** | |
* @return bool | |
*/ | |
public function isConnected() {} | |
/** | |
* @return bool | |
*/ | |
public function close() {} | |
/** | |
* @param string $file | |
* @param string $key | |
* @param string $class | |
* @param bool $use_file | |
* | |
* @return bool | |
*/ | |
public function put($file, $key, $class, $use_file=false) {} | |
/** | |
* @param string $key | |
* @return array | |
*/ | |
public function fileInfo($key) {} | |
/** | |
* @param string $key | |
* @param int $pathcount | |
* | |
* @return array | |
*/ | |
public function get($key, $pathcount = 2) {} | |
/** | |
* @param string $key | |
* @return bool | |
*/ | |
public function delete($key) {} | |
/** | |
* @param string $from_key | |
* @param string $to_key | |
* | |
* @return bool | |
*/ | |
public function rename($from_key, $to_key) {} | |
/** | |
* @param string $prefix | |
* @param string $after | |
* @param int $limit | |
* | |
* @return array | |
*/ | |
public function listKeys($prefix, $after, $limit) {} | |
/** | |
* @param int $from | |
* @param int $to | |
* | |
* @return bool | |
*/ | |
public function listFids($from, $to) {} | |
/** | |
* @return array | |
*/ | |
public function getDomains() {} | |
/** | |
* @return array | |
*/ | |
public function getHosts() {} | |
/** | |
* @return array | |
*/ | |
public function getDevices() {} | |
/** | |
* @param int $duration | |
* @return bool | |
*/ | |
public function sleep($duration) {} | |
/** | |
* @param int $all | |
* @return array | |
*/ | |
public function stats($all) {} | |
/** | |
* @return bool | |
*/ | |
public function replicate() {} | |
/** | |
* @param string $devid | |
* @param string $status | |
* | |
* @return array | |
*/ | |
public function createDevice($devid, $status) {} | |
/** | |
* @param string $domain | |
* @return array | |
*/ | |
public function createDomain($domain) {} | |
/** | |
* @param string $domain | |
* @return array | |
*/ | |
public function deleteDomain($domain) {} | |
/** | |
* @param string $domain | |
* @param string $class | |
* @param string $mindevcount | |
* | |
* @return array | |
*/ | |
public function createClass($domain, $class, $mindevcount) {} | |
/** | |
* @param string $domain | |
* @param string $class | |
* @param string $mindevcount | |
* | |
* @return array | |
*/ | |
public function updateClass($domain, $class, $mindevcount) {} | |
/** | |
* @param string $hostname | |
* @return array | |
*/ | |
public function createHost($hostname) {} | |
/** | |
* @param string $hostname | |
* @param string $ip | |
* @param int $port | |
* @param string $state | |
*/ | |
public function updateHost($hostname, $ip, $port, $state = "alive") {} | |
/** | |
* @param string $hostname | |
* @return bool | |
*/ | |
public function deleteHost($hostname) {} | |
/** | |
* @param string $hostname | |
* @param string $device | |
* @param string $weight | |
* @return bool | |
*/ | |
public function setWeight($hostname, $device, $weight) {} | |
/** | |
* @param string $hostname | |
* @param string $device | |
* @param string $state | |
* @return bool | |
*/ | |
public function setState($hostname, $device, $state = "alive") {} | |
/** | |
* @param string $status [on|off] | |
* @param string $level | |
* @return bool | |
*/ | |
public function checker($status, $level) {} | |
/** | |
* @param float $readTimeout | |
* @return void | |
*/ | |
public function setReadTimeout($readTimeout) {} | |
/** | |
* @return float | |
*/ | |
public function getReadTimeout() {} | |
} | |
/** | |
* Class MogileFsException | |
*/ | |
class MogileFsException extends Exception {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
phpstorm -> settings -> php -> add include path [path/to/dir/with/file]