src/QueryBuilder.php
protected function _parseMarker($marker, $parameter, $brace){

		$brace = strtolower($brace);

		$result = [
			'uid' => md5(uniqid($parameter, true)),
			'force-type' => null,
			'identifier' => false
		];

		// Integer quick-marker (#parameter# => @[int]parameter@)

		if($marker == '#'){

			assert('$brace == \'\'');
			$brace = 'int';
		}

		// Identifier quick-marker ($parameter$ => @[ident]parameter@)

		elseif($marker == '$'){

			assert('$brace == \'\'');
			$brace = 'identifier';
		}

		switch($brace){

			case 'int':
			case 'float':
			case 'bool':

				$result['force-type'] = $brace;

				break;

			case 'ident':
			case 'identifier':

				$result['identifier'] = true;

				break;

			default:

				if($brace != ''){

					throw new InvalidSyntaxException("Invalid type-hint '$brace' encountered");
				}
		}

		if($parameter == ''){

			throw new InvalidSyntaxException('Invalid parameter name');
		}

		$result['parameter'] = $parameter;

		return $result;
	}
protected function _parseMarker($marker, $parameter, $brace){

		$brace = strtolower($brace);

		$result = [
			'uid' => md5(uniqid($parameter, true)),
			'force-type' => null,
			'identifier' => false
		];

		// Integer quick-marker (#parameter# => @[int]parameter@)

		if($marker == '#'){

			assert('$brace == \'\'');
			$brace = 'int';
		}

		// Identifier quick-marker ($parameter$ => @[ident]parameter@)

		elseif($marker == '$'){

			assert('$brace == \'\'');
			$brace = 'identifier';
		}

		switch($brace){

			case 'int':
			case 'float':
			case 'bool':

				$result['force-type'] = $brace;

				break;

			case 'ident':
			case 'identifier':

				$result['identifier'] = true;

				break;

			default:

				if($brace != ''){

					throw new InvalidSyntaxException("Invalid type-hint '$brace' encountered");
				}
		}

		if($parameter == ''){

			throw new InvalidSyntaxException('Invalid parameter name');
		}

		$result['parameter'] = $parameter;

		return $result;
	}
protected function _parseMarker ( $ marker , $ parameter , $ brace ) { $ brace = strtolower ( $ brace ) ; $ result = [ 'uid' => md5 ( uniqid ( $ parameter , true ) ) , 'force-type' => null , 'identifier' => false ] ; // Integer quick-marker (#parameter# => @[int]parameter@) if ( $ marker == '#' ) { assert ( '$brace == \'\'' ) ; $ brace = 'int' ; } // Identifier quick-marker ($parameter$ => @[ident]parameter@) elseif ( $ marker == '$' ) { assert ( '$brace == \'\'' ) ; $ brace = 'identifier' ; } switch ( $ brace ) { case 'int' : case 'float' : case 'bool' : $ result [ 'force-type' ] = $ brace ; break ; case 'ident' : case 'identifier' : $ result [ 'identifier' ] = true ; break ; default : if ( $ brace != '' ) { throw new InvalidSyntaxException ( "Invalid type-hint '$brace' encountered" ) ; } } if ( $ parameter == '' ) { throw new InvalidSyntaxException ( 'Invalid parameter name' ) ; } $ result [ 'parameter' ] = $ parameter ; return $ result ; }
Parse the contents of a QueryBuilder marker.

@param string $marker
@param string $parameter
@param string $brace
@return array
@throws InvalidSyntaxException
Parse the contents of a QueryBuilder marker .