PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 101 to 120 of 214

Court Ewing's Blog: Create and Validate a Choice List in a Symfony 2 Form

Court Ewing's Blog: Create and Validate a Choice List in a Symfony 2 Form
Court Ewing has written up a new post to his blog about creating a "choice" list (a select list as defined by Symfony 2) with dynamic options and validating the resulting submission. His example uses Doctrine 2 entities to work with most of the data handling.A standard select list can be created using Symfony's choice field type; it is pretty clear how to create a new choice field with simple, non-dynamic options (e.g. gender), but it gets a little more complicated when you want to create and validate a...

Community News: Latest Releases from PHPClasses.org

Community News: Latest Releases from PHPClasses.org
Rank Checker Words To Numbers Simple REST Server Imagens Pagination Sayfalama Class Secure SQLite TXTJI SMS API SPMD Facebook Integration for Zend Framework PHP Simple View CSS Unifier HTML Form PHP 5

Does Phix Need A Screencast Or Two?

Does Phix Need A Screencast Or Two?
Just a quick straw poll a is there much interest in me making a screencast or two for how to install and work with Phix?

Quality Assurance on PHP projects - PHPUnit part 1

Quality Assurance on PHP projects - PHPUnit part 1
Of all tools available for improving quality assurance, there's one tool that is the core tool you have to master: PHPUnit. PHPUnit is a complete testing framework crafted by Sebastian Bergmann (@s_bergmann), who ported existing xUnit frameworks to PHP. And with this testing framework you're able to test your functionality in an automated way before you push code into production.[editorial]AAs I cannot summarize the whole usage of phpunit in one blogpost, this will be a sequence of several articles that...

Create and Validate a Choice List in a Symfony 2 Form

Create and Validate a Choice List in a Symfony 2 Form
There is a lot of magic going on in the Symfony 2 form component, and while this magic is frequently convenient and borderline awe-inspiring, it sometimes has the unpleasant side effect of making it unclear how to do more fine-grained tasks within the form. A standard select list can be created using Symfony's choice field type; it is pretty clear how to create a new choice field with simple, non-dynamic options (e.g. gender), but it gets a little more complicated when you want to create and validate a...

Stuart Herbert's Blog: PHP Components: Shipping Web Pages With Your Components

Stuart Herbert's Blog: PHP Components: Shipping Web Pages With Your Components
Stuart Herbert's latest post in his "PHP Components" series looks at an optional but handy thing you can include in your component's package - web pages (be they a manual or other kind of information). This new post talks about where they should lie in the component's package structure.I'm now going under the bonnet of our components, and looking at the different file roles that the PEAR installer expects to find when we distribute our component as a PEAR-compatible package. It isn't very often that a...

Ian Christian's Blog: Creating a custom form field type in Symfony 2

Ian Christian's Blog: Creating a custom form field type in Symfony 2
Ian Christian has added a new post to his blog today showing how you can create a custom form field type in Symfony 2 by extending the AbstractType.I am finally starting to dive into symfony 2 properly. Yes - it's taken a while, work has taken me in different directions! I found myself needing to create a custom form field type pretty quickly, but couldn't find much in the way of documentation to do so, so I thought I'ld throw it up here; partly to help others, but mostly to get feedback to make sure I'm...

Gonzalo Ayuso's Blog: Checking the performance reading arrays with PHP

Gonzalo Ayuso's Blog: Checking the performance reading arrays with PHP
While admitting that micro-optimizations aren't usually worth the time that's taken to worry about them, Gonzalo Ayuso has thrown together some array read benchmarks to show the difference, if any, in where array values are fetched.Normally our code is coded once and executed thousands of times, and we must keep in mind that CPU time many times means money. We need to balance it (as always). But, WTH. I like micro-optimizations, and here comes another one: Checking the access to arrays with PHP.He sets...

DevShed: PHP and the Law of Demeter

DevShed: PHP and the Law of Demeter
On DevShed today there's a new tutorial looking at how to use dependency injection to help prevent you from breaking the "Law of Demeter" in your application's structure.When [responsibilities aren't well defined for classes], it's a clear symptom of a common issue known as the "Law of Demeter" breakage. In case the name doesn't ring any bells, the "Law of Demeter" (http://en.wikipedia.org/wiki/Law_of_Demeter) - or the Principle of Least Knowledge - is a paradigm that allows to create loosely-coupled...

Symfony2 for Midgard Developers

Symfony2 for Midgard Developers
We hosted a full-day Symfony2 workshop for some of the Finnish Midgard developer community today. As I've written before, Midgard is now transitioning to Symfony2 as our PHP web framework of choice, and this workshop was organized to support that. Symfony2 for Midgard Developers View more presentations from Henri Bergius Subjects discussed included: Symfony2 as a central PHP ecosystem Basic ideas behind Symfony2 Introduction to PHP namespaces Installation with Symfony Standard Edition Running...

RubySource.com: PHP to Ruby: Modules, Mixins and Ducks

RubySource.com: PHP to Ruby: Modules, Mixins and Ducks
In his latest article comparing some of the functionality of PHP to Ruby, Dave Kennedy looks at modules, mixins and ducks and how they compare to PHP's interfaces and abstract classes.If you have been writing PHP for a few years you will no doubt have come across Interfaces and Abstract classes. They were introduced in PHP5 object model and since have had medium usage in the PHP world. If you Google "PHP Interfaces" you will get some results on the official documentation and the rest saying how pointless...

NetTuts.com: Getting Started with the Fuel PHP Framework

NetTuts.com: Getting Started with the Fuel PHP Framework
On NetTuts.com today there's a new tutorial from Philip Sturgeon about how you can get started with Fuel PHP, a framework for rapid website development.This two-part tutorial will get you up and running with the Fuel PHP framework. We'll start with the basics, and then move onto some more advanced topics in part two! Let's get started.He starts with a brief introduction to the Model/View/Controller design pattern just to be sure you're up to speed with the moving parts of the tutorial. From there he...

Community News: Latest PECL Releases for 08.16.2011

Community News: Latest PECL Releases for 08.16.2011
Latest PECL Releases: dbx 1.1.1 dbx 1.1.2 rrd 1.0.4 uploadprogress 1.0.3.1 mongo 1.2.3

PHP Components: Shipping Web Pages With Your Components

PHP Components: Shipping Web Pages With Your Components
In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components. I'm now going under the bonnet of our components, and looking at the different file roles that the PEAR installer expects to find when we distribute our component as a PEAR-compatible...

Factor3 Blog: Web Frameworks

Factor3 Blog: Web Frameworks
Chris Anstey has a new post to his blog with some of his suggestions to framework developers out there (those writing frameworks, not writing applications with them). He mentions some of the criteria he believes frameworks should have.A framework provides you with many of the common components required to develop a website - for example, database access, templating systems and authorization systems. [...] These frameworks are all open source - which means that anyone can review and suggest improvements...

Hyperpolyglot.org: Syntax for Common Tasks - Side-by-side (Ruby, Perl, Python & PHP)

Hyperpolyglot.org: Syntax for Common Tasks - Side-by-side (Ruby, Perl, Python & PHP)
On Hyperpolyglot.org there's an interesting listing of scripting language syntax - PHP, Python, Ruby and Perl - showing some of their common syntax and data structures side by side.Sections of the reference sheet include arithmetic and logic arrays execution control libraries and modules objects reflection It's interesting to see how the various languages compare, where some have shortcuts for things and others fail at the same (or make it much more difficult). Descriptions for the different row types...

Stuart Herbert's Blog: PHP Components: PHP Components: Shipping Unit Tests With Your Component

Stuart Herbert's Blog: PHP Components: PHP Components: Shipping Unit Tests With Your Component
Stuart Herbert has his latest post in his "PHP Components" series on his blog today - a recommendation to include unit tests along with the release of you component.I'm now going under the bonnet of our components, and looking at the different file roles that the PEAR installer expects to find when we distribute our component as a PEAR-compatible package. One of the most important file roles allows you to ship your tests with your package - and it's vital that this is something that you get in the habit...

Mike Purcell's Blog: Symfony - sfGuardPlugin - Use Email Instead of Username

Mike Purcell's Blog: Symfony - sfGuardPlugin - Use Email Instead of Username
Mike Purcell has a handy new post for the Symfony users out there wanting more flexibility with their sfGuardPlugin use in their application. He describes how you can use email instead of a username for working with the user information.sfGuardPlugin is pretty awesome. It allows a symfony developer the ability to quickly implement a user login and access control system. However, there is an issue with respect to telling the plugin whether to use the username or the email column for validating user...

Community News: Latest PEAR Releases for 08.15.2011

Community News: Latest PEAR Releases for 08.15.2011
Latest PEAR Releases: Mail_Mime 1.8.2 Net_Whois 1.0.5 Date_Holidays_Spain 0.1.2 Net_SMTP 1.6.1

PHP Components: Shipping Unit Tests With Your Component

PHP Components: Shipping Unit Tests With Your Component
In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components. I'm now going under the bonnet of our components, and looking at the different file roles that the PEAR installer expects to find when we distribute our component as a PEAR-compatible...