1: <?php
2:
3: namespace Alchemy\util\promise;
4:
5:
6: /**
7: * An interface for objects that are functionally identical when composed
8: * with Promises; in other words, they must be immutable and time-independent.
9: */
10: interface IPromisable {
11:
12: /**
13: * Returns an array mapping promisable methods to return types.
14: * A promisable method is one that is dependent only on immutable inputs
15: * and is guaranteed to return an instance of a certain type.
16: *
17: * @return array(method_name => class_name, ...)
18: */
19: public static function list_promisable_methods();
20: }