Lines Matching refs:this

104         if (!$this->stderr) {
105 $this->stderr = fopen('php://stderr', 'w');
107 if (!$this->stdout) {
108 $this->stdout = fopen('php://stdout', 'w');
110 if (!$this->stdin) {
111 $this->stdin = fopen('php://stdin', 'r');
119 list($options, $positional) = $this->parseArguments($argv);
122 $this->quiet = true;
124 …$this->log($this->colorize('green', "sabre/vobject ") . $this->colorize('yellow', Version::VERSION…
135 $this->showHelp();
158 $this->format = $value;
168 $this->pretty = true;
172 $this->forgiving = true;
180 $this->inputFormat = 'json';
192 $this->inputFormat = 'mimedir';
208 $this->showHelp();
225 $this->showHelp();
226 $this->log('Error: ' . $e->getMessage(), 'red');
232 $this->inputPath = $positional[1];
233 $this->outputPath = isset($positional[2]) ? $positional[2] : '-';
235 if ($this->outputPath !== '-') {
236 $this->stdout = fopen($this->outputPath, 'w');
239 if (!$this->inputFormat) {
240 if (substr($this->inputPath, -5) === '.json') {
241 $this->inputFormat = 'json';
243 $this->inputFormat = 'mimedir';
246 if (!$this->format) {
247 if (substr($this->outputPath, -5) === '.json') {
248 $this->format = 'json';
250 $this->format = 'mimedir';
259 while ($input = $this->readInput()) {
261 $returnCode = $this->$command($input);
269 $this->log('Error: ' . $e->getMessage(), 'red');
284 $this->log('Usage:', 'yellow');
285 $this->log(" vobject [options] command [arguments]");
286 $this->log('');
287 $this->log('Options:', 'yellow');
288 $this->log($this->colorize('green', ' -q ') . "Don't output anything.");
289 $this->log($this->colorize('green', ' -help -h ') . "Display this help message.");
290 …$this->log($this->colorize('green', ' --format ') . "Convert to a specific format. Must be o…
291 $this->log($this->colorize('green', ' --forgiving ') . "Makes the parser less strict.");
292 $this->log(" vcard30, vcard40, icalendar20, jcal, jcard, json, mimedir.");
293 …$this->log($this->colorize('green', ' --inputformat ') . "If the input format cannot be guessed f…
294 $this->log(" must be specified here.");
297 $this->log($this->colorize('green', ' --pretty ') . "json pretty-print.");
299 $this->log('');
300 $this->log('Commands:', 'yellow');
301 …$this->log($this->colorize('green', ' validate') . ' source_file Validates a file fo…
302 … $this->log($this->colorize('green', ' repair') . ' source_file [output_file] Repairs a file.');
303 … $this->log($this->colorize('green', ' convert') . ' source_file [output_file] Converts a file.');
304 …$this->log($this->colorize('green', ' color') . ' source_file Colorize a file, us…
305 $this->log(
315 $this->log('Examples:', 'yellow');
316 $this->log(' vobject convert contact.vcf contact.json');
317 $this->log(' vobject convert --format=vcard40 old.vcf new.vcf');
318 $this->log(' vobject convert --inputformat=json --format=mimedir - -');
319 $this->log(' vobject color calendar.ics');
320 $this->log('');
321 $this->log('https://github.com/fruux/sabre-vobject', 'purple');