Download the PHP package packagefactory/atomicfusion-constants without Composer
On this page you can find all versions of the php package packagefactory/atomicfusion-constants. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download packagefactory/atomicfusion-constants
More information about packagefactory/atomicfusion-constants
Files in packagefactory/atomicfusion-constants
Package atomicfusion-constants
Short Description Language construct for constants as an addition to Neos.Fusion
License
Informations about the package atomicfusion-constants
PackageFactory.AtomicFusion.Constants
Constants as a language construct for fusion
Warning!
This is experimental technology. Constants are currently not part of the fusion language. You can however install this package to make this functionality available to your project.
Our goal is to make this part of the fusion core in the future. It is very likely though, that Syntax, Scoping and implementation details will deviate from what is presented here.
Installation
PackageFactory.AtomicFusion.Constants is available via packagist. You can install this package with composer:
We use semantic-versioning so every breaking change will increase the major-version number.
Usage
This package introduces the const:
declaration, that let's you define constants within a fusion file. With const::*
you can use the defined constant anywhere in your fusion file:
Constants are scoped to the file they are defined in and cannot be overwritten or redeclared within that file.
Constant names need to be ALL_UPPERCASE and can contain letters, numbers and underscores. A name needs to start with either a letter or an underscore.
Magic Constants
__FILE__
Similar to PHP's __FILE__
constant, you can use const::__FILE__
to reference the location of the current fusion file.
__DIR__
Similar to PHP's __DIR__
constant, you can use const::__DIR__
to reference the directory of the current fusion file.
License
see LICENSE file