PHP code example of phmlabs / init
1. Go to this page and download the library: Download phmlabs/init 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/ */
phmlabs / init example snippets
class MyClass {
public function __construct($firstParam, $secondParam = null) {
// ...
}
}
$options = [
'class' => 'MyClass',
'call' => [
'__construct' => ['secondParam' => 'foo', 'firstParam' => 'bar']
]
]
$myClass = Init::initialize($options);