Random thoughts

Blog

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 { "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.
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.
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 It should be built from components Advantage I could use those components on a different project without spending long time learning a different API.
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. composer require vlucas/phpdotenv Edit the file config/_env.php and add Dotenv::load(/path/to/.env); to the first line.
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 composer require foa/di-config Usage 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
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. 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.
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.
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.
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 { "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.
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.
Menu