REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 2.91 KB
Close
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Console/View/Components/Component.php
Text
Base64
<?php namespace Illuminate\Console\View\Components; use Illuminate\Console\OutputStyle; use Illuminate\Console\QuestionHelper; use ReflectionClass; use Symfony\Component\Console\Helper\SymfonyQuestionHelper; use function Termwind\render; use function Termwind\renderUsing; abstract class Component { /** * The output style implementation. * * @var \Illuminate\Console\OutputStyle */ protected $output; /** * The list of mutators to apply on the view data. * * @var array<int, callable(string): string> */ protected $mutators; /** * Creates a new component instance. * * @param \Illuminate\Console\OutputStyle $output * @return void */ public function __construct($output) { $this->output = $output; } /** * Renders the given view. * * @param string $view * @param \Illuminate\Contracts\Support\Arrayable|array $data * @param int $verbosity * @return void */ protected function renderView($view, $data, $verbosity) { renderUsing($this->output); render((string) $this->compile($view, $data), $verbosity); } /** * Compile the given view contents. * * @param string $view * @param array $data * @return void */ protected function compile($view, $data) { extract($data); ob_start(); include __DIR__."/../../resources/views/components/$view.php"; return tap(ob_get_contents(), function () { ob_end_clean(); }); } /** * Mutates the given data with the given set of mutators. * * @param array<int, string>|string $data * @param array<int, callable(string): string> $mutators * @return array<int, string>|string */ protected function mutate($data, $mutators) { foreach ($mutators as $mutator) { $mutator = new $mutator; if (is_iterable($data)) { foreach ($data as $key => $value) { $data[$key] = $mutator($value); } } else { $data = $mutator($data); } } return $data; } /** * Eventually performs a question using the component's question helper. * * @param callable $callable * @return mixed */ protected function usingQuestionHelper($callable) { $property = with(new ReflectionClass(OutputStyle::class)) ->getParentClass() ->getProperty('questionHelper'); $currentHelper = $property->isInitialized($this->output) ? $property->getValue($this->output) : new SymfonyQuestionHelper(); $property->setValue($this->output, new QuestionHelper); try { return $callable(); } finally { $property->setValue($this->output, $currentHelper); } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 16
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Mutators
DIR
-
drwxrwxrwx
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Alert.php
710 B
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Ask.php
636 B
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AskWithCompletion.php
751 B
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BulletList.php
746 B
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Choice.php
1.37 KB
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Component.php
2.91 KB
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Confirm.php
440 B
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Error.php
477 B
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Factory.php
2.64 KB
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Info.php
475 B
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Line.php
1.58 KB
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Secret.php
575 B
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Success.php
481 B
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Task.php
1.81 KB
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TwoColumnDetail.php
1.00 KB
lrw-rw-rw-
2025-09-17 06:52:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Warn.php
488 B
lrw-rw-rw-
2025-09-17 06:52:57
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).