@@ -23,10 +23,10 @@ class Template implements DomainModel, Identity
23
23
private string $ title ;
24
24
25
25
#[ORM \Column(name: 'template ' , type: 'blob ' , nullable: true )]
26
- private mixed $ template ;
26
+ private mixed $ content ;
27
27
28
28
#[ORM \Column(name: 'template_text ' , type: 'blob ' , nullable: true )]
29
- private mixed $ templateText ;
29
+ private mixed $ text ;
30
30
31
31
#[ORM \Column(name: 'listorder ' , type: 'integer ' , nullable: true )]
32
32
private ?int $ listOrder = null ;
@@ -50,24 +50,24 @@ public function getTitle(): string
50
50
return $ this ->title ;
51
51
}
52
52
53
- public function getTemplate (): ?string
53
+ public function getContent (): ?string
54
54
{
55
- if (is_resource ($ this ->template )) {
56
- rewind ($ this ->template );
57
- return stream_get_contents ($ this ->template );
55
+ if (is_resource ($ this ->content )) {
56
+ rewind ($ this ->content );
57
+ return stream_get_contents ($ this ->content );
58
58
}
59
59
60
- return $ this ->template ;
60
+ return $ this ->content ;
61
61
}
62
62
63
- public function getTemplateText (): ?string
63
+ public function getText (): ?string
64
64
{
65
- if (is_resource ($ this ->templateText )) {
66
- rewind ($ this ->templateText );
67
- return stream_get_contents ($ this ->templateText );
65
+ if (is_resource ($ this ->text )) {
66
+ rewind ($ this ->text );
67
+ return stream_get_contents ($ this ->text );
68
68
}
69
69
70
- return $ this ->templateText ;
70
+ return $ this ->text ;
71
71
}
72
72
73
73
public function getListOrder (): ?int
@@ -86,16 +86,16 @@ public function setTitle(string $title): self
86
86
return $ this ;
87
87
}
88
88
89
- public function setTemplate (?string $ template ): self
89
+ public function setContent (?string $ content ): self
90
90
{
91
- $ this ->template = $ template !== null ? fopen ('data://text/plain, ' . $ template , 'r ' ) : null ;
91
+ $ this ->content = $ content !== null ? fopen ('data://text/plain, ' . $ content , 'r ' ) : null ;
92
92
return $ this ;
93
93
}
94
94
95
95
96
- public function setTemplateText (?string $ templateText ): self
96
+ public function setText (?string $ text ): self
97
97
{
98
- $ this ->templateText = $ templateText !== null ? fopen ('data://text/plain, ' . $ templateText , 'r ' ) : null ;
98
+ $ this ->text = $ text !== null ? fopen ('data://text/plain, ' . $ text , 'r ' ) : null ;
99
99
return $ this ;
100
100
}
101
101
0 commit comments