PhpRiot
Follow phpriot on Twitter
Sponsored Link
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

Accessing concrete adapters

Sometimes it is necessary to retrieve the concrete adapter for the service that the Storage API is working with. This can be achieved by using the getAdapter() method.

Note

Accessing the underlying adapter breaks portability among services, so it should be reserved for exceptional circumstances only.

Example 107. Using a concrete adapter

<?php
// the Simple Cloud Storage API doesn't support "clean bucket" operation
// the concrete adapter can be used to access this feature
$s3 $storage->getClient();
$s3->cleanBucket("oldBucket");

Zend Framework