You are here: Re: Problems with include and duplication function definitions « PHP Programming Language « IT news, forums, messages
Re: Problems with include and duplication function definitions

Posted by Wescotte on 04/14/06 20:18

The application is processing freight EDI files. We have mutliple
vendors who use various file formats. The goal was to create an easy
way for somebody else to add new vendors without having to mess with
the base code.

So they create a php file to with 3 functions

1. Check if the specified file is from that vendor
2. Parse the invoice data
3. Build remittance EDI files

So I'd have a table that would contain
Vendor # for our ERP/PHP file to include

If they wanted to add additional suport they would create a new PHP
file with the 3 functions I described and add an entry into the above
table

If you have a better suggestion on how to allow for such a task please
let me know


The current method is a global detect function that knows what files to
include, a global creation file that knows which files to include based
on detected type and a global remittance function that knows which file
to include based on the vendor #.

So if somebody wants to add a new vendor they have to append their
detection code and add code to all 3 functions. Granted it's only a few
lines each it's still something I'd prefer they didn't have to do.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация