Moves multiple class methods to their own power classes. Moves many compiler config values to its own config class. Updated the Expantion method to use the new config class.

This commit is contained in:
2022-08-30 17:28:41 +02:00
parent f8ac247377
commit 4928a8baaf
58 changed files with 14568 additions and 12580 deletions

View File

@@ -0,0 +1,106 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Componentbuilder\Compiler\Utilities;
/**
* The Placeholder Prefix and Suffix Factory
*
* @since 3.2.0
*/
abstract class Placefix
{
/**
* The hash prefix and suffix
*
* @var string
* @since 3.2.0
**/
private static $hhh = '#' . '#' . '#';
/**
* The open prefix
*
* @var string
* @since 3.2.0
**/
private static $bbb = '[' . '[' . '[';
/**
* The close suffix
*
* @var string
* @since 3.2.0
**/
private static $ddd = ']' . ']' . ']';
/**
* Get a prefix and suffix added to given string
*
* @param string $class The class name
*
* @return string
* @since 3.2.0
*/
public static function _(string $string): string
{
return self::b() . $string . self::d();
}
/**
* Get a open prefix
*
* @return string
* @since 3.2.0
*/
public static function b(): string
{
return self::$bbb;
}
/**
* Get a close suffix
*
* @return string
* @since 3.2.0
*/
public static function d(): string
{
return self::$ddd;
}
/**
* Get a hash prefix and suffix added to given string
*
* @param string $class The class name
*
* @return string
* @since 3.2.0
*/
public static function _h(string $string): string
{
return self::h() . $string . self::h();
}
/**
* Get a hash-fix
*
* @return string
* @since 3.2.0
*/
public static function h(): string
{
return self::$hhh;
}
}