{$method}( ...$args ); } public static function getInstance(): Notice { $cls = static::class; if ( ! isset( self::$instances[ $cls ] ) ) { self::$instances[ $cls ] = new static(); } return self::$instances[ $cls ]; } public function __wakeup() { throw new Exception( "Cannot unserialize a singleton." ); } protected function __clone() { } private function init() { foreach ( [ self::ERROR, self::SUCCESS, self::WARNING, self::INFO, ] as $level ) { $messages = get_transient( "aether_notice_{$level}" ); if ( $messages && is_array( $messages ) ) { foreach ( $messages as $message ) { echo sprintf( '
%s