Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Laravel News:
Improved model generation with Laracademy Generators
Sep 08, 2016 @ 16:18:24

The Laravel News site has a quick tutorial posted showing you how using smarter generators to make model classes can help reduce your development time in Laravel applications (using a package to help adds the "smarts" needed).

Laravel provides the Artisan command line tool that allows you to save time by including several generators. Some examples include make:controller, make:model, and make:migration.

Building on top of this idea is a third party package named Laracademy Generators that will automatically generate your models based on your database structure.

They show first the normal process for creating a model and matching migration with the "artisan" command. Once this migration is run and the table is created, they can show how to automagically enhance the model with the generators package, using it to read from the table in the database and update the model with "fillable", "casts" and "dates" properties filled in.

tagged: model generator laracademy package improved database migration

Link: https://laravel-news.com/2016/09/improved-model-generation-with-laracademy-generators/

HHVM Blog:
Improved User Documentation
Dec 15, 2015 @ 15:05:32

The HHVM blog has a post today announcing some updates they've made around the documentation for the project and the release of the "next generation" of their documentation at http://docs.hhvm.com/.

Back in August, we announced that we are going full force in revamping user documentation. We sent out a public survey to gauge the standing on the existing documentation at the time. We had 160 responses to the survey. Those results served as both validation and a guide to our approach with the new documentation.

The survey showed some interesting results including that the existing documentation could use improvement, better content in certain sections and poor examples in some places. In order to help this they worked hard to revamp the documentation and created a new GitHub repository for the docs and allows developers to pull it down locally and contribute back content/corrections as they might catch them. They also lay out the new documentation structure, breaking it up into Hack, API and HHVM sections. Finally, they talk about the technology behind the site including the runnable code examples, how they're generated and what the build process looks like.

tagged: improved documentation user hhvm hack facebook api survey results

Link: http://hhvm.com/blog/10925/improved-user-documentation

SitePoint PHP Blog:
Re-introducing Vagrant: The Right Way to Start with PHP
Jun 09, 2015 @ 13:57:59

The SitePoint PHP blog has a new tutorial posted showing you the right way to start with PHP using Vagrant. Vagrant allows for the easy creation and management of local virtual machines that work as self-contained environments and make for easy reuse.

I often get asked to recommend beginner resources for people new to PHP. And, it’s true, we don’t have many truly newbie friendly ones. I’d like to change that by first talking about the basics of environment configuration. In this post, you’ll learn about the very first thing you should do before starting to work with PHP (or any other language, for that matter). We’ll be re-introducing Vagrant powered development.

He starts off by getting everyone on the same level with an introduction to what Vagrant is, how its set up and some of the advantages is brings to the table. He moves to the next piece of software needed, VirtualBox, that actually hosts the virtual machines. With that installed you'll then need Vagrant. With those both set up, he talks more about what makes this a perfect setup for PHP development and information about their preferred VM, the Homestead Improved image. He ends the post with some links to other resources and SitePoint's own posts with more information on this powerful setup.

tagged: vagrant homestead improved tutorial virtualbox gettingstarted

Link: http://www.sitepoint.com/re-introducing-vagrant-right-way-start-php/

SitePoint PHP Blog:
Getting Started with eZ Platform on Vagrant
May 13, 2015 @ 14:54:48

The SitePoint PHP blog has a new post about getting eZ platform set up and running on a Vagrant VM relatively painlessly. eZ Publish (and the newer eZ Platform) are a content management system aimed at the digital marketing space.

Last year, I had a somewhat negative experience with installing eZ Publish on a Vagrant box. Since then, they’ve significantly improved both the software and the VM-friendliness by, well, flat out removing the legacy stack. The VM setup we’ll be using in this tutorial comes from the labs of NetGen and the mind of @vranac, and is followed by the installation procedure on our very own Homestead Improved modified by yours truly.

Author Bruno Skvorc walks you through the entire process, using Vranac (Vagrant, Anisble and VirtualBox) to get the VM instance set up and running. He then shows how to clone the latest eZ installation and build the demo application. He follows this with the instructions on getting the same setup running on a Homestead Improved instance, requiring a few more steps but it can be a bit faster overall. He finishes off the post by mentioning an upcoming event, PHPSummerCamp, a conference that will include sessions and in-depth looks at the eZ Publish and Platform functionality (happening in Croatia in August).

tagged: ezplatform introduction vagrant homestead improved install configure

Link: http://www.sitepoint.com/getting-started-ez-platform-vagrant/

Nicolas Grekas (on Github):
Improved handling of HTTP requests in PHP
Jun 17, 2011 @ 14:39:41

As Nicolas Grekas shows in this tutorial (posted as a gist), the functionality that PHP gives users to work with the raw HTTP requests is pretty limited. There's a few solutions he offers, but none of them allow for the full use of the HTTP options provided by the server.

HP offers comprehensive autoglobals to access external data sent with each request. These variables do not expose all the possibilities allowed by the HTTP protocol, but a controlled use can in practice minimize the impact of this limitation. Two problems are particularly troublesome: the lack of access to multi-valued keys without using a special syntax and complexity of the magic bracketed syntax. Until PHP natively provides another interface freed from these problems, a different interface in user space can circumvent them.

He gives some code examples of methods that can be used to parse strings like those found in cookies (or pulled in via php://stdin) including mentions of key normalization and accessing the values by literal keys. You can see a more full implementation here.

tagged: http handling improved requests tutorial parse

Link:

Jani Hartikainen's Blog:
Improved PDF generation with RE Framework RE_Pdf
Mar 24, 2009 @ 13:42:27

Jani Hartikainen has made a recent post about a library that can manage PDF generation a bit better than the Zend_PDF component of the Zend Framework - RE_PDF.

Zend_Pdf, while generally quite good, has one big issue: It does not support word wrapping text! There’s a new and still a bit obscure framework called RE Framework, which has an excellent PDF component - it includes support for word wrapping, better support for PDF templates, image loading etc.

The several of the interfaces (method calls) are similar between Zend_Pdf and RE_Pdf, so there's not too much rewriting involved if you're already using Zend's option. He shows how to parse an XML file, plug those values, the fonts and fields, in the PDF object then flesh it out with a presentation layer and information to fill in the blanks.

tagged: improved pdf generate framework zendpdf repdf reframework

Link:

Nefarious Designs:
Object-Oriented PHP Part 4: PHP5's Improved Features
Aug 31, 2006 @ 15:29:29

Nefarious Designs continues their object-oriented PHP series with part four posted today, a look at some of the new features that PHP5 brings to the table.

After a welcome break, over the late summer public holiday here in England, here's the final part in my object-oriented PHP series. Sorry about the rather extended pause since "Part 3: Taking Relationships Further".

Having already looked at definition, relationships and taking those relationships further, I'm going to look at how PHP5's new Object Model introduces more advanced functionality.

In this latest part they look at clas constants, abstract classes, object interfaces, and magic methods (including overloading).

tagged: object oriented php5 improved features tutorial part4 object oriented php5 improved features tutorial part4

Link:

Nefarious Designs:
Object-Oriented PHP Part 4: PHP5's Improved Features
Aug 31, 2006 @ 15:29:29

Nefarious Designs continues their object-oriented PHP series with part four posted today, a look at some of the new features that PHP5 brings to the table.

After a welcome break, over the late summer public holiday here in England, here's the final part in my object-oriented PHP series. Sorry about the rather extended pause since "Part 3: Taking Relationships Further".

Having already looked at definition, relationships and taking those relationships further, I'm going to look at how PHP5's new Object Model introduces more advanced functionality.

In this latest part they look at clas constants, abstract classes, object interfaces, and magic methods (including overloading).

tagged: object oriented php5 improved features tutorial part4 object oriented php5 improved features tutorial part4

Link:


Trending Topics: