src/Warp/Core/Console.php
public static function Start()
	{
		// Retrieve the global variables
		if(!$argv) $argv = $_SERVER["argv"];

		// Get the console variables
		$functionName = $argv[1];
		$rows = explode(",", $argv[2]);
		$vars = array();
		foreach($rows as $row)
		{
			$parts = explode("=", $row);
			$vars[$parts[0]] = $parts[1];
		}

		// Prepare the console
		$console = new Console;

		// Run the console
		try
		{
			return $console->Run($functionName, $vars);
		}
		catch(\Exception $ex)
		{
			return "\nError: " . $ex->getMessage() . "\n";
		}
	}
public static function Start()
	{
		// Retrieve the global variables
		if(!$argv) $argv = $_SERVER["argv"];

		// Get the console variables
		$functionName = $argv[1];
		$rows = explode(",", $argv[2]);
		$vars = array();
		foreach($rows as $row)
		{
			$parts = explode("=", $row);
			$vars[$parts[0]] = $parts[1];
		}

		// Prepare the console
		$console = new Console;

		// Run the console
		try
		{
			return $console->Run($functionName, $vars);
		}
		catch(\Exception $ex)
		{
			return "\nError: " . $ex->getMessage() . "\n";
		}
	}
public static function Start ( ) { // Retrieve the global variables if ( ! $ argv ) $ argv = $ _SERVER [ "argv" ] ; // Get the console variables $ functionName = $ argv [ 1 ] ; $ rows = explode ( "," , $ argv [ 2 ] ) ; $ vars = array ( ) ; foreach ( $ rows as $ row ) { $ parts = explode ( "=" , $ row ) ; $ vars [ $ parts [ 0 ] ] = $ parts [ 1 ] ; } // Prepare the console $ console = new Console ; // Run the console try { return $ console -> Run ( $ functionName , $ vars ) ; } catch ( \ Exception $ ex ) { return "\nError: " . $ ex -> getMessage ( ) . "\n" ; } }
Start the Console
Start the Console