You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As with the "unittest" command, the xpcli-Runner will also accept
filenames as class names.
Rationale
Use of tab-completion
Consistency with "unittest"
Functionality
The util.cmd.Runner class will check for the first argument containing
the string ".class.php" (or actually, whatever xp::CLASS_FILE_EXT
constant is defined for), and then try to find the class in the classpath.
To run a Command class, you can use the following:
# Use class name
$ xpcli fully.qualified.ClassName
# Use filename
$ xpcli fully/qualified/ClassName.class.php
Note
Using filenames only works if classes are found in the classpath,
otherwise there is no way to infer the classname from the file's name!
Security considerations
n/a
Speed impact
Slightly slower: One strstr() check for ".class.php" for every case
Scope of Change
As with the "unittest" command, the xpcli-Runner will also accept
filenames as class names.
Rationale
Functionality
The util.cmd.Runner class will check for the first argument containing
the string ".class.php" (or actually, whatever xp::CLASS_FILE_EXT
constant is defined for), and then try to find the class in the classpath.
To run a Command class, you can use the following:
Note
Using filenames only works if classes are found in the classpath,
otherwise there is no way to infer the classname from the file's name!
Security considerations
n/a
Speed impact
Dependencies
n/a
Related documents
Implementing patch
The text was updated successfully, but these errors were encountered: