Showing 10 of 1,214 results.

parseKey($key) | The Laravel Translator

The parseKey is used to parse a given $key into its namespace, group and item parts. The namespace refers to a custom namespace (or the default * namespace); the group refers to a particular file, such as passwords.php and the item refers to a...

PHP Block Nodes | Parser Nodes Overview

The parser produces instances of the Stillat\BladeParser\Nodes\PhpBlockNode class after successfully parsing a @php and @endphp directive pair. PhpBlockNode instances are only created when the opening @php directive contains  no  arguments....

PHP Tag Nodes | Parser Nodes Overview

The parser emits Stillat\BladeParser\Nodes\PhpTagNode instances when it parses traditional PHP tags within a Blade template. Each PhpTagNode node is categorized in one of two ways: PhpOpenTag, : Indicates the PHP tag started with the, <?php, tag.,...

Error Families | Parser Errors

The following error families may be reported: Error Family Code Parser P Validation V Compiler C Third-party extensions should not emit error codes in the parser family.

Core Concepts

The heart of the Blade Parser library is its Document Parser. This parser is responsible for reading through a Blade template and extracting information from it. It accomplishes this by looking for Blade constructs, such as directives, comments,...

Implementing a Customer Domain Specific Language Parser in PHP

In this article we are going to take a look at implementing a custom language parser in PHP. The language this parser will analyze will be fairly small, and serve a very specific purpose: to parse custom filter expressions from a string input....

Disabling Core Directives | The Document Parser

…epending on the integration or use case, it may be beneficial to remove support for the core directives and specify only a subset of directives names. We can accomplish this by calling the withoutCoreDirectives method: 1 <?php 2 3 use Stillat \...