PHP code example of jinowom / yii2-pay-supports

1. Go to this page and download the library: Download jinowom/yii2-pay-supports library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jinowom / yii2-pay-supports example snippets


use jinowom\Supports\Logger as Log;
use Monolog\Logger;

class ApplicationLogger
{
    private static $logger;

    /**
     * Forward call.
     *
     * @author jinowom <[email protected]>
     *
     * @return mixed
     */
    public static function __callStatic(string $method, array $args)
    {
        return call_user_func_array([self::getLogger(), $method], $args);
    }

    /**
     * Forward call.
     *
     * @author jinowom <[email protected]>
     *
     * @return mixed
     */
    public function __call(string $method, array $args)
    {
        return call_user_func_array([self::getLogger(), $method], $args);
    }

    /**
     * Make a default log instance.
     *
     * @author jinowom <[email protected]>
     *
     * @return Log
     */
    public static function getLogger()
    {
        if (! self::$logger instanceof Logger) {
            self::$logger = new Log();
        }   

        return self::$logger;
    }
}


ApplicationLogger::debug('test', ['test log']);