Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
added environment option that'll set a default application environment
Browse files Browse the repository at this point in the history
(if specified)
  • Loading branch information
shady committed Jul 23, 2014
1 parent dcb5222 commit 6aa2fa3
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lib/Fresque.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ public function __construct()
$this->input = new \ezcConsoleInput();
$this->output = new \ezcConsoleOutput();

$this->input->registerOption(
new \ezcConsoleOption(
't',
'environment',
\ezcConsoleInput::TYPE_STRING,
null,
false,
'Application environment',
'Application environment'
)
);

$this->input->registerOption(
new \ezcConsoleOption(
'u',
Expand Down Expand Up @@ -319,7 +331,11 @@ public function __construct()
'help' => 'Print help',
'options' => array()),
);


if ($this->input->getOption('environment')->value) {
putenv($this->input->getOption('environment')->value);
}

$this->callCommand($command);
}

Expand Down

0 comments on commit 6aa2fa3

Please sign in to comment.