twilioKit php starter kit
I've adapted my ZFKit for an upcoming Twilio presentation (codestock next weekend!) and created a new project on github for it under the project name atwiliokita. A ZFKit was updated a little bit (a basic menu/navigation was added with Zend_Navigation, some example unit tests added) and used as the basis for this.
You can see this in action if you want to play around with it a bit.
I've modified the twilio REST client available from Twilio.com. A While functional, it wasn't the easiest thing to use, and I've added a couple helper methods which may make things a bit easier for people.
I've got two examples so far - one is a basic asend SMS message to a phone' controller, which uses my new helper methods in the Twilio_Rest_Client library. A The second is a small guessing game which demonstrates making use of ZF sessions. A You enter a phone number (and name!) to call, and the app will call up and ask the person to add two numbers together (aohello dave. A What is 4 + 2?a) A Based on your answer provided, you're told whether you were correct or not, then offered a chance to play again.
I should have a few more examples before next weekend, but there's actually quite a bit going on, between the ZF code and the Twilio code. A I'm working on something (in the code now) which will log all the call activity, and I'm working on it logging everything to a Doctrine table.
When you first use twiliokit, you'll need to enter the ascripts' directory and run the ./run script. A This will create the necessary atcall' table to store the info. A This is building from a schema.yml file to a local sqlite file. A You will probably need to chmod 777 the dev.db sqlite file, depending on your system's permissions.
Oh, and there are a couple unit tests in place in the ./tests directory (though certainly not comprehensive).
This is definitely a work in progress, but I wanted to share it on github to allow people to use it and make any changes they need and be able to easily send those changes back to me. A I was on the fence about making this just a working branch on the zfkit project, but it felt like that might get too confusing.
Let me know what you think!