-
Add this bundle and Tijs Verkoyen's Bitly class to your project :
$ git submodule add git://github.com/popofr13/BitlyBundle.git src/Bundle/BitlyBundle $ wget http://classes.verkoyen.eu/modules/bitly/files/php_bitly_2_0_1.zip => extract and copy bitly.php to src/vendor/bitly/Bitly.php
-
Add the
Bitly
class to your project's autoloader bootstrap script:// src/autoload.php $loader->registerPrefixes(array( 'Bitly' => $vendorDir.'/bitly', ));
-
Add this bundle to your application's kernel:
// application/ApplicationKernel.php public function registerBundles() { return array( // ... new Bundle\BitlyBundle\BitlyBundle(), // ... ); }
-
Configure the
bitly
service in your YAML or XML configuration:# application/config/config.yml bitly.api: login: myBitlyLogin api_key: 123456879 # application/config/config.xml <bitly:api login="myBitlyLogin" api_key="123456879" />
-
Use it! :)
# Controller or Command file $bitly = $this->container->get('bitly'); $shortened = $bitly->shorten($url);
-
Notifications
You must be signed in to change notification settings - Fork 0
justinrainbow/BitlyBundle
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A Symfony2 bundle for working with the Bit.ly API.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published