/**
  * singleton pattern
  *
  * @return PlentymarketsSoapExampleLoader
  */
 public static function getInstance()
 {
     if (!isset(self::$instance) || !self::$instance instanceof PlentymarketsSoapExampleLoader) {
         self::$instance = new PlentymarketsSoapExampleLoader();
     }
     return self::$instance;
 }
<?php

/*
 * usage:
 * 
 * shell> php cli/PlentymarketsSoapExampleLoader.cli.php [ExampleName]
 * shell> php cli/PlentymarketsSoapExampleLoader.cli.php GetServerTime
 * 
 * If you want to see log output, than run this before:
 * shell> tail -f log/soap.log &
 * 
 */
require_once realpath(dirname(__FILE__) . '/../') . '/config/basic.inc.php';
require_once ROOT . 'lib/soap/example_loader/PlentymarketsSoapExampleLoader.class.php';
PlentymarketsSoapExampleLoader::getInstance()->run($argv);