<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sadiqk2 / nativephp-symfony-desktop-bundle example snippets
final class Bootstrapper implements AppBootstrapper
{
public function __construct(private readonly WindowManager $windows) {}
// The runtime POSTs /_native/api/booted at the end of its boot and this
// decides what appears. That is the entire app-startup contract.
public function boot(): void
{
$this->windows->open('main')
->url('/')
->size(1000, 720)
->title('My App')
->rememberState()
->open();
}
}
#[AsEventListener]
public function onResized(WindowResized $event): void
{
// Typed, not an array: $event->id, $event->width, $event->height
}
yaml
# config/routes/native_desktop.yaml — written by native:install
native_desktop:
resource: '@NativeDesktopBundle/src/Resources/config/routes.php'
type: php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.