Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created May 23, 2018 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/65ee5b4f4cab6aa932cdec3cc175e20e to your computer and use it in GitHub Desktop.
Save uno-de-piera/65ee5b4f4cab6aa932cdec3cc175e20e to your computer and use it in GitHub Desktop.
<?php namespace App\Commands;
use CodeIgniter\CLI\BaseCommand;
use CodeIgniter\CLI\CLI;
use CodeIgniter\CodeIgniter;
class AppInfo extends BaseCommand
{
protected $group = 'AppInfo';
protected $name = 'app:info';
protected $description = 'Muestra la información del proyecto.';
public function run(array $params)
{
CLI::write('PHP Version: '. CLI::color(phpversion(), 'yellow'));
CLI::write('CI Version: '. CLI::color(CodeIgniter::CI_VERSION, 'yellow'));
CLI::write('APPPATH: '. CLI::color(APPPATH, 'yellow'));
CLI::write('BASEPATH: '. CLI::color(BASEPATH, 'yellow'));
CLI::write('ROOTPATH: '. CLI::color(ROOTPATH, 'yellow'));
CLI::write('Included files: '. CLI::color(count(get_included_files()), 'yellow'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment