You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2015/05/01 23:32:55 UTC

[08/57] [partial] airavata-php-gateway git commit: AIRAVATA 1632 + Job Description for Admin Dashboard

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php
new file mode 100755
index 0000000..2231327
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php
@@ -0,0 +1,223 @@
+<?php namespace Illuminate\Queue;
+
+use Closure;
+
+class QueueManager {
+
+	/**
+	 * The application instance.
+	 *
+	 * @var \Illuminate\Foundation\Application
+	 */
+	protected $app;
+
+	/**
+	 * The array of resolved queue connections.
+	 *
+	 * @var array
+	 */
+	protected $connections = array();
+
+	/**
+	 * Create a new queue manager instance.
+	 *
+	 * @param  \Illuminate\Foundation\Application  $app
+	 * @return void
+	 */
+	public function __construct($app)
+	{
+		$this->app = $app;
+	}
+
+	/**
+	 * Register an event listener for the daemon queue loop.
+	 *
+	 * @param  mixed  $callback
+	 * @return void
+	 */
+	public function looping($callback)
+	{
+		$this->app['events']->listen('illuminate.queue.looping', $callback);
+	}
+
+	/**
+	 * Register an event listener for the failed job event.
+	 *
+	 * @param  mixed  $callback
+	 * @return void
+	 */
+	public function failing($callback)
+	{
+		$this->app['events']->listen('illuminate.queue.failed', $callback);
+	}
+
+	/**
+	 * Register an event listener for the daemon queue stopping.
+	 *
+	 * @param  mixed  $callback
+	 * @return void
+	 */
+	public function stopping($callback)
+	{
+		$this->app['events']->listen('illuminate.queue.stopping', $callback);
+	}
+
+	/**
+	 * Determine if the driver is connected.
+	 *
+	 * @param  string  $name
+	 * @return bool
+	 */
+	public function connected($name = null)
+	{
+		return isset($this->connections[$name ?: $this->getDefaultDriver()]);
+	}
+
+	/**
+	 * Resolve a queue connection instance.
+	 *
+	 * @param  string  $name
+	 * @return \Illuminate\Queue\QueueInterface
+	 */
+	public function connection($name = null)
+	{
+		$name = $name ?: $this->getDefaultDriver();
+
+		// If the connection has not been resolved yet we will resolve it now as all
+		// of the connections are resolved when they are actually needed so we do
+		// not make any unnecessary connection to the various queue end-points.
+		if ( ! isset($this->connections[$name]))
+		{
+			$this->connections[$name] = $this->resolve($name);
+
+			$this->connections[$name]->setContainer($this->app);
+
+			$this->connections[$name]->setEncrypter($this->app['encrypter']);
+		}
+
+		return $this->connections[$name];
+	}
+
+	/**
+	 * Resolve a queue connection.
+	 *
+	 * @param  string  $name
+	 * @return \Illuminate\Queue\QueueInterface
+	 */
+	protected function resolve($name)
+	{
+		$config = $this->getConfig($name);
+
+		return $this->getConnector($config['driver'])->connect($config);
+	}
+
+	/**
+	 * Get the connector for a given driver.
+	 *
+	 * @param  string  $driver
+	 * @return \Illuminate\Queue\Connectors\ConnectorInterface
+	 *
+	 * @throws \InvalidArgumentException
+	 */
+	protected function getConnector($driver)
+	{
+		if (isset($this->connectors[$driver]))
+		{
+			return call_user_func($this->connectors[$driver]);
+		}
+
+		throw new \InvalidArgumentException("No connector for [$driver]");
+	}
+
+	/**
+	 * Add a queue connection resolver.
+	 *
+	 * @param  string    $driver
+	 * @param  \Closure  $resolver
+	 * @return void
+	 */
+	public function extend($driver, Closure $resolver)
+	{
+		return $this->addConnector($driver, $resolver);
+	}
+
+	/**
+	 * Add a queue connection resolver.
+	 *
+	 * @param  string    $driver
+	 * @param  \Closure  $resolver
+	 * @return void
+	 */
+	public function addConnector($driver, Closure $resolver)
+	{
+		$this->connectors[$driver] = $resolver;
+	}
+
+	/**
+	 * Get the queue connection configuration.
+	 *
+	 * @param  string  $name
+	 * @return array
+	 */
+	protected function getConfig($name)
+	{
+		return $this->app['config']["queue.connections.{$name}"];
+	}
+
+	/**
+	 * Get the name of the default queue connection.
+	 *
+	 * @return string
+	 */
+	public function getDefaultDriver()
+	{
+		return $this->app['config']['queue.default'];
+	}
+
+	/**
+	 * Set the name of the default queue connection.
+	 *
+	 * @param  string  $name
+	 * @return void
+	 */
+	public function setDefaultDriver($name)
+	{
+		$this->app['config']['queue.default'] = $name;
+	}
+
+	/**
+	 * Get the full name for the given connection.
+	 *
+	 * @param  string  $connection
+	 * @return string
+	 */
+	public function getName($connection = null)
+	{
+		return $connection ?: $this->getDefaultDriver();
+	}
+
+	/**
+	* Determine if the application is in maintenance mode.
+	*
+	* @return bool
+	*/
+	public function isDownForMaintenance()
+	{
+		return $this->app->isDownForMaintenance();
+	}
+
+	/**
+	 * Dynamically pass calls to the default connection.
+	 *
+	 * @param  string  $method
+	 * @param  array   $parameters
+	 * @return mixed
+	 */
+	public function __call($method, $parameters)
+	{
+		$callable = array($this->connection(), $method);
+
+		return call_user_func_array($callable, $parameters);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php
new file mode 100755
index 0000000..64733ca
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php
@@ -0,0 +1,305 @@
+<?php namespace Illuminate\Queue;
+
+use IlluminateQueueClosure;
+use Illuminate\Support\ServiceProvider;
+use Illuminate\Queue\Console\WorkCommand;
+use Illuminate\Queue\Console\ListenCommand;
+use Illuminate\Queue\Console\RestartCommand;
+use Illuminate\Queue\Connectors\SqsConnector;
+use Illuminate\Queue\Console\SubscribeCommand;
+use Illuminate\Queue\Connectors\SyncConnector;
+use Illuminate\Queue\Connectors\IronConnector;
+use Illuminate\Queue\Connectors\RedisConnector;
+use Illuminate\Queue\Connectors\BeanstalkdConnector;
+use Illuminate\Queue\Failed\DatabaseFailedJobProvider;
+
+class QueueServiceProvider extends ServiceProvider {
+
+	/**
+	 * Indicates if loading of the provider is deferred.
+	 *
+	 * @var bool
+	 */
+	protected $defer = true;
+
+	/**
+	 * Register the service provider.
+	 *
+	 * @return void
+	 */
+	public function register()
+	{
+		$this->registerManager();
+
+		$this->registerWorker();
+
+		$this->registerListener();
+
+		$this->registerSubscriber();
+
+		$this->registerFailedJobServices();
+
+		$this->registerQueueClosure();
+	}
+
+	/**
+	 * Register the queue manager.
+	 *
+	 * @return void
+	 */
+	protected function registerManager()
+	{
+		$this->app->bindShared('queue', function($app)
+		{
+			// Once we have an instance of the queue manager, we will register the various
+			// resolvers for the queue connectors. These connectors are responsible for
+			// creating the classes that accept queue configs and instantiate queues.
+			$manager = new QueueManager($app);
+
+			$this->registerConnectors($manager);
+
+			return $manager;
+		});
+	}
+
+	/**
+	 * Register the queue worker.
+	 *
+	 * @return void
+	 */
+	protected function registerWorker()
+	{
+		$this->registerWorkCommand();
+
+		$this->registerRestartCommand();
+
+		$this->app->bindShared('queue.worker', function($app)
+		{
+			return new Worker($app['queue'], $app['queue.failer'], $app['events']);
+		});
+	}
+
+	/**
+	 * Register the queue worker console command.
+	 *
+	 * @return void
+	 */
+	protected function registerWorkCommand()
+	{
+		$this->app->bindShared('command.queue.work', function($app)
+		{
+			return new WorkCommand($app['queue.worker']);
+		});
+
+		$this->commands('command.queue.work');
+	}
+
+	/**
+	 * Register the queue listener.
+	 *
+	 * @return void
+	 */
+	protected function registerListener()
+	{
+		$this->registerListenCommand();
+
+		$this->app->bindShared('queue.listener', function($app)
+		{
+			return new Listener($app['path.base']);
+		});
+	}
+
+	/**
+	 * Register the queue listener console command.
+	 *
+	 * @return void
+	 */
+	protected function registerListenCommand()
+	{
+		$this->app->bindShared('command.queue.listen', function($app)
+		{
+			return new ListenCommand($app['queue.listener']);
+		});
+
+		$this->commands('command.queue.listen');
+	}
+
+	/**
+	 * Register the queue restart console command.
+	 *
+	 * @return void
+	 */
+	public function registerRestartCommand()
+	{
+		$this->app->bindShared('command.queue.restart', function()
+		{
+			return new RestartCommand;
+		});
+
+		$this->commands('command.queue.restart');
+	}
+
+	/**
+	 * Register the push queue subscribe command.
+	 *
+	 * @return void
+	 */
+	protected function registerSubscriber()
+	{
+		$this->app->bindShared('command.queue.subscribe', function()
+		{
+			return new SubscribeCommand;
+		});
+
+		$this->commands('command.queue.subscribe');
+	}
+
+	/**
+	 * Register the connectors on the queue manager.
+	 *
+	 * @param  \Illuminate\Queue\QueueManager  $manager
+	 * @return void
+	 */
+	public function registerConnectors($manager)
+	{
+		foreach (array('Sync', 'Beanstalkd', 'Redis', 'Sqs', 'Iron') as $connector)
+		{
+			$this->{"register{$connector}Connector"}($manager);
+		}
+	}
+
+	/**
+	 * Register the Sync queue connector.
+	 *
+	 * @param  \Illuminate\Queue\QueueManager  $manager
+	 * @return void
+	 */
+	protected function registerSyncConnector($manager)
+	{
+		$manager->addConnector('sync', function()
+		{
+			return new SyncConnector;
+		});
+	}
+
+	/**
+	 * Register the Beanstalkd queue connector.
+	 *
+	 * @param  \Illuminate\Queue\QueueManager  $manager
+	 * @return void
+	 */
+	protected function registerBeanstalkdConnector($manager)
+	{
+		$manager->addConnector('beanstalkd', function()
+		{
+			return new BeanstalkdConnector;
+		});
+	}
+
+	/**
+	 * Register the Redis queue connector.
+	 *
+	 * @param  \Illuminate\Queue\QueueManager  $manager
+	 * @return void
+	 */
+	protected function registerRedisConnector($manager)
+	{
+		$app = $this->app;
+
+		$manager->addConnector('redis', function() use ($app)
+		{
+			return new RedisConnector($app['redis']);
+		});
+	}
+
+	/**
+	 * Register the Amazon SQS queue connector.
+	 *
+	 * @param  \Illuminate\Queue\QueueManager  $manager
+	 * @return void
+	 */
+	protected function registerSqsConnector($manager)
+	{
+		$manager->addConnector('sqs', function()
+		{
+			return new SqsConnector;
+		});
+	}
+
+	/**
+	 * Register the IronMQ queue connector.
+	 *
+	 * @param  \Illuminate\Queue\QueueManager  $manager
+	 * @return void
+	 */
+	protected function registerIronConnector($manager)
+	{
+		$app = $this->app;
+
+		$manager->addConnector('iron', function() use ($app)
+		{
+			return new IronConnector($app['encrypter'], $app['request']);
+		});
+
+		$this->registerIronRequestBinder();
+	}
+
+	/**
+	 * Register the request rebinding event for the Iron queue.
+	 *
+	 * @return void
+	 */
+	protected function registerIronRequestBinder()
+	{
+		$this->app->rebinding('request', function($app, $request)
+		{
+			if ($app['queue']->connected('iron'))
+			{
+				$app['queue']->connection('iron')->setRequest($request);
+			}
+		});
+	}
+
+	/**
+	 * Register the failed job services.
+	 *
+	 * @return void
+	 */
+	protected function registerFailedJobServices()
+	{
+		$this->app->bindShared('queue.failer', function($app)
+		{
+			$config = $app['config']['queue.failed'];
+
+			return new DatabaseFailedJobProvider($app['db'], $config['database'], $config['table']);
+		});
+	}
+
+	/**
+	 * Register the Illuminate queued closure job.
+	 *
+	 * @return void
+	 */
+	protected function registerQueueClosure()
+	{
+		$this->app->bindShared('IlluminateQueueClosure', function($app)
+		{
+			return new IlluminateQueueClosure($app['encrypter']);
+		});
+	}
+
+	/**
+	 * Get the services provided by the provider.
+	 *
+	 * @return array
+	 */
+	public function provides()
+	{
+		return array(
+			'queue', 'queue.worker', 'queue.listener', 'queue.failer',
+			'command.queue.work', 'command.queue.listen', 'command.queue.restart',
+			'command.queue.subscribe',
+		);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Queue/README.md
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Queue/README.md b/vendor/laravel/framework/src/Illuminate/Queue/README.md
new file mode 100644
index 0000000..e6a715b
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Queue/README.md
@@ -0,0 +1,34 @@
+## Illuminate Queue
+
+The Laravel Queue component provides a unified API across a variety of different queue services. Queues allow you to defer the processing of a time consuming task, such as sending an e-mail, until a later time, thus drastically speeding up the web requests to your application.
+
+### Usage Instructions
+
+First, create a new Queue `Capsule` manager instance. Similar to the "Capsule" provided for the Eloquent ORM, the queue Capsule aims to make configuring the library for usage outside of the Laravel framework as easy as possible.
+
+```PHP
+use Illuminate\Queue\Capsule\Manager as Queue;
+
+$queue = new Queue;
+
+$queue->addConnection([
+    'driver' => 'beanstalkd',
+    'host' => 'localhost',
+    'queue' => 'default',
+]);
+
+// Make this Capsule instance available globally via static methods... (optional)
+$queue->setAsGlobal();
+```
+
+Once the Capsule instance has been registered. You may use it like so:
+
+```PHP
+// As an instance...
+$queue->push('SendEmail', array('message' => $message));
+
+// If setAsGlobal has been called...
+Queue::push('SendEmail', array('message' => $message));
+```
+
+For further documentation on using the queue, consult the [Laravel framework documentation](http://laravel.com/docs).

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php
new file mode 100644
index 0000000..d127888
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php
@@ -0,0 +1,319 @@
+<?php namespace Illuminate\Queue;
+
+use Illuminate\Redis\Database;
+use Illuminate\Queue\Jobs\RedisJob;
+
+class RedisQueue extends Queue implements QueueInterface {
+
+	/**
+	* The Redis database instance.
+	*
+	 * @var \Illuminate\Redis\Database
+	 */
+	protected $redis;
+
+	/**
+	 * The connection name.
+	 *
+	 * @var string
+	 */
+	protected $connection;
+
+	/**
+	 * The name of the default queue.
+	 *
+	 * @var string
+	 */
+	protected $default;
+
+	/**
+	 * The expiration time of a job.
+	 *
+	 * @var int|null
+	 */
+	protected $expire = 60;
+
+	/**
+	 * Create a new Redis queue instance.
+	 *
+	 * @param  \Illuminate\Redis\Database  $redis
+	 * @param  string  $default
+	 * @param  string  $connection
+	 * @return void
+	 */
+	public function __construct(Database $redis, $default = 'default', $connection = null)
+	{
+		$this->redis = $redis;
+		$this->default = $default;
+		$this->connection = $connection;
+	}
+
+	/**
+	 * Push a new job onto the queue.
+	 *
+	 * @param  string  $job
+	 * @param  mixed   $data
+	 * @param  string  $queue
+	 * @return void
+	 */
+	public function push($job, $data = '', $queue = null)
+	{
+		return $this->pushRaw($this->createPayload($job, $data), $queue);
+	}
+
+	/**
+	 * Push a raw payload onto the queue.
+	 *
+	 * @param  string  $payload
+	 * @param  string  $queue
+	 * @param  array   $options
+	 * @return mixed
+	 */
+	public function pushRaw($payload, $queue = null, array $options = array())
+	{
+		$this->getConnection()->rpush($this->getQueue($queue), $payload);
+
+		return array_get(json_decode($payload, true), 'id');
+	}
+
+	/**
+	 * Push a new job onto the queue after a delay.
+	 *
+	 * @param  \DateTime|int  $delay
+	 * @param  string  $job
+	 * @param  mixed   $data
+	 * @param  string  $queue
+	 * @return void
+	 */
+	public function later($delay, $job, $data = '', $queue = null)
+	{
+		$payload = $this->createPayload($job, $data);
+
+		$delay = $this->getSeconds($delay);
+
+		$this->getConnection()->zadd($this->getQueue($queue).':delayed', $this->getTime() + $delay, $payload);
+
+		return array_get(json_decode($payload, true), 'id');
+	}
+
+	/**
+	 * Release a reserved job back onto the queue.
+	 *
+	 * @param  string  $queue
+	 * @param  string  $payload
+	 * @param  int  $delay
+	 * @param  int  $attempts
+	 * @return void
+	 */
+	public function release($queue, $payload, $delay, $attempts)
+	{
+		$payload = $this->setMeta($payload, 'attempts', $attempts);
+
+		$this->getConnection()->zadd($this->getQueue($queue).':delayed', $this->getTime() + $delay, $payload);
+	}
+
+	/**
+	 * Pop the next job off of the queue.
+	 *
+	 * @param  string  $queue
+	 * @return \Illuminate\Queue\Jobs\Job|null
+	 */
+	public function pop($queue = null)
+	{
+		$original = $queue ?: $this->default;
+
+		$queue = $this->getQueue($queue);
+
+		if ( ! is_null($this->expire))
+		{
+			$this->migrateAllExpiredJobs($queue);
+		}
+
+		$job = $this->getConnection()->lpop($queue);
+
+		if ( ! is_null($job))
+		{
+			$this->getConnection()->zadd($queue.':reserved', $this->getTime() + $this->expire, $job);
+
+			return new RedisJob($this->container, $this, $job, $original);
+		}
+	}
+
+	/**
+	 * Delete a reserved job from the queue.
+	 *
+	 * @param  string  $queue
+	 * @param  string  $job
+	 * @return void
+	 */
+	public function deleteReserved($queue, $job)
+	{
+		$this->getConnection()->zrem($this->getQueue($queue).':reserved', $job);
+	}
+
+	/**
+	 * Migrate all of the waiting jobs in the queue.
+	 *
+	 * @param  string  $queue
+	 * @return void
+	 */
+	protected function migrateAllExpiredJobs($queue)
+	{
+		$this->migrateExpiredJobs($queue.':delayed', $queue);
+
+		$this->migrateExpiredJobs($queue.':reserved', $queue);
+	}
+
+	/**
+	 * Migrate the delayed jobs that are ready to the regular queue.
+	 *
+	 * @param  string  $from
+	 * @param  string  $to
+	 * @return void
+	 */
+	public function migrateExpiredJobs($from, $to)
+	{
+		$options = ['cas' => true, 'watch' => $from, 'retry' => 10];
+
+		$this->getConnection()->transaction($options, function ($transaction) use ($from, $to)
+		{
+			// First we need to get all of jobs that have expired based on the current time
+			// so that we can push them onto the main queue. After we get them we simply
+			// remove them from this "delay" queues. All of this within a transaction.
+			$jobs = $this->getExpiredJobs(
+				$transaction, $from, $time = $this->getTime()
+			);
+
+			// If we actually found any jobs, we will remove them from the old queue and we
+			// will insert them onto the new (ready) "queue". This means they will stand
+			// ready to be processed by the queue worker whenever their turn comes up.
+			if (count($jobs) > 0)
+			{
+				$this->removeExpiredJobs($transaction, $from, $time);
+
+				$this->pushExpiredJobsOntoNewQueue($transaction, $to, $jobs);
+			}
+		});
+	}
+
+	/**
+	 * Get the expired jobs from a given queue.
+	 *
+	 * @param  \Predis\Transaction\MultiExec  $transaction
+	 * @param  string  $from
+	 * @param  int  $time
+	 * @return array
+	 */
+	protected function getExpiredJobs($transaction, $from, $time)
+	{
+		return $transaction->zrangebyscore($from, '-inf', $time);
+	}
+
+	/**
+	 * Remove the expired jobs from a given queue.
+	 *
+	 * @param  \Predis\Transaction\MultiExec  $transaction
+	 * @param  string  $from
+	 * @param  int  $time
+	 * @return void
+	 */
+	protected function removeExpiredJobs($transaction, $from, $time)
+	{
+		$transaction->multi();
+
+		$transaction->zremrangebyscore($from, '-inf', $time);
+	}
+
+	/**
+	 * Push all of the given jobs onto another queue.
+	 *
+	 * @param  \Predis\Transaction\MultiExec  $transaction
+	 * @param  string  $to
+	 * @param  array  $jobs
+	 * @return void
+	 */
+	protected function pushExpiredJobsOntoNewQueue($transaction, $to, $jobs)
+	{
+		call_user_func_array([$transaction, 'rpush'], array_merge([$to], $jobs));
+	}
+
+	/**
+	 * Create a payload string from the given job and data.
+	 *
+	 * @param  string  $job
+	 * @param  mixed   $data
+	 * @param  string  $queue
+	 * @return string
+	 */
+	protected function createPayload($job, $data = '', $queue = null)
+	{
+		$payload = parent::createPayload($job, $data);
+
+		$payload = $this->setMeta($payload, 'id', $this->getRandomId());
+
+		return $this->setMeta($payload, 'attempts', 1);
+	}
+
+	/**
+	 * Get a random ID string.
+	 *
+	 * @return string
+	 */
+	protected function getRandomId()
+	{
+		return str_random(32);
+	}
+
+	/**
+	 * Get the queue or return the default.
+	 *
+	 * @param  string|null  $queue
+	 * @return string
+	 */
+	protected function getQueue($queue)
+	{
+		return 'queues:'.($queue ?: $this->default);
+	}
+
+	/**
+	 * Get the connection for the queue.
+	 *
+	 * @return \Predis\ClientInterface
+	 */
+	protected function getConnection()
+	{
+		return $this->redis->connection($this->connection);
+	}
+
+	/**
+	 * Get the underlying Redis instance.
+	 *
+	 * @return \Illuminate\Redis\Database
+	 */
+	public function getRedis()
+	{
+		return $this->redis;
+	}
+
+	/**
+	 * Get the expiration time in seconds.
+	 *
+	 * @return int|null
+	 */
+	public function getExpire()
+	{
+		return $this->expire;
+	}
+
+	/**
+	 * Set the expiration time in seconds.
+	 *
+	 * @param  int|null  $seconds
+	 * @return void
+	 */
+	public function setExpire($seconds)
+	{
+		$this->expire = $seconds;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php
new file mode 100755
index 0000000..e78fb60
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php
@@ -0,0 +1,126 @@
+<?php namespace Illuminate\Queue;
+
+use Aws\Sqs\SqsClient;
+use Illuminate\Queue\Jobs\SqsJob;
+
+class SqsQueue extends Queue implements QueueInterface {
+
+	/**
+	 * The Amazon SQS instance.
+	 *
+	 * @var \Aws\Sqs\SqsClient
+	 */
+	protected $sqs;
+
+	/**
+	 * The name of the default tube.
+	 *
+	 * @var string
+	 */
+	protected $default;
+
+	/**
+	 * Create a new Amazon SQS queue instance.
+	 *
+	 * @param  \Aws\Sqs\SqsClient  $sqs
+	 * @param  string  $default
+	 * @return void
+	 */
+	public function __construct(SqsClient $sqs, $default)
+	{
+		$this->sqs = $sqs;
+		$this->default = $default;
+	}
+
+	/**
+	 * Push a new job onto the queue.
+	 *
+	 * @param  string  $job
+	 * @param  mixed   $data
+	 * @param  string  $queue
+	 * @return mixed
+	 */
+	public function push($job, $data = '', $queue = null)
+	{
+		return $this->pushRaw($this->createPayload($job, $data), $queue);
+	}
+
+	/**
+	 * Push a raw payload onto the queue.
+	 *
+	 * @param  string  $payload
+	 * @param  string  $queue
+	 * @param  array   $options
+	 * @return mixed
+	 */
+	public function pushRaw($payload, $queue = null, array $options = array())
+	{
+		$response = $this->sqs->sendMessage(array('QueueUrl' => $this->getQueue($queue), 'MessageBody' => $payload));
+
+		return $response->get('MessageId');
+	}
+
+	/**
+	 * Push a new job onto the queue after a delay.
+	 *
+	 * @param  \DateTime|int  $delay
+	 * @param  string  $job
+	 * @param  mixed   $data
+	 * @param  string  $queue
+	 * @return mixed
+	 */
+	public function later($delay, $job, $data = '', $queue = null)
+	{
+		$payload = $this->createPayload($job, $data);
+
+		$delay = $this->getSeconds($delay);
+
+		return $this->sqs->sendMessage(array(
+
+			'QueueUrl' => $this->getQueue($queue), 'MessageBody' => $payload, 'DelaySeconds' => $delay,
+
+		))->get('MessageId');
+	}
+
+	/**
+	 * Pop the next job off of the queue.
+	 *
+	 * @param  string  $queue
+	 * @return \Illuminate\Queue\Jobs\Job|null
+	 */
+	public function pop($queue = null)
+	{
+		$queue = $this->getQueue($queue);
+
+		$response = $this->sqs->receiveMessage(
+			array('QueueUrl' => $queue, 'AttributeNames' => array('ApproximateReceiveCount'))
+		);
+
+		if (count($response['Messages']) > 0)
+		{
+			return new SqsJob($this->container, $this->sqs, $queue, $response['Messages'][0]);
+		}
+	}
+
+	/**
+	 * Get the queue or return the default.
+	 *
+	 * @param  string|null  $queue
+	 * @return string
+	 */
+	public function getQueue($queue)
+	{
+		return $queue ?: $this->default;
+	}
+
+	/**
+	 * Get the underlying SQS instance.
+	 *
+	 * @return \Aws\Sqs\SqsClient
+	 */
+	public function getSqs()
+	{
+		return $this->sqs;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php
new file mode 100755
index 0000000..8da5bab
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php
@@ -0,0 +1,67 @@
+<?php namespace Illuminate\Queue;
+
+class SyncQueue extends Queue implements QueueInterface {
+
+	/**
+	 * Push a new job onto the queue.
+	 *
+	 * @param  string  $job
+	 * @param  mixed   $data
+	 * @param  string  $queue
+	 * @return mixed
+	 */
+	public function push($job, $data = '', $queue = null)
+	{
+		$this->resolveJob($job, json_encode($data))->fire();
+
+		return 0;
+	}
+
+	/**
+	 * Push a raw payload onto the queue.
+	 *
+	 * @param  string  $payload
+	 * @param  string  $queue
+	 * @param  array   $options
+	 * @return mixed
+	 */
+	public function pushRaw($payload, $queue = null, array $options = array())
+	{
+		//
+	}
+
+	/**
+	 * Push a new job onto the queue after a delay.
+	 *
+	 * @param  \DateTime|int  $delay
+	 * @param  string  $job
+	 * @param  mixed   $data
+	 * @param  string  $queue
+	 * @return mixed
+	 */
+	public function later($delay, $job, $data = '', $queue = null)
+	{
+		return $this->push($job, $data, $queue);
+	}
+
+	/**
+	 * Pop the next job off of the queue.
+	 *
+	 * @param  string  $queue
+	 * @return \Illuminate\Queue\Jobs\Job|null
+	 */
+	public function pop($queue = null) {}
+
+	/**
+	 * Resolve a Sync job instance.
+	 *
+	 * @param  string  $job
+	 * @param  string  $data
+	 * @return \Illuminate\Queue\Jobs\SyncJob
+	 */
+	protected function resolveJob($job, $data)
+	{
+		return new Jobs\SyncJob($this->container, $job, $data);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Queue/Worker.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Worker.php b/vendor/laravel/framework/src/Illuminate/Queue/Worker.php
new file mode 100755
index 0000000..239908a
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Queue/Worker.php
@@ -0,0 +1,362 @@
+<?php namespace Illuminate\Queue;
+
+use Illuminate\Queue\Jobs\Job;
+use Illuminate\Events\Dispatcher;
+use Illuminate\Cache\Repository as CacheRepository;
+use Illuminate\Queue\Failed\FailedJobProviderInterface;
+
+class Worker {
+
+	/**
+	 * The queue manager instance.
+	 *
+	 * @var \Illuminate\Queue\QueueManager
+	 */
+	protected $manager;
+
+	/**
+	 * The failed job provider implementation.
+	 *
+	 * @var \Illuminate\Queue\Failed\FailedJobProviderInterface
+	 */
+	protected $failer;
+
+	/**
+	 * The event dispatcher instance.
+	 *
+	 * @var \Illuminate\Events\Dispatcher
+	 */
+	protected $events;
+
+	/**
+	 * The cache repository implementation.
+	 *
+	 * @var \Illuminate\Cache\Repository
+	 */
+	protected $cache;
+
+	/**
+	 * The exception handler instance.
+	 *
+	 * @var \Illuminate\Exception\Handler
+	 */
+	protected $exceptions;
+
+	/**
+	 * Create a new queue worker.
+	 *
+	 * @param  \Illuminate\Queue\QueueManager  $manager
+	 * @param  \Illuminate\Queue\Failed\FailedJobProviderInterface  $failer
+	 * @param  \Illuminate\Events\Dispatcher  $events
+	 * @return void
+	 */
+	public function __construct(QueueManager $manager,
+                                FailedJobProviderInterface $failer = null,
+                                Dispatcher $events = null)
+	{
+		$this->failer = $failer;
+		$this->events = $events;
+		$this->manager = $manager;
+	}
+
+	/**
+	 * Listen to the given queue in a loop.
+	 *
+	 * @param  string  $connectionName
+	 * @param  string  $queue
+	 * @param  int     $delay
+	 * @param  int     $memory
+	 * @param  int     $sleep
+	 * @param  int     $maxTries
+	 * @return array
+	 */
+	public function daemon($connectionName, $queue = null, $delay = 0, $memory = 128, $sleep = 3, $maxTries = 0)
+	{
+		$lastRestart = $this->getTimestampOfLastQueueRestart();
+
+		while (true)
+		{
+			if ($this->daemonShouldRun())
+			{
+				$this->runNextJobForDaemon(
+					$connectionName, $queue, $delay, $sleep, $maxTries
+				);
+			}
+			else
+			{
+				$this->sleep($sleep);
+			}
+
+			if ($this->memoryExceeded($memory) || $this->queueShouldRestart($lastRestart))
+			{
+				$this->stop();
+			}
+		}
+	}
+
+	/**
+	 * Run the next job for the daemon worker.
+	 *
+	 * @param  string  $connectionName
+	 * @param  string  $queue
+	 * @param  int  $delay
+	 * @param  int  $sleep
+	 * @param  int  $maxTries
+	 * @return void
+	 */
+	protected function runNextJobForDaemon($connectionName, $queue, $delay, $sleep, $maxTries)
+	{
+		try
+		{
+			$this->pop($connectionName, $queue, $delay, $sleep, $maxTries);
+		}
+		catch (\Exception $e)
+		{
+			if ($this->exceptions) $this->exceptions->handleException($e);
+		}
+	}
+
+	/**
+	 * Determine if the daemon should process on this iteration.
+	 *
+	 * @return bool
+	 */
+	protected function daemonShouldRun()
+	{
+		if ($this->manager->isDownForMaintenance())
+		{
+			return false;
+		}
+
+		return $this->events->until('illuminate.queue.looping') !== false;
+	}
+
+	/**
+	 * Listen to the given queue.
+	 *
+	 * @param  string  $connectionName
+	 * @param  string  $queue
+	 * @param  int     $delay
+	 * @param  int     $sleep
+	 * @param  int     $maxTries
+	 * @return array
+	 */
+	public function pop($connectionName, $queue = null, $delay = 0, $sleep = 3, $maxTries = 0)
+	{
+		$connection = $this->manager->connection($connectionName);
+
+		$job = $this->getNextJob($connection, $queue);
+
+		// If we're able to pull a job off of the stack, we will process it and
+		// then immediately return back out. If there is no job on the queue
+		// we will "sleep" the worker for the specified number of seconds.
+		if ( ! is_null($job))
+		{
+			return $this->process(
+				$this->manager->getName($connectionName), $job, $maxTries, $delay
+			);
+		}
+
+		$this->sleep($sleep);
+
+		return ['job' => null, 'failed' => false];
+	}
+
+	/**
+	 * Get the next job from the queue connection.
+	 *
+	 * @param  \Illuminate\Queue\Queue  $connection
+	 * @param  string  $queue
+	 * @return \Illuminate\Queue\Jobs\Job|null
+	 */
+	protected function getNextJob($connection, $queue)
+	{
+		if (is_null($queue)) return $connection->pop();
+
+		foreach (explode(',', $queue) as $queue)
+		{
+			if ( ! is_null($job = $connection->pop($queue))) return $job;
+		}
+	}
+
+	/**
+	 * Process a given job from the queue.
+	 *
+	 * @param  string  $connection
+	 * @param  \Illuminate\Queue\Jobs\Job  $job
+	 * @param  int  $maxTries
+	 * @param  int  $delay
+	 * @return void
+	 *
+	 * @throws \Exception
+	 */
+	public function process($connection, Job $job, $maxTries = 0, $delay = 0)
+	{
+		if ($maxTries > 0 && $job->attempts() > $maxTries)
+		{
+			return $this->logFailedJob($connection, $job);
+		}
+
+		try
+		{
+			// First we will fire off the job. Once it is done we will see if it will
+			// be auto-deleted after processing and if so we will go ahead and run
+			// the delete method on the job. Otherwise we will just keep moving.
+			$job->fire();
+
+			if ($job->autoDelete()) $job->delete();
+
+			return ['job' => $job, 'failed' => false];
+		}
+
+		catch (\Exception $e)
+		{
+			// If we catch an exception, we will attempt to release the job back onto
+			// the queue so it is not lost. This will let is be retried at a later
+			// time by another listener (or the same one). We will do that here.
+			if ( ! $job->isDeleted()) $job->release($delay);
+
+			throw $e;
+		}
+	}
+
+	/**
+	 * Log a failed job into storage.
+	 *
+	 * @param  string  $connection
+	 * @param  \Illuminate\Queue\Jobs\Job  $job
+	 * @return array
+	 */
+	protected function logFailedJob($connection, Job $job)
+	{
+		if ($this->failer)
+		{
+			$this->failer->log($connection, $job->getQueue(), $job->getRawBody());
+
+			$job->delete();
+
+			$this->raiseFailedJobEvent($connection, $job);
+		}
+
+		return ['job' => $job, 'failed' => true];
+	}
+
+	/**
+	 * Raise the failed queue job event.
+	 *
+	 * @param  string  $connection
+	 * @param  \Illuminate\Queue\Jobs\Job  $job
+	 * @return void
+	 */
+	protected function raiseFailedJobEvent($connection, Job $job)
+	{
+		if ($this->events)
+		{
+			$data = json_decode($job->getRawBody(), true);
+
+			$this->events->fire('illuminate.queue.failed', array($connection, $job, $data));
+		}
+	}
+
+	/**
+	 * Determine if the memory limit has been exceeded.
+	 *
+	 * @param  int   $memoryLimit
+	 * @return bool
+	 */
+	public function memoryExceeded($memoryLimit)
+	{
+		return (memory_get_usage() / 1024 / 1024) >= $memoryLimit;
+	}
+
+	/**
+	 * Stop listening and bail out of the script.
+	 *
+	 * @return void
+	 */
+	public function stop()
+	{
+		$this->events->fire('illuminate.queue.stopping');
+
+		die;
+	}
+
+	/**
+	 * Sleep the script for a given number of seconds.
+	 *
+	 * @param  int   $seconds
+	 * @return void
+	 */
+	public function sleep($seconds)
+	{
+		sleep($seconds);
+	}
+
+	/**
+	 * Get the last queue restart timestamp, or null.
+	 *
+	 * @return int|null
+	 */
+	protected function getTimestampOfLastQueueRestart()
+	{
+		if ($this->cache)
+		{
+			return $this->cache->get('illuminate:queue:restart');
+		}
+	}
+
+	/**
+	 * Determine if the queue worker should restart.
+	 *
+	 * @param  int|null  $lastRestart
+	 * @return bool
+	 */
+	protected function queueShouldRestart($lastRestart)
+	{
+		return $this->getTimestampOfLastQueueRestart() != $lastRestart;
+	}
+
+	/**
+	 * Set the exception handler to use in Daemon mode.
+	 *
+	 * @param  \Illuminate\Exception\Handler  $handler
+	 * @return void
+	 */
+	public function setDaemonExceptionHandler($handler)
+	{
+		$this->exceptions = $handler;
+	}
+
+	/**
+	 * Set the cache repository implementation.
+	 *
+	 * @param  \Illuminate\Cache\Repository  $cache
+	 * @return void
+	 */
+	public function setCache(CacheRepository $cache)
+	{
+		$this->cache = $cache;
+	}
+
+	/**
+	 * Get the queue manager instance.
+	 *
+	 * @return \Illuminate\Queue\QueueManager
+	 */
+	public function getManager()
+	{
+		return $this->manager;
+	}
+
+	/**
+	 * Set the queue manager instance.
+	 *
+	 * @param  \Illuminate\Queue\QueueManager  $manager
+	 * @return void
+	 */
+	public function setManager(QueueManager $manager)
+	{
+		$this->manager = $manager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Queue/composer.json
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Queue/composer.json b/vendor/laravel/framework/src/Illuminate/Queue/composer.json
new file mode 100755
index 0000000..045a0a3
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Queue/composer.json
@@ -0,0 +1,44 @@
+{
+    "name": "illuminate/queue",
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "Taylor Otwell",
+            "email": "taylorotwell@gmail.com"
+        }
+    ],
+    "require": {
+        "php": ">=5.4.0",
+        "illuminate/console": "4.2.*",
+        "illuminate/container": "4.2.*",
+        "illuminate/http": "4.2.*",
+        "illuminate/support": "4.2.*",
+        "symfony/process": "2.5.*",
+        "nesbot/carbon": "~1.0"
+    },
+    "require-dev": {
+        "illuminate/cache": "4.2.*",
+        "illuminate/events": "4.2.*",
+        "aws/aws-sdk-php": "~2.6",
+        "iron-io/iron_mq": "~1.5",
+        "pda/pheanstalk": "~2.1"
+    },
+    "autoload": {
+        "psr-0": {
+            "Illuminate\\Queue": ""
+        },
+        "classmap": [
+            "IlluminateQueueClosure.php"
+        ]
+    },
+    "target-dir": "Illuminate/Queue",
+    "extra": {
+        "branch-alias": {
+            "dev-master": "4.2-dev"
+        }
+    },
+    "suggest": {
+        "illuminate/redis": "Allows use of the Redis queue driver."
+    },
+    "minimum-stability": "dev"
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Redis/Database.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Redis/Database.php b/vendor/laravel/framework/src/Illuminate/Redis/Database.php
new file mode 100755
index 0000000..1d10caa
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Redis/Database.php
@@ -0,0 +1,98 @@
+<?php namespace Illuminate\Redis;
+
+use Predis\Client;
+
+class Database {
+
+	/**
+	 * The host address of the database.
+	 *
+	 * @var array
+	 */
+	protected $clients;
+
+	/**
+	 * Create a new Redis connection instance.
+	 *
+	 * @param  array  $servers
+	 * @return void
+	 */
+	public function __construct(array $servers = array())
+	{
+		if (isset($servers['cluster']) && $servers['cluster'])
+		{
+			$this->clients = $this->createAggregateClient($servers);
+		}
+		else
+		{
+			$this->clients = $this->createSingleClients($servers);
+		}
+	}
+
+	/**
+	 * Create a new aggregate client supporting sharding.
+	 *
+	 * @param  array  $servers
+	 * @return array
+	 */
+	protected function createAggregateClient(array $servers)
+	{
+		$servers = array_except($servers, array('cluster'));
+
+		return array('default' => new Client(array_values($servers)));
+	}
+
+	/**
+	 * Create an array of single connection clients.
+	 *
+	 * @param  array  $servers
+	 * @return array
+	 */
+	protected function createSingleClients(array $servers)
+	{
+		$clients = array();
+
+		foreach ($servers as $key => $server)
+		{
+			$clients[$key] = new Client($server);
+		}
+
+		return $clients;
+	}
+
+	/**
+	 * Get a specific Redis connection instance.
+	 *
+	 * @param  string  $name
+	 * @return \Predis\ClientInterface
+	 */
+	public function connection($name = 'default')
+	{
+		return $this->clients[$name ?: 'default'];
+	}
+
+	/**
+	 * Run a command against the Redis database.
+	 *
+	 * @param  string  $method
+	 * @param  array   $parameters
+	 * @return mixed
+	 */
+	public function command($method, array $parameters = array())
+	{
+		return call_user_func_array(array($this->clients['default'], $method), $parameters);
+	}
+
+	/**
+	 * Dynamically make a Redis command.
+	 *
+	 * @param  string  $method
+	 * @param  array   $parameters
+	 * @return mixed
+	 */
+	public function __call($method, $parameters)
+	{
+		return $this->command($method, $parameters);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php
new file mode 100755
index 0000000..947d365
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php
@@ -0,0 +1,37 @@
+<?php namespace Illuminate\Redis;
+
+use Illuminate\Support\ServiceProvider;
+
+class RedisServiceProvider extends ServiceProvider {
+
+	/**
+	 * Indicates if loading of the provider is deferred.
+	 *
+	 * @var bool
+	 */
+	protected $defer = true;
+
+	/**
+	 * Register the service provider.
+	 *
+	 * @return void
+	 */
+	public function register()
+	{
+		$this->app->bindShared('redis', function($app)
+		{
+			return new Database($app['config']['database.redis']);
+		});
+	}
+
+	/**
+	 * Get the services provided by the provider.
+	 *
+	 * @return array
+	 */
+	public function provides()
+	{
+		return array('redis');
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Redis/composer.json
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Redis/composer.json b/vendor/laravel/framework/src/Illuminate/Redis/composer.json
new file mode 100755
index 0000000..4cbef76
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Redis/composer.json
@@ -0,0 +1,27 @@
+{
+    "name": "illuminate/redis",
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "Taylor Otwell",
+            "email": "taylorotwell@gmail.com"
+        }
+    ],
+    "require": {
+        "php": ">=5.4.0",
+        "illuminate/support": "4.2.*",
+        "predis/predis": "0.8.*"
+    },
+    "autoload": {
+        "psr-0": {
+            "Illuminate\\Redis": ""
+        }
+    },
+    "target-dir": "Illuminate/Redis",
+    "extra": {
+        "branch-alias": {
+            "dev-master": "4.2-dev"
+        }
+    },
+    "minimum-stability": "dev"
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Remote/Connection.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Remote/Connection.php b/vendor/laravel/framework/src/Illuminate/Remote/Connection.php
new file mode 100644
index 0000000..18042da
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Remote/Connection.php
@@ -0,0 +1,262 @@
+<?php namespace Illuminate\Remote;
+
+use Closure;
+use Illuminate\Filesystem\Filesystem;
+use Symfony\Component\Console\Output\NullOutput;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class Connection implements ConnectionInterface {
+
+	/**
+	 * The SSH gateway implementation.
+	 *
+	 * @var \Illuminate\Remote\GatewayInterface
+	 */
+	protected $gateway;
+
+	/**
+	 * The name of the connection.
+	 *
+	 * @var string
+	 */
+	protected $name;
+
+	/**
+	 * The host name of the server.
+	 *
+	 * @var string
+	 */
+	protected $host;
+
+	/**
+	 * The username for the connection.
+	 *
+	 * @var string
+	 */
+	protected $username;
+
+	/**
+	 * All of the defined tasks.
+	 *
+	 * @var array
+	 */
+	protected $tasks = array();
+
+	/**
+	 * The output implementation for the connection.
+	 *
+	 * @var \Symfony\Component\Console\Output\OutputInterface
+	 */
+	protected $output;
+
+	/**
+	 * Create a new SSH connection instance.
+	 *
+	 * @param  string  $name
+	 * @param  string  $host
+	 * @param  string  $username
+	 * @param  array   $auth
+	 * @param  \Illuminate\Remote\GatewayInterface
+	 * @param
+	 */
+	public function __construct($name, $host, $username, array $auth, GatewayInterface $gateway = null)
+	{
+		$this->name = $name;
+		$this->host = $host;
+		$this->username = $username;
+		$this->gateway = $gateway ?: new SecLibGateway($host, $auth, new Filesystem);
+	}
+
+	/**
+	 * Define a set of commands as a task.
+	 *
+	 * @param  string  $task
+	 * @param  string|array  $commands
+	 * @return void
+	 */
+	public function define($task, $commands)
+	{
+		$this->tasks[$task] = $commands;
+	}
+
+	/**
+	 * Run a task against the connection.
+	 *
+	 * @param  string  $task
+	 * @param  \Closure  $callback
+	 * @return void
+	 */
+	public function task($task, Closure $callback = null)
+	{
+		if (isset($this->tasks[$task]))
+		{
+			return $this->run($this->tasks[$task], $callback);
+		}
+	}
+
+	/**
+	 * Run a set of commands against the connection.
+	 *
+	 * @param  string|array  $commands
+	 * @param  \Closure  $callback
+	 * @return void
+	 */
+	public function run($commands, Closure $callback = null)
+	{
+		// First, we will initialize the SSH gateway, and then format the commands so
+		// they can be run. Once we have the commands formatted and the server is
+		// ready to go we will just fire off these commands against the server.
+		$gateway = $this->getGateway();
+
+		$callback = $this->getCallback($callback);
+
+		$gateway->run($this->formatCommands($commands));
+
+		// After running the commands against the server, we will continue to ask for
+		// the next line of output that is available, and write it them out using
+		// our callback. Once we hit the end of output, we'll bail out of here.
+		while (true)
+		{
+			if (is_null($line = $gateway->nextLine())) break;
+
+			call_user_func($callback, $line, $this);
+		}
+	}
+
+	/**
+	 * Download the contents of a remote file.
+	 *
+	 * @param  string  $remote
+	 * @param  string  $local
+	 * @return void
+	 */
+	public function get($remote, $local)
+	{
+		$this->getGateway()->get($remote, $local);
+	}
+
+	/**
+	 * Get the contents of a remote file.
+	 *
+	 * @param  string  $remote
+	 * @return string
+	 */
+	public function getString($remote)
+	{
+		return $this->getGateway()->getString($remote);
+	}
+
+	/**
+	 * Upload a local file to the server.
+	 *
+	 * @param  string  $local
+	 * @param  string  $remote
+	 * @return void
+	 */
+	public function put($local, $remote)
+	{
+		$this->getGateway()->put($local, $remote);
+	}
+
+	/**
+	 * Upload a string to to the given file on the server.
+	 *
+	 * @param  string  $remote
+	 * @param  string  $contents
+	 * @return void
+	 */
+	public function putString($remote, $contents)
+	{
+		$this->getGateway()->putString($remote, $contents);
+	}
+
+	/**
+	 * Display the given line using the default output.
+	 *
+	 * @param  string  $line
+	 * @return void
+	 */
+	public function display($line)
+	{
+		$server = $this->username.'@'.$this->host;
+
+		$lead = '<comment>['.$server.']</comment> <info>('.$this->name.')</info>';
+
+		$this->getOutput()->writeln($lead.' '.$line);
+	}
+
+	/**
+	 * Format the given command set.
+	 *
+	 * @param  string|array  $commands
+	 * @return string
+	 */
+	protected function formatCommands($commands)
+	{
+		return is_array($commands) ? implode(' && ', $commands) : $commands;
+	}
+
+	/**
+	 * Get the display callback for the connection.
+	 *
+	 * @param  \Closure|null  $callback
+	 * @return \Closure
+	 */
+	protected function getCallback($callback)
+	{
+		if ( ! is_null($callback)) return $callback;
+
+		return function($line) { $this->display($line); };
+	}
+
+	/**
+	 * Get the exit status of the last command.
+	 *
+	 * @return int|bool
+	 */
+	public function status()
+	{
+		return $this->gateway->status();
+	}
+
+	/**
+	 * Get the gateway implementation.
+	 *
+	 * @return \Illuminate\Remote\GatewayInterface
+	 *
+	 * @throws \RuntimeException
+	 */
+	public function getGateway()
+	{
+		if ( ! $this->gateway->connected() && ! $this->gateway->connect($this->username))
+		{
+			throw new \RuntimeException("Unable to connect to remote server.");
+		}
+
+		return $this->gateway;
+	}
+
+	/**
+	 * Get the output implementation for the connection.
+	 *
+	 * @return \Symfony\Component\Console\Output\OutputInterface
+	 */
+	public function getOutput()
+	{
+		if (is_null($this->output)) $this->output = new NullOutput;
+
+		return $this->output;
+	}
+
+	/**
+	 * Set the output implementation.
+	 *
+	 * @param  \Symfony\Component\Console\Output\OutputInterface  $output
+	 * @return void
+	 */
+	public function setOutput(OutputInterface $output)
+	{
+		$this->output = $output;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Remote/ConnectionInterface.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Remote/ConnectionInterface.php b/vendor/laravel/framework/src/Illuminate/Remote/ConnectionInterface.php
new file mode 100644
index 0000000..0b46ab3
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Remote/ConnectionInterface.php
@@ -0,0 +1,52 @@
+<?php namespace Illuminate\Remote;
+
+use Closure;
+
+interface ConnectionInterface {
+
+	/**
+	 * Define a set of commands as a task.
+	 *
+	 * @param  string  $task
+	 * @param  string|array  $commands
+	 * @return void
+	 */
+	public function define($task, $commands);
+
+	/**
+	 * Run a task against the connection.
+	 *
+	 * @param  string  $task
+	 * @param  \Closure  $callback
+	 * @return void
+	 */
+	public function task($task, Closure $callback = null);
+
+	/**
+	 * Run a set of commands against the connection.
+	 *
+	 * @param  string|array  $commands
+	 * @param  \Closure  $callback
+	 * @return void
+	 */
+	public function run($commands, Closure $callback = null);
+
+	/**
+	 * Upload a local file to the server.
+	 *
+	 * @param  string  $local
+	 * @param  string  $remote
+	 * @return void
+	 */
+	public function put($local, $remote);
+
+	/**
+	 * Upload a string to to the given file on the server.
+	 *
+	 * @param  string  $remote
+	 * @param  string  $contents
+	 * @return void
+	 */
+	public function putString($remote, $contents);
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Remote/GatewayInterface.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Remote/GatewayInterface.php b/vendor/laravel/framework/src/Illuminate/Remote/GatewayInterface.php
new file mode 100644
index 0000000..38094c3
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Remote/GatewayInterface.php
@@ -0,0 +1,60 @@
+<?php namespace Illuminate\Remote;
+
+interface GatewayInterface {
+
+	/**
+	 * Connect to the SSH server.
+	 *
+	 * @param  string  $username
+	 * @return void
+	 */
+	public function connect($username);
+
+	/**
+	 * Determine if the gateway is connected.
+	 *
+	 * @return bool
+	 */
+	public function connected();
+
+	/**
+	 * Run a command against the server (non-blocking).
+	 *
+	 * @param  string  $command
+	 * @return void
+	 */
+	public function run($command);
+
+	/**
+	 * Upload a local file to the server.
+	 *
+	 * @param  string  $local
+	 * @param  string  $remote
+	 * @return void
+	 */
+	public function put($local, $remote);
+
+	/**
+	 * Upload a string to to the given file on the server.
+	 *
+	 * @param  string  $remote
+	 * @param  string  $contents
+	 * @return void
+	 */
+	public function putString($remote, $contents);
+
+	/**
+	 * Get the next line of output from the server.
+	 *
+	 * @return string|null
+	 */
+	public function nextLine();
+
+	/**
+	 * Get the exit status of the last command.
+	 *
+	 * @return int|bool
+	 */
+	public function status();
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Remote/MultiConnection.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Remote/MultiConnection.php b/vendor/laravel/framework/src/Illuminate/Remote/MultiConnection.php
new file mode 100644
index 0000000..be026dd
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Remote/MultiConnection.php
@@ -0,0 +1,100 @@
+<?php namespace Illuminate\Remote;
+
+use Closure;
+
+class MultiConnection implements ConnectionInterface {
+
+	/**
+	 * All of the active server connections.
+	 *
+	 * @var array
+	 */
+	protected $connections;
+
+	/**
+	 * The array of connections.
+	 *
+	 * @param  array  $connections
+	 * @return void
+	 */
+	public function __construct(array $connections)
+	{
+		$this->connections = $connections;
+	}
+
+	/**
+	 * Define a set of commands as a task.
+	 *
+	 * @param  string  $task
+	 * @param  string|array  $commands
+	 * @return void
+	 */
+	public function define($task, $commands)
+	{
+		foreach ($this->connections as $connection)
+		{
+			$connection->define($task, $commands);
+		}
+	}
+
+	/**
+	 * Run a task against the connection.
+	 *
+	 * @param  string  $task
+	 * @param  \Closure  $callback
+	 * @return void
+	 */
+	public function task($task, Closure $callback = null)
+	{
+		foreach ($this->connections as $connection)
+		{
+			$connection->task($task, $callback);
+		}
+	}
+
+	/**
+	 * Run a set of commands against the connection.
+	 *
+	 * @param  string|array  $commands
+	 * @param  \Closure  $callback
+	 * @return void
+	 */
+	public function run($commands, Closure $callback = null)
+	{
+		foreach ($this->connections as $connection)
+		{
+			$connection->run($commands, $callback);
+		}
+	}
+
+	/**
+	 * Upload a local file to the server.
+	 *
+	 * @param  string  $local
+	 * @param  string  $remote
+	 * @return void
+	 */
+	public function put($local, $remote)
+	{
+		foreach ($this->connections as $connection)
+		{
+			$connection->put($local, $remote);
+		}
+	}
+
+	/**
+	 * Upload a string to to the given file on the server.
+	 *
+	 * @param  string  $remote
+	 * @param  string  $contents
+	 * @return void
+	 */
+	public function putString($remote, $contents)
+	{
+		foreach ($this->connections as $connection)
+		{
+			$connection->putString($remote, $contents);
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php b/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php
new file mode 100644
index 0000000..0ad96ce
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php
@@ -0,0 +1,199 @@
+<?php namespace Illuminate\Remote;
+
+use Symfony\Component\Console\Output\NullOutput;
+use Symfony\Component\Console\Output\ConsoleOutput;
+
+class RemoteManager {
+
+	/**
+	 * The application instance.
+	 *
+	 * @var \Illuminate\Foundation\Application
+	 */
+	protected $app;
+
+	/**
+	 * Create a new remote manager instance.
+	 *
+	 * @param  \Illuminate\Foundation\Application  $app
+	 * @return void
+	 */
+	public function __construct($app)
+	{
+		$this->app = $app;
+	}
+
+	/**
+	 * Get a remote connection instance.
+	 *
+	 * @param  string|array|mixed  $name
+	 * @return \Illuminate\Remote\ConnectionInterface
+	 */
+	public function into($name)
+	{
+		if (is_string($name) || is_array($name))
+		{
+			return $this->connection($name);
+		}
+
+		return $this->connection(func_get_args());
+	}
+
+	/**
+	 * Get a remote connection instance.
+	 *
+	 * @param  string|array  $name
+	 * @return \Illuminate\Remote\ConnectionInterface
+	 */
+	public function connection($name = null)
+	{
+		if (is_array($name)) return $this->multiple($name);
+
+		return $this->resolve($name ?: $this->getDefaultConnection());
+	}
+
+	/**
+	 * Get a connection group instance by name.
+	 *
+	 * @param  string  $name
+	 * @return \Illuminate\Remote\ConnectionInterface
+	 */
+	public function group($name)
+	{
+		return $this->connection($this->app['config']['remote.groups.'.$name]);
+	}
+
+	/**
+	 * Resolve a multiple connection instance.
+	 *
+	 * @param  array  $names
+	 * @return \Illuminate\Remote\MultiConnection
+	 */
+	public function multiple(array $names)
+	{
+		return new MultiConnection(array_map(array($this, 'resolve'), $names));
+	}
+
+	/**
+	 * Resolve a remote connection instance.
+	 *
+	 * @param  string  $name
+	 * @return \Illuminate\Remote\Connection
+	 */
+	public function resolve($name)
+	{
+		return $this->makeConnection($name, $this->getConfig($name));
+	}
+
+	/**
+	 * Make a new connection instance.
+	 *
+	 * @param  string  $name
+	 * @param  array   $config
+	 * @return \Illuminate\Remote\Connection
+	 */
+	protected function makeConnection($name, array $config)
+	{
+		$this->setOutput($connection = new Connection(
+
+			$name, $config['host'], $config['username'], $this->getAuth($config)
+
+		));
+
+		return $connection;
+	}
+
+	/**
+	 * Set the output implementation on the connection.
+	 *
+	 * @param  \Illuminate\Remote\Connection  $connection
+	 * @return void
+	 */
+	protected function setOutput(Connection $connection)
+	{
+		$output = php_sapi_name() == 'cli' ? new ConsoleOutput : new NullOutput;
+
+		$connection->setOutput($output);
+	}
+
+	/**
+	 * Format the appropriate authentication array payload.
+	 *
+	 * @param  array  $config
+	 * @return array
+	 *
+	 * @throws \InvalidArgumentException
+	 */
+	protected function getAuth(array $config)
+	{
+		if (isset($config['agent']) && $config['agent'] === true)
+		{
+			return array('agent' => true);
+		}
+		elseif (isset($config['key']) && trim($config['key']) != '')
+		{
+			return array('key' => $config['key'], 'keyphrase' => $config['keyphrase']);
+		}
+		elseif (isset($config['keytext']) && trim($config['keytext']) != '')
+		{
+			return array('keytext' => $config['keytext']);
+		}
+		elseif (isset($config['password']))
+		{
+			return array('password' => $config['password']);
+		}
+
+		throw new \InvalidArgumentException('Password / key is required.');
+	}
+
+	/**
+	 * Get the configuration for a remote server.
+	 *
+	 * @param  string  $name
+	 * @return array
+	 *
+	 * @throws \InvalidArgumentException
+	 */
+	protected function getConfig($name)
+	{
+		$config = $this->app['config']['remote.connections.'.$name];
+
+		if ( ! is_null($config)) return $config;
+
+		throw new \InvalidArgumentException("Remote connection [$name] not defined.");
+	}
+
+	/**
+	 * Get the default connection name.
+	 *
+	 * @return string
+	 */
+	public function getDefaultConnection()
+	{
+		return $this->app['config']['remote.default'];
+	}
+
+	/**
+	 * Set the default connection name.
+	 *
+	 * @param  string  $name
+	 * @return void
+	 */
+	public function setDefaultConnection($name)
+	{
+		$this->app['config']['remote.default'] = $name;
+	}
+
+	/**
+	 * Dynamically pass methods to the default connection.
+	 *
+	 * @param  string  $method
+	 * @param  array   $parameters
+	 * @return mixed
+	 */
+	public function __call($method, $parameters)
+	{
+		return call_user_func_array(array($this->connection(), $method), $parameters);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Remote/RemoteServiceProvider.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Remote/RemoteServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Remote/RemoteServiceProvider.php
new file mode 100644
index 0000000..0bceea9
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Remote/RemoteServiceProvider.php
@@ -0,0 +1,37 @@
+<?php namespace Illuminate\Remote;
+
+use Illuminate\Support\ServiceProvider;
+
+class RemoteServiceProvider extends ServiceProvider {
+
+	/**
+	 * Indicates if loading of the provider is deferred.
+	 *
+	 * @var bool
+	 */
+	protected $defer = true;
+
+	/**
+	 * Register the service provider.
+	 *
+	 * @return void
+	 */
+	public function register()
+	{
+		$this->app->bindShared('remote', function($app)
+		{
+			return new RemoteManager($app);
+		});
+	}
+
+	/**
+	 * Get the services provided by the provider.
+	 *
+	 * @return array
+	 */
+	public function provides()
+	{
+		return array('remote');
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Remote/SecLibGateway.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Remote/SecLibGateway.php b/vendor/laravel/framework/src/Illuminate/Remote/SecLibGateway.php
new file mode 100644
index 0000000..c473019
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Remote/SecLibGateway.php
@@ -0,0 +1,321 @@
+<?php namespace Illuminate\Remote;
+
+use Illuminate\Filesystem\Filesystem;
+use Net_SFTP, Crypt_RSA, System_SSH_Agent;
+
+class SecLibGateway implements GatewayInterface {
+
+	/**
+	 * The host name of the server.
+	 *
+	 * @var string
+	 */
+	protected $host;
+
+	/**
+	 * The SSH port on the server.
+	 *
+	 * @var int
+	 */
+	protected $port = 22;
+
+	/**
+	 * The authentication credential set.
+	 *
+	 * @var array
+	 */
+	protected $auth;
+
+	/**
+	 * The filesystem instance.
+	 *
+	 * @var \Illuminate\Filesystem\Filesystem
+	 */
+	protected $files;
+
+	/**
+	 * The SecLib connection instance.
+	 *
+	 * @var \Net_SFTP
+	 */
+	protected $connection;
+
+	/**
+	 * Create a new gateway implementation.
+	 *
+	 * @param  string  $host
+	 * @param  array   $auth
+	 * @param  \Illuminate\Filesystem\Filesystem  $files
+	 * @return void
+	 */
+	public function __construct($host, array $auth, Filesystem $files)
+	{
+		$this->auth = $auth;
+		$this->files = $files;
+		$this->setHostAndPort($host);
+	}
+
+	/**
+	 * Set the host and port from a full host string.
+	 *
+	 * @param  string  $host
+	 * @return void
+	 */
+	protected function setHostAndPort($host)
+	{
+		if ( ! str_contains($host, ':'))
+		{
+			$this->host = $host;
+		}
+		else
+		{
+			list($this->host, $this->port) = explode(':', $host);
+
+			$this->port = (int) $this->port;
+		}
+	}
+
+	/**
+	 * Connect to the SSH server.
+	 *
+	 * @param  string  $username
+	 * @return bool
+	 */
+	public function connect($username)
+	{
+		return $this->getConnection()->login($username, $this->getAuthForLogin());
+	}
+
+	/**
+	 * Determine if the gateway is connected.
+	 *
+	 * @return bool
+	 */
+	public function connected()
+	{
+		return $this->getConnection()->isConnected();
+	}
+
+	/**
+	 * Run a command against the server (non-blocking).
+	 *
+	 * @param  string  $command
+	 * @return void
+	 */
+	public function run($command)
+	{
+		$this->getConnection()->exec($command, false);
+	}
+
+	/**
+	 * Download the contents of a remote file.
+	 *
+	 * @param  string  $remote
+	 * @param  string  $local
+	 * @return void
+	 */
+	public function get($remote, $local)
+	{
+		$this->getConnection()->get($remote, $local);
+	}
+
+	/**
+	 * Get the contents of a remote file.
+	 *
+	 * @param  string  $remote
+	 * @return string
+	 */
+	public function getString($remote)
+	{
+		return $this->getConnection()->get($remote);
+	}
+
+	/**
+	 * Upload a local file to the server.
+	 *
+	 * @param  string  $local
+	 * @param  string  $remote
+	 * @return void
+	 */
+	public function put($local, $remote)
+	{
+		$this->getConnection()->put($remote, $local, NET_SFTP_LOCAL_FILE);
+	}
+
+	/**
+	 * Upload a string to to the given file on the server.
+	 *
+	 * @param  string  $remote
+	 * @param  string  $contents
+	 * @return void
+	 */
+	public function putString($remote, $contents)
+	{
+		$this->getConnection()->put($remote, $contents);
+	}
+
+	/**
+	 * Get the next line of output from the server.
+	 *
+	 * @return string|null
+	 */
+	public function nextLine()
+	{
+		$value = $this->getConnection()->_get_channel_packet(NET_SSH2_CHANNEL_EXEC);
+
+		return $value === true ? null : $value;
+	}
+
+	/**
+	 * Get the authentication object for login.
+	 *
+	 * @return \Crypt_RSA|\System_SSH_Agent|string
+	 * @throws \InvalidArgumentException
+	 */
+	protected function getAuthForLogin()
+	{
+		if ($this->useAgent()) return $this->getAgent();
+
+		// If a "key" was specified in the auth credentials, we will load it into a
+		// secure RSA key instance, which will be used to connect to the servers
+		// in place of a password, and avoids the developer specifying a pass.
+		elseif ($this->hasRsaKey())
+		{
+			return $this->loadRsaKey($this->auth);
+		}
+
+		// If a plain password was set on the auth credentials, we will just return
+		// that as it can be used to connect to the server. This will be used if
+		// there is no RSA key and it gets specified in the credential arrays.
+		elseif (isset($this->auth['password']))
+		{
+			return $this->auth['password'];
+		}
+
+		throw new \InvalidArgumentException('Password / key is required.');
+	}
+
+	/**
+	 * Determine if an RSA key is configured.
+	 *
+	 * @return bool
+	 */
+	protected function hasRsaKey()
+	{
+		$hasKey = (isset($this->auth['key']) && trim($this->auth['key']) != '');
+
+		return $hasKey || (isset($this->auth['keytext']) && trim($this->auth['keytext']) != '');
+	}
+
+	/**
+	 * Load the RSA key instance.
+	 *
+	 * @param  array  $auth
+	 * @return \Crypt_RSA
+	 */
+	protected function loadRsaKey(array $auth)
+	{
+		with($key = $this->getKey($auth))->loadKey($this->readRsaKey($auth));
+
+		return $key;
+	}
+
+	/**
+	 * Read the contents of the RSA key.
+	 *
+	 * @param  array  $auth
+	 * @return string
+	 */
+	protected function readRsaKey(array $auth)
+	{
+		if (isset($auth['key'])) return $this->files->get($auth['key']);
+
+		return $auth['keytext'];
+	}
+
+	/**
+	 * Create a new RSA key instance.
+	 *
+	 * @param  array  $auth
+	 * @return \Crypt_RSA
+	 */
+	protected function getKey(array $auth)
+	{
+		with($key = $this->getNewKey())->setPassword(array_get($auth, 'keyphrase'));
+
+		return $key;
+	}
+
+	/**
+	 * Determine if the SSH Agent should provide an RSA key.
+	 *
+	 * @return bool
+	 */
+	protected function useAgent()
+	{
+		return isset($this->auth['agent']) && $this->auth['agent'] === true;
+	}
+
+	/**
+	 * Get a new SSH Agent instance.
+	 *
+	 * @return \System_SSH_Agent
+	 */
+	public function getAgent()
+	{
+		return new System_SSH_Agent;
+	}
+
+	/**
+	 * Get a new RSA key instance.
+	 *
+	 * @return \Crypt_RSA
+	 */
+	public function getNewKey()
+	{
+		return new Crypt_RSA;
+	}
+
+	/**
+	 * Get the exit status of the last command.
+	 *
+	 * @return int|bool
+	 */
+	public function status()
+	{
+		return $this->getConnection()->getExitStatus();
+	}
+
+	/**
+	 * Get the host used by the gateway.
+	 *
+	 * @return string
+	 */
+	public function getHost()
+	{
+		return $this->host;
+	}
+
+	/**
+	 * Get the port used by the gateway.
+	 *
+	 * @return int
+	 */
+	public function getPort()
+	{
+		return $this->port;
+	}
+
+	/**
+	 * Get the underlying Net_SFTP connection.
+	 *
+	 * @return \Net_SFTP
+	 */
+	public function getConnection()
+	{
+		if ($this->connection) return $this->connection;
+
+		return $this->connection = new Net_SFTP($this->host, $this->port);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Remote/composer.json
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Remote/composer.json b/vendor/laravel/framework/src/Illuminate/Remote/composer.json
new file mode 100644
index 0000000..f7bb904
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Remote/composer.json
@@ -0,0 +1,31 @@
+{
+    "name": "illuminate/remote",
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "Taylor Otwell",
+            "email": "taylorotwell@gmail.com"
+        }
+    ],
+    "require": {
+        "php": ">=5.4.0",
+        "illuminate/filesystem": "4.2.*",
+        "illuminate/support": "4.2.*",
+        "phpseclib/phpseclib": "0.3.*"
+    },
+    "require-dev": {
+        "illuminate/console": "4.2.*"
+    },
+    "autoload": {
+        "psr-0": {
+            "Illuminate\\Remote": ""
+        }
+    },
+    "target-dir": "Illuminate/Remote",
+    "extra": {
+        "branch-alias": {
+            "dev-master": "4.2-dev"
+        }
+    },
+    "minimum-stability": "dev"
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Routing/Console/MakeControllerCommand.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Console/MakeControllerCommand.php b/vendor/laravel/framework/src/Illuminate/Routing/Console/MakeControllerCommand.php
new file mode 100755
index 0000000..9ebb844
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Routing/Console/MakeControllerCommand.php
@@ -0,0 +1,181 @@
+<?php namespace Illuminate\Routing\Console;
+
+use Illuminate\Console\Command;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Input\InputArgument;
+use Illuminate\Routing\Generators\ControllerGenerator;
+
+class MakeControllerCommand extends Command {
+
+	/**
+	 * The console command name.
+	 *
+	 * @var string
+	 */
+	protected $name = 'controller:make';
+
+	/**
+	 * The console command description.
+	 *
+	 * @var string
+	 */
+	protected $description = 'Create a new resourceful controller';
+
+	/**
+	 * The controller generator instance.
+	 *
+	 * @var \Illuminate\Routing\Generators\ControllerGenerator
+	 */
+	protected $generator;
+
+	/**
+	 * The path to the controller directory.
+	 *
+	 * @var string
+	 */
+	protected $path;
+
+	/**
+	 * Create a new make controller command instance.
+	 *
+	 * @param  \Illuminate\Routing\Generators\ControllerGenerator  $generator
+	 * @param  string  $path
+	 * @return void
+	 */
+	public function __construct(ControllerGenerator $generator, $path)
+	{
+		parent::__construct();
+
+		$this->path = $path;
+		$this->generator = $generator;
+	}
+
+	/**
+	 * Execute the console command.
+	 *
+	 * @return void
+	 */
+	public function fire()
+	{
+		$this->generateController();
+	}
+
+	/**
+	 * Generate a new resourceful controller file.
+	 *
+	 * @return void
+	 */
+	protected function generateController()
+	{
+		// Once we have the controller and resource that we are going to be generating
+		// we will grab the path and options. We allow the developers to include or
+		// exclude given methods from the resourceful controllers we're building.
+		$controller = $this->input->getArgument('name');
+
+		$path = $this->getPath();
+
+		$options = $this->getBuildOptions();
+
+		// Finally, we're ready to generate the actual controller file on disk and let
+		// the developer start using it. The controller will be stored in the right
+		// place based on the namespace of this controller specified by commands.
+		$this->generator->make($controller, $path, $options);
+
+		$this->info('Controller created successfully!');
+	}
+
+	/**
+	 * Get the path in which to store the controller.
+	 *
+	 * @return string
+	 */
+	protected function getPath()
+	{
+		if ( ! is_null($this->input->getOption('path')))
+		{
+			return $this->laravel['path.base'].'/'.$this->input->getOption('path');
+		}
+		elseif ($bench = $this->input->getOption('bench'))
+		{
+			return $this->getWorkbenchPath($bench);
+		}
+
+		return $this->path;
+	}
+
+	/**
+	 * Get the workbench path for the controller.
+	 *
+	 * @param  string  $bench
+	 * @return string
+	 */
+	protected function getWorkbenchPath($bench)
+	{
+		$path = $this->laravel['path.base'].'/workbench/'.$bench.'/src/controllers';
+
+		if ( ! $this->laravel['files']->isDirectory($path))
+		{
+			$this->laravel['files']->makeDirectory($path);
+		}
+
+		return $path;
+	}
+
+	/**
+	 * Get the options for controller generation.
+	 *
+	 * @return array
+	 */
+	protected function getBuildOptions()
+	{
+		$only = $this->explodeOption('only');
+
+		$except = $this->explodeOption('except');
+
+		return compact('only', 'except');
+	}
+
+	/**
+	 * Get and explode a given input option.
+	 *
+	 * @param  string  $name
+	 * @return array
+	 */
+	protected function explodeOption($name)
+	{
+		$option = $this->input->getOption($name);
+
+		return is_null($option) ? array() : explode(',', $option);
+	}
+
+	/**
+	 * Get the console command arguments.
+	 *
+	 * @return array
+	 */
+	protected function getArguments()
+	{
+		return array(
+			array('name', InputArgument::REQUIRED, 'The name of the controller class'),
+		);
+	}
+
+	/**
+	 * Get the console command options.
+	 *
+	 * @return array
+	 */
+	protected function getOptions()
+	{
+		return array(
+			array('bench', null, InputOption::VALUE_OPTIONAL, 'The workbench the controller belongs to'),
+
+			array('only', null, InputOption::VALUE_OPTIONAL, 'The methods that should be included'),
+
+			array('except', null, InputOption::VALUE_OPTIONAL, 'The methods that should be excluded'),
+
+			array('path', null, InputOption::VALUE_OPTIONAL, 'Where to place the controller'),
+		);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Routing/Controller.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Controller.php b/vendor/laravel/framework/src/Illuminate/Routing/Controller.php
new file mode 100644
index 0000000..62fe093
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Routing/Controller.php
@@ -0,0 +1,271 @@
+<?php namespace Illuminate\Routing;
+
+use Closure;
+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+
+abstract class Controller {
+
+	/**
+	 * The "before" filters registered on the controller.
+	 *
+	 * @var array
+	 */
+	protected $beforeFilters = array();
+
+	/**
+	 * The "after" filters registered on the controller.
+	 *
+	 * @var array
+	 */
+	protected $afterFilters = array();
+
+	/**
+	 * The route filterer implementation.
+	 *
+	 * @var \Illuminate\Routing\RouteFiltererInterface
+	 */
+	protected static $filterer;
+
+	/**
+	 * The layout used by the controller.
+	 *
+	 * @var \Illuminate\View\View
+	 */
+	protected $layout;
+
+	/**
+	 * Register a "before" filter on the controller.
+	 *
+	 * @param  \Closure|string  $filter
+	 * @param  array  $options
+	 * @return void
+	 */
+	public function beforeFilter($filter, array $options = array())
+	{
+		$this->beforeFilters[] = $this->parseFilter($filter, $options);
+	}
+
+	/**
+	 * Register an "after" filter on the controller.
+	 *
+	 * @param  \Closure|string  $filter
+	 * @param  array  $options
+	 * @return void
+	 */
+	public function afterFilter($filter, array $options = array())
+	{
+		$this->afterFilters[] = $this->parseFilter($filter, $options);
+	}
+
+	/**
+	 * Parse the given filter and options.
+	 *
+	 * @param  \Closure|string  $filter
+	 * @param  array  $options
+	 * @return array
+	 */
+	protected function parseFilter($filter, array $options)
+	{
+		$parameters = array();
+
+		$original = $filter;
+
+		if ($filter instanceof Closure)
+		{
+			$filter = $this->registerClosureFilter($filter);
+		}
+		elseif ($this->isInstanceFilter($filter))
+		{
+			$filter = $this->registerInstanceFilter($filter);
+		}
+		else
+		{
+			list($filter, $parameters) = Route::parseFilter($filter);
+		}
+
+		return compact('original', 'filter', 'parameters', 'options');
+	}
+
+	/**
+	 * Register an anonymous controller filter Closure.
+	 *
+	 * @param  \Closure  $filter
+	 * @return string
+	 */
+	protected function registerClosureFilter(Closure $filter)
+	{
+		$this->getFilterer()->filter($name = spl_object_hash($filter), $filter);
+
+		return $name;
+	}
+
+	/**
+	 * Register a controller instance method as a filter.
+	 *
+	 * @param  string  $filter
+	 * @return string
+	 */
+	protected function registerInstanceFilter($filter)
+	{
+		$this->getFilterer()->filter($filter, array($this, substr($filter, 1)));
+
+		return $filter;
+	}
+
+	/**
+	 * Determine if a filter is a local method on the controller.
+	 *
+	 * @param  mixed  $filter
+	 * @return boolean
+	 *
+	 * @throws \InvalidArgumentException
+	 */
+	protected function isInstanceFilter($filter)
+	{
+		if (is_string($filter) && starts_with($filter, '@'))
+		{
+			if (method_exists($this, substr($filter, 1))) return true;
+
+			throw new \InvalidArgumentException("Filter method [$filter] does not exist.");
+		}
+
+		return false;
+	}
+
+	/**
+	 * Remove the given before filter.
+	 *
+	 * @param  string  $filter
+	 * @return void
+	 */
+	public function forgetBeforeFilter($filter)
+	{
+		$this->beforeFilters = $this->removeFilter($filter, $this->getBeforeFilters());
+	}
+
+	/**
+	 * Remove the given after filter.
+	 *
+	 * @param  string  $filter
+	 * @return void
+	 */
+	public function forgetAfterFilter($filter)
+	{
+		$this->afterFilters = $this->removeFilter($filter, $this->getAfterFilters());
+	}
+
+	/**
+	 * Remove the given controller filter from the provided filter array.
+	 *
+	 * @param  string  $removing
+	 * @param  array  $current
+	 * @return array
+	 */
+	protected function removeFilter($removing, $current)
+	{
+		return array_filter($current, function($filter) use ($removing)
+		{
+			return $filter['original'] != $removing;
+		});
+	}
+
+	/**
+	 * Get the registered "before" filters.
+	 *
+	 * @return array
+	 */
+	public function getBeforeFilters()
+	{
+		return $this->beforeFilters;
+	}
+
+	/**
+	 * Get the registered "after" filters.
+	 *
+	 * @return array
+	 */
+	public function getAfterFilters()
+	{
+		return $this->afterFilters;
+	}
+
+	/**
+	 * Get the route filterer implementation.
+	 *
+	 * @return \Illuminate\Routing\RouteFiltererInterface
+	 */
+	public static function getFilterer()
+	{
+		return static::$filterer;
+	}
+
+	/**
+	 * Set the route filterer implementation.
+	 *
+	 * @param  \Illuminate\Routing\RouteFiltererInterface  $filterer
+	 * @return void
+	 */
+	public static function setFilterer(RouteFiltererInterface $filterer)
+	{
+		static::$filterer = $filterer;
+	}
+
+	/**
+	 * Create the layout used by the controller.
+	 *
+	 * @return void
+	 */
+	protected function setupLayout() {}
+
+	/**
+	 * Execute an action on the controller.
+	 *
+	 * @param  string  $method
+	 * @param  array   $parameters
+	 * @return \Symfony\Component\HttpFoundation\Response
+	 */
+	public function callAction($method, $parameters)
+	{
+		$this->setupLayout();
+
+		$response = call_user_func_array(array($this, $method), $parameters);
+
+		// If no response is returned from the controller action and a layout is being
+		// used we will assume we want to just return the layout view as any nested
+		// views were probably bound on this view during this controller actions.
+		if (is_null($response) && ! is_null($this->layout))
+		{
+			$response = $this->layout;
+		}
+
+		return $response;
+	}
+
+	/**
+	 * Handle calls to missing methods on the controller.
+	 *
+	 * @param  array   $parameters
+	 * @return mixed
+	 *
+	 * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
+	 */
+	public function missingMethod($parameters = array())
+	{
+		throw new NotFoundHttpException("Controller method not found.");
+	}
+
+	/**
+	 * Handle calls to missing methods on the controller.
+	 *
+	 * @param  string  $method
+	 * @param  array   $parameters
+	 * @return mixed
+	 *
+	 * @throws \BadMethodCallException
+	 */
+	public function __call($method, $parameters)
+	{
+		throw new \BadMethodCallException("Method [$method] does not exist.");
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php
----------------------------------------------------------------------
diff --git a/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php b/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php
new file mode 100644
index 0000000..c8c08a7
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php
@@ -0,0 +1,243 @@
+<?php namespace Illuminate\Routing;
+
+use Closure;
+use Illuminate\Http\Request;
+use Illuminate\Container\Container;
+
+class ControllerDispatcher {
+
+	/**
+	 * The routing filterer implementation.
+	 *
+	 * @var \Illuminate\Routing\RouteFiltererInterface  $filterer
+	 */
+	protected $filterer;
+
+	/**
+	 * The IoC container instance.
+	 *
+	 * @var \Illuminate\Container\Container
+	 */
+	protected $container;
+
+	/**
+	 * Create a new controller dispatcher instance.
+	 *
+	 * @param  \Illuminate\Routing\RouteFiltererInterface  $filterer
+	 * @param  \Illuminate\Container\Container  $container
+	 * @return void
+	 */
+	public function __construct(RouteFiltererInterface $filterer,
+								Container $container = null)
+	{
+		$this->filterer = $filterer;
+		$this->container = $container;
+	}
+
+	/**
+	 * Dispatch a request to a given controller and method.
+	 *
+	 * @param  \Illuminate\Routing\Route  $route
+	 * @param  \Illuminate\Http\Request  $request
+	 * @param  string  $controller
+	 * @param  string  $method
+	 * @return mixed
+	 */
+	public function dispatch(Route $route, Request $request, $controller, $method)
+	{
+		// First we will make an instance of this controller via the IoC container instance
+		// so that we can call the methods on it. We will also apply any "after" filters
+		// to the route so that they will be run by the routers after this processing.
+		$instance = $this->makeController($controller);
+
+		$this->assignAfter($instance, $route, $request, $method);
+
+		$response = $this->before($instance, $route, $request, $method);
+
+		// If no before filters returned a response we'll call the method on the controller
+		// to get the response to be returned to the router. We will then return it back
+		// out for processing by this router and the after filters can be called then.
+		if (is_null($response))
+		{
+			$response = $this->call($instance, $route, $method);
+		}
+
+		return $response;
+	}
+
+	/**
+	 * Make a controller instance via the IoC container.
+	 *
+	 * @param  string  $controller
+	 * @return mixed
+	 */
+	protected function makeController($controller)
+	{
+		Controller::setFilterer($this->filterer);
+
+		return $this->container->make($controller);
+	}
+
+	/**
+	 * Call the given controller instance method.
+	 *
+	 * @param  \Illuminate\Routing\Controller  $instance
+	 * @param  \Illuminate\Routing\Route  $route
+	 * @param  string  $method
+	 * @return mixed
+	 */
+	protected function call($instance, $route, $method)
+	{
+		$parameters = $route->parametersWithoutNulls();
+
+		return $instance->callAction($method, $parameters);
+	}
+
+	/**
+	 * Call the "before" filters for the controller.
+	 *
+	 * @param  \Illuminate\Routing\Controller  $instance
+	 * @param  \Illuminate\Routing\Route  $route
+	 * @param  \Illuminate\Http\Request  $request
+	 * @param  string  $method
+	 * @return mixed
+	 */
+	protected function before($instance, $route, $request, $method)
+	{
+		foreach ($instance->getBeforeFilters() as $filter)
+		{
+			if ($this->filterApplies($filter, $request, $method))
+			{
+				// Here we will just check if the filter applies. If it does we will call the filter
+				// and return the responses if it isn't null. If it is null, we will keep hitting
+				// them until we get a response or are finished iterating through this filters.
+				$response = $this->callFilter($filter, $route, $request);
+
+				if ( ! is_null($response)) return $response;
+			}
+		}
+	}
+
+	/**
+	 * Apply the applicable after filters to the route.
+	 *
+	 * @param  \Illuminate\Routing\Controller  $instance
+	 * @param  \Illuminate\Routing\Route  $route
+	 * @param  \Illuminate\Http\Request  $request
+	 * @param  string  $method
+	 * @return mixed
+	 */
+	protected function assignAfter($instance, $route, $request, $method)
+	{
+		foreach ($instance->getAfterFilters() as $filter)
+		{
+			// If the filter applies, we will add it to the route, since it has already been
+			// registered on the filterer by the controller, and will just let the normal
+			// router take care of calling these filters so we do not duplicate logics.
+			if ($this->filterApplies($filter, $request, $method))
+			{
+				$route->after($this->getAssignableAfter($filter));
+			}
+		}
+	}
+
+	/**
+	 * Get the assignable after filter for the route.
+	 *
+	 * @param  \Closure|string  $filter
+	 * @return string
+	 */
+	protected function getAssignableAfter($filter)
+	{
+		return $filter['original'] instanceof Closure ? $filter['filter'] : $filter['original'];
+	}
+
+	/**
+	 * Determine if the given filter applies to the request.
+	 *
+	 * @param  array  $filter
+	 * @param  \Illuminate\Http\Request  $request
+	 * @param  string  $method
+	 * @return bool
+	 */
+	protected function filterApplies($filter, $request, $method)
+	{
+		foreach (array('Only', 'Except', 'On') as $type)
+		{
+			if ($this->{"filterFails{$type}"}($filter, $request, $method))
+			{
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	/**
+	 * Determine if the filter fails the "only" constraint.
+	 *
+	 * @param  array  $filter
+	 * @param  \Illuminate\Http\Request  $request
+	 * @param  string  $method
+	 * @return bool
+	 */
+	protected function filterFailsOnly($filter, $request, $method)
+	{
+		if ( ! isset($filter['options']['only'])) return false;
+
+		return ! in_array($method, (array) $filter['options']['only']);
+	}
+
+	/**
+	 * Determine if the filter fails the "except" constraint.
+	 *
+	 * @param  array  $filter
+	 * @param  \Illuminate\Http\Request  $request
+	 * @param  string  $method
+	 * @return bool
+	 */
+	protected function filterFailsExcept($filter, $request, $method)
+	{
+		if ( ! isset($filter['options']['except'])) return false;
+
+		return in_array($method, (array) $filter['options']['except']);
+	}
+
+	/**
+	 * Determine if the filter fails the "on" constraint.
+	 *
+	 * @param  array  $filter
+	 * @param  \Illuminate\Http\Request  $request
+	 * @param  string  $method
+	 * @return bool
+	 */
+	protected function filterFailsOn($filter, $request, $method)
+	{
+		$on = array_get($filter, 'options.on');
+
+		if (is_null($on)) return false;
+
+		// If the "on" is a string, we will explode it on the pipe so you can set any
+		// amount of methods on the filter constraints and it will still work like
+		// you specified an array. Then we will check if the method is in array.
+		if (is_string($on)) $on = explode('|', $on);
+
+		return ! in_array(strtolower($request->getMethod()), $on);
+	}
+
+	/**
+	 * Call the given controller filter method.
+	 *
+	 * @param  array  $filter
+	 * @param  \Illuminate\Routing\Route  $route
+	 * @param  \Illuminate\Http\Request  $request
+	 * @return mixed
+	 */
+	protected function callFilter($filter, $route, $request)
+	{
+		extract($filter);
+
+		return $this->filterer->callRouteFilter($filter, $parameters, $route, $request);
+	}
+
+}