PHP code example of auto1-oss / service-api-handler-bundle
1. Go to this page and download the library: Download auto1-oss/service-api-handler-bundle 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/ */
auto1-oss / service-api-handler-bundle example snippets
class GetCarLeadByVinRequest implements ServiceRequestInterface
{
private $vin;
public function setVin(string $vin): self
{
$this->vin = $vin;
return $this;
}
public function getVin()
{
return $this->vin;
}
}
use Auto1\ServiceAPIHandlerBundle\Response\ServiceResponse;
use Auto1\ServiceDTOCollection\CarLead\CarLeadRead\Request\GetCarLeadByVinRequest;
use Auto1\ServiceDTOCollection\CarLead\CarLeadRead\Response\CarLead;
class MyController {
public function carLeadByVinAction(GetCarLeadByVinRequest $carLeadRequestDTO): ServiceResponse
{
/** @var CarLead $carLead */
$carLead = $this->...->find($carLeadRequestDTO->getVin());
return new ServiceResponse(
$carLead,
200
);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.