-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bertrand Dunogier
committed
Jul 10, 2013
0 parents
commit 69d7615
Showing
7 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
namespace BD\Bundle\IFTTTBundle; | ||
|
||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
class BDIFTTTBundle extends Bundle | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/** | ||
* File containing the IFTTT controller. | ||
*/ | ||
namespace BD\Bundle\IFTTTBundle\Controller; | ||
|
||
use BD\Bundle\XmlRpcBundle\XmlRpc\Response; | ||
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
|
||
class IFTTT extends Controller | ||
{ | ||
public function getRecentPosts() | ||
{ | ||
return new Response( array() ); | ||
} | ||
|
||
public function newPost() | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
namespace BD\Bundle\IFTTTBundle\DependencyInjection; | ||
|
||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
use Symfony\Component\DependencyInjection\Loader; | ||
|
||
/** | ||
* This is the class that loads and manages your bundle configuration | ||
* | ||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} | ||
*/ | ||
class BDIFTTTExtension extends Extension | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function load(array $configs, ContainerBuilder $container) | ||
{ | ||
$configuration = new Configuration(); | ||
$config = $this->processConfiguration($configuration, $configs); | ||
|
||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | ||
$loader->load('services.yml'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
namespace BD\Bundle\IFTTTBundle\DependencyInjection; | ||
|
||
use Symfony\Component\Config\Definition\Builder\TreeBuilder; | ||
use Symfony\Component\Config\Definition\ConfigurationInterface; | ||
|
||
/** | ||
* This is the class that validates and merges configuration from your app/config files | ||
* | ||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} | ||
*/ | ||
class Configuration implements ConfigurationInterface | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getConfigTreeBuilder() | ||
{ | ||
$treeBuilder = new TreeBuilder(); | ||
$rootNode = $treeBuilder->root('bdifttt'); | ||
|
||
// Here you should define the parameters that are allowed to | ||
// configure your bundle. See the documentation linked above for | ||
// more information on that topic. | ||
|
||
return $treeBuilder; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
bdifttt.getRecentPosts: | ||
path: /xmlrpc/metaWeblog.getRecentPosts | ||
defaults: | ||
_controller: bdifttt.controller:getRecentPosts | ||
|
||
bdifttt.supportedMethods: | ||
path: /xmlrpc/mt.supportedMethods | ||
defaults: | ||
_controller: bdifttt.controller:supportedMethods | ||
|
||
bdifttt.newPost: | ||
path: /xmlrpc/metaWeblog.newPost | ||
defaults: | ||
_controller: bdifttt.controller:newPost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
parameters: | ||
bdifttt.controller.class: BD\Bundle\IFTTTBundle\Controller\IFTTT | ||
|
||
services: | ||
bdifttt.controller: | ||
class: %bdifttt.controller.class% | ||
calls: | ||
- [ setContainer, [ @service_container ] ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "bdunogier/iftttbundle", | ||
"description": "A generic Symfony 2 bundle that receives IFTTT recipe actions", | ||
"license": "GPL-2.0", | ||
"authors": [ | ||
{ | ||
"name": "Bertrand Dunogier", | ||
"homepage": "https://github.com/bdunogier/iftttbundle" | ||
} | ||
], | ||
"require": { | ||
"bdunogier/xmlrpcbundle": "@dev" | ||
}, | ||
"minimum-stability": "dev", | ||
"autoload": { | ||
"psr-0": {"BD\\Bundle\\IFTTTBundle": ""} | ||
}, | ||
"target-dir": "BD/Bundle/IFTTTBundle" | ||
} |