I've been using PHP for a few years now and I'm quite familiar and
comfortable with it.
I'd like to start to seriously do some OOP coding and take things to
the next level. But as I understand it, PHP5 is going to make quite a
few changes/improvements to PHP4's current handling of OOP.
Given
Mike Brum wrote:
I'd like to start to seriously do some OOP coding and take things to
the next level. But as I understand it, PHP5 is going to make quite a
few changes/improvements to PHP4's current handling of OOP.
Given that the PHP5 beta has been out for approx. 1 month, do you think
it makes
Hello,
First post to the list, hi everyone.
I'm having some difficulties with a script that makes heavy usage of
objects, (de)serialization, and reference-passing. I've been noticing
extremely frequent segfaults and bus errors in my apache logs (Bus Error
10, Segmentation Fault 11). These are
Is it possible to reference two instances of an object at once with a
single variable name while retaining the ability to reference the
objects seperately?
I am using the PEAR Template IT package and need to generate two similar
but different results at the same time. I am doing this with two
On Sat, 1 Jun 2003, Jackson Miller wrote:
Is it possible to reference two instances of an object at once with a
single variable name while retaining the ability to reference the
objects seperately?
No chance. Well, you could hack it with some really fancy object
overloading, but in general,
At 08:39 01.06.2003, Jackson Miller said:
[snip]
Is it possible to reference two instances of an object at once with a
single variable name while retaining the ability to reference the
objects seperately?
[snip]
Not
Just noticed a small glitch in the attach() method - check_object will not
be called for the first object. Use this attach() / check_object()
implementation instead. The var $class instance variable of CTeeObject
can be omitted.
function attach($hObj) {
if (!$this-check_object($hObj))
William N. Zanatta [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
It is a known issue that function calls are expensive for the processor.
The OOP let us better organize the code but, thinking in function (or
method) calls it may be more expensive than in the procedural form.
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP OOP x Procedural Performance
William N. Zanatta [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
It is a known issue that function calls are expensive for the processor.
The OOP let us better organize the code but, thinking in function
One thing I'd like to abundantly point out is that NOT
EVERYTHING BELONGS IN
OOP! For instance, if you're building classes that output
HTML - you've
skipped a few chapters in your OOP design books.
Joe,
I am curious about this opinion, could you elaborate a bit, please? I am not
an OOP
: PHP OOP x Procedural Performance
One thing I'd like to abundantly point out is that NOT
EVERYTHING BELONGS IN
OOP! For instance, if you're building classes that output
HTML - you've
skipped a few chapters in your OOP design books.
Joe,
I am curious about this opinion, could you elaborate
[mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 8:21 AM
To: 'Joe Stump'; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: PHP OOP x Procedural Performance
One thing I'd like to abundantly point out is that NOT
EVERYTHING BELONGS IN
OOP! For instance, if you're building classes
At 04:05 29.05.2003, William N. Zanatta said:
[snip]
It is a known issue that function calls are expensive for the processor.
The OOP let us better organize the code but, thinking in function (or
method) calls it may be more expensive than in the
Joe Stump [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Sure ...
I'm of the belief that OOP (in PHP anyways) has great use for core
libraries. Core libraries, by their nature, generally don't output HTML.
It's a core libraries job to separate logic and presentation. How portable
Hi,
From my personal recent experience, I can tell you that processing a lot of
echo's thru classes is a heck of a lot slower than just doing it the normal
way. Although I wouldn't have done this particular project any other way, I
do with that I could get it to display faster. Its not
First of all. Thanks everybody for the feedback. It was very precious to
hear from you.
So, there's no big differences unless we're working with heavy
processes. Even in this case, the performance seems to be very good in
both practices, thus I'll keep OOP.
My OOP concepts are not really
It is a known issue that function calls are expensive for the processor.
The OOP let us better organize the code but, thinking in function (or
method) calls it may be more expensive than in the procedural form.
My question is, has anyone made any tests regarding the performance of
OOP
yes, the bottom line is code reuse...that is why there is oop. So that a
developer can always reuse code saving money on development and thus if
speed is an issue then adding more hardware.
--
Ray
On Wed, 2003-05-28 at 20:05, William N. Zanatta wrote:
It is a known issue that function calls
[snip]
It is a known issue that function calls are expensive for the
processor.
The OOP let us better organize the code but, thinking in function (or
method) calls it may be more expensive than in the procedural form.
My question is, has anyone made any tests regarding the performance of
I have several web projects that are all database driven. I have recently been diving
into OOP, and rewriting a lot of procedural code in OOP. I have a design question
about handling the MySQL connection.
I have a mysql() class which handles all my queries, automatic inserts/updates, etc.
Just
Answer - use PEAR for both your database connection and as a data modeling
layer:
http://pear.php.net
check the documentation for more info.
neko
Joseph Szobody [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have several web projects that are all database driven. I have recently
At 14:24 04.03.2003, Joseph Szobody spoke out and said:
[snip]
I have several web projects that are all database driven. I have recently
been diving into OOP, and rewriting a lot of procedural code in OOP. I have
a design question about handling the MySQL
Hi to all;
Just a little question about OOP. I'm just confused with the symbol '-' .
In the article that i've red :
#this reads change the value of the variable $head within this class to
black
$this-head=black
#how do i read this line
$this-head-prev=NULL
I'm just confused with this line, i
Nice work on php archittect by the way :)
Thanks again,
Jordan
Thank you.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Thanks Greg,
I know a bit of PHP but the OOP is a bit harder to understand I think :)
I'll check out the PEAR classes.
Cheers,
Jordan
On Thursday 16 Jan 2003 12:25 am, Greg Beaver wrote:
Hi Jordan,
If you are doing this to learn PHP, that is great, keep plugging. If you
want to see working
Thanks John,
Inheriting would probably be the most modular.
I thought this would be the way to go. Ill need to read up on this.
I haven't found any clear examples of this kind of OOP, only the real
basics
(which I still need help with by the way :) ).
Use google. Do some more studying
Hi,
I've been doing a little OOP lately and have a few questions.
I want to build an application, there a re lots of elements to the
application: Authentication, Database, Presentation, Error Handling etc.
Now, I want to code this cleanly and make it reusable. So, a class for each of
these
I've been doing a little OOP lately and have a few questions.
I want to build an application, there a re lots of elements to the
application: Authentication, Database, Presentation, Error Handling etc.
Now, I want to code this cleanly and make it reusable. So, a class for
each of
these
I'd recommend you make a separate database class and error class that each
of your other classes access. That would make it the most modular and
re-usable.
---John Holmes...
I was hoping someone would say that :)
How could I code that though. I've only just started with OOP and don't
Hi Jordan,
If you are doing this to learn PHP, that is great, keep plugging. If you
want to see working examples of the things you've described, there are a
number of scripts out there, both in pear (pear.php.net) and at other
repositories like phpbuilder.com and phpclasses.org. You would
I'd recommend you make a separate database class and error class
that
each
of your other classes access. That would make it the most modular
and
re-usable.
---John Holmes...
I was hoping someone would say that :)
How could I code that though. I've only just started with OOP and
I'm no OOP programmer but maybe extend your class to
include methods for each situation.
something like this:
function countSingle($cid)
function countMulti($cidArray)
function countAll()
HTH,
olinux
--- Victor [EMAIL PROTECTED] wrote:
Hello. I have this question. When I program, I try
olinux wrote:
I'm no OOP programmer but maybe extend your class to
include methods for each situation.
something like this:
function countSingle($cid)
function countMulti($cidArray)
function countAll()
HTH,
olinux
Hmm, yes, that's an interesting idea. Except perhaps include the first
arg
Hello. I have this question. When I program, I try to create a class for
each table. Example below.
Now what some complain about, and logically so, is that this might
impose an overhead (I load all data even if I just need a counter and
NOT description).
So I say we can make a STATIC version
PHP can pass references to objects around exactly the same way you pass
references to normal variables.
-Rasmus
On Thu, 26 Dec 2002, Erik Franzén wrote:
Say the you are going to create a simple forum and you want to have a number
of classes:
Class Sql - handles the DB interface
Class User
Say the you are going to create a simple forum and you want to have a number
of classes:
Class Sql - handles the DB interface
Class User - handles users
Class Messages - handles messages
When you are writing the code, you first creates a new sql object in order
to read or write data from or to
Hi guys,
It goes something like this:
class Myclass extends GtkWindow {
var $run_xpm;
var $pixmap;
var $mask;
function Myclass() {
$this-run_xpm = array(bla, bla);
$this-GtkWindow(GTK_WINDOW_TOPLEVEL);
$this-connect(destroy, array($this, shutdown));
$this-set_title(Run);
Currently, I have the following code:
?php
class overall {
var $loaded;
function load($class){
//eval(global \$$class;); // This didn't work either
$this-loaded[] = $class;
eval(\$this-$class = new $class;);
return true;
}
}
class foo {
var $bar;
// Constructor
function bar(){
(get_declared_classes());
return true;
}
}
- Original Message -
From: Tularis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 19, 2002 10:50 AM
Subject: [PHP] OOP - transfering object-pointer
Currently, I have the following code:
?php
class overall {
var $loaded;
function load
currently I have the followig script:
everything works fine, except for the fact that it doesn't seem to
understand $overall-foo-foo();. It returns this error:
Fatal error: Call to a member function on a non-object in
d:\apache\htdocs\classes.php on line 32
Now, I know the object is loaded,
- Original Message -
From: Tularis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 17, 2002 11:21 PM
Subject: [PHP] OOP-classes in PHP
currently I have the followig script:
everything works fine, except for the fact that it doesn't seem to
understand $overall-foo-foo
Hey,
I have the following script:
class overall {
function overall(){
$this-loaded['overall'] =1;
function load($class){
$$class = new $class;
$this-loaded[$class] = 1;
$$class-setup(); // Run constructor
if(!is_object($$class)){
return false;
}
return true;
}
}
Hello,
Adding the following as the first line of overall-load() should solve your
problem.
global $$class;
HTH,
Danny.
- Original Message -
From: Tularis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 14, 2002 8:18 PM
Subject: [PHP] OOP-related question
Hey,
I
I think it is working, but you are not seeing anything because all the
variables and objects that are declared in your classes are destroyed
once the function exits (out of scope?). I just finished reading up on
this, but I think you want to look into passing data by reference
instead of value
Message -
From: Tularis
To:
Sent: Thursday, November 14, 2002 8:18 PM
Subject: [PHP] OOP-related question
Hey,
I have the following script:
class overall {
function overall(){
$this-loaded['overall'] =1;
function load($class){
$$class = new $class;
$this-loaded[$class] = 1;
$$class-setup
I think the error is fairly self explanatory here - you can't pass the
parameter by reference. Globalising the $$class var will retain scope.
Danny.
- Original Message -
From: Tularis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 14, 2002 9:29 PM
Subject: Re: [PHP] OOP
.
Debbie
- Original Message -
From: Davíð Örn Jóhannsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 1:59 PM
Subject: [PHP] OOP class names
Is there any way to get a print out of class names of an object, lets
say I have a object called obj and I have x number
: Davíð Örn Jóhannsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 1:59 PM
Subject: [PHP] OOP class names
Is there any way to get a print out of class names of an object, lets
say I have a object called obj and I have x number of classes and I want
to find out, theyr
Rodrigo Dominguez wrote:
I made a mistake while I was writting the example, in my original code I
wrote it as you did, with $this-b[0] = new one(); but it doesn't work.
Thank you.
Philip Hallstrom [EMAIL PROTECTED] escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Not
Not tested, but what if you change
$b[0] = new one();
$b[1] = new one();
to:
$this-b[0] = new one();
$this-b[1] = new one();
On Tue, 3 Sep 2002, Rodrigo Dominguez wrote:
I have a problem, I can't create an array of classes into a class, for
example:
I have a problem, I can't create an array of classes into a class, for
example:
class one {
var $a;
function foo() {
echo foo;
}
}
class two {
var $b;
function initialize() {
$b[0] = new one();
$b[1] = new one();
}
}
$test = new two();
I made a mistake while I was writting the example, in my original code I
wrote it as you did, with $this-b[0] = new one(); but it doesn't work.
Thank you.
Philip Hallstrom [EMAIL PROTECTED] escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Not tested, but what if you change
Hi again,
i got a question concerning OOP, would be nice if anyone could help.
I am trying to build a class that builds SQL statements dynamically like i send
tablenames, fieldnames, etc and it should build select, insert, update... statements.
e.g. i have a table PERS_DATA with following
Is there a newsgroup list for PHP and OOP?
It would be great to split up this large topic and create an OOP specific
list.
InsaneCoder
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Try http://www.phpclasses.org;
Warren Vail
Tools, Metrics Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658
-Original Message-
From: Mathieu Dumoulin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 10:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP OOP
Hello,
On 07/23/2002 02:35 PM, Mathieu Dumoulin wrote:
Is there a newsgroup list for PHP and OOP?
It would be great to split up this large topic and create an OOP specific
list.
Sure, just send a message to [EMAIL PROTECTED] or
subscribe in this page:
have a look to the function xml_set_object in the doc:
http://www.php.net/manual/en/function.xml-set-object.php
-Original Message-
From: Christof Rath [mailto:[EMAIL PROTECTED]]
Sent: jeudi 27 juin 2002 23:19
To: [EMAIL PROTECTED]
Subject: [PHP] OOP and xml_set_element_handler
On Thursday, June 27, 2002, at 04:44 AM, Andrew White wrote:
On Wednesday, June 26, 2002, at 04:48 pm, Erik Price wrote:
My problem is that I have no way to know which type of object to
instantiate in advance -- all I have is this primary key. Using the
primary key to instantiate an
Is it possible to call xml_set_element_handler() with a class function like:
xml_set_element_handler($parser, $this-startElement, $this-endElement);
thx Christof Rath
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I'm making this request for help because my experience with object
oriented programming is very limited. I'd like to describe my situation
and then ask a question at the end of it, any comments or input are very
appreciated.
My application needs to keep track of different kinds of
On Friday, June 7, 2002, at 12:50 AM, Analysis Solutions wrote:
On Thu, Jun 06, 2002 at 04:57:42PM -0400, Erik Price wrote:
I have a method in my class that essentially unsets an array element.
Uh, I know you're a sharp guy, but I've got to ask anyway. If it's
doing such a simple
Scott Hurring [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Depends ;-)
yea, really depnds, but as you mentioned, having parameterless
constructors are more generic, especially when it comes to derive the
classes.
instead (with option #2), you could do
I'm trying to solve my earlier-posted dilemma of a class attribute
(array) that is remembering elements that should have been unset().
The good news is that, according to some testing I've been doing (I have
separated the relevant code and am directly testing it), it looks like
PHP is
: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 4:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] OOP style question
I'm trying to solve my earlier-posted dilemma of a class attribute
(array) that is remembering elements that should have been
unset().
The good news
]
Subject: [PHP] OOP style question
I'm trying to solve my earlier-posted dilemma of a class attribute
(array) that is remembering elements that should have been
unset().
The good news is that, according to some testing I've been
doing (I have
separated the relevant code and am directly
Hello.
I have, what is probably a silly, question.
I want to convert my existing scripts to OO - because it's the way to go
in terms of the huge amount of functionality that they now have (and since
I've never done it before it would be interesting). However I have one
thing that I don't
PROTECTED]
Subject: [PHP] OOP Question in PHP
Hello.
I have, what is probably a silly, question.
I want to convert my existing scripts to OO - because it's
the way to go
in terms of the huge amount of functionality that they now
have (and since
I've never done it before it would
On Wed, Jun 05, 2002 at 10:32:39PM +0100, Henry Blackman wrote:
Do I create a new document and pass the primary key as it's a variable in
the
$document = new Document(number);
and have the constructor retrieve the appropriate data from MySQL and fill
the attribute variables.
Or do I
Yesterday, I read in the archives somewhere that in PHP, class
attributes are all static attributes (class variables), not instance
variables. (Figures, I can't find it again, so I can't provide a
link.) In other words, the attributes apply to every single instance of
an object. This
: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 2:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] OOP with PHP
Yesterday, I read in the archives somewhere that in PHP, class
attributes are all static attributes (class variables), not instance
variables. (Figures, I can't
This is done on PHP 3.0.16
Hi folks,
I have a problem with these HTTP_ vars.
I have a mainpage, call it main. There is an include which carries several
settings
and other includes like my abstract db-layer class.
I include this in my class-function, which works fine for the most
variables but
On Mon, 29 Apr 2002 [EMAIL PROTECTED] wrote:
I include this in my class-function, which works fine for the most
variables but $SERVER_ADDR It seems that I cannot get these variable in
the function of my class so I have to pass them as argument to the
function. I have made an init() function
Attention PHP guru's,
I have a question about PHP and OOP. My problem is that I want
multiple inheritance functionality in PHP but it does not support this
(see http://www.zend.com/manual/keyword.extends.php). My question is can
PHP classes be extended multiple times to simulate multiple
]]
Sent: Friday, March 22, 2002 9:49 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP OOP: Multiple Class Extends
Attention PHP guru's,
I have a question about PHP and OOP. My problem is that I want
multiple inheritance functionality in PHP but it does not support this
(see http://www.zend.com
Hi
I've been using php for a while now but I have not got my head around OOP
(classes)
Why bother using them? I've read thru a few tutorials on using classes and
the examples given are quite simple This is probably the problem - I just
can't see the benefit of using this style of programming
I've often wondered the same thing... which is why I've never moved to
OOP
So I'm patiently waiting for a reply to this message as well :)
-Original Message-
From: mojo jojo [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 12:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] OOP .. I
is better to use.
Martin
-Original Message-
From: Demitrious S. Kelly [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 7:31 AM
To: 'mojo jojo'; [EMAIL PROTECTED]
Subject: RE: [PHP] OOP .. I just don't get it.
I've often wondered the same thing... which is why I've never moved to
OOP
Hi
suggest u take a look at this article by Kevin Yank at SitePoint:
http://ebmasterbasecom/article/662 I think he is a great author of
small and efficient articles!
Web inventor
Michael Cronstrom
At 21:22 05/03/02, you wrote:
Hi
I've been using php for a while now but I have not got
Many years ago I wrote something for newcomers into OOP I have cut a
snippet out of it and added some comments Sorry, it became rather long
Hope it helps somebody
Frank
OOP is the art of designing objects, then creating and killing them An
object is a box with handles We can operate it
PROTECTED]]
Sent: Wednesday, March 06, 2002 11:48 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] OOP .. I just don't get it.
Many years ago I wrote something for newcomers into OOP. I have cut a
snippet out of it and added some comments. Sorry, it became rather long.
Hope it helps somebody.
Frank
recommended the classes,
and wrote functions to accept an array of filenames to attach to
the email body using the logic in the book.
/general bitch mode
Apparently everyone I've sent my function to finds it a lot
easier to integrate and use :)
Maybe the quality of existing freely-available PHP OOP
Thanks to all those who contributed to the thread
Very helpful
Mojo
--
PHP General Mailing List (http://wwwphpnet/)
To unsubscribe, visit: http://wwwphpnet/unsubphp
Hi PHPzers
Is php have to compile with anything to get 'overload' function to work,
bcoz its not working on mine, by saying 'undefined function'. In manual
,there is no restriction in using this.
[EMAIL PROTECTED]
---
We must
can you provide a code snippet so we can see what you're doing?
-Original Message-
From: S.Murali Krishna [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 4:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP] OOP .. overload not working
Hi PHPzers
Is php have to compile
($o-a[0]-prop);
?
On Wed, 6 Mar 2002, Martin Towell wrote:
can you provide a code snippet so we can see what you're doing?
-Original Message-
From: S.Murali Krishna [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 4:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP] OOP
I am new to PHP but 10 years in C++
One of the cool/powerful things you can do in C++ is the following:
class DrawDialog {
public:
...
virtual Draw(); // implementation draws a plain dialog box
};
class DrawStyleDialog : public DrawPlainDialog {
public:
...
virtual Draw(); //
Hi,
i have create a simple php class to learn how to oop programming, like this:
class mysqldb {
var $dbconn;
function OpenCon($DBHOST,$DBUSER,$DBPASS){
$this-dbconn = mysql_connect($DBHOST,$DBUSER,$DBPASS);
}
}
this is a simple example...
but when i inherit the class,
php
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* On 22-01-02 at 15:08
* Charles said
php give me a error,
call to undefined function: mysql_connect()
php think that mysql_connect is my private function ?
obvious question
Have you used mysql functions in that enviornment (without a
.
HTH
Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 X289
[EMAIL PROTECTED]
- Original Message -
From: Charles [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 10:25 AM
Subject: [PHP] OOP Problem
Hi,
i have create a simple php class
send us the code that inherits your mysqldb class...
--- Charles [EMAIL PROTECTED] wrote:
Hi,
i have create a simple php class to learn how to oop
programming, like this:
class mysqldb {
var $dbconn;
function OpenCon($DBHOST,$DBUSER,$DBPASS){
$this-dbconn =
I don't know if this is the right place to ask this (there is no .news.admin
group on news.php.net), but where is the right place to look for support for
OOP PHP programming.
Any newsgroups, mailing lists?
Maybe opening a group in this hierarchy named php.oop?? Where is the right
place to ask
Hey all,
I've been working on my first OPP driven PHP code and wanted to see what
everyone thought and any ideas anybody can add to the code that I'm working
on. I've had to make some concessions due to the limitations of PHP's OOP
model and the fact that I'm using PHP3 which doesn't functions
hi
does anybody know of a message board written in OOP style?
thanks for helping;
regards
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL
Message-
From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
Sent: 20 July 2001 12:15
To: [EMAIL PROTECTED]
Subject: [PHP] oop thingie
ok first of all i admit i am complete new to OOP. Secondly didnt write this
script. but there is my problem
i declare a class say dog. dog uses a constructor that has
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 20, 2001 6:31 PM
Subject: RE: [PHP] oop thingie
Not sure about your code, but what you describe is perfectly faesible in
PHP.
If you are setting values in one part of your code and cannot see these
values in another part of your code then I
Hello!
I have following problem:
?
$container = new ccontainer();
$container-init();
$container-test1-foo();
$container-test2-foo();
$container-test2-owner-test1-foo();
$container-test1-owner-test2-foo();
class ccontainer
{
function ccontainer()
{
}
function init()
{
Hi Andrew!
On Sat, 14 Jul 2001, Andrew Kirilenko wrote:
Hello!
I have following problem:
?
$container = new ccontainer();
$container-init();
$container-test1-foo();
$container-test2-foo();
$container-test2-owner-test1-foo();
[*]
$container-test1-owner-test2-foo();
class
Hello!
Is it possible to do normal inheritance on PHP?
I've following code:
---
class one
{
function one()
{
echo one ;
}
}
class two extends one
{
function two()
{
echo two ;
}
}
class three extends two
{
As I understand it in PHP the constructor of the parent class is not called
when a child class is initiated.
You can call it manually. Eg., using your example:
class one
{
function one()
{
echo one ;
}
}
class two extends one
{
function two()
{
one::one();
= new three();
---
Matty.
- Original Message -
From: Andrew Kirilenko [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Sunday, June 24, 2001 6:04 AM
Subject: [PHP] OOP
Hello!
Is it possible to do normal inheritance on PHP?
I've
201 - 300 of 320 matches
Mail list logo