PHP code example of carmelosantana / sendadf

1. Go to this page and download the library: Download carmelosantana/sendadf 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/ */

    

carmelosantana / sendadf example snippets


$adf = ( new CarmeloSantana\SendAdf\SendAdf() )
    ->addProspect( 'new' )
    ->addRequestdate( '2/9/2020 6:26PM' )
    ->addVehicle( [
        'year' => 1999,
        'make' => 'Chevrolet',
        'model' => 'Blazer'
    ], 'buy', 'used' )
    ->addCustomer()
        ->addContact()
            ->addName( 'John Doe' )
            ->addPhone( '393-999-3922' )
    ->addVendor()
        ->addContact()
            ->addName( 'Acura of Bellevue' );

echo $adf->getXml();

echo $adf->getPrettyPrintXML();

$adf = ( new CarmeloSantana\SendAdf\SendAdf() )
    ->addRequestdate()
    ->addVehicle( [
        'year' => 2020,
        'make' => 'Chevrolet',
        'model' => 'Blazer'
    ] )
    ->addCustomer()
        ->addContact()
            ->addName( 'John Doe' )
            ->addPhone( '393-999-3922' );

echo $adf->getPrettyPrintXML();