diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-11-01 22:18:43 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-11-01 22:18:43 -0400 |
commit | ae5d31e4c285e0ce672de780fdacff953fe71bba (patch) | |
tree | 5a0f3995633da429417cdc0cfbad920c3e9b4bc9 /app/Core/ExternalTask/ExternalTaskProviderInterface.php | |
parent | a3ffb3b40e5459a4e671739e8265cc26d7f6b84b (diff) |
Add ExternalTaskManager class
Diffstat (limited to 'app/Core/ExternalTask/ExternalTaskProviderInterface.php')
-rw-r--r-- | app/Core/ExternalTask/ExternalTaskProviderInterface.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/app/Core/ExternalTask/ExternalTaskProviderInterface.php b/app/Core/ExternalTask/ExternalTaskProviderInterface.php new file mode 100644 index 00000000..9e672780 --- /dev/null +++ b/app/Core/ExternalTask/ExternalTaskProviderInterface.php @@ -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); +} |