1#!/usr/bin/env php 2<?php 3 4namespace Sabre\VObject; 5 6// This sucks.. we have to try to find the composer autoloader. But chances 7// are, we can't find it this way. So we'll do our bestest 8$paths = [ 9 __DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly 10 __DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency. 11]; 12 13foreach($paths as $path) { 14 if (file_exists($path)) { 15 include $path; 16 break; 17 } 18} 19 20if (!class_exists('Sabre\\VObject\\Version')) { 21 fwrite(STDERR, "Composer autoloader could not be loaded.\n"); 22 die(1); 23} 24 25$cli = new Cli(); 26exit($cli->main($argv)); 27 28