PHP Object Oriented tutorials
To demonstrate the use of a class, lets create one to model a bank account.A bank account has certain information associated with it, such as itsaccount number, the PIN number needed to access it, and its balance.
Related Tutorials
Creating a bank_account Class
To demonstrate the use of a class, lets create one to model a bank account.A bank account has certain information associated with it, such as itsaccount number, the PIN number needed to access it, and its balance.
An Expandable Form Validation Class: Part 2
In Part 1 of this tutorial, we covered the basics of our Form Validation Class. We explained how the core of the Class depends on regular expressions and gave an insight regarding the keyword concept. We also explained how each keyword will have a corresponding Class Method so that we can easily extend the Class in the future to suit our needs. In Part 2, we will get our hands dirty in creating the remaining useful Class Methods that will instruct the Class which form fields to validate and how to validate them.
Intro To Object Oriented: Creating Your First Class
Introduction to object oriented programming (oop), create your very first php class.
How to use the LoadVars Class
The LoadVars class allows developers to have a better control of the external loaded data. There are many reason to use the LoadVars class intead of the old deprecated loadvariables and loadvariablesNum.
An Expandable Form Validation Class: Part 1
Learn how to create an expandable Form Validation Class, that once complete, you will able to use in any of your PHP scripts. The beauty of this Class is that it is expandable with ease. This means that once the base code of the Class is complete, you can easily configure it to validate different types of form data with virtually no changes. The extra configurations will only be limited to your programming knowledge.
Object Oriented Programming: Image Class
Create an image class, in this class there are 4 function: One to Upload; One to Resize; One to get a file extension and One to resize on the fly.
How to create a gallery class
In this tutorial, we will create a gallery class, and also a template class that will work together with the gallery class.
PHP Table Class
This is a class for generating HTML tables. It's kind of rough, but I thought somebody might want to do something with it.
An Expandable Form Validation Class: Part 3
In this final Part we will be coding some example validation rules and explaining how to use them. We will then go on and show how the final complete Class can be applied in a real working environment, so that you can use it in all your future scripts. At the end of this Part, you should have gained a complete understanding of how the Class operates, and proceed to expand on it with ease.
Clean way to call to multiple xmlrpc remote servers
I've got a class library in PHP. This class library is distributed in a several servers and I want to call them synchronously. The class library has a XMLRPC interface with Zend Framework XMLRPC server.
Sending MIME email in PHP
Tired of sending those drab textual notifications and newsletters to your friend and clients? Ever wanted to send attachments and/or HTML embedded email.The answer is MIME. The ensuing few pages explain the basics of MIME, creating MIME-compliant messages and then ends with a working class implementation of sending MIME complaint email in PHP. Note that references to calling script, caller etc. denote the script that uses the class we are about to develop and client/MUA etc. denote a mail reading client or mail user agent.
Advance Pagination Class
This class will display the results of any MySQL table including all the fields and rows. It will work out how many fields there are and display the results accordingly
Developing a URL Handling Helper Class in PHP 5
In this third installment of a series on building helpers in PHP 5, I will provide you with the basic pointers for building a URL-handling helper class. The code examples, though simple, should serve to demonstrate how to create a helper that generates dynamic URLs.
PHP and UML Class Diagrams
UML (Unified Modeling Language) is a mechanism for representing software in the form of diagrams. Essentially it allows to design our applications by drawing, and if the right tools existed, even generate code from the diagrams. In this article we'll look at how PHP code is represented in UML terms, via use of the the UML class diagram.
PHP Classes - OOP
Most people are afraid of classes and refuse to see the use of them. I was, until I took a JAVA class, which requires the use of classes, and saw the actual beauty of them. Classes are really useful, they reduce the clutter of your code, and make updating a site very easy. Unfortunately, classes aren't as useful in PHP as in other languages, but I still like them. I'm going to use my site as an example, where I have the user_commands class, which handles all the users on the site (ie login, logout, session_ids, etc). It makes my code very neat and organized, and it really pays off when you need to make a change.
Advanced Pagination Class in PHP
Now I am going to go through how to make an advanced pagination class in PHP.
Building a Shopping Cart Class in PHP
An introduction to building a class in PHP using a shopping cart as an example.
ISO to UTF-8 Tutorial
Searching the web for a problem I face on a greek site about encoding, I found a very useful PHP class which changes the charset of a variable.
Timezone Class: Dealing with Timezones the Proper Way
A simple timezone script and then tell you how easy it was.
couchDB
Connecting PHP and CouchDB. A simple class to perform most common database operations.
Classes and objects in PHP
There are many ways to create programming code. One of the easiest but most powerful is to start using object oriented way to think and work. I will give you the basic how you create a class, and why.
PHP Form Class
Generates select boxes, text boxes, check boxes and radio buttons. Via a handful of functions.
Enhancing a URL Handling Helper Class
Are you a PHP developer wishing to find an approachable guide that walks you through building different kinds of helper classes in PHP 5? Then look no further, because this group of articles may be the material that you really need.
A Shopping Cart Class
First, we need to define the properties and behavior of a shopping cartclass. This shopping cart will be kept fairly simple for demonstration purposes,but will certainly be sufficient for use and expansion.
Functions, Classes and Objects
In this tutorial i will guide you through the evolution of some php code as it passes from being a function through a static class and finally end up as an object. there is plenty more i could share with you on the theory behind objects, but all we are looking at here is giving you the understanding you need to be able to go out and write your own classes.
How to Build a Shopping Cart using CodeIgniter and jQuery
In this tutorial, we're going to take advantage of this new class, and write a shopping cart system, with a touch of jQuery added in.
Templates - why and how to use them in PHP3
This tutorial shows you how to create a template-based Web site using FastTemplate class by CDI. By using FastTemplate you can change the look of your entire web site in seconds, use abstract programming without HTML, and your Webpage designer does not need to take care of all that "fuzzy" code.
How many visitors browsing the site at the moment?
This tutorial will show you how to make a class that will show how many users browsing the site at the moment.
get remote page title and description
This PHP class will help you get remote page title and description. Could be useful for automating link exchanges.
Pivot tables
In my work as developer I normally need to transform data from one format to another. Typically our data input are a database and we need to show database data into a report, datagrid or something similar. Its very typical to use 'pivot tables'. I want to write a class to 'pivot tables' in PHP with the most common requirements (at least for me )
jQuery Contact form for your website
In this tutorial we show how to create a modern contact form that is linked by a simple text link and opens in a fancy Lightbox where all form handling, including reCAPTCHA validations, are processed by PHP and the jQuery Ajax function. After the form submission was successful we are using the PHP Class script PHPMailer to send the message via SMTP.
Creating a Shoutbox
This tutorial - "Creating a Shoutbox" will keep your interest as well as teach you a great bit of design with all the code you will need right on the page. The author makes it a snap with lots of photos and illustrations.
Creating PDF documents
This tutorial steps you through the process of creating PDF documents with PHP.
FTP Administration with full logging via PHP
PHP Class for FTP Administration with full activity logging.
Template Refernce in Joomla! 1.5
This tutorial covers key reference information under easy-to-look-up headings that will help you with Joomla! template development. From the many CSS ID and class styles that Joomla! outputs, to Joomla!'s jdoc tags and their controlling attributes, the information in this tutorial is listed along with key links to bookmark which will make template development as easy as possible. (pdf tutorial, install Acrobat Reader to read this tutorial)
Uploading, Saving and Downloading Binary Data in a MySQL Database
This article is aimed at answering one of the most asked questions on the PHP mailing list and discussion forums alike: How to store binary files in a MySQL database. This article is split into three pages: Setting up the database, Creating the 'upload' scripts, and Creating the 'download' script.
PHP Script Tips - Creating Your Own Functions
A collection of 19 tips on creating your own PHP functions. Clear answers are provided with tutorial exercises on defining functions, defining arguments, passing references, returning references, argument default values, etc.
Creating Categories and Attributes with Magento
The combination of products, presentation, and service makes our store unique. Before adding products, we need to make some decisions about how we will organize our site. A few minutes of planning now can save us hours of work later. This Chapter focuses on creating categories and attributes, a necessary step before you can build your catalog of products. (pdf file, install Acrobat Reader to view this tutorial)
Creating a graphic clock using Date() functions in PHP
In this tutorial I aim to show you one of the many ways of showing the time on a webpage. Many websites use a textual display of the date and time on their site. In this tutorial we will be creating a unique graphic clock using PHP.
Getting to know Midgard
Server-side scripting languages such as PHP are great for creating dynamic, creative, and compelling Web sites. Unfortunately they have always left the mechanics of creating, rendering, and administering dynamic content to the script author -- until now. This article introduces and shows you how to use Midgard, an open-source system based on PHP that takes over the job of looking after content, allowing you to concentrate on site aesthetics and functionality.
 
Categories