473,513 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

classes in PHP - question

dan
Hi,

//I've the class Application
class Application...

//I call show function from class Abstract
...
$seller = new Seller...
$seller->show(...)
...
$customer = new Customer...
$customer->show(...)

//I've also the class Abstract - it implements some common code code
for all classes Seller, Customer,... etc..

class Abstract...
...
function show(...){
...

$form = new HTML_QuickForm...

$this->List($form);
}
//here's Customer class - some special code for customer

class customer extends Abstract

function List($form){
$quickFormSelect = new HTML_QuickForm_select
...
$form->addElement($quickFormSelect));
}

of course, I can do it, using some "if's" i Abstract class, but the
above code could simplify my application, unfortunately it doesn't work

Any suggestions about this code?
ps.

the above code can looks like this:

....

function Lista(){
...
$quickFormSelect = new HTML_QuickForm_select
...
return $quickFormSelect;
}

//and then in Abstarct class

$form->addElement($this->Lista());
but in this solution I can add only one $quickFormSelect do $form, how
to add some more $quickFormSelect calling function List only one (like
in my unfortunetly non working code - $this->List($form);)

Daniel
Jul 17 '05 #1
1 1379
dan schrieb:

Any suggestions about this code?

No, because I totally lost you. The code sample ist so split into pieces
that I can't even imagine waht you are trying to do. Please give code in
a single piece and describe more clearly what you want it to do.

AllOLLi
Jul 17 '05 #2

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

Similar topics

5
2960
by: Hal Vaughan | last post by:
I think a lot of this is definately a question of personal programming style, but I'm new to Java and would like to hear a few opinions. I'm writing a control panel for an application that runs...
3
4812
by: Ed Severn | last post by:
I'm sorry of this question has been posed and answered many times before. But I have avoided using the "package" statement because of this. Most of my classes have no "package" statement, and...
12
3797
by: David MacQuigg | last post by:
I have what looks like a bug trying to generate new style classes with a factory function. class Animal(object): pass class Mammal(Animal): pass def newAnimal(bases=(Animal,), dict={}):...
6
1591
by: Piotr Getka | last post by:
Hi I have 3 classes: - CMainFrame - CPitApp - CPitView In class CPitApp i create object CMainFrame* pMainFrame = new CMainFrame and in class CMainFrame there is:
9
2501
by: Gomaw Beoyr | last post by:
Two question about the "partial classes" (in the next wersion of ..NET). Question 1 ========== Will partial classes (in the next version of C#) have to be declared "partial" in ALL places. ...
2
9479
by: joye | last post by:
Hello, My question is how to use C# to call the existing libraries containing unmanaged C++ classes directly, but not use C# or managed C++ wrappers unmanaged C++ classes? Does anyone know how...
6
1748
by: Peter Oliphant | last post by:
I just discovered that the ImageList class can't be inherited. Why? What could go wrong? I can invision a case where someone would like to add, say, an ID field to an ImageList, possible so that...
4
4672
by: Matt Kruse | last post by:
While developing an internal IE6-only webapp, a discussion started about the 'best' way to apply classes to data tables across multiple pages. The two arguments were: 1. Apply a single class to...
7
3202
by: wolfing1 | last post by:
Is there a way to see what CSS classes in a page are not defined? (like if I want to find mispelled class names, etc)
16
1832
by: chameleon | last post by:
I have 2 classes with exactly the same members (all static except dtor/ctor). Classes have different implementantion in only one static member function and first class has one more member...
0
7379
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.