Skip to content

chrisbarr/BeanstalkAPIBundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#BeanstalkAPIBundle A Symfony2 bundle for the Beanstalkapp API

This bundle uses a slightly modified version of the Beanstalk PHP API

##Installation

  1. Add this bundle and the sfBeanstalk-PHP-API library as submodules

    $ git submodule add https://chrisbarr@github.com/chrisbarr/BeanstalkAPIBundle.git vendor/bundles/Beanstalkapp/BeanstalkAPIBundle $ git submodule add https://chrisbarr@github.com/chrisbarr/sfBeanstalk-PHP-API.git vendor/Beanstalk

  2. Add the namespaces to the autoloader

    // app/autoload.php $loader->registerNamespaces(array( // ... 'Beanstalk' => DIR.'/../vendor', 'Beanstalkapp' => DIR.'/../vendor/bundles' ));

  3. Initialise the bundle

    // app/AppKernel.php public function registerBundles() { return array( // ... new Beanstalkapp\BeanstalkAPIBundle\BeanstalkAPIBundle() ); }

  4. Set the required config - all 3 parameters are required

    // app/config/config.yml beanstalk_api: account: my_account username: chris password: pass

##Usage

All Beanstalk API methods are available through the beanstalkapi service - see https://github.com/chrisbarr/sfBeanstalk-PHP-API for available methods

All methods return SimpleXMLElement objects

<?php
    $beanstalk = $this->get('beanstalkapi');
    $plans = $beanstalk->find_all_plans();

About

Symfony2 bundle for the Beanstalk PHP API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages