/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/modules/Orderbutton/templates/client/mod_orderbutton_currency.html.twig
{% set currencies = guest.currency_get_pairs %}
{% if currencies|length > 1 %}
<label for="currency" class="mt-2">
<select id="currency" name="currency" class="currency_selector form-select ms-2">
{% set selected = guest.cart_get_currency.code %}
{% for code, name in currencies %}
<option value="{{ code }}" class="currency_{{ code }}"{% if code == selected %} selected="selected"{% endif %}>{{ code }} - {{ name }}</option>
{% endfor %}
</select>
</label>
{% endif %}
Arguments
"An exception has been thrown during the rendering of a template ("Couldn't read the indices [Names][Rp][1] for the locale "en_US_POSIX" in "/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/symfony/intl/Resources/data/currencies". The indices also couldn't be found for the fallback locale(s) "en_US", "en", "root".") in "mod_orderbutton_currency.html.twig" at line 1."
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/symfony/intl/Data/Bundle/Reader/BundleEntryReader.php
// containing the detailed path and locale
$errorMessage = \sprintf(
'Couldn\'t read the indices [%s] for the locale "%s" in "%s".',
implode('][', $indices),
$locale,
$path
);
// Append fallback locales, if any
if (\count($testedLocales) > 1) {
// Remove original locale
array_shift($testedLocales);
$errorMessage .= \sprintf(
' The indices also couldn\'t be found for the fallback locale(s) "%s".',
implode('", "', $testedLocales)
);
}
throw new MissingResourceException($errorMessage, 0, $exception);
}
}
Arguments
"Couldn't read the indices [Names][Rp][1] for the locale "en_US_POSIX" in "/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/symfony/intl/Resources/data/currencies". The indices also couldn't be found for the fallback locale(s) "en_US", "en", "root"."
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/symfony/intl/Data/Util/RecursiveArrayAccess.php
*/
class RecursiveArrayAccess
{
public static function get(mixed $array, array $indices): mixed
{
foreach ($indices as $index) {
// Use array_key_exists() for arrays, isset() otherwise
if (\is_array($array)) {
if (\array_key_exists($index, $array)) {
$array = $array[$index];
continue;
}
} elseif ($array instanceof \ArrayAccess) {
if (isset($array[$index])) {
$array = $array[$index];
continue;
}
}
throw new OutOfBoundsException(\sprintf('The index "%s" does not exist.', $index));
}
return $array;
}
private function __construct()
{
}
}
Arguments
"The index "Rp" does not exist."
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/symfony/intl/Data/Bundle/Reader/BundleEntryReader.php
}
public function readEntry(string $path, string $locale, array $indices, bool $fallback = true): mixed
{
$entry = null;
$isMultiValued = false;
$readSucceeded = false;
$exception = null;
$currentLocale = $locale;
$testedLocales = [];
while (null !== $currentLocale) {
// Resolve any aliases to their target locales
if (isset($this->localeAliases[$currentLocale])) {
$currentLocale = $this->localeAliases[$currentLocale];
}
try {
$data = $this->reader->read($path, $currentLocale);
$currentEntry = RecursiveArrayAccess::get($data, $indices);
$readSucceeded = true;
$isCurrentTraversable = $currentEntry instanceof \Traversable;
$isCurrentMultiValued = $isCurrentTraversable || \is_array($currentEntry);
// Return immediately if fallback is disabled or we are dealing
// with a scalar non-null entry
if (!$fallback || (!$isCurrentMultiValued && null !== $currentEntry)) {
return $currentEntry;
}
// =========================================================
// Fallback is enabled, entry is either multi-valued or NULL
// =========================================================
// If entry is multi-valued, convert to array
if ($isCurrentTraversable) {
$currentEntry = iterator_to_array($currentEntry);
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/symfony/intl/ResourceBundle.php
* Only applicable if the result is multivalued
* (i.e. array or \ArrayAccess) or cannot be found
* in the requested locale.
*
* @return mixed returns an array or {@link \ArrayAccess} instance for
* complex data and a scalar value for simple data
*/
final protected static function readEntry(array $indices, ?string $locale = null, bool $fallback = true): mixed
{
if (!isset(self::$entryReader)) {
self::$entryReader = new BundleEntryReader(new BufferedBundleReader(
new PhpBundleReader(),
Intl::BUFFER_SIZE
));
$localeAliases = self::$entryReader->readEntry(Intl::getDataDirectory().'/'.Intl::LOCALE_DIR, 'meta', ['Aliases']);
self::$entryReader->setLocaleAliases($localeAliases instanceof \Traversable ? iterator_to_array($localeAliases) : $localeAliases);
}
return self::$entryReader->readEntry(static::getPath(), $locale ?? \Locale::getDefault(), $indices, $fallback);
}
final protected static function asort(iterable $list, ?string $locale = null): array
{
if ($list instanceof \Traversable) {
$list = iterator_to_array($list);
}
$collator = new \Collator($locale ?? \Locale::getDefault());
$collator->asort($list);
return $list;
}
private function __construct()
{
}
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/symfony/intl/Currencies.php
return self::readEntry(['Currencies'], 'meta');
}
public static function exists(string $currency): bool
{
try {
self::readEntry(['Names', $currency, self::INDEX_NAME]);
return true;
} catch (MissingResourceException) {
return false;
}
}
/**
* @throws MissingResourceException if the currency code does not exist
*/
public static function getName(string $currency, ?string $displayLocale = null): string
{
return self::readEntry(['Names', $currency, self::INDEX_NAME], $displayLocale);
}
/**
* @return string[]
*/
public static function getNames(?string $displayLocale = null): array
{
// ====================================================================
// For reference: It is NOT possible to return names indexed by
// numeric code here, because some numeric codes map to multiple
// 3-letter codes (e.g. 32 => "ARA", "ARP", "ARS")
// ====================================================================
$names = self::readEntry(['Names'], $displayLocale);
if ($names instanceof \Traversable) {
$names = iterator_to_array($names);
}
array_walk($names, function (&$value) {
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/modules/Currency/Repository/CurrencyRepository.php
* If the default currency is changed via `Service::setAsDefault()`, that method
* clears the identity map to ensure subsequent calls return fresh data.
*/
public function findDefault(): ?Currency
{
return $this->findOneBy(['isDefault' => true]);
}
public function getPairs(): array
{
$qb = $this->createQueryBuilder('c')
->select('c.code')
->orderBy('c.code', 'ASC');
$results = $qb->getQuery()->getResult();
$pairs = [];
foreach ($results as $result) {
$code = $result['code'];
$pairs[$code] = Currencies::getName($code);
}
return $pairs;
}
/**
* Get conversion rate by currency code.
* Returns the rate as a float for calculations, or null if currency not found.
*
* @param string $code Currency code
*
* @return float|null The conversion rate as a float, or null if not found
*/
public function getRateByCode(string $code): ?float
{
try {
$rate = $this->createQueryBuilder('c')
->select('c.conversionRate')
->where('c.code = :code')
->setParameter('code', $code)
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/modules/Currency/Api/Guest.php
*/
namespace Box\Mod\Currency\Api;
use Box\Mod\Currency\Entity\Currency;
use FOSSBilling\i18n;
use FOSSBilling\Tools;
use Symfony\Component\Intl\Currencies;
class Guest extends \Api_Abstract
{
/**
* Get a list of available currencies.
*/
public function get_pairs(): array
{
/** @var \Box\Mod\Currency\Repository\CurrencyRepository $repo */
$repo = $this->getService()->getCurrencyRepository();
return $repo->getPairs();
}
/**
* Get a currency by code.
*/
public function get(array $data): array
{
/** @var \Box\Mod\Currency\Repository\CurrencyRepository $repo */
$repo = $this->getService()->getCurrencyRepository();
if (isset($data['code']) && !empty($data['code'])) {
$model = $repo->findOneByCode($data['code']);
} else {
$model = $repo->findDefault();
}
if (!$model instanceof Currency) {
throw new \FOSSBilling\Exception('Currency not found.');
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/library/Api/Handler.php
$api->setDi($this->di);
$api->setMod($bb_mod);
$api->setIdentity($this->identity);
$api->setIp($this->getDi()['request']->getClientIp());
if ($bb_mod->hasService()) {
$api->setService($this->getDi()['mod_service']($mod));
}
if (!method_exists($api, $method_name) || !is_callable([$api, $method_name])) {
$reflector = new ReflectionClass($api);
if (!$reflector->hasMethod('__call')) {
throw new FOSSBilling\Exception(':type API call :method does not exist in module :module', [':type' => ucfirst((string) $this->type), ':method' => $method_name, ':module' => $mod], 740);
}
}
$data = is_array($arguments) ? $arguments : [];
$this->validateRequiredParams($api, $method_name, $data);
return $api->{$method_name}($arguments);
}
/**
* Validate required parameters for an API method using attributes.
*
* @param Api_Abstract $api The API instance
* @param string $method_name The method name
* @param array $data The data array passed to the method
*
* @throws FOSSBilling\InformationException If required parameters are missing
*/
public function validateRequiredParams(Api_Abstract $api, string $method_name, array $data): void
{
try {
$reflection = new ReflectionMethod($api, $method_name);
} catch (ReflectionException) {
// Method doesn't exist, skip validation
return;
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Extension/CoreExtension.php
if ($isDefinedTest) {
return false;
}
if ($propertyNotAllowedError) {
throw $propertyNotAllowedError;
}
throw $e;
}
}
if ($isDefinedTest) {
return true;
}
// Some objects throw exceptions when they have __call, and the method we try
// to call is not supported. If ignoreStrictCheck is true, we should return null.
try {
$ret = $object->$method(...$arguments);
} catch (\BadMethodCallException $e) {
if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
return;
}
throw $e;
}
return $ret;
}
/**
* Returns the values from a single column in the input array.
*
* <pre>
* {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
*
* {% set fruits = items|column('fruit') %}
*
* {# fruits now contains ['apple', 'orange'] #}
* </pre>
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/data/cache/b7/b7368dd257d3ef509dc74177937590a9.php
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 1
$context["currencies"] = CoreExtension::getAttribute($this->env, $this->source, ($context["guest"] ?? null), "currency_get_pairs", [], "any", false, false, false, 1);
// line 2
yield "
";
// line 3
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["currencies"] ?? null)) > 1)) {
// line 4
yield " <label for=\"currency\" class=\"mt-2\">
<select id=\"currency\" name=\"currency\" class=\"currency_selector form-select ms-2\">
";
// line 6
$context["selected"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["guest"] ?? null), "cart_get_currency", [], "any", false, false, false, 6), "code", [], "any", false, false, false, 6);
// line 7
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(($context["currencies"] ?? null));
foreach ($context['_seq'] as $context["code"] => $context["name"]) {
// line 8
yield " <option value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["code"], "html", null, true);
yield "\" class=\"currency_";
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Template.php
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function yield(array $context, array $blocks = []): iterable
{
$context += $this->env->getGlobals();
$blocks = array_merge($this->blocks, $blocks);
try {
$this->ensureSecurityChecked();
yield from $this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Template.php
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks(): array
{
return $this->blocks;
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Template.php
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/TemplateWrapper.php
/**
* @return iterable<scalar|\Stringable|null>
*/
public function stream(array $context = []): iterable
{
yield from $this->template->yield($context);
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function streamBlock(string $name, array $context = []): iterable
{
yield from $this->template->yieldBlock($name, $context);
}
public function render(array $context = []): string
{
return $this->template->render($context);
}
/**
* @return void
*/
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_get_args()[1] ?? []);
}
public function hasBlock(string $name, array $context = []): bool
{
return $this->template->hasBlock($name, $context);
}
/**
* @return string[] An array of defined template block names
*/
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Extension/CoreExtension.php
if ($isSandboxed = $sandboxed && $env->hasExtension(SandboxExtension::class)) {
$sandbox = $env->getExtension(SandboxExtension::class);
if (!$alreadySandboxed = $sandbox->isSandboxed()) {
$sandbox->enableSandbox();
}
}
try {
$loaded = null;
try {
$loaded = $env->resolveTemplate($template);
} catch (LoaderError $e) {
if (!$ignoreMissing) {
throw $e;
}
return '';
}
return $loaded->render($variables);
} finally {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
}
}
/**
* Returns a template content without rendering it.
*
* @param string $name The template name
* @param bool $ignoreMissing Whether to ignore missing templates or not
*
* @internal
*/
public static function source(Environment $env, $name, $ignoreMissing = false): string
{
$loader = $env->getLoader();
try {
return $loader->getSourceContext($name)->getCode();
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/data/cache/eb/eb375b1fc10ffb6fed7aec2b0e419ecc.php
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 17
yield " <div class=\"row\">
<div class=\"col-md-12\">
<div class=\"card mb-4\">
<div class=\"card-header py-3 py-3\">
<div class=\"d-flex justify-content-between align-items-center\">
<div class=\"w-100\">
<h1 class=\"mb-1\">";
// line 23
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->trans("Products"), "html", null, true);
yield "</h1>
";
// line 24
yield Twig\Extension\CoreExtension::include($this->env, $context, "mod_orderbutton_currency.html.twig");
yield "
</div>
</div>
</div>
<div class=\"card-body overflow-hidden\">
";
// line 29
yield Twig\Extension\CoreExtension::include($this->env, $context, "mod_orderbutton_content.html.twig");
yield "
</div>
</div>
</div>
</div>
";
yield from [];
}
// line 36
/**
* @return iterable<null|scalar|\Stringable>
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Template.php
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
} elseif (isset($this->blocks[$name])) {
$template = $this->blocks[$name][0];
$block = $this->blocks[$name][1];
} else {
$template = null;
$block = null;
}
// avoid RCEs when sandbox is enabled
if (null !== $template && !$template instanceof self) {
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->ensureSecurityChecked();
yield from $template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
$e->guess();
throw $e;
}
} elseif ($parent = $this->getParent($context)) {
yield from $parent->unwrap()->yieldBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this);
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/data/cache/27/27e9a4977b3fddd15126886aa890712d.php
// line 178
yield " <div class=\"content-block\" role=\"main\">
";
// line 179
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["settings"] ?? null), "show_breadcrumb", [], "any", false, false, false, 179)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 180
yield " ";
yield from $this->unwrap()->yieldBlock('breadcrumbs', $context, $blocks);
// line 191
yield " ";
}
// line 192
yield "
";
// line 193
yield $this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->renderWidgets($this->env, "client.theme.content.before");
yield "
";
// line 194
yield from $this->unwrap()->yieldBlock('content', $context, $blocks);
// line 195
yield " ";
yield $this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->renderWidgets($this->env, "client.theme.content.after");
yield "
";
// line 197
yield Twig\Extension\CoreExtension::include($this->env, $context, "partial_message.html.twig");
yield "
";
// line 199
yield from $this->unwrap()->yieldBlock('content_after', $context, $blocks);
// line 200
yield " </div>
</section>
<div id=\"push\"></div>
</div>
";
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Template.php
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
} elseif (isset($this->blocks[$name])) {
$template = $this->blocks[$name][0];
$block = $this->blocks[$name][1];
} else {
$template = null;
$block = null;
}
// avoid RCEs when sandbox is enabled
if (null !== $template && !$template instanceof self) {
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->ensureSecurityChecked();
yield from $template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
$e->guess();
throw $e;
}
} elseif ($parent = $this->getParent($context)) {
yield from $parent->unwrap()->yieldBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this);
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/data/cache/27/27e9a4977b3fddd15126886aa890712d.php
yield from $this->unwrap()->yieldBlock('head', $context, $blocks);
// line 39
yield " ";
yield from $this->unwrap()->yieldBlock('js', $context, $blocks);
// line 40
yield "</head>
<body class=\"";
// line 42
yield from $this->unwrap()->yieldBlock('body_class', $context, $blocks);
yield "\">
";
// line 44
yield $this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->renderWidgets($this->env, "client.theme.body.start");
yield "
";
// line 46
yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
// line 259
yield "
";
// line 260
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["settings"] ?? null), "inject_javascript", [], "any", false, false, false, 260)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 261
yield " ";
yield CoreExtension::getAttribute($this->env, $this->source, ($context["settings"] ?? null), "inject_javascript", [], "any", false, false, false, 261);
yield "
";
}
// line 263
yield " ";
yield Twig\Extension\CoreExtension::include($this->env, $context, "partial_pending_messages.html.twig", [], true, true);
yield "
";
// line 264
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["guest"] ?? null), "extension_is_on", [["mod" => "cookieconsent"]], "method", false, false, false, 264)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 265
yield " ";
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Template.php
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function yield(array $context, array $blocks = []): iterable
{
$context += $this->env->getGlobals();
$blocks = array_merge($this->blocks, $blocks);
try {
$this->ensureSecurityChecked();
yield from $this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/data/cache/eb/eb375b1fc10ffb6fed7aec2b0e419ecc.php
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return $this->load((((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["request"] ?? null), "ajax", [], "any", false, false, false, 1)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("layout_blank.html.twig") : ("layout_default.html.twig")), 1);
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 2
$context["active_menu"] = "order";
// line 7
$context["loader_nr"] = ((CoreExtension::getAttribute($this->env, $this->source, ($context["request"] ?? null), "loader", [], "any", true, true, false, 7)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["request"] ?? null), "loader", [], "any", false, false, false, 7), "8")) : ("8"));
// line 8
$context["loader_url"] = (("img/assets/loaders/loader" . ($context["loader_nr"] ?? null)) . ".gif");
// line 1
yield from $this->getParent($context)->unwrap()->yield($context, array_merge($this->blocks, $blocks));
}
// line 4
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_meta_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->trans("Order"), "html", null, true);
yield from [];
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_meta_description(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Template.php
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function yield(array $context, array $blocks = []): iterable
{
$context += $this->env->getGlobals();
$blocks = array_merge($this->blocks, $blocks);
try {
$this->ensureSecurityChecked();
yield from $this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Template.php
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks(): array
{
return $this->blocks;
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/Template.php
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/vendor/twig/twig/src/TemplateWrapper.php
/**
* @return iterable<scalar|\Stringable|null>
*/
public function stream(array $context = []): iterable
{
yield from $this->template->yield($context);
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function streamBlock(string $name, array $context = []): iterable
{
yield from $this->template->yieldBlock($name, $context);
}
public function render(array $context = []): string
{
return $this->template->render($context);
}
/**
* @return void
*/
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_get_args()[1] ?? []);
}
public function hasBlock(string $name, array $context = []): bool
{
return $this->template->hasBlock($name, $context);
}
/**
* @return string[] An array of defined template block names
*/
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/library/Box/AppClient.php
$this->di['logger']->setChannel('routing')->info($e->getMessage());
return $this->errorResponse($e, 404);
}
/**
* @param string $fileName
*/
#[Override]
public function render($fileName, $variableArray = [], $ext = 'html.twig'): string
{
try {
$template = $this->getTwig()->load(Path::changeExtension($fileName, $ext));
} catch (Twig\Error\LoaderError $e) {
$this->di['logger']->setChannel('routing')->info($e->getMessage());
throw new FOSSBilling\InformationException('Page not found', null, 404);
}
return $template->render($variableArray);
}
/**
* Get Twig environment for client area.
*/
protected function getTwig(): Twig\Environment
{
$twigFactory = $this->di['twig_factory'];
return $twigFactory->createClientEnvironment($this->debugBar);
}
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/modules/Order/Controller/Client.php
$this->di = $di;
}
public function getDi(): ?\Pimple\Container
{
return $this->di;
}
public function register(\Box_App &$app): void
{
$app->get('/order', 'get_products', [], static::class);
$app->get('/order/service', 'get_orders', [], static::class);
$app->get('/order/:id', 'get_configure_product', ['id' => '[0-9]+'], static::class);
$app->get('/order/:slug', 'get_configure_product_by_slug', ['slug' => '[a-z0-9-]+'], static::class);
$app->get('/order/service/manage/:id', 'get_order', ['id' => '[0-9]+'], static::class);
}
public function get_products(\Box_App $app): string
{
return $app->render('mod_order_index');
}
public function get_configure_product_by_slug(\Box_App $app, $slug): string
{
$api = $this->di['api_guest'];
$product = $api->product_get(['slug' => $slug]);
$tpl = 'mod_service' . $product['type'] . '_order';
if ($api->system_template_exists(['file' => $tpl . '.html.twig'])) {
return $app->render($tpl, ['product' => $product]);
}
return $app->render('mod_order_product', ['product' => $product]);
}
public function get_configure_product(\Box_App $app, $id): string
{
$api = $this->di['api_guest'];
$product = $api->product_get(['id' => $id]);
$tpl = 'mod_service' . $product['type'] . '_order';
if ($api->system_template_exists(['file' => $tpl . '.html.twig'])) {
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/library/Box/App.php
$timeCollector->startMeasure('executeShared', 'Reflecting module controller (shared mapping)');
$class = new $classname();
if ($class instanceof InjectionAwareInterface) {
$class->setDi($this->di);
}
$reflection = new ReflectionMethod($class::class, $methodName);
$args = [];
$args[] = $this; // first param always app instance
foreach ($reflection->getParameters() as $param) {
if (isset($params[$param->name])) {
$args[$param->name] = $params[$param->name];
} elseif ($param->isDefaultValueAvailable()) {
$args[$param->name] = $param->getDefaultValue();
}
}
$timeCollector->stopMeasure('executeShared');
return $reflection->invokeArgs($class, $args);
}
protected function execute($methodName, $params, $classname = null): mixed
{
/** @var TimeDataCollector $timeCollector */
$timeCollector = $this->debugBar->getCollector('time');
$timeCollector->startMeasure('execute', 'Reflecting module controller');
$reflection = new ReflectionMethod(static::class, $methodName);
$args = [];
foreach ($reflection->getParameters() as $param) {
if (isset($params[$param->name])) {
$args[$param->name] = $params[$param->name];
} elseif ($param->isDefaultValueAvailable()) {
$args[$param->name] = $param->getDefaultValue();
}
}
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/library/Box/App.php
return $apiController->renderJson(null, $exc);
}
return $this->renderResponse('mod_system_maintenance', [], 503);
}
}
/** @var TimeDataCollector $timeCollector */
$timeCollector = $this->debugBar->getCollector('time');
$timeCollector->startMeasure('sharedMapping', 'Checking shared mappings');
$sharedCount = count($this->shared);
for ($i = 0; $i < $sharedCount; ++$i) {
$mapping = $this->shared[$i];
$url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url, $this->getRequest()->getMethod());
if ($url->match) {
$timeCollector->stopMeasure('sharedMapping');
return $this->normalizeResponse($this->executeShared($mapping[4], $mapping[2], $url->params));
}
}
$timeCollector->stopMeasure('sharedMapping');
// this class mappings
$timeCollector->startMeasure('mapping', 'Checking mappings');
$mappingsCount = count($this->mappings);
for ($i = 0; $i < $mappingsCount; ++$i) {
$mapping = $this->mappings[$i];
$url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url, $this->getRequest()->getMethod());
if ($url->match) {
$timeCollector->stopMeasure('mapping');
return $this->normalizeResponse($this->execute($mapping[2], $url->params));
}
}
$timeCollector->stopMeasure('mapping');
$e = new FOSSBilling\InformationException('Page :url not found', [':url' => $this->url], 404);
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/library/Box/App.php
public function run(): Response
{
/** @var TimeDataCollector $timeCollector */
$timeCollector = $this->debugBar->getCollector('time');
try {
$timeCollector->startMeasure('registerModule', 'Registering module routes');
$this->registerModule();
$timeCollector->stopMeasure('registerModule');
$timeCollector->startMeasure('init', 'Initializing the app');
$this->init();
$timeCollector->stopMeasure('init');
$timeCollector->startMeasure('checkperm', 'Checking access to module');
$this->checkPermission();
$timeCollector->stopMeasure('checkperm');
return $this->processRequest();
} catch (AuthenticationRequiredException $e) {
if ($e->getArea() === 'admin') {
$this->di['set_return_uri'];
return new RedirectResponse($this->di['url']->adminLink('staff/login'));
}
$this->di['set_return_uri'];
return new RedirectResponse($this->di['url']->link('login'));
} catch (EmailValidationRequiredException) {
return new RedirectResponse($this->di['url']->link('client/profile'));
} catch (HttpResponseException $e) {
return $e->getResponse();
}
}
/**
* @param string $path
*/
/home/hostingkoo/domains/hostingkoo.my.id/public_html/member/index.php
$timeCollector?->stopMeasure('translate');
// If HTTP error code has been passed, handle it.
if (!is_null($http_err_code)) {
$http_err_code = intval($http_err_code);
switch ($http_err_code) {
case 404:
$e = new FOSSBilling\Exception('Page :url not found', [':url' => $url], 404);
$app->show404($e)->send();
break;
default:
$e = new FOSSBilling\Exception('HTTP Error :err_code occurred while attempting to load :url', [':err_code' => $http_err_code, ':url' => $url], $http_err_code);
(new Response($app->render('error', ['exception' => $e]), $http_err_code))->send();
}
exit;
}
// If no HTTP error passed, run the app.
$app->run()->send();
exit;