Posts tagged frameworks

Simple framework wrapper for Amazon’s AWS SDK for PHP 5

If you interact with any of Amazon’s Web Services using PHP you should be using their SDK.

It’s very powerful and pretty simple to get started with.

In my case I did not want to checkout their whole repository into my frameworks namespace and decided to use .phar file they provided as
an alternative.

To me, using a .phar file for third party libraries kind of makes sense if I’m not planning to extend or overwrite any of the available functionality.

Plus if you have your own directory conventions and don’t want to bother re-factoring Amazon’s structure, .phar might come in handy.

The issue I ran into (not really an issue but inconsistency always bothers me as an engineer) is that if you are using namespaces and your own autoloader, requiring .phar file anywhere you need to access AWS is pretty ghetto.

The way I solved it is by using a very simple wrapper that either loads configuration (using \library\configuration as an example) containing your key/secret or takes key/secret as a constructor parameter and simply stores instance of AWS internally while routing all the calls directly to it.

You can check out this approach on my GitHub page located here: https://github.com/AlekseyKorzun/aws-sdk-wrapper

A re-factored plug-n-play PHP 5 client for Twilio’s REST API

I have pretty high standards when it comes to code and felt like the current PHP 5 library that Twilio offered did not really fit well with modern frameworks.

So I decided to rewrite it, if you have your own framework and looking for a cleaner Twilio client make sure give this a try.

Features

  • Direct plug-in-play integration with PHP 5 based frameworks
  • Namespace utilization, ability to piggy back off your own autoloader
  • Completely refactored to remove clutter and omit ridiculous constructor inheritance the original package was build with
  • Various optimizations, no longer pre-loads all of the available actions when an idle instance is created
  • Cleaner file structure
  • Single coding standard across all of the components
  • 100% phpDocumentator 2 code coverage
  • 100% PSR2 standard coverage

Find out more at: http://alekseykorzun.github.com/Twilio-PHP-5/