Browse Source

use filesystem defined mime type constants

PHP-GTK3
yggverse 4 months ago
parent
commit
720f9ebbae
  1. 5
      src/Entity/Browser/Container/Page.php

5
src/Entity/Browser/Container/Page.php

@ -11,6 +11,7 @@ use \Yggverse\Yoda\Entity\Browser\Container\Page\Content;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Response; use \Yggverse\Yoda\Entity\Browser\Container\Page\Response;
use \Yggverse\Yoda\Model\Connection; use \Yggverse\Yoda\Model\Connection;
use \Yggverse\Yoda\Model\Filesystem;
class Page class Page
{ {
@ -201,7 +202,7 @@ class Page
// Update content // Update content
switch ($connection->getMime()) switch ($connection->getMime())
{ {
case 'text/gemini': case Filesystem::MIME_TEXT_GEMINI:
$title = null; $title = null;
@ -219,7 +220,7 @@ class Page
break; break;
case 'text/plain': case Filesystem::MIME_TEXT_PLAIN:
$this->content->setPlain( $this->content->setPlain(
(string) $connection->getData() (string) $connection->getData()

Loading…
Cancel
Save