Add ExternalTaskManager class

This commit is contained in:
Frederic Guillot
2016-11-01 22:18:43 -04:00
parent a3ffb3b40e
commit ae5d31e4c2
9 changed files with 222 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
<?php
namespace Kanboard\Core\ExternalTask;
/**
* Interface ExternalTaskProviderInterface
*
* @package Kanboard\Core\ExternalTask
* @author Frederic Guillot
*/
interface ExternalTaskProviderInterface
{
/**
* Get templates
*
* @return string
*/
public function getCreationFormTemplate();
public function getModificationFormTemplate();
public function getTaskViewTemplate();
/**
* Get provider name (visible in the user interface)
*
* @access public
* @return string
*/
public function getName();
/**
* Retrieve task from external system or cache
*
* @access public
* @throws \Kanboard\Core\ExternalTask\AccessForbiddenException
* @throws \Kanboard\Core\ExternalTask\NotFoundException
* @param string $uri
* @return array Dict that will populate the form
*/
public function retrieve($uri);
/**
* Save the task to the external system and/or update the cache
*
* @access public
* @param string $uri
* @param array $data
* @return bool
*/
public function persist($uri, array $data);
}