dvadf
File manager - Edit - /home/centroca/public_html/Contracts.tar
Back
CacheContract.php 0000644 00000001233 15253036577 0007772 0 ustar 00 <?php namespace Analyst\Contracts; /** * Interface CacheContract * * @since 1.1.5 */ interface CacheContract { /** * Save value with given key * * @param string $key * @param string $value * * @return static */ public function put($key, $value); /** * Get value by given key * * @param $key * * @param null $default * @return string */ public function get($key, $default = null); /** * @param $key * * @return static */ public function delete($key); /** * Should get value and remove it from cache * * @param $key * @param null $default * @return mixed */ public function pop($key, $default = null); } AnalystContract.php 0000644 00000000251 15253036577 0010401 0 ustar 00 <?php namespace Analyst\Contracts; interface AnalystContract { /** * Must return version of analyst * * @return string */ public static function version(); } TrackerContract.php 0000644 00000002350 15253036577 0010363 0 ustar 00 <?php namespace Analyst\Contracts; interface TrackerContract { /** * Should register activation and deactivation * event hooks * * @return void */ public function registerHooks(); /** * Will fire when admin activates plugin * * @return void */ public function onActivePluginListener(); /** * Will fire when admin deactivates plugin * * @return void */ public function onDeactivatePluginListener(); /** * Will fire when user opted in * * @return void */ public function onOptInListener(); /** * Will fire when user opted out * * @return void */ public function onOptOutListener(); /** * Will fire when user accept opt/in at first time * * @return void */ public function onInstallListener(); /** * Will fire when user skipped installation * * @return void */ public function onSkipInstallListener(); /** * Will fire when user delete plugin through admin panel. * This action will happen if admin at least once * activated the plugin. * * The register_uninstall_hook function accepts only static * function or global function to be executed, so this is * why this method is static * * @return void */ public static function onUninstallPluginListener(); } HttpClientContract.php 0000644 00000000624 15253036577 0011050 0 ustar 00 <?php namespace Analyst\Contracts; use Analyst\ApiResponse; interface HttpClientContract { /** * Make an http request * * @param $method * @param $url * @param $body * @param $headers * @return ApiResponse */ public function request($method, $url, $body, $headers); /** * Must return `true` if client is supported * * @return bool */ public static function hasSupport(); } RequestorContract.php 0000644 00000001236 15253036577 0010763 0 ustar 00 <?php namespace Analyst\Contracts; interface RequestorContract { /** * Get request * * @param $url * @param array $headers * @return mixed */ public function get($url, $headers = []); /** * Post request * * @param $url * @param $body * @param array $headers * @return mixed */ public function post($url, $body = [], $headers = []); /** * Put request * * @param $url * @param $body * @param array $headers * @return mixed */ public function put($url, $body = [], $headers = []); /** * Delete request * * @param $url * @param array $headers * @return mixed */ public function delete($url, $headers = []); } RequestContract.php 0000644 00000000523 15253036577 0010420 0 ustar 00 <?php namespace Analyst\Contracts; use Analyst\ApiResponse; interface RequestContract { /** * Cast request data to array * * @return array */ public function toArray(); /** * Execute the request * @param RequestorContract $requestor * @return ApiResponse */ public function execute(RequestorContract $requestor); }
dvadf
dvadf
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings