phpreflect (1) Linux Manual Page
phpreflect – Reverse-engineer classes, interfaces, functions, constants, namespaces and more
Synopsis
phpreflect [options] command [arguments]Description
The phpreflect(1) command parse any data source, to find out elements, such as classes, interfaces, functions, constants, namespaces.Options
-h, –help- Display this help message.
-q, –quiet
- Do not output any message.
-v|vv|v, –verbose
- Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
-V, –version
- Display this application version.
–ansi
- Force ANSI output.
–no-ansi
- Disable ANSI output.
–profile
- Display timing and memory usage information.
–progress
- Show progress bar.
–output
- Write results to file or URL.
–manifest
- Show which versions of dependencies are bundled (PHAR version only).
Analyser:List Command
The phpreflect(1) analyser:list command is used to show what analysers are installed (see CONF FILES section).Analyser:Run Command
The phpreflect(1) analyser:run command is used to analyse a data source and display results.Usage:
phpreflect analyser:run [–alias] [–format[="…"]] [–filter[="…"]] source [analysers1] … [analysersN]
Where:
source
- Identify a data source; may be declared in a json configuration file (see CONF FILES section)
–alias
- If set, the source refers to its alias
–format
- If set, convert result to a specific format. (default: false)
–filter
- Resource that provide a closure to filter results. (default: false)
analysers1 … analysersN
- Identify one or more analyser to execute. See analyser:list command to know what analysers are available. (default: ["structure"])
Config:Validate Command
The phpreflect(1) config:validate command is used to check syntax of your json configuration fileUsage:
phpreflect config:validate [file]
Where:
file
- Path to phpreflect.json file (optional)
Diagnose:Run Command
The phpreflect(1) diagnose:run command is used to identify common errors on a platform.Usage:
phpreflect diagnose:run [-vv|-vvv]
Diagram:Class Command
The phpreflect(1) diagram:class command is used to generate diagram about a user class present in a data sourceUsage:
phpreflect diagram:class [–alias] [–engine[="…"]] argument source
Where:
argument
- Name of the class to inspect
source
- Identify a data source; may be declared in a json configuration file (see CONF FILES section)
–alias
- If set, the source refers to its alias
–engine
- Graphical syntax. (default: "plantuml")
Diagram:Package Command
The phpreflect(1) diagram:package command is used to generate diagram about namespaces in a data sourceUsage:
phpreflect diagram:package [–alias] [–engine[="…"]] argument source
Where:
argument
- Name of the namespace to inspect
source
- Identify a data source; may be declared in a json configuration file (see CONF FILES section)
–alias
- If set, the source refers to its alias
–engine
- Graphical syntax. (default: "plantuml")
Plugin:List Command
The phpreflect(1) plugin:list command is used to show what plugins are installed (see CONF FILES section).Reflection:Class Command
The phpreflect(1) reflection:class command is used to give information about a user class present in a data source.Usage:
phpreflect reflection:class [–alias] [–format="…"] argument source
Where:
argument
- Name of the class to reflect.
source
- Identify a data source; may be declared in a json configuration file (see CONF FILES section)
–alias
- If set, the source refers to its alias
–format
- To ouput results in other formats. (default: "txt")
Reflection:Function Command
The phpreflect(1) reflection:function command is used to give information about a user function present in a data source.Usage:
phpreflect reflection:function [–alias] [–format="…"] argument source
Where:
argument
- Name of the function to reflect.
source
- Identify a data source; may be declared in a json configuration file (see CONF FILES section)
–alias
- If set, the source refers to its alias
–format
- To ouput results in other formats. (default: "txt")
Exit Status
0- Success
1
- Failure (syntax or usage error; configuration error; unexpected error).
Conf Files
A configuration file contains data sources that can be analysed, but also optional plugins and analysers installed. Require configuration file is loaded in the following order:- 1. The CONF_FILE specified by the environment variables BARTLETTRC and BARTLETT_SCAN_DIR.
- 2. phpreflect.json from the current directory.
- 3. phpreflect.json from the User $HOME/.config directory.
- 4. phpreflect.json from the /etc directory.
