1. Go to this page and download the library: Download f-oris/easy-sdk 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/ */
f-oris / easy-sdk example snippets
// ...
class Hello extends Component
{
/**
* Return a hello message.
*
* @return string
*/
public function hello()
{
return "Hello, easy sdk framework.";
}
}
// ...
class HelloComponentTest extends TestCase
{
/**
* Test get a hello message from hello component.
*/
public function testGetAHelloMessageFromHelloComponent()
{
$this->assertEquals('Hello, easy sdk framework.', $this->app()->get(Hello::name())->hello());
}
}
//...
$http = (new Application())->get(\Foris\Easy\HttpClient\HttpClient::class);