FOSSology  4.4.0
Open Source License Compliance by Open Source Software
common-cli.php File Reference

General purpose classes used by fossology CLI programs. More...

Go to the source code of this file.

Namespaces

 common
 

Functions

 cli_Init ()
 Initialize the fossology environment for CLI use. This routine loads the plugins so they can be use by cli programs. In the process of doing that it disables the core-auth plugin. More...
 
 cli_logger ($handle, $message, $mode='a')
 Write/append a message to the log handle passed in. More...
 

Detailed Description

General purpose classes used by fossology CLI programs.

Definition in file common-cli.php.

Function Documentation

◆ cli_Init()

cli_Init ( )

Initialize the fossology environment for CLI use. This routine loads the plugins so they can be use by cli programs. In the process of doing that it disables the core-auth plugin.

Returns
true

Definition at line 25 of file common-cli.php.

◆ cli_logger()

cli_logger (   $handle,
  $message,
  $mode = 'a' 
)

Write/append a message to the log handle passed in.

Parameters
string$handleThe path to the file
string$messageThe message to put in the log file, the string should not have a new line at the end, this function will add it.
string$modeThe open mode, either 'a' or 'w'
Note
It is up to the caller to manage the mode
Returns
null on success, string for failure

Definition at line 63 of file common-cli.php.