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');
117 list($options, $positional) = $this->parseArguments($argv);
120 $this->quiet = true;
122 …$this->log($this->colorize('green', 'sabre/vobject ').$this->colorize('yellow', Version::VERSION));
131 $this->showHelp();
154 $this->format = $value;
163 $this->pretty = true;
167 $this->forgiving = true;
175 $this->inputFormat = 'json';
187 $this->inputFormat = 'mimedir';
200 $this->showHelp();
217 $this->showHelp();
218 $this->log('Error: '.$e->getMessage(), 'red');
225 $this->inputPath = $positional[1];
226 $this->outputPath = isset($positional[2]) ? $positional[2] : '-';
228 if ('-' !== $this->outputPath) {
229 $this->stdout = fopen($this->outputPath, 'w');
232 if (!$this->inputFormat) {
233 if ('.json' === substr($this->inputPath, -5)) {
234 $this->inputFormat = 'json';
236 $this->inputFormat = 'mimedir';
239 if (!$this->format) {
240 if ('.json' === substr($this->outputPath, -5)) {
241 $this->format = 'json';
243 $this->format = 'mimedir';
250 while ($input = $this->readInput()) {
251 $returnCode = $this->$command($input);
259 $this->log('Error: '.$e->getMessage(), 'red');
272 $this->log('Usage:', 'yellow');
273 $this->log(' vobject [options] command [arguments]');
274 $this->log('');
275 $this->log('Options:', 'yellow');
276 $this->log($this->colorize('green', ' -q ')."Don't output anything.");
277 $this->log($this->colorize('green', ' -help -h ').'Display this help message.');
278 …$this->log($this->colorize('green', ' --format ').'Convert to a specific format. Must be one…
279 $this->log($this->colorize('green', ' --forgiving ').'Makes the parser less strict.');
280 $this->log(' vcard30, vcard40, icalendar20, jcal, jcard, json, mimedir.');
281 …$this->log($this->colorize('green', ' --inputformat ').'If the input format cannot be guessed fro…
282 $this->log(' must be specified here.');
285 $this->log($this->colorize('green', ' --pretty ').'json pretty-print.');
287 $this->log('');
288 $this->log('Commands:', 'yellow');
289 …$this->log($this->colorize('green', ' validate').' source_file Validates a file for …
290 … $this->log($this->colorize('green', ' repair').' source_file [output_file] Repairs a file.');
291 … $this->log($this->colorize('green', ' convert').' source_file [output_file] Converts a file.');
292 …$this->log($this->colorize('green', ' color').' source_file Colorize a file, usef…
293 $this->log(
303 $this->log('Examples:', 'yellow');
304 $this->log(' vobject convert contact.vcf contact.json');
305 $this->log(' vobject convert --format=vcard40 old.vcf new.vcf');
306 $this->log(' vobject convert --inputformat=json --format=mimedir - -');
307 $this->log(' vobject color calendar.ics');
308 $this->log('');
309 $this->log('https://github.com/fruux/sabre-vobject', 'purple');