Example #1
0
File: About.php Project: newup/core
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $this->info('NewUp version ' . $this->laravel->version());
     $this->line('http://newup.io' . PHP_EOL);
     $this->line('Configuration loaded from: ' . $this->normalizePath(get_user_config_path()) . PHP_EOL);
     $this->comment('NewUp is a simple command line utility, built on Laravel\'s Artisan, to quickly generate packages compatible with all of PHP.');
     $this->comment('Check out the source code at github.com/newup/newup' . PHP_EOL);
     $this->line('Thank you for using NewUp!');
 }
Example #2
0
 protected function getConfigurationFiles(Application $app)
 {
     $files = [];
     $userConfigurationPath = get_user_config_path();
     $userConfigurationPath = $this->normalizePath($userConfigurationPath);
     $this->userConfigurationPath = $userConfigurationPath;
     foreach (Finder::create()->files()->name('*.php')->in($userConfigurationPath) as $file) {
         $nesting = $this->getConfigurationNesting($file);
         $files[$nesting . basename($file->getRealPath(), '.php')] = $file->getRealPath();
     }
     return $files;
 }
Example #3
0
 public function testGetUserConfigObservesConfigConstant()
 {
     define('NEWUP_CORE_USER_CONFIGURATION_DIRECTORY', 'test');
     $this->assertEquals('test', get_user_config_path());
 }