コード例 #1
0
 /**
  * Initializes the container
  */
 protected function initialize()
 {
     if (!$this->initialized) {
         $conn = $this->connectionFactory->create();
         if ($this->createContainer) {
             $this->container = $conn->create_container($this->containerName);
         } else {
             $this->container = $conn->get_container($this->containerName);
         }
         $this->initialized = true;
     }
 }
コード例 #2
0
 /**
  * @param \Gaufrette\Adapter\RackspaceCloudfiles\ConnectionFactoryInterface $connectionFactory
  * @param \CF_Connection $connection
  */
 function let($connectionFactory, $connection)
 {
     $connectionFactory->create()->willReturn($connection);
     $this->beConstructedWith($connectionFactory, 'my_container');
 }