PHP code example of aide-travaux / eco-ptz
1. Go to this page and download the library: Download aide-travaux/eco-ptz 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/ */
aide-travaux / eco-ptz example snippets
EcoPTZ::get(DataInterface $model): ?float;
EcoPTZ::getBareme(DataInterface $model): ?array;
use AideTravaux\EcoPTZ\Model\DataInterface;
use AideTravaux\EcoPTZ\Model\ConditionInterface;
use AideTravaux\EcoPTZ\EcoPTZ;
class Data implements DataInterface, ConditionInterface
{
public function getEcoPTZCodeTravaux(): string
{
return 'EPTZ-01';
}
public function getEptzTypeProjet(): string
{
return 'Bouquet de 2 travaux';
}
public function getCoutTTC(): float
{
return (float) 12000;
}
public function getTypeLogement(): string
{
return 'Maison individuelle';
}
public function getStatutOccupantLogement(): string
{
return 'Propriétaire occupant';
}
public function getTypeOccupationLogement(): string
{
return 'Résidence principale';
}
public function getAgeLogement(): int
{
return 30;
}
}
$data = new Data();
EcoPTZ::get($data);
EcoPTZ::resolveConditions($data);