Base work for CLI and phpunit support