Documentation

CliMock extends Cli
in package

This is the CLI interface for sabre-vobject.

Table of Contents

$format  : string
Whether to spit out 'mimedir' or 'json' format.
$inputFormat  : string
Input format (one of json or mimedir).
$outputFormat  : mixed
$pretty  : bool
JSON pretty print.
$quiet  : bool
No output.
$stderr  : resource
stderr.
$stdin  : resource
stdin.
$stdout  : resource
output stream.
$forgiving  : bool
Makes the parser less strict.
$inputPath  : string
Source file.
$outputPath  : string
Destination file.
$parser  : mixed
$showHelp  : bool
Help display.
main()  : int
Main function.
color()  : int
Colorizes a file.
colorize()  : string
Returns an ansi color string for a color name.
convert()  : int
Converts a vObject file to a new format.
cWrite()  : mixed
Writes out a string in specific color.
log()  : mixed
Sends a message to STDERR.
parseArguments()  : mixed
Parses the list of arguments.
readInput()  : Component
Reads the input file.
repair()  : int
Repairs a VObject file.
serializeComponent()  : mixed
serializeProperty()  : mixed
Colorizes a property.
showHelp()  : mixed
Shows the help message.
validate()  : int
Validates a VObject file.

Properties

$format

Whether to spit out 'mimedir' or 'json' format.

public string $format

$inputFormat

Input format (one of json or mimedir).

public string $inputFormat

$outputFormat

public mixed $outputFormat

$pretty

JSON pretty print.

public bool $pretty

$quiet

No output.

public bool $quiet = false

$stderr

stderr.

public resource $stderr

$stdin

stdin.

public resource $stdin

$stdout

output stream.

public resource $stdout

$forgiving

Makes the parser less strict.

protected bool $forgiving = false

$inputPath

Source file.

protected string $inputPath

$outputPath

Destination file.

protected string $outputPath

$parser

protected mixed $parser

$showHelp

Help display.

protected bool $showHelp = false

Methods

main()

Main function.

public main(array<string|int, mixed> $argv) : int
Parameters
$argv : array<string|int, mixed>
Return values
int

color()

Colorizes a file.

protected color(Component $vObj) : int
Parameters
$vObj : Component
Return values
int

colorize()

Returns an ansi color string for a color name.

protected colorize(string $color, mixed $str[, mixed $resetTo = 'default' ]) : string
Parameters
$color : string
$str : mixed
$resetTo : mixed = 'default'
Return values
string

convert()

Converts a vObject file to a new format.

protected convert(Component $vObj) : int
Parameters
$vObj : Component
Return values
int

cWrite()

Writes out a string in specific color.

protected cWrite(string $color, string $str) : mixed
Parameters
$color : string
$str : string
Return values
mixed

log()

Sends a message to STDERR.

protected log(string $msg[, mixed $color = 'default' ]) : mixed
Parameters
$msg : string
$color : mixed = 'default'
Return values
mixed

parseArguments()

Parses the list of arguments.

protected parseArguments(array<string|int, mixed> $argv) : mixed
Parameters
$argv : array<string|int, mixed>
Return values
mixed

repair()

Repairs a VObject file.

protected repair(Component $vObj) : int
Parameters
$vObj : Component
Return values
int

serializeComponent()

protected serializeComponent(Component $vObj) : mixed
Parameters
$vObj : Component
Return values
mixed

serializeProperty()

Colorizes a property.

protected serializeProperty(Property $property) : mixed
Parameters
$property : Property
Return values
mixed

showHelp()

Shows the help message.

protected showHelp() : mixed
Return values
mixed

validate()

Validates a VObject file.

protected validate(Component $vObj) : int
Parameters
$vObj : Component
Return values
int

Search results