File "CompilesUseStatements.php"
Full Path: /home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesUseStatements.php
File size: 532 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace Illuminate\View\Compilers\Concerns;
trait CompilesUseStatements
{
/**
* Compile the use statements into valid PHP.
*
* @param string $expression
* @return string
*/
protected function compileUse($expression)
{
$segments = explode(',', preg_replace("/[\(\)]/", '', $expression));
$use = ltrim(trim($segments[0], " '\""), '\\');
$as = isset($segments[1]) ? ' as '.trim($segments[1], " '\"") : '';
return "<?php use \\{$use}{$as}; ?>";
}
}