Download the PHP package alexoliverwd/brace without Composer

On this page you can find all versions of the php package alexoliverwd/brace. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package brace

PHPUnit

Brace

brace is a simple template language written in PHP. Brace uses a handlebar style syntax.

Requirements

Brace requires PHP version 8.1 or later.

Installation

Via composer

Or Including the brace class

Usage

Returning processes templates as a string

Compiling to an external file

Instance variables

Variable Description Default value
Keep or remove comment blocks from templates [Boolean]
Set directory to load template files from [String] Current working directory
Template file extension [String]

Template Reference

Variables

In-line "or" operator

Multiple In-line "or" operators

Return variable values by an array index value

Result:

Iterators

In-line Iterators

Or

Nth children

Row keys

Or

Iteration data variables

Variables that are added to each iteration.

ID Description Type
_ITERATION Iteration value (is_first_item, is_last_item, 2, 3 etc) String
_ROW_ID Record/Row ID (1,2,3, etc) Integer
_KEY Record/Row key Mixed
GLOBAL An array of external record data that is accessible to all rows Array

Loops

Increasing

Decreasing

Loop data variables

Variables that are added to each iteration.

ID Description Type
_KEY Row key Integer

Conditional Statements

Condition Blocks

Else If Statements

In-line conditions

Escaping quotations

Conditions

Condition Description
== Is equal to (Loose equality comparison)
=== Is equal to (Strict equality comparison)
>= More than or equal to
<= Less than or equal to
> More than
< Less than
!= Is not equal (Loose non equality comparison)
!! Is not
!== Is not equal (Same as !! operator, strict non equality comparison
EXISTS Exists
!EXISTS Does not exist

Including Templates

Shortcodes

PHP Implementation Example

Content Template

Array Counting

Ability to check and display array item counts

Display Count:

Check Count

Comment Blocks

In-line Comment Block

Multiple Line Comment Block

Clearing cached process string

The --clear-- method is useful when needing to processes multiple templates with differing data using the same brace instance.

By default brace does not clear a processed string at the end of executing a template/string parse.

Running Tests

Running PHPStan and PHPUnit tests can be achieved with the following commands

Or by running via composer


All versions of brace with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alexoliverwd/brace contains the following files

Loading the files please wait ....