PHP code example of bugo / smf-compat
1. Go to this page and download the library: Download bugo/smf-compat 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/ */
bugo / smf-compat example snippets
class Example
{
public function method1()
{
global $txt;
echo $txt['hello_world'];
}
public function method2()
{
global $user_info, $modSettings;
echo $user_info['name'];
var_dump($modSettings);
}
}
use Bugo\Compat\Lang;
use Bugo\Compat\User;
use Bugo\Compat\Config;
class Example
{
public function method1()
{
echo Lang::$txt['hello_world'];
}
public function method2()
{
echo User::$info['name'];
var_dump(Config::$modSettings);
}
}