PHP Object Oriented

Home » PHP (1586) » Object Oriented (60)

Beginners PHP OOP
This is an Object-oriented PHP Tutorial, we will briefly cover how to use classes and objects so most will understand it, and how to use OOP in real situations. OOP can sometimes be useful if you have a block of code, that you would otherwise have to repeat a lot of places, across multiple files or projects.

Working with Request objects in PHP
Normally when we work with web applications we need to handle Request objects. Request is the input of our applications. Filter Input-Escape Output is the rule. Frameworks filter them for us, but not all are frameworks. Here a small library to filter and validate Request input.

Getting Started With Object-Oriented Programming
A lot of people asking what's OOP, why OOP so hard for me to understand, why using OOP and there’s functions, etc… In this tutorial I will explain what's OOP and how easy to understand it.

Display your Favorite Tweets using PHP and jQuery
In this tutorial, we will be writing a PHP class that will fetch, cache, and display your favorite tweets in a beautiful CSS3 interface.

Runtime Classes. A experiment with PHP and Object Oriented Programming
An experiment with OO. Runtime classes, Classes declared dynamically with the same (ok "almost" the same) behaviour than real ones. FizzBuzz kata created with this OO experiment.

How to write a basic PHP Class
This tutorial is for beginners who want to learn oop in php and this tutorial explains how to create a basic php class.

Object-Oriented PHP for Absolute Beginners
This tutorial introduces you to object-oriented programming in PHP. You'll explore the basics of object-oriented programming, and learn how to write simple object-oriented PHP scripts.

Tutorial: Introduction to Unit Testing in PHP with PHPUnit
It's a familiar situation: you've been developing on an application for hours and you feel like you've been going round in circles. You fix one bug and another pops up. Sometimes, it's the same one you found 30 minutes ago, and sometimes it's new, but you just know it's related. For most developers, debugging means either clicking around on the site, or putting in a whole load of debugging statements to hunt the problem down.

Comparing Objects
I'm going to go through some examples of what happens when comparing objects in PHP 5.3, I found this rather interesting with special regard to the comparisons of objects that have other objects as properties.

Implementing The Factory Design Pattern
The Factory Design Pattern is a method of designing your code in order to make the process of creating objects more streamlined.

OOP Part 3 - Field Scopes
I briefly touched upon field scopes (otherwise known as 'access modifiers') in my first OOP in PHP tutorial and this piece will expand on this small yet entirely nifty OOP functionality in an effort to explain what precisely field scopes are and what they do

OOP Part Two: Inheritance
The second part in my series of OOP in PHP tutorials will focus on OOP Inheritance. In this tutorial I will explain what OOP Inheritance is, how to use it and what benefits it can provide using a real-world and entirely understand example to illustrate my words.

Part 3 What Are Class Constructors?
So just what are class constructors, and how can they be used within PHP classes/OOP programming? When a PHP class is first called, the class will automatically run the class constructor function, which can help automatically configure the class. This can be useful if you need to preset some instance variables, sessions or cookies prior to using the class methods.

How to over-complicate your code
I've started learning Java recently and I've been noticing this strange pattern of how you can thoroughly complicate (and thus "organize") your code. This goes between languages (from BASIC to Java and C++, the amount of code increases for a simple "hello world"). Ive been learning OOP PHP and for general scripting, it's not required but for more complicated applications, you'll need OOP. So let me show you a progression of successive ways of how to write a simple "Hello World" program in PHP.

Magic Methods
PHP provides a number of 'magic' methods that allow you to do some pretty neat tricks in object oriented programming. These methods, identified by a two underscore prefix (__), function as interceptors that are automatically called when certain conditions are met. Magic methods provide some extremely useful functionality, and this tutorial will demonstrate each method's use.

IP Information Class
ipInfo is Extremely useful PHP class to detect your Country Code, Region, City, location, Latitude and Longitude information automatically.

PHP Class Tutorial - Part 2 - What is $this->
This tutorial will explain what $this-> is all about, and how to further your PHP class knowledge!

Simple Class-Based Querying
Though it is usually advisable to use some sort of framework or CMS, sometimes a project is small enough such that those options would weigh down the development. However, even in smaller projects, separating presentational elements from backend querying should not be ignored. This tutorial will walk you through creating a basic class-based querying engine for PHP and MySQL.

Scraping with DOM Library
In this tutorial, you'll learn how to use an open source, easily learned parser, to read, modify, and spit back out HTML from external sources. You'll learn how to get a list of all the articles published on the site and display them.

PHPDoc, code completion and iterations
Tips to improve our work as PHP developers helping to our IDE to show us the code autocompletion

Home » PHP (1586) » Object Oriented (60)