Skip to content

1.1.0

Choose a tag to compare

@JohnathonKoster JohnathonKoster released this 26 Feb 17:25
· 67 commits to master since this release

This release adds a new getValues() method to the Stillat\BladeParser\Nodes\ArgumentGroupNode node, making it easier to work with individual argument strings supplied to directives:

<?php

use Stillat\BladeParser\Document\Document;


$template = <<<'BLADE'
@extends("layout")

@section("content")
  @lang("arg1")
@endsection
BLADE;

$doc = Document::fromText($template);

$lang = $doc->findDirectiveByName('lang');

// Returns a Collection instance.
$args = $lang->arguments->getValues();

// Returns "arg1"
$value = $args[0];