PHP Classes
elePHPant
Icontem

PHP Tutorials

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

Articles to teach about PHP matters and related topics

  All package blogs All package blogs   Blog PHP Classes blog   Blog PHP Tutorials   Post article Post article  
  86 - 77   76 - 67   66 - 57   56 - 47   46 - 37   36 - 27   26 - 17   16 - 7   6 - 1  

308. How to Make Better Reuse of PHP Code using Traits Part 2: Advanced Traits Usage Explained

Posted on: 2015-08-18

In the first part of this article we learned how to use PHP traits to organize better functionality to be reused by multiple unrelated classes.

Read this article to learn more about advanced features of traits like solving conflicts when using traits that define the same properties, changing the visibility of a trait method in the class that uses it, reusing traits within traits, examples of packages that provide general purpose traits for use by many other packages.


Blog More ...   Post a comment Post a comment   See comments See comments (1)   Trackbacks (0)

306. How to Create a PHP C Extension to Manipulate Arrays Part 2: Adding ArrayAccess and Traversable interfaces

Posted on: 2015-08-13

In the first part of this article we learned how to create an extension for PHP written in C to create a class that works like arrays. However, to make the class objects really behave as arrays you need to implement certain interfaces in the class.

Read this article to learn how to make a PHP class defined by a C extension implement ArrayAccess and Traversable interfaces, as well understand how to solve problems that you may encounter that can make your extension slower than you expect.


Blog More ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)

305. How to Make Better Reuse of PHP Code using Traits Part 1: Basic Code Reuse

Posted on: 2015-08-12

When you want to share common methods across multiple unrelated classes, in PHP, traits are the way to go.

They contain the power of an abstract class with the added ability to resolve conflicts which makes them the perfect place to store your favorite methods to quickly use in any project.

Read this article to learn what are traits using simple analogies and how you can use them to make better reuse of your code in multiple classes for very different purposes.


Blog More ...   Post a comment Post a comment   See comments See comments (11)   Trackbacks (0)

304. How to Create a PHP C Extension to Manipulate Arrays - Part 1: Basic Array Class Extension

Posted on: 2015-08-11

In PHP projects, arrays are used every where because they are useful and flexible to store all sorts of data structures.

However, when you need to maximize the performance the manipulation of arrays for specific purposes, you can achieve great gains if you implement a PHP extension written in the C language.

Read this tutorial to learn how to build your own basic array manipulation extension in C.


Blog More ...   Post a comment Post a comment   See comments See comments (3)   Trackbacks (0)

303. How to create a simple PHP CMS with SEO friendly links

Posted on: 2015-08-06

Nowadays search engines like Google value more and more the user experience provided by the sites to rank their site pages well. So, SEO (Search Engine Optimization) often means making the sites more user friendly.

One aspect that contributes to Web site pages being ranked well is to have friendly URLs that allow the user to know what pages are about just looking at the URLs.

Read this tutorial to learn how to create a simple content management system that uses user friendly URLs for the content pages, so you can implement in your own projects without having to use other large CMS systems.


Blog More ...   Post a comment Post a comment   See comments See comments (15)   Trackbacks (0)

301. What You Should Do Before Pushing PHP Code to your Production GIT Repository

Posted on: 2015-07-29

Every time you commit new code to a Git repository, there is a great chance that the code has problems that were not detected with your usual batch of tests.

Read this article to learn how to integrate PHP Code Sniffer with your project Git commit process to inspect your PHP code automatically and prevent that code with problems is committed.


Blog More ...   Post a comment Post a comment   See comments See comments (6)   Trackbacks (0)

300. Using PHP Object Interfaces

Posted on: 2015-07-22

When you are sharing code with closely related objects, you use class abstraction. When you want to provide class templates for broadly related objects, you use Object Interfaces.

Read this tutorial to learn the different ways to implement interfaces and set up interface dependencies in PHP.


Blog More ...   Post a comment Post a comment   See comments See comments (4)   Trackbacks (0)

297. Using the Gateway Pattern in PHP to Access Common Data From Anywhere in your Application

Posted on: 2015-07-14

All applications need to access common data from different parts of the code, like for instance configuration values, text translations, access databases, etc.. The Gateway pattern defines a clean approach for accessing application common data from anywhere in your code.

Read this article to learn more about the gateway pattern and how you implement it to access common methods and properties from any part of your PHP application code following the OOP principles, as well how it can be used to implement other well known design patterns.


Blog More ...   Post a comment Post a comment   See comments See comments (2)   Trackbacks (0)

296. Controlling Autonomous Hardware Devices Using PHP Software Agents

Posted on: 2015-07-13

Some hardware devices can perform useful actions autonomously by the means of software agents, like for instance monitoring objects in the space around an unmanned vehicle (robot).

Read this article to learn how to implement PHP software agents that can process actions using sequences of actions defined in JSON.


Blog More ...   Post a comment Post a comment   See comments See comments (10)   Trackbacks (0)

295. How to Use Vagrant to Improve Your Web Development Process

Posted on: 2015-07-08

A great part of the production Web sites are hosted on Linux based systems. However the vast majority of the Web developers run Windows or Mac OS X on their development machines.

Vagrant is an application that creates and configures virtual development environments. It can be used as a simpler wrapper solution around virtualization software such as VirtualBox, VMware, KVM and Linux Containers (LXC), and around configuration management software such as Ansible, Chef, Salt and Puppet.

Read this article learn how to use Vagrant to easily setup your Web applications development environment in a way that it is as close as possible to the Linux based environment that you have on your production server.


Blog More ...   Post a comment Post a comment   See comments See comments (2)   Trackbacks (0)

  86 - 77   76 - 67   66 - 57   56 - 47   46 - 37   36 - 27   26 - 17   16 - 7   6 - 1  
  All package blogs All package blogs   Blog PHP Classes blog   Blog PHP Tutorials   Post article Post article