diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-04-26 16:48:01 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-04-26 16:48:01 +0200 |
commit | bfd4763b4f831ed9eccbdd4717c98b7d95999d2e (patch) | |
tree | 73538562b347386a24e3b81f443a0b61309fe3de /src/ste/StorageAccess.php | |
parent | 2464ac4fa63ccd169f36849a1f7372191066f305 (diff) | |
download | ste-bfd4763b4f831ed9eccbdd4717c98b7d95999d2e.tar.gz ste-bfd4763b4f831ed9eccbdd4717c98b7d95999d2e.tar.bz2 ste-bfd4763b4f831ed9eccbdd4717c98b7d95999d2e.zip |
Some simple code formatting
- Expand tabs into spaces
- Remove trailing whitespace
- Get rid of closing `?>` tags
Diffstat (limited to 'src/ste/StorageAccess.php')
-rw-r--r-- | src/ste/StorageAccess.php | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/src/ste/StorageAccess.php b/src/ste/StorageAccess.php index 81f7439..0798b41 100644 --- a/src/ste/StorageAccess.php +++ b/src/ste/StorageAccess.php @@ -12,44 +12,44 @@ namespace kch42\ste; * This means, that you are not limited to store the Templates inside directories, you can also use a database or something else. */ interface StorageAccess { - /* - * Constants: Template modes - * - * MODE_SOURCE - The Templates source - * MODE_TRANSCOMPILED - The transcompiled template - */ - const MODE_SOURCE = 0; - const MODE_TRANSCOMPILED = 1; - - /* - * Function: load - * Loading a template. - * - * Parameters: - * $tpl - The name of the template. - * &$mode - Which mode is preferred? One of the <Template modes>. - * If <MODE_SOURCE>, the raw sourcecode is expected, if <MODE_TRANSCOMPILED> the transcompiled template *as a callable function* (expecting an <STECore> instance as first parameter) is expected. - * If the transcompiled version is not available or older than the source, you can set this parameter to <MODE_SOURCE> and return the source. - * - * Throws: - * A <CantLoadTemplate> exception if the template could not be loaded. - * - * Returns: - * Either the sourcecode or a callable function (first, and only parameter: an <STECore> instance). - */ - public function load($tpl, &$mode); - - /* - * Function: save - * Saves a template. - * - * Throws: - * A <CantSaveTemplate> exception if the template could not be saved. - * - * Parameters: - * $tpl -The name of the template. - * $data - The data to be saved. - * $mode - A <Template mode> constant. - */ - public function save($tpl, $data, $mode); + /* + * Constants: Template modes + * + * MODE_SOURCE - The Templates source + * MODE_TRANSCOMPILED - The transcompiled template + */ + const MODE_SOURCE = 0; + const MODE_TRANSCOMPILED = 1; + + /* + * Function: load + * Loading a template. + * + * Parameters: + * $tpl - The name of the template. + * &$mode - Which mode is preferred? One of the <Template modes>. + * If <MODE_SOURCE>, the raw sourcecode is expected, if <MODE_TRANSCOMPILED> the transcompiled template *as a callable function* (expecting an <STECore> instance as first parameter) is expected. + * If the transcompiled version is not available or older than the source, you can set this parameter to <MODE_SOURCE> and return the source. + * + * Throws: + * A <CantLoadTemplate> exception if the template could not be loaded. + * + * Returns: + * Either the sourcecode or a callable function (first, and only parameter: an <STECore> instance). + */ + public function load($tpl, &$mode); + + /* + * Function: save + * Saves a template. + * + * Throws: + * A <CantSaveTemplate> exception if the template could not be saved. + * + * Parameters: + * $tpl -The name of the template. + * $data - The data to be saved. + * $mode - A <Template mode> constant. + */ + public function save($tpl, $data, $mode); } |