PHP code example of lane4hub / classversion

1. Go to this page and download the library: Download lane4hub/classversion 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/ */

    

lane4hub / classversion example snippets


use Jardis\Version\ClassVersion;
use Jardis\Version\config\ClassVersionConfig;

$classVersions = ['subDirectory' => ['version1', 'version2']];
$classVersionConfig = new ClassVersionConfig($classVersions);
$classVersion = new ClassVersion($classVersionConfig);

$class = $classVersion(YourClass::class)
$class1 = $classVersion(YourClass::class, 'version1')
$class2 = $classVersion(YourClass::class, 'version2')