PHP Classes

pl2method: Execute PgSQL stored procedures as class functions

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 287 This week: 1All time: 7,527 This week: 560Up
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: 44
All time rank: 3862310 in Brazil Brazil
Week rank: 416 Up36 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:287
This week:1
All time:7,527
This week:560Up
User Comments (1)
great class
15 years ago (osniel)
62%StarStarStarStar