示例#1
0
 /**
  * @param string $message
  */
 public function __construct($message = null)
 {
     if ($message !== null) {
         $message = 'The promise has been cancelled';
     }
     parent::__construct($this, $message);
 }
示例#2
0
 public function __construct($msg, array $reasons)
 {
     parent::__construct($reasons, sprintf('%s; %d rejected promises', $msg, count($reasons)));
 }