Skip to content

I sincerely believe that you should improve the standard #9

@wnunezc

Description

@wnunezc
  1. If the request is web or CLI it can be detected according to the existence of variables:
$env= '';
if (php_sapi_name() == 'cli') {
    $env= 'cli';
} else {
    $env= 'web';
}

or with one-liner

$env = (php_sapi_name() == 'cli') ? 'cli' : 'web';
  1. Generally insert content in a "pre" tag or perform a color highlighting in CLI, it should be indicated by a single instruction passed to the function, in case the output is required to be dumped into a text file default plane should be false.
if($env== 'cli'){
    //populate cli highlighting
}elseif(){
    //decorated with <pre> tag
}
  1. It seems to me that the user should tell the function what he wants to do with the result:
  • output html.
  • output CLI
  • output File (plain txt)
  • output json
  1. the number of Line in Title or Header must be passed ... 1,2,3,X and you can set the number you want footer.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions