News Feed
Sections




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

Refulz.com:
Traits in PHP - Multiple and Nested Traits
May 28, 2012 @ 15:16:29

On the Refulz.com blog there's a new tutorial posted looking at traits (and nested traits) in PHP including examples of them in use and how to create your own.

Traits is a good new addition to PHP language. In our series about the new features of PHP 5.4, we reviewed the concept of Traits in PHP. The introductory article talks about what the traits are and what is the general syntax of Traits in PHP. The second article attempts to explain why we need traits.

The tutorial shows you how to define a custom trait use things like abstract methods, nesting them by making them "users" and how to use multiples at the same time (comma-separating).

0 comments voice your opinion now!
traits multiple nested tutorial abstract


blog comments powered by Disqus

Similar Posts

Rob Allen's Blog: Zend Framework Tutorials (an Update and Zend_Auth)

NetTuts.com: Laravel 4: A Start at a RESTful API

Matthew Weier O'Phinney's Blog: Getting started writing ZF2 modules

Zend Developer Zone: Tutorial : Using Zend Framework Without PDO

Pierre-Alain Joye's Blog: ext/filter, API frozen (!) and fixes, 0.11.0 is out


Community Events

Don't see your event here?
Let us know!


interview conference laravel framework laravel5 podcast voicesoftheelephpant opinion unittest video psr7 development community library series language extension api release introduction

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework