Skip to content

Commit

Permalink
Merge pull request #163 from leafsphp/v3.x-dev
Browse files Browse the repository at this point in the history
V3.x dev
  • Loading branch information
mychidarko authored Oct 23, 2022
2 parents 38dc1dc + 0542a04 commit 573dca9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,4 +414,20 @@ public function cors($options = [])
trigger_error('Cors module not found! Run `composer require leafs/cors` to install the CORS module. This is required to configure CORS.');
}
}

/**
* @inheritdoc
*/
public static function run(?callable $callback = null)
{
if (class_exists('Leaf\Eien\Server')) {
server()
->wrap(function () use ($callback) {
parent::run($callback);
})
->listen();
} else {
return parent::run($callback);
}
}
}

0 comments on commit 573dca9

Please sign in to comment.