{"$schema":"https://yii2-framework.github.io/docs/reference/reference.schema.json","schemaVersion":1,"package":"franken-php","title":"FrankenPHP","repository":"https://github.com/yii2-extensions/franken-php","ref":"main","commit":"c3fb90157e65c0a2947415e4e0bbf9f3b4fe777d","generatedAt":"2026-10-18","url":"https://yii2-framework.github.io/docs/extensions/franken-php/reference/","types":{"yii2\\extensions\\frankenphp\\FrankenPHP":{"kind":"class","modifiers":["final"],"url":"https://yii2-framework.github.io/docs/extensions/franken-php/reference/frankenphp/","summary":"Runs the FrankenPHP worker loop for a Yii PSR bridge application.","methods":{"__construct":{"signature":"public function __construct(yii2\\extensions\\psrbridge\\http\\Application $app, int|null $maxRequests = null)","summary":"Creates a new instance of the `yii2\\extensions\\frankenphp\\FrankenPHP` class.","params":[{"name":"$app","type":"yii2\\extensions\\psrbridge\\http\\Application","description":"Application instance."},{"name":"$maxRequests","type":"int|null","default":"null","optional":true,"description":"Maximum number of requests to handle before stopping. If `null`, will try to read from `$_ENV['MAX_REQUESTS']` or the process environment, otherwise defaults to '1000'."}]},"run":{"signature":"public function run(): int","summary":"Runs the FrankenPHP worker loop for handling HTTP requests.","return":{"type":"int","description":"Exit code indicating the result of the worker loop execution (`yii2\\extensions\\psrbridge\\http\\ServerExitCode::OK` for success, `yii2\\extensions\\psrbridge\\http\\ServerExitCode::REQUEST_LIMIT` for request limit reached)."},"throws":[{"type":"Throwable","description":"if an exception occurs during request handling or response emission."}]}},"constants":{"DEFAULT_MAX_REQUESTS":{"value":"1000","description":"Default maximum number of requests to handle before stopping the worker loop."}}}}}
