1. Go to this page and download the library: Download decodelabs/slingshot 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/ */
use DecodeLabs\Harvest\Context as HarvestContext;
class Test {
public function __construct(
// Fetch or create a Harvest Context (example) from container
HarvestContext $param1,
string $param2
) {
// ...
}
}
$testObect = $slingshot->instantiate(Test::class, [
'param2' => 'value'
]);