REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 2.38 KB
Close
/home/jambtst2015/9jahookups.com/libraries/src/Document/Factory.php
Text
Base64
<?php /** * Joomla! Content Management System * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Document; \defined('_JEXEC') or die; /** * Default factory for creating Document objects * * @since 4.0.0 */ class Factory implements FactoryInterface { /** * Creates a new Document object for the requested format. * * @param string $type The document type to instantiate * @param array $attributes Array of attributes * * @return Document * * @since 4.0.0 */ public function createDocument(string $type = 'html', array $attributes = []): Document { $type = preg_replace('/[^A-Z0-9_\.-]/i', '', $type); $ntype = null; $class = __NAMESPACE__ . '\\' . ucfirst($type) . 'Document'; if (!class_exists($class)) { $class = 'JDocument' . ucfirst($type); } if (!class_exists($class)) { $ntype = $type; $class = RawDocument::class; } // Inject this factory into the document unless one was provided if (!isset($attributes['factory'])) { $attributes['factory'] = $this; } /** @var Document $instance */ $instance = new $class($attributes); if (!\is_null($ntype)) { // Set the type to the Document type originally requested $instance->setType($ntype); } return $instance; } /** * Creates a new renderer object. * * @param Document $document The Document instance to attach to the renderer * @param string $type The renderer type to instantiate * @param string $docType The document type the renderer is part of * * @return RendererInterface * * @since 4.0.0 */ public function createRenderer(Document $document, string $type, string $docType = ''): RendererInterface { $docType = $docType ? ucfirst($docType) : ucfirst($document->getType()); // Determine the path and class $class = __NAMESPACE__ . '\\Renderer\\' . $docType . '\\' . ucfirst($type) . 'Renderer'; if (!class_exists($class)) { $class = 'JDocumentRenderer' . $docType . ucfirst($type); } if (!class_exists($class)) { // "Legacy" class name structure $class = '\\JDocumentRenderer' . $type; if (!class_exists($class)) { throw new \RuntimeException(sprintf('Unable to load renderer class %s', $type), 500); } } return new $class($document); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 16
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Feed
DIR
-
drwxr-xr-x
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Opensearch
DIR
-
drwxr-xr-x
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Renderer
DIR
-
drwxr-xr-x
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Document.php
24.47 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DocumentRenderer.php
1.44 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ErrorDocument.php
3.22 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Factory.php
2.38 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FactoryInterface.php
1.14 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FeedDocument.php
4.24 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HtmlDocument.php
21.04 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ImageDocument.php
1.42 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
JsonapiDocument.php
3.41 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
JsonDocument.php
2.20 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OpensearchDocument.php
5.18 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PreloadManager.php
4.00 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PreloadManagerInterface.php
2.54 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RawDocument.php
1.06 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RendererInterface.php
753 B
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
XmlDocument.php
2.51 KB
lrw-r--r--
2021-08-23 19:07:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).