Oihana PHP Arango

assertVariableName.php

Table of Contents

Functions

assertVariableName()  : void
Asserts that a string is a safe AQL **variable** name, throwing when it is not.

Functions

assertVariableName()

Asserts that a string is a safe AQL **variable** name, throwing when it is not.

assertVariableName(mixed $value) : void

The variable counterpart of assertAttributeName(), and not interchangeable with it: an attribute name may be a path (address.city), a variable name may not — LET address.city = … is a syntax error. Use this one before interpolating a declared identifier into a LET.

Parameters
$value : mixed

The variable name to validate.

Tags
throws
ValidationException

When $value is not a well-formed variable name.

example
use function oihana\arango\db\helpers\assertVariableName;

assertVariableName( 'authorRef'    ) ; // ok
assertVariableName( 'address.city' ) ; // throws
since
1.7.0
author

Marc Alcaraz

On this page

Search results