PHP code example of dsl / mytarget-client-bundle

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

    

dsl / mytarget-client-bundle example snippets



class AppKernel extends Kernel
{
//...
    public function registerBundles()
    {
        ...
        $bundles = [ ... , new \DSL\MyTargetClientBundle\DslMyTargetClientBundle(), ];
        ...
        return $bundles;
    }
//...
}

 
//...
    $mtClient =$this->getContainer()->get('dsl.my_target_client.client'); // dsl.my_target_client.service.client.test
    // or $mtClient =$this->getContainer()->get('dsl.my_target_client.service.client.main');
    $mtMapper =$this->getContainer()->get('dsl.my_target_client.service.mapper');
    $bannerOperator = new BannerOperator($mtClient, $mtMapper);
    var_dump( $bannerOperator->all() );
//...