1. Go to this page and download the library: Download jced-artem/legacy-adapter 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/ */
jced-artem / legacy-adapter example snippets
// legacy_lib.php
include("settings.inc.php");
E_CONST', 'value');
$var1 = funcName(CONST_2);
function get_Var2A($param1, $param2) {
return functionFromAnotherInclude($param2, $param1);
}
class myClass
{
var $data = '';
function getData() {
global $var1;
// do somethig
return get_Var2A($var1, SOME_CONST);
}
}
class MyLib extends LegacyAbstractAdapter
{
/**
* Configure flyweight
*/
protected function configure()
{
$this
->setLegacyFile('legacy_lib.php')
->setLegacyPath('/path/to/ $myLib->needThis();
// get printr result
$content = $myLib->getFlyweight()->getContent();
class MyLib extends LegacyAbstractAdapter
{
/**
* Configure flyweight
*/
protected function configure()
{
$this
->setLegacyFile('legacy_lib.php')
->setLegacyPath('/path/to/eight()->call('get_Var2A', [$param1, $param2]); . '</font>';
}
// and more
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.