Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\View\Compilers\Concerns;
4
 
5
trait CompilesRawPhp
6
{
7
    /**
8
     * Compile the raw PHP statements into valid PHP.
9
     *
10
     * @param  string  $expression
11
     * @return string
12
     */
13
    protected function compilePhp($expression)
14
    {
15
        if ($expression) {
16
            return "<?php {$expression}; ?>";
17
        }
18
 
19
        return '@php';
20
    }
21
 
22
    /**
23
     * Compile the unset statements into valid PHP.
24
     *
25
     * @param  string  $expression
26
     * @return string
27
     */
28
    protected function compileUnset($expression)
29
    {
30
        return "<?php unset{$expression}; ?>";
31
    }
32
}