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
import ioc.loader | |
import os | |
class Extension(object): | |
def load(self, config, container_builder): | |
path = os.path.dirname(os.path.abspath(__file__)) | |
loader = ioc.loader.YamlLoader() | |
loader.load("%s/resources/config/services.yml" % path, container_builder) |
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
Problem 1 | |
- Installation request for sonata-project/user-bundle 2.1.*@dev -> satisfiable by sonata-project/user-bundle 2.1.x-dev. | |
- sonata-project/user-bundle 2.1.x-dev requires sonata-project/admin-bundle 2.1.x-dev -> no matching package found. | |
Problem 2 | |
- Installation request for sonata-project/page-bundle 2.1.*@dev -> satisfiable by sonata-project/page-bundle 2.1.x-dev. | |
- sonata-project/page-bundle 2.1.x-dev requires symfony-cmf/routing-extra-bundle 1.0.* -> no matching package found. | |
Problem 3 | |
- Installation request for sonata-project/media-bundle 2.1.*@dev -> satisfiable by sonata-project/media-bundle 2.1.x-dev. | |
- sonata-project/media-bundle 2.1.x-dev requires sonata-project/admin-bundle 2.1.x-dev -> no matching package found. |
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
class consumer(twistedhttpstream.MessageReceiver): | |
def connectionMade(self): | |
print "connected..." | |
def connectionFailed(self, why): | |
print "cannot connect:", why | |
reactor.stop() | |
def messageReceived(self, tweet): | |
print "new message:", repr(tweet) |
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
Sonata Media Bundle | |
=================== | |
Media path generation: http://mycdn.com/context/01223/023/thumb_1232_small.jpg | |
1. CDN http://mycdn.com | |
2. Path Generator : context/01223/023 | |
3. Thumbnail - internal generation: thumb_1232_small.jpg | |
4. Thumbnail - return the relative path: context/01223/023/thumb_1232_small.jpg |
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
sonata_admin: | |
access_control: | |
- { path: ^/admin/sonata/media/media/list$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_LIST], methods: null } | |
- { path: ^/admin/sonata/media/media/create$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_CREATE], methods: null } | |
- { path: ^/admin/sonata/media/media/update$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_UPDATE], methods: null } | |
- { path: ^/admin/sonata/media/media/batch$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_BATCH], methods: null } | |
- { path: ^/admin/sonata/media/media/(?P[^/]+?)/edit$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_EDIT], methods: null } | |
- { path: ^/admin/sonata/media/media/(?P[^/]+?)/delete$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_DELETE], methods: null } | |
- { path: ^/admin/sonata/media/media/(?P[^/]+?)/view$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_VIEW], methods: null } | |
- { path: ^/admin/sonata/media/gallery/list$, roles: [ROLE_SONATA_MEDIA_ADMIN_GALLERY_LIST], methods: null } |
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
<?php | |
/* | |
* This file is part of the Sonata project. | |
* | |
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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
<?php | |
namespace Sonata\Bundle\ScreenyBundle\Consumer; | |
use Sonata\Bundle\ScreenyBundle\Screeny\UrlShotManager; | |
use PhpAmqpLib\Message\AMQPMessage; | |
use OldSound\RabbitMqBundle\RabbitMq\Producer; | |
class UrlShotConsumer | |
{ |
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
<?php | |
// this check prevents access to debug front controllers that are deployed by accident to production servers. | |
// feel free to remove this, extend it, or make something more sophisticated. | |
if (!in_array(@$_SERVER['REMOTE_ADDR'], array( | |
'127.0.0.1', | |
'::1', | |
'84.14.82.2', | |
'88.175.92.100', | |
))) { |
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
diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | |
index 2cad8a4..51c4924 100644 | |
--- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | |
+++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | |
@@ -127,6 +127,16 @@ class XmlExporter extends AbstractExporter | |
} | |
} | |
+ foreach ($metadata->associationMappings as $name => $field) { | |
+ if (isset($field['id']) && $field['id']) { |
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
<?php | |
// service | |
interface BlockExecuteFactoryInterface | |
{ | |
function getExecutionContext(BlockInterface $block); | |
} | |
// object, one per block | |
interface BlockExecutionContextInterface |