function processFile($token, $file)
	{
		// Why not in one condition?
		// @see http://forum.nettephp.com/cs/viewtopic.php?pid=29556#p29556
		if (!$file instanceof FileUpload) {
			return false;
		}

		/* @var $validateCallback Callback */
		$validateCallback = MultipleFileUpload::$validateFileCallback;

		/* @var $isValid bool */
		$isValid = $validateCallback->invoke($file);

		if ($isValid) {
			MultipleFileUpload::getQueuesModel()
				->getQueue($token)
				->addFile($file);
		}
		return $isValid;
	}
function processFile($token, $file)
	{
		// Why not in one condition?
		// @see http://forum.nettephp.com/cs/viewtopic.php?pid=29556#p29556
		if (!$file instanceof FileUpload) {
			return false;
		}

		/* @var $validateCallback Callback */
		$validateCallback = MultipleFileUpload::$validateFileCallback;

		/* @var $isValid bool */
		$isValid = $validateCallback->invoke($file);

		if ($isValid) {
			MultipleFileUpload::getQueuesModel()
				->getQueue($token)
				->addFile($file);
		}
		return $isValid;
	}
function processFile ( $ token , $ file ) { // Why not in one condition? // @see http://forum.nettephp.com/cs/viewtopic.php?pid=29556#p29556 if ( ! $ file instanceof FileUpload ) { return false ; } /* @var $validateCallback Callback */ $ validateCallback = MultipleFileUpload :: $ validateFileCallback ; /* @var $isValid bool */ $ isValid = $ validateCallback -> invoke ( $ file ) ; if ( $ isValid ) { MultipleFileUpload :: getQueuesModel ( ) -> getQueue ( $ token ) -> addFile ( $ file ) ; } return $ isValid ; }
Process single file
@param string $token
@param FileUpload $file
@return bool
Process single file