-
Notifications
You must be signed in to change notification settings - Fork 43
/
ThePhalconsAmazonWebServicesBundle.php
36 lines (31 loc) · 1.02 KB
/
ThePhalconsAmazonWebServicesBundle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* @package AmazonWebServicesBundle
* @author Mark Badolato <[email protected]>
* @copyright Copyright (c) CyberNox Technologies. All rights reserved.
* @license http://www.opensource.org/licenses/BSD-2-Clause BSD License
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AmazonWebServicesBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use AmazonWebServicesBundle\StreamWrapper\S3StreamWrapper;
/**
* AmazonWebServicesBundle Main Bundle Class
*/
class ThePhalconsAmazonWebServicesBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function boot()
{
if (in_array('s3', $this->container->getParameter('the_phalcons_amazon_web_services.enable_extensions'))) {
if (in_array('s3', stream_get_wrappers())) {
stream_wrapper_unregister('s3');
}
S3StreamWrapper::register($this->container->get('aws_s3'), 's3');
}
}
}