PHP Function Re-Definition

A place for users and developers of the Xataface to discuss and receive support.

PHP Function Re-Definition

Postby andperry » Fri Feb 24, 2012 3:08 am

On one of my projects, I have a situation where the main PHP files for three separate tables (actually one table and two related views) include a file containing some common functions, to be called from the handling functions of the various table classes. The project as a whole contains about six such sets of tables each with its own set of common functions, and many of the common function names are repeated across the board (e.g. common_beforeSave, common_afterSave). It works without a problem.

Having tried it on a new project however, I'm getting lots of error messages saying that PHP function names are being re-defined. It is as if all the table classes are being loaded every time, regardless of whether a particular table is being handled by the given page. If this is so then why does the first project work anyway?

All I am asking for is clarification as to what should happen and can work round it either way. Both projects are using Xataface version 1.2.7.

Regards,

Andrew Perry.
andperry
 
Posts: 57
Joined: Wed Feb 18, 2009 9:20 am
Location: Wirral, UK

Return to Xataface Users

Who is online

Users browsing this forum: Bing [Bot] and 6 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved