aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-06-21 18:43:34 +0200
committerThomas Lange <code@nerdmind.de>2021-06-21 18:43:34 +0200
commit57019638f3b72c42d9b72cab6f060537edbee038 (patch)
treed8398b93dfca8da852a01470a6431927fbefb360 /core
parent93e84ae4bcf58ace1f714e248a7bc2067f784467 (diff)
downloadblog-57019638f3b72c42d9b72cab6f060537edbee038.tar.gz
blog-57019638f3b72c42d9b72cab6f060537edbee038.tar.xz
blog-57019638f3b72c42d9b72cab6f060537edbee038.zip
Remove unused methods from Item class
Diffstat (limited to 'core')
-rw-r--r--core/namespace/Item.php50
1 files changed, 0 insertions, 50 deletions
diff --git a/core/namespace/Item.php b/core/namespace/Item.php
index 0cd504b..92eb0e8 100644
--- a/core/namespace/Item.php
+++ b/core/namespace/Item.php
@@ -51,56 +51,6 @@ abstract class Item implements ItemInterface {
}
#===============================================================================
- # Return pre-parsed content
- #===============================================================================
- public function getBody(): string {
- $content = preg_replace_callback('#\{(POST|PAGE|USER)\[([0-9]+)\]\}#', function($matches) {
- $namespace = ucfirst(strtolower($matches[1])).'\\Factory';
-
- try {
- $Item = $namespace::build($matches[2]);
- return Application::getEntityURL($Item);
- } catch(Exception $Exception) {
- return '{undefined}';
- }
- }, $this->Attribute->get('body'));
-
- $content = preg_replace('#\{BASE\[\"([^"]+)\"\]\}#', \Application::getURL('$1'), $content);
- $content = preg_replace('#\{FILE\[\"([^"]+)\"\]\}#', \Application::getFileURL('$1'), $content);
-
- return $content;
- }
-
- #===============================================================================
- # Return parsed content
- #===============================================================================
- public function getHTML(): string {
- $item = "{$this->Reflection->getNamespaceName()}\\Item";
-
- $Parsedown = new Parsedown();
- $Parsedown->setUrlsLinked(FALSE);
- $content = $this->getBody();
-
- if(\Application::get($item::CONFIGURATION.'.EMOTICONS') === TRUE) {
- $content = parseUnicodeEmoticons($content);
- $content = parseEmoticons($content);
- }
-
- return $Parsedown->text($content);
- }
-
- #===============================================================================
- # Return attached files
- #===============================================================================
- public function getFiles(): array {
- if(preg_match_all('#\!\[(.*)\][ ]?(?:\n[ ]*)?\((.*)(\s[\'"](.*)[\'"])?\)#U', $this->getBody(), $matches)) {
- return array_map('htmlentities', $matches[2]);
- }
-
- return [];
- }
-
- #===============================================================================
# Return parsed arguments
#===============================================================================
public function getArguments(): array {