Login   Register  
PHP Classes
elePHPant
Icontem

pl2method: Execute PgSQL stored procedures as class functions

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2008-11-02 (6 years ago) RSS 2.0 feedNot enough user ratingsTotal: 275 All time: 6,801 This week: 1,793Up
Version License PHP version Categories  
pl2method 0.0.2BSD License5.1PHP 5, Databases, Language
Description Author  

This class can be used to execute stored procedures on a PostgreSQL database by calling the class functions.

It uses PHP 5 __call function to map class function calls to execute stored procedures with the same name on a given PostgreSQL database schema.

The class passes function parameter values to the stored procedure as its parameters. If the values do not match the procedure expected types, the class throws an exception.

It returns a PDO statement object that can be used to retrieve any result sets returned from the execution of the stored procedure.

Innovation Award  
PHP Programming Innovation award nominee
November 2008
Number 3


Prize: One book of choice by O'Reilly
Stored procedures are often used to execute complex database queries from inside the database server to make them run as fast as possible.

It is necessary to execute a query with special syntax to call a stored procedure passing eventual arguments.

This class provides a general solution to call PostgreSQL stored procedures as if they are actual PHP class functions.

This is an elegant solution that avoids the requirement to learn the syntax and pass the values to the procedure arguments.

Manuel Lemos
Picture of Ivo Augusto Nascimento
Name: Ivo Augusto Nascimento <contact>
Classes: 1 package by
Country: Brazil Brazil
Age: 35
All time rank: 3471276 in Brazil Brazil
Week rank: 1754 Up146 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file ipgpl.class.php Class ipgpl.class.php
Plain text file ipgtype.class.php Class ipgtype.class.php
Accessible without login Plain text file teste.php Example teste.php

 Version Control Unique User Downloads Download Rankings  
 0%Total:275All time:6,801
 This week:0This week:1,793Up
 User Comments (1)  
 
great class
5 years ago (osniel)
62%StarStarStarStar