Random thoughts

In my earlier post I have shown how you can connect to Magento with REST api. In this post let us connect via SOAP. The below class acts like a proxy to call the magento soap api. <?php /** * * @author Hari K T * */ class My_Soap_Magento { /** * * Host name to connect * * @var string * */ protected $hostname; /** * * User name * * @var string * */ protected $username; /** * * API Key * * @var string * */ protected $apikey; /** * * Zend_Soap_Client * * @var Zend_Soap_Client * */ protected $client; protected $session; /** * * Constructor * * @param string $hostname The host name * * @param string $username The user name of the host * * @param string $apikey The apikey of the host * */ public function __construct($hostname, $username, $apikey) { $this->hostname = $hostname; $this->username = $username; $this->apikey = $apikey; } /** * * Magic method, the methods are named on the basis of Magento SOAP api * You don't need to pass the session as the first argument, for convience.
There has been lot of requests to show how the individual packages in aura, can be made use inside the framework. So today I am happy to announce that there is a work in progress to make the framework documentation better. I have already started the work on the same. You can read the chapters online. The examples used in the book are also online at https://github.com/harikt/Example.Package I hope Something is better than nothing.
Magento provides both REST and SOAP api. In this post I would like to concentrate on REST api to connect and get the products from magento shop. First we want to register an Oauth consumer to get the consumer key and secret key. Login to the admin of the magento shop and from the menu System->Web Services->REST - Oauth Consumers and add a new Ouath consumer. You need the Key and Secret which is what we pass in the config to Zend_Oauth_Consumer shortly.
If you are new to the concept of MVC, or if you are planning to build your own framework, probably Aura.Web help you to do the same. Here is the article in phpmaster.com Aura.Web: Aura’s Page Controller for MVC. Probably you may also like the article Web Routing in PHP with Aura.Router.
Yesterday Paul M Jones tagged the beta5 for the system repo. So you can download the system from http://auraphp.com/system/downloads/ via composer Creating aura framework based projects has been made easy with composer. You can run php composer.phar create-project -s dev aura/system your-directory What it does is almost similar to git clone and installing via git as below via git git clone https://github.com/auraphp/system cd system php update.php you can also skip php update.
Yesterday I wrote about Standalone Forms and Validation. It may need a little bit knowledge on how the Aura.Filter works. But that is a good start if you want to know how you can integrate the pieces of Aura. Today I think I need to show you the very minimal approach you can take to build the form and validate your form. If you want to use a powerful validation and filtering use something like Aura.
Update : I wrote a very minimal approach here Recently Aura.Input was tagged Beta1. I would like to show you how you can use Aura.Input, Aura.Filter and Aura.View to create form. The Aura.Input itself contains a basic filter implementation. As shown in earlier post Aura Turns 2 But in this post let us use the power of Aura.Filter. As Aura.Input doesn't have a rendering capability you may need to use Aura.
Looking over the commits on Aura.Router, Aura.Signal etc you will notice, aura project has turned 2. And today, I would like to introduce you, the new born baby still under active development and refactoring based on user feedback, the form library for php, Aura.Input. The Aura.Input, doesn't have a rendering functionality. But you can always use Aura.View or create your own helpers. A basic filtering based on closure exists in Aura.
The Aura.Http package provide you the tool to build and send request and response. Instantiation: The easiest way is <?php $http = require 'path/to/Aura.Http/scripts/instance.php'; What it gives you is an object of Aura\Http\Manager. If you want to create manually you can look into the instance.php Building your Response Probably you may not have bothered too much on building the http response either the framework does it for you, or until you need to send the correct response.
Recently github introduces contributions chart. So I peeped into some of the people of our php community. It seems @fabpot is the one who contributes almost every day. Just 21 days without any contribution. {% img center /assets/images/github/fabpot.png 687 299 ‘Contributions by fabpot’ ‘Contributions by fabpot’ %} {% img center /assets/images/github/weierophinney.png 687 299 ‘Contributions by weierophinney’ ‘Contributions by weierophinney’ %} {% img center /assets/images/github/pmjones.png 687 299 ‘Contributions by pmjones’ ‘Contributions by pmjones’ %} {% img center /assets/images/github/willdurand.