PHP 8.3.31
Preview: CompilesLayouts.php Size: 3.01 KB
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php

<?php

namespace Illuminate\View\Compilers\Concerns;

trait CompilesLayouts
{
    /**
     * The name of the last section that was started.
     *
     * @var string
     */
    protected $lastSection;

    /**
     * Compile the extends statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    protected function compileExtends($expression)
    {
        $expression = $this->stripParentheses($expression);

        $echo = "<?php echo \$__env->make({$expression}, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>";

        $this->footer[] = $echo;

        return '';
    }

    /**
     * Compile the extends-first statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    protected function compileExtendsFirst($expression)
    {
        $expression = $this->stripParentheses($expression);

        $echo = "<?php echo \$__env->first({$expression}, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>";

        $this->footer[] = $echo;

        return '';
    }

    /**
     * Compile the section statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    protected function compileSection($expression)
    {
        $this->lastSection = trim($expression, "()'\" ");

        return "<?php \$__env->startSection{$expression}; ?>";
    }

    /**
     * Replace the @parent directive to a placeholder.
     *
     * @return string
     */
    protected function compileParent()
    {
        $escapedLastSection = strtr($this->lastSection, ['\\' => '\\\\', "'" => "\\'"]);

        return "<?php echo \Illuminate\View\Factory::parentPlaceholder('{$escapedLastSection}'); ?>";
    }

    /**
     * Compile the yield statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    protected function compileYield($expression)
    {
        return "<?php echo \$__env->yieldContent{$expression}; ?>";
    }

    /**
     * Compile the show statements into valid PHP.
     *
     * @return string
     */
    protected function compileShow()
    {
        return '<?php echo $__env->yieldSection(); ?>';
    }

    /**
     * Compile the append statements into valid PHP.
     *
     * @return string
     */
    protected function compileAppend()
    {
        return '<?php $__env->appendSection(); ?>';
    }

    /**
     * Compile the overwrite statements into valid PHP.
     *
     * @return string
     */
    protected function compileOverwrite()
    {
        return '<?php $__env->stopSection(true); ?>';
    }

    /**
     * Compile the stop statements into valid PHP.
     *
     * @return string
     */
    protected function compileStop()
    {
        return '<?php $__env->stopSection(); ?>';
    }

    /**
     * Compile the end-section statements into valid PHP.
     *
     * @return string
     */
    protected function compileEndsection()
    {
        return '<?php $__env->stopSection(); ?>';
    }
}

Directory Contents

Dirs: 0 × Files: 21

Name Size Perms Modified Actions
2.44 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
446 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
413 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
6.46 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
9.27 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
4.52 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
933 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
729 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.56 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.38 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
505 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
447 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
725 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
3.01 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
4.82 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
620 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1013 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.73 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
443 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.03 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
532 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).