Files
hephaestus 093df77a1f CHG: introduce cancellable queue for use with unwinding install callbacks (Webapps)
CHG: reorder installation to clarify installation completed (apnscp/notify-installed)
2024-08-23 14:14:35 -04:00

26 lines
579 B
PHP

<?php declare(strict_types=1);
/*
* Copyright (C) Apis Networks, Inc - All Rights Reserved.
*
* Unauthorized copying of this file, via any medium, is
* strictly prohibited without consent. Any dissemination of
* material herein is prohibited.
*
* For licensing inquiries email <licensing@apisnetworks.com>
*
* Written by Matt Saladna <matt@apisnetworks.com>, April 2021
*/
class Deferred extends SplStack {
public function __destruct()
{
$this->flush();
}
public function flush(): void
{
while (!$this->isEmpty()) {
\call_user_func($this->pop());
}
}
}