You do not need to access $DB as a global variable
Since $db_database is a property of search_helper, you can initialize it by
passing a value via the constructor like this
class search_helper extends AjaxACApplication
{
protected $db_database;
public function __construct($database_nam
Hi there,
I am new to classes in PHP and do want to change a class that has been
in a package I downloaded. I do simply want to access a variable from
outside.
This is the code:
class search_helper extends AjaxACApplication
{
//global $DB;
var $db_database = '
On Sun, Nov 1, 2009 at 6:46 PM, Larry Garfield wrote:
> On Sunday 01 November 2009 2:50:55 pm Daniel Kolbo wrote:
> > Hello,
> >
> > Is there a way to see what objects and functions a script
> > loaded/required/used?
> >
> > I could recursively loop through the globals, but if objects were unset,
On Sunday 01 November 2009 2:50:55 pm Daniel Kolbo wrote:
> Hello,
>
> Is there a way to see what objects and functions a script
> loaded/required/used?
>
> I could recursively loop through the globals, but if objects were unset,
> then i may miss some.
>
> I could make a 'tracking' object and ever
On Sun, Nov 1, 2009 at 9:50 PM, Daniel Kolbo wrote:
> Hello,
>
> Is there a way to see what objects and functions a script
> loaded/required/used?
>
I don't think it's possible to that in PHP code.
>
> I could recursively loop through the globals, but if objects were unset,
> then i may miss som
Hello,
Is there a way to see what objects and functions a script
loaded/required/used?
I could recursively loop through the globals, but if objects were unset,
then i may miss some.
I could make a 'tracking' object and every time i load/include a file
(which contains a class def or a function de
Hi
you can use the following code
On Sat, May 9, 2009 at 10:16 PM, Robert Cummings wrote:
> On Sat, 2009-05-09 at 18:35 +0200, Cesco wrote:
> > Ok, I suppose that this should be a very simple problem and probably
> > the answer is obvious, but I really can't understand how the classes
> > and th
On Sat, 2009-05-09 at 18:35 +0200, Cesco wrote:
> Ok, I suppose that this should be a very simple problem and probably
> the answer is obvious, but I really can't understand how the classes
> and the rest of the stuff works in PHP...
>
> Let's suppose that we have this piece of code:
>
>
>
Ok, I suppose that this should be a very simple problem and probably
the answer is obvious, but I really can't understand how the classes
and the rest of the stuff works in PHP...
Let's suppose that we have this piece of code:
I have put an infinite loop in the class constructor just to
On Mon, February 18, 2008 2:25 pm, nihilism machine wrote:
> if i declare an instance of a class in the top of my php file, then
> have html, then later on user $myClassInstance->myMethod(); --
> myMethod() does not execute, only when i have the instantiation of the
> class right before the call to
Nick Stinemates wrote:
> Shawn McKenzie wrote:
>>> What part of my example was unclear?
>>>
>>>
>> All of it, since I posted just a couple minutes after you and I hadn't
>> seen your post yet.
>>
>>
> I'm sorry, I thought were were responding WHAT?!? to me.
>
> I'm going to blame thunderbi
Shawn McKenzie wrote:
>> What part of my example was unclear?
>>
>>
> All of it, since I posted just a couple minutes after you and I hadn't
> seen your post yet.
>
>
I'm sorry, I thought were were responding WHAT?!? to me.
I'm going to blame thunderbird for looking like you responded to m
Nick Stinemates wrote:
> Shawn McKenzie wrote:
>> Jay Blanchard wrote:
>>
>>> [snip]
>>> if i declare an instance of a class in the top of my php file, then
>>> have html, then later on user $myClassInstance->myMethod(); --
>>> myMethod() does not execute, only when i have the instantiation
[snip]
> http://www.php.net/flush
Huh, what?!?! to both of you:
[/snip]
My bad...I had a total brain fart and 'combined' some concepts that I
was speaking to someone about off-list.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Shawn McKenzie wrote:
> Jay Blanchard wrote:
>
>> [snip]
>> if i declare an instance of a class in the top of my php file, then
>> have html, then later on user $myClassInstance->myMethod(); --
>> myMethod() does not execute, only when i have the instantiation of the
>> class right before
Jay Blanchard wrote:
> [snip]
> if i declare an instance of a class in the top of my php file, then
> have html, then later on user $myClassInstance->myMethod(); --
> myMethod() does not execute, only when i have the instantiation of the
> class right before the call to the method does it wor
nihilism machine wrote:
if i declare an instance of a class in the top of my php file, then have
html, then later on user $myClassInstance->myMethod(); -- myMethod()
does not execute, only when i have the instantiation of the class right
before the call to the method does it work. any ideas?
Jay Blanchard wrote:
> [snip]
> if i declare an instance of a class in the top of my php file, then
> have html, then later on user $myClassInstance->myMethod(); --
> myMethod() does not execute, only when i have the instantiation of the
> class right before the call to the method does it wor
[snip]
if i declare an instance of a class in the top of my php file, then
have html, then later on user $myClassInstance->myMethod(); --
myMethod() does not execute, only when i have the instantiation of the
class right before the call to the method does it work. any ideas?
[/snip]
You are
if i declare an instance of a class in the top of my php file, then
have html, then later on user $myClassInstance->myMethod(); --
myMethod() does not execute, only when i have the instantiation of the
class right before the call to the method does it work. any ideas?
-e
--
PHP General Mai
On 10/15/07, Larry Garfield <[EMAIL PROTECTED]> wrote:
>
> On Monday 15 October 2007, Nathan Nobbe wrote:
> > On 10/15/07, tedd <[EMAIL PROTECTED]> wrote:
> > > I understand the class concept. But, I am not familiar with autoload.
> > >
> > > Stut also made mention of that, so I shall investigate p
On Monday 15 October 2007, Nathan Nobbe wrote:
> On 10/15/07, tedd <[EMAIL PROTECTED]> wrote:
> > I understand the class concept. But, I am not familiar with autoload.
> >
> > Stut also made mention of that, so I shall investigate post haste.
>
> __autoload is pretty tight; but if you dont want to
On 10/15/07, tedd <[EMAIL PROTECTED]> wrote:
>
> I understand the class concept. But, I am not familiar with autoload.
>
> Stut also made mention of that, so I shall investigate post haste.
__autoload is pretty tight; but if you dont want to have all your class
files in the same
directory, i sugg
At 5:42 AM -0500 10/15/07, Jay Blanchard wrote:
[snip]
With a class you can inherit all of the base class functionality
into a new customer type. You do not have to break open the base
class to add a case, you just have to create an extension class.
Documentation is unique to each class.
No ma
On 10/15/07, Jay Blanchard <[EMAIL PROTECTED]> wrote:
>
> [snip]
> >With a class you can inherit all of the base class functionality
> >into a new customer type. You do not have to break open the base
> >class to add a case, you just have to create an extension class.
> >Documentation is unique to
[snip]
>With a class you can inherit all of the base class functionality
>into a new customer type. You do not have to break open the base
>class to add a case, you just have to create an extension class.
>Documentation is unique to each class.
No matter what, you have to break something open t
""Jay Blanchard"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
[snip]
First of all what you call "normal" is procedural or functional
programming. There is nothing wrong with doing things this way and may
be
especially quick and efficient when doing basic web sites and
At 9:03 AM -0500 10/12/07, Jay Blanchard wrote:
tedd said:
In either case, I still have to write more code to accommodate
scaling. And, if I have more customer types, then it's a simple
matter to add more customer functions and addition case statements to
the initial customer function. I don't s
At 2:44 PM +0100 10/12/07, Stut wrote:
You can limit the need to add more code like so...
function customer($whatWas, $customertype, $whatAdditional)
{
/* do "what was" (i.e., common to all) */
/* then do what's additional unique to type */
$func = strtolower($customertype).'Customer
[snip]
> First of all what you call "normal" is procedural or functional
> programming. There is nothing wrong with doing things this way and may
be
> especially quick and efficient when doing basic web sites and
applications.
> Document well and you will have no problem maintaining your code.
One
On 10/12/07, Jay Blanchard <[EMAIL PROTECTED]> wrote:
>
> No doubt. (are you by chance continuing the other argument, re:
> interfaces?), but you have to break open the original tested function, add
> code to it, test it, etc. Every time you add a new case you have to break
> open the existing func
[snip]
Yes, but I could do that procedurally from within the customer
function by simply adding a customer type (needed regardless) and
using a switch to direct and collect the additional data needed.
In either case, I still have to write more code to accommodate
scaling. And, if I have
tedd wrote:
function customer($whatWas, $customertype, $whatAdditional)
{
/* do "what was" (i.e., common to all) */
/* then do what's additional unique to type */
switch(1)
{
case $customertype =='Commercial':
commercialCustomer($whatAdditional);
break;
..
At 7:36 AM -0500 10/11/07, Jay Blanchard wrote:
[snip]
okay, this is really (!) embarassing, but I have to ask:
Why would I want to use classes in PHP?
I have been using PHP for years now and writing the "normal" functions all
the time. I have never even bothered working with classes, but now I
On 10/12/07, Larry Garfield <[EMAIL PROTECTED]> wrote:
>
> On Thursday 11 October 2007, Jay Blanchard wrote:
> > [snip]
> > okay, this is really (!) embarassing, but I have to ask:
> >
> > Why would I want to use classes in PHP?
> >
> > I have been using PHP for years now and writing the "normal" f
On Thursday 11 October 2007, Jay Blanchard wrote:
> [snip]
> okay, this is really (!) embarassing, but I have to ask:
>
> Why would I want to use classes in PHP?
>
> I have been using PHP for years now and writing the "normal" functions all
> the time. I have never even bothered working with classe
[snip]
Not trying to hijack the thread... Hopefully this is related enough,
if not I apologize. Would a good use of a class be to write a generic
database connection script? and then feed in the different variables,
such as customer login, database, stuff like that?
something like class DBCo
On Thu, 2007-10-11 at 07:36 -0500, Jay Blanchard wrote:
> [snip]
> okay, this is really (!) embarassing, but I have to ask:
>
> Why would I want to use classes in PHP?
>
> I have been using PHP for years now and writing the "normal" functions all
> the time. I have never even bothered working wi
On Oct 11, 2007, at 8:36 AM, Jay Blanchard wrote:
[snip]
okay, this is really (!) embarassing, but I have to ask:
Why would I want to use classes in PHP?
I have been using PHP for years now and writing the "normal"
functions all
the time. I have never even bothered working with classes, but
[snip]
okay, this is really (!) embarassing, but I have to ask:
Why would I want to use classes in PHP?
I have been using PHP for years now and writing the "normal" functions all
the time. I have never even bothered working with classes, but now I would
love to know what makes the classes so sp
Howdy fellas,
okay, this is really (!) embarassing, but I have to ask:
Why would I want to use classes in PHP?
I have been using PHP for years now and writing the "normal" functions all
the time. I have never even bothered working with classes, but now I would
love to know what makes the clas
On 10/1/07, Merlin <[EMAIL PROTECTED]> wrote:
>
> Hello everybody,
>
> thank you for all your answers. I am sorry but I just realized that
> there is an huge difference between PHP5 and PHP4 considering OOP.
> Unfortunatelly I am still running PHP4.x and cant change this over
> night. However I sti
ds AjaxACApplication
> {
> /**
> * Database connection details
> */
>
>// announce global variable before use it
>global $dbh;
>
> $db_hostname = $dbh;
>
>
> ...
>
> Regards,
> Ryu
>
>
>
On 9/30/07, 潘志彬 <[EMAIL PROTECTED]> wrote:
>
> $dbh = 'test';
>
> class search_helper extends AjaxACApplication
> {
> /**
> * Database connection details
> */
>
>// announce global variable before use it
>global $dbh;
>
> $db_hostname = $dbh;
AIL PROTECTED]>:
>
> Hi there,
>
> I am new to PHP classes and I do want to access a variable outside the
> class, but somehow that does not work. global also does not have any
> effect.
>
> In the following example I would like to be able to access $dbh from
> inside
gt; Hi there,
>
> I am new to PHP classes and I do want to access a variable outside the
> class, but somehow that does not work. global also does not have any
> effect.
>
> In the following example I would like to be able to access $dbh from
> inside the class like I did in
Refer to the global on the constructor.
Anyway, using a global like that is not a good practice. Just pass the
variable to the constructor.
2007/9/29, Merlin <[EMAIL PROTECTED]>:
>
> Hi there,
>
> I am new to PHP classes and I do want to access a variable outside the
> cl
Hi there,
I am new to PHP classes and I do want to access a variable outside the
class, but somehow that does not work. global also does not have any effect.
In the following example I would like to be able to access $dbh from
inside the class like I did in that example. This does not work
# [EMAIL PROTECTED] / 2007-02-08 01:14:43 +0100:
> 290function setOptions(&$db, $options)
> 291{
> 292if (is_array($options)) {
> 293foreach ($options as $option => $value) {
> 294$test = $db->setOption($option, $value);
> 295if (PEAR::isE
# [EMAIL PROTECTED] / 2007-02-08 11:27:13 +1100:
> Roman Neuhauser wrote:
> ># [EMAIL PROTECTED] / 2007-02-07 09:59:15 +1100:
> >>Roman Neuhauser wrote:
> >>># [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100:
> Have been reading posts daily for two months now on the list, and
> am very please
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-02-07 09:59:15 +1100:
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100:
Have been reading posts daily for two months now on the list, and am very
pleased at how informative these can be.
I have noticed, many examples where
# [EMAIL PROTECTED] / 2007-02-07 09:59:15 +1100:
> Roman Neuhauser wrote:
> ># [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100:
> >>Have been reading posts daily for two months now on the list, and am very
> >>pleased at how informative these can be.
> >>I have noticed, many examples where one is poi
On Tue, February 6, 2007 5:47 am, Tim wrote:
> Shouldn't these classes be perhaps broken down into usefull "parts".
Many of them started life as very small classes, and then the Feature
Requests started pouring in and...
Do feel free to take a class and delete all the bits you're not using,
if yo
On Wed, 2007-02-07 at 09:59 +1100, Chris wrote:
> Roman Neuhauser wrote:
> > # [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100:
> >> Have been reading posts daily for two months now on the list, and am very
> >> pleased at how informative these can be.
> >> I have noticed, many examples where one is
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100:
Have been reading posts daily for two months now on the list, and am very
pleased at how informative these can be.
I have noticed, many examples where one is pointed to using classes
downloadable on the internet.
This is
# [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100:
> Have been reading posts daily for two months now on the list, and am very
> pleased at how informative these can be.
> I have noticed, many examples where one is pointed to using classes
> downloadable on the internet.
> This is when i realized h
there are special design patterns for autoloading classes and subclasses to
use only we needed at runtime! this together with singeltons pattern will
prevent any memory overflows. problem is that almost nobody implements these
patterns when designing "standalone" classes
fra*
Hello folks,
Have
Hello folks,
Have been reading posts daily for two months now on the list, and am very
pleased at how informative these can be.
I have noticed, many examples where one is pointed to using classes
downloadable on the internet.
Not a very big user of these classes my self (maybe a bit naïf in thi
Martin Alterisio wrote:
> Forgot to mention that calling a non-static function this way should
> generate an E_STRICT warning.
and IIRC it will eventually be made a fatal error in php6, somebody
please correct me if I'm wrong!
>
> 2007/1/16, Martin Alterisio <[EMAIL PROTECTED]>:
>>
>> Backward c
Forgot to mention that calling a non-statical function this way should
generate an E_STRICT warning.
2007/1/16, Martin Alterisio <[EMAIL PROTECTED]>:
Backward compatibility with PHP4, where member functions couldn't be
declared as static. Any member function could be called statically providing
Backward compatibility with PHP4, where member functions couldn't be
declared as static. Any member function could be called statically providing
a static context instead of an object instance.
2007/1/16, Cheseldine, D. L. <[EMAIL PROTECTED]>:
Hi
I'm stuck on The Basics page of the php5 Object
[snip]
http://uk.php.net/manual/en/language.oop5.basic.php
The top example has the code:
A::foo();
even though foo is not declared static in its class. How does it get
called statically without being declared static?
[/snip]
foo() is a function and would not be static, it can be public (defau
Hi
I'm stuck on The Basics page of the php5 Object Model:
http://uk.php.net/manual/en/language.oop5.basic.php
The top example has the code:
A::foo();
even though foo is not declared static in its class. How does it get
called statically without being declared static?
regards
dave
--
PHP Gen
On 3/7/06, Wolf <[EMAIL PROTECTED]> wrote:
> I'm looking for a couple of good books or online sources where I can get
> a lot better grasp of Classes and OOP programming in general. Mostly I
> use PHP so that is the best option.
>
> Thanks,
> Robert
>
PHP5 - Objects, Patterns, and Best Practices
PHP5 Objects, Patterns and Practice
1590593804 - Matt Zandstra - Apress
This is a good way to get a good grasp of object-oriented programming
covers the basics of uml as well as using decent examples to explain
the use of objective programming (unlike all the web sites out there
that i tried to
I'm looking for a couple of good books or online sources where I can get
a lot better grasp of Classes and OOP programming in general. Mostly I
use PHP so that is the best option.
Thanks,
Robert
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.ph
Jason Gerfen wrote:
I am attempting to work up a class and because I am unfamiliar with some
of the code flow I am only able to get a return value of 'object'. How
can I pull the data out of a class?
which data? It doesn't seem as if anyone knows what your trying to do.
(try to explain it aga
I am attempting to work up a class and because I am unfamiliar with some
of the code flow I am only able to get a return value of 'object'. How
can I pull the data out of a class?
Any help, or pointers on what I am doing wrong is appreciated.
class myAuth
{
var $user;
var $pass;
var $lvl;
var
Hello!
I have a database and php classes and I'm not sure the best way I
should be retrieving the data.
as below, if 'other' (line 9) is stored in the database as an id of a
record in another table,
should my getData() method:
a. return the id as part of the MyObj obje
]
Sent: Tuesday, December 06, 2005 6:37 PM
To: php-general@lists.php.net
Subject: [PHP] Classes/Objects - Books/Links?
Hello,
I want to learn about classes and objects in PHP.
(IMHO) I would say that my understanding of functions is very good.
Any books that you could suggest that specifically
On Dec 6, 2005, at 6:39 PM, Chris Shiflett wrote:
Adam Trachtenberg's Upgrading to PHP 5 (O'Reilly) is a good book. It
covers all of the new features in PHP 5 (so it's not just OOP, sorry),
but the chapter on objects is excellent.
Hi Chris, thanks for the quick response. :) That book sounds g
Michael Hulse wrote:
Any books that you could suggest that specifically address just
classes/objects?
Adam Trachtenberg's Upgrading to PHP 5 (O'Reilly) is a good book. It
covers all of the new features in PHP 5 (so it's not just OOP, sorry),
but the chapter on objects is excellent.
Chris
-
Hello,
I want to learn about classes and objects in PHP.
(IMHO) I would say that my understanding of functions is very good.
Any books that you could suggest that specifically address just
classes/objects?
How-a-bout sites/links/tutorials on the web?
I am hoping that by learning how to use
On 11/4/05, Unknown Unknown <[EMAIL PROTECTED]> wrote:
> Hi everyone, i have some code that proccesses a login form. i have an object
> $DB which works only in SOME areas, this is the code:
>
[...]
> $DB="membersp";
> $SQL="SELECT ID FROM membersonline WHERE ID='$ID' ";
> $DB->Query($SQL);
[...]
>
On Thu, 2005-11-03 at 18:37 -0500, Unknown Unknown wrote:
> Hi everyone, i have some code that proccesses a login form. i have an object
> $DB which works only in SOME areas, this is the code:
>
> require_once("Include.php");
> global $DB;
There is no need to global $DB here. You are already in
Hi everyone, i have some code that proccesses a login form. i have an object
$DB which works only in SOME areas, this is the code:
Query($SQL);
$UserInfo=$DB->QueryInfo("Array");
if($UserInfo==0) $Login="FALSE";
else $Login="TRUE";
//Make Sure the user is not a duplicate user trying to log in agai
STFW
>-Original Message-
>From: Unknown Unknown [mailto:[EMAIL PROTECTED]
>Sent: 03 November 2005 00:05
>To: Jasper Bryant-Greene
>Cc: php-general@lists.php.net
>Subject: Re: [PHP] Classes and Functions
>
>
>Oh thanks agai
Robert Cummings wrote:
On Thu, 2005-11-03 at 12:15, Jasper Bryant-Greene wrote:
On Wed, 2005-11-02 at 19:05 -0500, Unknown Unknown wrote:
Oh thanks again
and what does RTFM mean?
Read The [insert your favourite word beginning with F here] Manual.
"Fondu"?? *licks lips*
you missed an '
On Thu, 2005-11-03 at 12:15, Jasper Bryant-Greene wrote:
> On Wed, 2005-11-02 at 19:05 -0500, Unknown Unknown wrote:
> > Oh thanks again
> > and what does RTFM mean?
>
> Read The [insert your favourite word beginning with F here] Manual.
"Fondu"?? *licks lips*
Cheers,
Rob.
--
.
On Wed, 2005-11-02 at 19:05 -0500, Unknown Unknown wrote:
> Oh thanks again
> and what does RTFM mean?
Read The [insert your favourite word beginning with F here] Manual.
--
Jasper Bryant-Greene
General Manager
Album Limited
e: [EMAIL PROTECTED]
w: http://www.album.co.nz/
b: http://jbg.name/
p:
Oh thanks again
and what does RTFM mean?
A thanks, i tried that before didn't seem to work, now it works
Thanks again!
On 11/2/05, Unknown Unknown <[EMAIL PROTECTED]> wrote:
>
> Hi everybody i have a class that i reference with:
> $DB= new DBInterface;
> outside a function it works fine, but using $DB inside a function changes
> the data type i think... i get an error saying i'm using a method on a
> non-object...
On Wed, 2005-11-02 at 18:56 -0500, Unknown Unknown wrote:
> Hi everybody i have a class that i reference with:
> $DB= new DBInterface;
> outside a function it works fine, but using $DB inside a function changes
> the data type i think... i get an error saying i'm using a method on a
> non-object...
Hi everybody i have a class that i reference with:
$DB= new DBInterface;
outside a function it works fine, but using $DB inside a function changes
the data type i think... i get an error saying i'm using a method on a
non-object...
any help appreciatted
It's really a matter of comfort level and opinion. There can be
strong arguments either way. Using just functions will be faster,
although the speed difference may be minimal and not noticeable.
Using just functions can be easier and quicker to develop, especially
for small projects.
But,
What this methods are better for php4? classes or functions
Does it better to use classes when I can write the codes with functions?
Excuseme for my bad english
What this methods are better for php4? classes or functions
Does it better to use classes when I can write the codes with
functions?
Excuseme for my bad english
Jochem Maas wrote:
also I believe print_r() and var_dump() have a few odditities regarding
display of recursion with regard to objects... internals mailinglist
archive
might tell you more on that.
I think I have the answer, when I pass a var to print_r it isn't passed
by reference, so there will
Evert|Rooftop Solutions wrote:
Hi,
I have this piece of code:
class test1 {
var
$data = 'hi',
$node = false;
function test1() {
$this->node =& new test2($this);
}
}
class test2 {
var
$data = 'yoyo',
Hi,
I have this piece of code:
class test1 {
var
$data = 'hi',
$node = false;
function test1() {
$this->node =& new test2($this);
}
}
class test2 {
var
$data = 'yoyo',
$root = false;
fu
-Original Message-
From: Phil Neeb [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 16, 2005 8:58 PM
> I've gone through the PHP Manual a few times now, reading about classes,
> but really, what's written there doesn't make a whole lot of sense to
> me. I know a lot, if not the vast ma
Greets,
I've gone through the PHP Manual a few times now, reading about classes,
but really, what's written there doesn't make a whole lot of sense to
me. I know a lot, if not the vast majority, of PHP programmers use
classes, so I was wondering if some of you could explain them to me.
What ar
You know... we talked about this several times before. Please search
the archives for the PHP list's answers.
Hint: STFA tutorial class object
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http:/
On Mon, 14 Mar 2005 23:30:51 +, Alister Bulman <[EMAIL PROTECTED]> wrote:
> On Mon, 14 Mar 2005 19:14:37 +0530, Zareef Ahmed <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > I have a function to load the classes and return the object.
> >
> > function LoadClass($ClassName)
> > {
> > require_once
On Mon, 14 Mar 2005 09:03:00 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]>
wrote:
>
> > Hi All,
> >
> > I have a function to load the classes and return the object.
> >
> > function LoadClass($ClassName)
> > {
> > require_once("Class.$ClassName.inc");
> > return new $ClassName();
> > }
> >
> >
> Hi All,
>
> I have a function to load the classes and return the object.
>
> function LoadClass($ClassName)
> {
> require_once("Class.$ClassName.inc");
> return new $ClassName();
> }
>
> Its working fine.
>
> But Zend Studio's Code completion is not working for this type of
> object, Any hints?
Hi All,
I have a function to load the classes and return the object.
function LoadClass($ClassName)
{
require_once("Class.$ClassName.inc");
return new $ClassName();
}
Its working fine.
But Zend Studio's Code completion is not working for this type of
object, Any hints?
Zareef Ahmed
--
PHP
Dmitry wrote:
> Greetings.
>
> If i run this code (php5):
> --
> class a {
> function say() { echo "A"; }
> function run() { $this->say(); }
> }
> class b extends a {
//> function say() { echo "B"; }
function say() { parent::say(); echo "B";}
> func
had to better myself...
Jochem Maas wrote:
Dmitry wrote:
Greetings.
If i run this code (php5):
--
class a {
function say() { echo "A"; }
function run() { $this->say(); }
}
class b extends a {
function say() { echo "B"; }
function run() { parent::run(); }
1 - 100 of 246 matches
Mail list logo