-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTextInterface.php
85 lines (75 loc) · 2.04 KB
/
TextInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/**
* Definition of TextInterface
*
* @copyright 2014-today Justso GmbH
* @author [email protected]
* @package justso\justtexts\model
*/
namespace justso\justtexts;
use justso\justapi\SystemEnvironmentInterface;
interface TextInterface
{
/**
* Initializes a text page.
*
* @param SystemEnvironmentInterface $env
* @param string $pageName Name of page
*/
public function __construct(SystemEnvironmentInterface $env, $pageName);
/**
* Returns all texts of a page in the specified language.
*
* @param $language
* @return mixed
*/
public function getPageTexts($language);
/**
* Returns the texts including an information about the text in the base language.
*
* @param $language
* @return array
*/
public function getTextsWithBaseTexts($language);
/**
* Returns the text of a container in the specified language.
* If the text is not defined, null is returned.
*
* @param string $name
* @param string $language
* @return array
*/
public function getText($name, $language);
/**
* Adds a new text container.
*
* @param string $name
* @param string $content
* @param string $language
* @return array
* @throws \Exception
*/
public function addTextContainer($name, $content, $language);
/**
* Modifies the content and optionally the name of a text container.
* If the base language text is changed, the corresponding texts of other languages are invalidated.
*
* @param string $oldName
* @param string $newName
* @param string $content
* @param string $language
* @return array
* @throws \Exception
*/
public function modifyTextContainer($oldName, $newName, $content, $language);
/**
* Deletes a single text container
*
* @param $name
*/
public function deleteTextContainer($name);
/**
* Removes all files related to a text page
*/
public function removeAll();
}