<?php

/**
 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @package clearFusionCMS
 * @copyright Copyright (c) 2012 - 2013 clearFusionCMS. All rights reserved.
 * @link http://clearfusioncms.com
 */

/**
 * cfTaskRunner Class
 *
 * Class to process cron events for running tasks.
 *
 * @package clearFusionCMS
 */
class cfTaskRunner {

	/**
	 * Invoke the task.
	 *
	 * @param string $name The name of the task to run.
	 * @param array $args The arguments, 0 = The event object.
	 */
	function __call($name, $args) {
		$tasks = new cfTaskSnippets(clearFusionCMS::getDb());
		$tasks->runTask($name);
	}
}
