Repository navigation
Expand file tree
/
Copy pathConsole.php
More file actions
78 lines (64 loc) · 2.45 KB
/
Copy pathConsole.php
File metadata and controls
78 lines (64 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
namespace PhpBrew;
use CLIFramework\Application;
class Console extends Application
{
const NAME = 'phpbrew';
const VERSION = "1.14.7";
public function init()
{
parent::init();
$this->command('init');
$this->command('known');
$this->command('install');
$this->command('list');
$this->command('use');
$this->command('switch');
$this->command('each');
$this->command('config');
$this->command('info');
$this->command('env');
$this->command('ext');
$this->command('variants');
$this->command('path');
$this->command('cd');
$this->command('download');
$this->command('clean');
$this->command('list-ini', 'PhpBrew\Command\ListIniCommand');
$this->command('ctags', 'PhpBrew\Command\CtagsCommand');
$this->command('enable', 'PhpBrew\Command\MigratedCommand');
$this->command('install-ext', 'PhpBrew\Command\MigratedCommand');
$this->command('self-update', 'PhpBrew\Command\SelfUpdateCommand');
$this->command('remove');
$this->command('purge');
$this->command('off');
$this->command('switch-off', 'PhpBrew\Command\SwitchOffCommand');
$this->topics(array (
'contribution' => 'PhpBrew\\Topic\\ContributionTopic',
'cookbook' => 'PhpBrew\\Topic\\CookbookTopic',
'home' => 'PhpBrew\\Topic\\HomeTopic',
'migrating-from-homebrew-php-to-phpbrew' => 'PhpBrew\\Topic\\MigratingFromHomebrewPhpToPhpbrewTopic',
'phpbrew-ja' => 'PhpBrew\\Topic\\PHPBrewJATopic',
'release-process' => 'PhpBrew\\Topic\\ReleaseProcessTopic',
'requirement' => 'PhpBrew\\Topic\\RequirementTopic',
'setting-up-configuration' => 'PhpBrew\\Topic\\SettingUpConfigurationTopic',
'troubleshooting' => 'PhpBrew\\Topic\\TroubleshootingTopic',
));
$this->configure();
}
public function configure()
{
// avoid warnings when web scraping malformed HTML
libxml_use_internal_errors(true);
// prevent execution time limit fatal error
set_time_limit(0);
// prevent warnings when timezone is not set
date_default_timezone_set(
is_readable($tz = '/etc/timezone') ? trim(file_get_contents($tz)) : 'America/Los_Angeles'
);
}
public function brief()
{
return 'brew your latest php!';
}
}