Server IP : 127.0.0.2 / Your IP : 18.222.26.253 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/vendor/react/promise/src/ |
Upload File : |
<?php namespace React\Promise; interface ExtendedPromiseInterface extends PromiseInterface { /** * Consumes the promise's ultimate value if the promise fulfills, or handles the * ultimate error. * * It will cause a fatal error if either `$onFulfilled` or * `$onRejected` throw or return a rejected promise. * * Since the purpose of `done()` is consumption rather than transformation, * `done()` always returns `null`. * * @param callable|null $onFulfilled * @param callable|null $onRejected * @param callable|null $onProgress This argument is deprecated and should not be used anymore. * @return void */ public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null); /** * Registers a rejection handler for promise. It is a shortcut for: * * ```php * $promise->then(null, $onRejected); * ``` * * Additionally, you can type hint the `$reason` argument of `$onRejected` to catch * only specific errors. * * @param callable $onRejected * @return ExtendedPromiseInterface */ public function otherwise(callable $onRejected); /** * Allows you to execute "cleanup" type tasks in a promise chain. * * It arranges for `$onFulfilledOrRejected` to be called, with no arguments, * when the promise is either fulfilled or rejected. * * * If `$promise` fulfills, and `$onFulfilledOrRejected` returns successfully, * `$newPromise` will fulfill with the same value as `$promise`. * * If `$promise` fulfills, and `$onFulfilledOrRejected` throws or returns a * rejected promise, `$newPromise` will reject with the thrown exception or * rejected promise's reason. * * If `$promise` rejects, and `$onFulfilledOrRejected` returns successfully, * `$newPromise` will reject with the same reason as `$promise`. * * If `$promise` rejects, and `$onFulfilledOrRejected` throws or returns a * rejected promise, `$newPromise` will reject with the thrown exception or * rejected promise's reason. * * `always()` behaves similarly to the synchronous finally statement. When combined * with `otherwise()`, `always()` allows you to write code that is similar to the familiar * synchronous catch/finally pair. * * Consider the following synchronous code: * * ```php * try { * return doSomething(); * } catch(\Exception $e) { * return handleError($e); * } finally { * cleanup(); * } * ``` * * Similar asynchronous code (with `doSomething()` that returns a promise) can be * written: * * ```php * return doSomething() * ->otherwise('handleError') * ->always('cleanup'); * ``` * * @param callable $onFulfilledOrRejected * @return ExtendedPromiseInterface */ public function always(callable $onFulfilledOrRejected); /** * Registers a handler for progress updates from promise. It is a shortcut for: * * ```php * $promise->then(null, null, $onProgress); * ``` * * @param callable $onProgress * @return ExtendedPromiseInterface * @deprecated 2.6.0 Progress support is deprecated and should not be used anymore. */ public function progress(callable $onProgress); }