src/Entity/XiboCampaign.php
public function create($campaign)
    {
        $this->getLogger()->debug('Getting Resource Owner');
        $this->ownerId = $this->getEntityProvider()->getMe()->getId();
        $this->campaign = $campaign;

        // Rewrite parameter mismatch
        $array = $this->toArray();
        $array['name'] = $array['campaign'];
        $this->getLogger()->info('Creating Campaign ' . $this->campaign);
        $response = $this->doPost($this->url, $array);

        $this->getLogger()->debug('Passing the response to Hydrate');
        return $this->hydrate($response);
    }
public function create($campaign)
    {
        $this->getLogger()->debug('Getting Resource Owner');
        $this->ownerId = $this->getEntityProvider()->getMe()->getId();
        $this->campaign = $campaign;

        // Rewrite parameter mismatch
        $array = $this->toArray();
        $array['name'] = $array['campaign'];
        $this->getLogger()->info('Creating Campaign ' . $this->campaign);
        $response = $this->doPost($this->url, $array);

        $this->getLogger()->debug('Passing the response to Hydrate');
        return $this->hydrate($response);
    }
public function create ( $ campaign ) { $ this -> getLogger ( ) -> debug ( 'Getting Resource Owner' ) ; $ this -> ownerId = $ this -> getEntityProvider ( ) -> getMe ( ) -> getId ( ) ; $ this -> campaign = $ campaign ; // Rewrite parameter mismatch $ array = $ this -> toArray ( ) ; $ array [ 'name' ] = $ array [ 'campaign' ] ; $ this -> getLogger ( ) -> info ( 'Creating Campaign ' . $ this -> campaign ) ; $ response = $ this -> doPost ( $ this -> url , $ array ) ; $ this -> getLogger ( ) -> debug ( 'Passing the response to Hydrate' ) ; return $ this -> hydrate ( $ response ) ; }
Add a new campaign with specified name.

@param string $campaign name of the campaign
@return XiboCampaign
Add a new campaign with specified name .