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 Jerry Stuckle on 04/14/06 22:40

Wescotte wrote:
> 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.
>

Yes - learn OO programming.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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