473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem with PEAR::DataObject

Hi,
I'm pretty new to Object Oriented design in PHP (although I'm using PHP
since a long time, and I also code with Java, so this is not a problem
for me) and I need some help with PEAR::DataObject
(http://pear.php.net/package/DB_DataObject).
I tried several times to get it to run but there seem to be some
concepts that I can't get...
I can't even use the Factory to build an object since I get the
following error:

-----ERROR-----
DB_DataObject Error: factory could not find class from Project
----/ERROR-----
Project is a class I wrote (or to be more precise DataObjects_Project).
Ok so here comes my config:

///////////////////////////////////////////////////////////////////////////////
// Setup of DataObject stuff.
$options = &PEAR::getStaticProperty('DB_DataObject','options' );
$options = array(
'database' => $dsn,
'schema_location' => dirname(__FILE__).'/DataObjects',
'class_location' => dirname(__FILE__).'/DataObjects',
'require_prefix' => 'DataObjects/',
'class_prefix' => 'DataObjects_',
);
//
///////////////////////////////////////////////////////////////////////////////
(copied right from the user manual...)
And I have a class DataObjects_Project in
../DataObjects/DataObjects_Project.php:

///////////////////////////////////////////////////////////////////////////////
class DataObjects_Project extends DB_DataObject {
var $project_id;
var $project_description;
var $project_date;
}
///////////////////////////////////////////////////////////////////////////////
As you can see nothing fancy here, but I want to be able to load the
data from the database before expanding the classes...

Can someone help me???

Jul 17 '05 #1
0 1624

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sarah | last post by:
I'm having problems getting the FormBuilder package to work. I've spent the last 3hrs reading what little documentation and examples I could find and the idea seems great, if only it'll actually...
1
by: Espen Ruud Schultz | last post by:
Anybody care to explain why the below code doesn't work? TIA! , Espen #include <iostream> class TypeTXT { public:
2
by: Espen Ruud Schultz | last post by:
( This might get posted twice, because I posted with a subject another topic already had, so the first post got lost in it. What is up with this? Is it the news protocol or Outlook Express? ) ...
2
by: | last post by:
Hi there In my app I host the webbrowser. If I return my own implementation in GetDropTarget my methods are never called ( if i return the original dropTarget or NOTIMPLEMENTED everything works...
0
by: geo24 | last post by:
Have a problem with clipboard. Using the standard way for copying the image data: read the image into "myBitmap" copy the image into clipboard: DataObject myData = new DataObject();...
3
by: Thomas | last post by:
Hi all, I've got a half-functioning drag-drop from outlook app running. I can get the name of the message from the FileGroupDescriptor part, but whenever I try to get the FileContents part, I...
1
by: Lloyd Dupont | last post by:
I'm implementing my own, custom, internationalized text editor. I'm trying to implement copy/paste right now. Which cause me some trouble. I'm using .NET 2.0 beta 2 (I have ordered and I'm waiting...
1
by: theinsanecoder | last post by:
I created several classes that supports custom typing as following: Public Class DataManager(Of CustomType As {DataObject, New}) Public Class LockableDataManager(Of CustomType As...
11
by: Norbert Ruessmann | last post by:
Hello group, I have a problem with ObjectDataSource and ITypedList. At the end of this entry you find the implementatiopn of my List class, derived from ArrayList and implementing ITypedList....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.