public static function create($sthGroup) { if (!is_array($sthGroup)) { throw new \Exception('asset is_array($sthGroup)'); } $promiseGroup = new self(); foreach ($sthGroup as $sth) { $promise = Promise::create($sth); $promise->nextPromise = $promiseGroup; $promiseGroup->subPromiseArray[] = $promise; } return $promiseGroup; }