Functions for detecting command line in core and plugins? #143
-
Unfortunately a lot of web server do not set PHP_SAPI as Yellow expects. Especially cron jobs can get difficult. Additionally plugins that want to access the command line functionality from cgi-mode will run into troubles. It is easy to adapt yellow.php, but could the use of PHP_SAPI in the core and plugins be replaced by a config flag that can be changed at runtime? $yellow->config->setCliMode() Cheers, richi |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thanks for the suggestions. I am afraid to say that we don't add these functions. We can't promise if we may add something like this, however we definitely appreciate the feedback. Thanks, Mark |
Beta Was this translation helpful? Give feedback.
-
You can now check with |
Beta Was this translation helpful? Give feedback.
You can now check with
$this->yellow->isCommandLine()
if a plugin is running at the command line. It was needed for creating static websites and the feature is available to all.