Skip to main content

PHP

Zend Feed and Guzzle

·348 words·2 mins
You may have worked with Zend Feed as a standalone component. I don’t know whether you have integrated Zend framework Feed with Guzzle as Http Client. This post is inspired by Matthew Weier O’Phinney, who have mentioned the same on github. Our composer.json looks 1 2 3 4 5 6 7 8 9 10 11 12 { "require": { "guzzlehttp/guzzle": "~5.2", "zendframework/zend-feed": "~2.3", "zendframework/zend-servicemanager": "~2.3" }, "autoload": { "psr-0": { "": "src/" } } } Zen\Feed\Reader\Reader have a method importRemoteFeed which accepts an instance of Zend\Feed\Reader\Http\ClientInterface.

Conduit: Middleware for PHP

·618 words·3 mins
Long back, I happened to talk with Beau Simensen about stackphp on #auraphp channel. It was hard for me to digest when I noticed it need symfony/http-kernel and its dependencies. After a few months, I started to like the middleware approach of slim framework and wanted to push it to aura. But nothing happened there. Conduit to rescue # Conduit is a Middleware for PHP built by Matthew Weier O’Phinney lead of Zend framework. Conduit supports the current PSR-7 proposal. I believe like the many PSR’s, PSR-7 will be a revolution in the PHP world. Conduit is really a micro framework and can grow with your project.

Experimenting With Different PHP Frameworks

·765 words·4 mins
Whenever I get some time, I try to learn and experiment on different frameworks. I would like to stay away from pin pointing to the frameworks I have looked, so they don’t feel bad. Long live components # Components are awesome!. You can plug your favourite components to any system. Thank you composer. One strong preference choosing a framework was

Improving Environment Values in Aura v2

·208 words·1 min
Aura v2 framework probably have missed a better way to handle environment variables. But that doesn’t make you stall. Things can be improved ;-). Assume you are already using aura framework and is at root of the project. We are going to make use of vlucas/phpdotenv , alternatives are there if you are interested to experiment. 1 composer require vlucas/phpdotenv Edit the file config/_env.php and add Dotenv::load(/path/to/.env); to the first line. If you have not modified anything it will look as below

Speed Up Configuration in Aura v2

·322 words·2 mins
Aura v2 added auto resolution in-order to help lazy people writing configuration manually. Even though it was introduced to help, it introduced a few issues. So auto resolution will be disabled in the future. Some of the complains/suggestions are how to easily write the di configuration. So introducing you FOA.DiConfig Installation # 1 composer require foa/di-config Usage # 1 2 3 vendor/bin/di-config-dump Usage : vendor/bin/di-config-dump /real/path/to/file.php Usage : vendor/bin/di-config-dump /real/path/to/directory Example 1 # Let’s assume you have

Getting Started With Aura v2

·438 words·3 mins
Yesterday aura framework v2 stable released. Lots of complains about documentation or missing documentation. So this is a quick start. Probably a five minutes walk through. Learn and change to make it better. Creating your project # Create the project using composer. 1 2 composer create-project aura/web-project quick-start cd quick-start The minimal framework don’t come with any sort of view integrated. Let us use aura/view, the two step templating with the help of foa/html-view-bundle.

Using Aura.Input Forms Inside Slim Framework

·738 words·4 mins
Rob Allen wrote about Integrating ZF2 forms into Slim. I did write how you can use Aura.Input and Aura.Html to create standalone form for PHP. This time I felt I should write about integrating aura input inside Slim. Let us install a few dependencies aura/input for building the form and aura/html for the html helpers. You of-course can skip not to use aura/html and build your own helper. I also purposefully left not integrating the powerful Aura.Filter , but you are not limited to integrate any validator you love inside Aura.Input .

Aura Framework v2: The Missing Manual

·543 words·3 mins
Aura has an awesome collection of libraries for different purpose. It has components for authentication, cli, request and response, router, dependency injection container, dispatcher, html, view, event handlers, validation, extended pdo, query builders, sql schema, marshal, build and modify uri, http, internationalization, session, forms, includer. If you are new to aura, there is probably something you may want to figure out yourself. Some of the components have version 1 and version 2 releases. There is a question of which branch corresponds to which version. The v1 packages are in develop branch and v2 over develop-2 branch.

Hidden Gems of Composer

·322 words·2 mins
I hope everyone in the PHP world is aware of composer the dependency management tool that gives an end to Pear. We can look into some of the hidden gems of composer. Some of them are already documented in the composer docs. Bug Fixing : # Documented over Loading a package from a VCS repository 1 2 3 4 5 6 7 8 9 10 11 { "repositories": [ { "type": "vcs", "url": "https://github.com/igorw/monolog" } ], "require": { "monolog/monolog": "dev-bugfix" } } The above example assume you have pushed your code to github. But you can also make use of the local directory.

Extending Plates With Aura.Html Helpers

·730 words·4 mins
Aura.Html provides HTML escapers and helpers, including form input helpers, that can be used in any template, view, or presentation system. In this post I would like to give you a short introduction to Aura.Html and how you could use with Plates a native php templating system like Aura.View. Aura.Html was extracted from Aura.View helper functions of version 1, when we at aura noticed that people who uses Aura.Input may need some html helper functions and they may not be using a templating like Aura.View, but some other templating system.