$22 GRAYBYTE WORDPRESS FILE MANAGER $19

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/itiministry.org/wp-content/plugins/give/src/Framework/Support/Facades/

HOME
Current File : /home/bravrvjk/itiministry.org/wp-content/plugins/give/src/Framework/Support/Facades//Facade.php
<?php

namespace Give\Framework\Support\Facades;

/**
 * Class Facade
 *
 * This class provides a way of taking a normal instance class and creating a static facade out of it. It does it in
 * such a way, though, that the facade is still mockable. It does this by instantiating the decorated class through the
 * Give Service Container (SC). So by injecting a mock singleton of the decorated class in the SC, it can be mocked.
 *
 * To use this, simply make a new facade class which extends this once, then implement the getFacadeClass and return the
 * class to be decorated, for example: return MyClass::class;
 *
 * To help the IDE, take the methods from the decorated class and add them your class docblock. So if Repository had an
 * insert method, you would add "@method static Model insert()" to the top.
 *
 * @since 2.12.0
 */
abstract class Facade
{
    /**
     * Static helper for calling the facade methods
     *
     * @since 2.12.0
     *
     * @param string $name
     * @param array  $arguments
     *
     * @return mixed
     */
    public static function __callStatic($name, $arguments)
    {
        // Make sure the static class is a singleton and get instance
        give()->singletonIf(static::class);
        $staticInstance = give(static::class);

        // Make sure the accessed class is a singleton and get instance
        $accessorClass = $staticInstance->getFacadeAccessor();
        give()->singletonIf($accessorClass);
        $accessorInstance = give($accessorClass);

        return $accessorInstance->$name(...$arguments);
    }

    /**
     * Retrieves the fully qualified class name or alias for the class being decorated
     *
     * @since 2.12.0
     *
     * @return string
     */
    abstract protected function getFacadeAccessor();
}


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
4 Apr 2026 1.57 AM
bravrvjk / bravrvjk
0755
ActionScheduler
--
4 Apr 2026 1.57 AM
bravrvjk / bravrvjk
0755
DateTime
--
4 Apr 2026 1.57 AM
bravrvjk / bravrvjk
0755
Scripts
--
4 Apr 2026 1.57 AM
bravrvjk / bravrvjk
0755
CurrencyFacade.php
4.269 KB
1 Oct 2025 3.37 PM
bravrvjk / bravrvjk
0644
Facade.php
1.744 KB
24 Nov 2021 4.55 AM
bravrvjk / bravrvjk
0644
Str.php
19.917 KB
28 Apr 2023 2.27 AM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF