Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2008-2010 (original work) Deutsche Institut für Internationale Pädagogische Forschung |
| 19 | * (under the project TAO-TRANSFER); |
| 20 | * 2009-2012 (update and modification) Public Research Centre Henri Tudor |
| 21 | * (under the project TAO-SUSTAIN & TAO-DEV); |
| 22 | * |
| 23 | */ |
| 24 | |
| 25 | /** |
| 26 | * Any Object that claims to be annotable should implement this interface. |
| 27 | * |
| 28 | * @access public |
| 29 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 30 | * @package tao |
| 31 | |
| 32 | */ |
| 33 | interface tao_helpers_translation_Annotable |
| 34 | { |
| 35 | // --- OPERATIONS --- |
| 36 | |
| 37 | /** |
| 38 | * Sets the collection of annotations bound to this Translation Object. |
| 39 | * |
| 40 | * @access public |
| 41 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 42 | * @param array $annotations An associative array of annotations where keys are the annotation names and values are |
| 43 | * annotation values. |
| 44 | * @return void |
| 45 | */ |
| 46 | public function setAnnotations($annotations); |
| 47 | |
| 48 | /** |
| 49 | * Returns an associative array that represents a collection of annotations |
| 50 | * keys are annotation names and values annotation values. |
| 51 | * |
| 52 | * @access public |
| 53 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 54 | * @return array |
| 55 | */ |
| 56 | public function getAnnotations(); |
| 57 | |
| 58 | /** |
| 59 | * Adds an annotation with a given name and value. If value is not provided, |
| 60 | * annotation will be taken into account as a flag. |
| 61 | * |
| 62 | * @access public |
| 63 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 64 | * @param string name The name of the annotation to add. |
| 65 | * @param string value The value of the annotation to add. |
| 66 | * @return void |
| 67 | */ |
| 68 | public function addAnnotation($name, $value = ''); |
| 69 | |
| 70 | /** |
| 71 | * Removes an annotation for a given annotation name. |
| 72 | * |
| 73 | * @access public |
| 74 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 75 | * @param string name The name of the annotation to remove. |
| 76 | * @return void |
| 77 | */ |
| 78 | public function removeAnnotation($name); |
| 79 | |
| 80 | /** |
| 81 | * Get an annotation for a given annotation name. Returns an associative |
| 82 | * where keys are 'name' and 'value'. |
| 83 | * |
| 84 | * @access public |
| 85 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 86 | * @param string name |
| 87 | * @return array |
| 88 | */ |
| 89 | public function getAnnotation($name); |
| 90 | } |