On Wed, 2013-08-07 at 19:02 -0600, Brian Smither wrote:
> >Your example does _not_ show this, it works
> >as expected and throws a notice, from which can be inferred there is other
> >code doing this
>
> Or relevant code having a side-effect not currently realized.
No, you just didn't post rele
>Your example does _not_ show this, it works
>as expected and throws a notice, from which can be inferred there is other
>code doing this
Or relevant code having a side-effect not currently realized.
>Is your class maybe inheriting from another one and that contains the code
>causing this issue?
>I have two dozen classes in this application. In every case, there will
>be a variable, the name of which is a lowercase variant of the class
>name, to which is assigned an instance of the class, when the class's
>construct() function completes. The example informs you of this.
>
Actually, as
> $hello = $clsHello;
If that conceptual statement (or any occurance of the conceptual $hello) were
in the code, then my (really good) Find feature of my code editor would have
found it.
> There are only a few variables that get assigned as side effects of
> functions, but they have very spe
On Wed, 2013-08-07 at 21:02 +0100, Stuart Dallas wrote:
> On 7 Aug 2013, at 20:45, "Brian Smither" wrote:
>
> >> I cannot replicate this.
> >
> > I don't expect anyone to be able to replicate this behavior. The example
> > shows an extraordinarily stripped-down sequence of statements that info
On 7 Aug 2013, at 20:45, "Brian Smither" wrote:
>> I cannot replicate this.
>
> I don't expect anyone to be able to replicate this behavior. The example
> shows an extraordinarily stripped-down sequence of statements that informs
> what should work, but do to some unknown agent, which, therefo
>I cannot replicate this.
I don't expect anyone to be able to replicate this behavior. The example shows
an extraordinarily stripped-down sequence of statements that informs what
should work, but do to some unknown agent, which, therefore, cannot be included
in the example, produces unexpected
On Wed, 2013-08-07 at 13:11 -0600, Brian Smither wrote:
> Second go around:
>
> I have a situation where, for some unknown reason, where each class that
> finishes its __contruct{} function, that class gets automatically assigned to
> a variable - other than the variable I specify.
>
> Concept
Second go around:
I have a situation where, for some unknown reason, where each class that
finishes its __contruct{} function, that class gets automatically assigned to a
variable - other than the variable I specify.
Conceptually (a little bit better on the conceptualizing):
class Hello {
priv
vate $_world = 'World'; __construct(){} }
>
This isn't even valid PHP
$ php -a
Interactive shell
php > class Hello { private $_world = 'World'; __construct(){} }
PHP Parse error: syntax error, unexpected '__construct' (T_STRING),
expecting function (T_FUNCTION
I have a situation where, for some unknown reason, where each class that
finishes its __contruct{} function, that class gets automatically assigned to a
variable - other than the variable I specify.
Conceptually:
class Hello { private $_world = 'World'; __construct(){} }
$clsHello = new Hello(
2012/3/15 Jeremy Wei :
> I read the manual about method visibility, but i can't understand the
> code below:
> class Bar
> {
> public function test() {
> $this->testPrivate();
> $this->testPublic();
> }
>
> public function testPublic() {
> echo "Bar::testPublic\n";
>
On 29 Nov 2011 at 17:01, cimodev wrote:
> Am 29.11.2011 16:56, schrieb Tim Streater:
>> Is there any benefit to setting a pointer to a class instance to null before
>> returning from a function? As in:
>>
>> function myfunc ()
>> {
>> $p = new myclass ();
>> // do stuff
>> $p
On 11/29/2011 7:56 AM, Tim Streater wrote:
> Is there any benefit to setting a pointer to a class instance to null before
> returning from a function? As in:
>
> function myfunc ()
> {
> $p = new myclass ();
> // do stuff
> $p = null;
> }
>
> Thanks.
>
> --
> Cheers --
Am 29.11.2011 16:56, schrieb Tim Streater:
> Is there any benefit to setting a pointer to a class instance to null before
> returning from a function? As in:
>
> function myfunc ()
> {
> $p = new myclass ();
> // do stuff
> $p = null;
> }
>
> Thanks.
>
>
No!
In this case
Is there any benefit to setting a pointer to a class instance to null before
returning from a function? As in:
function myfunc ()
{
$p = new myclass ();
// do stuff
$p = null;
}
Thanks.
--
Cheers -- Tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
Thanks all. Assuming is best then to add the static in this case. But
it isn't required if I birthed an object first and referenced the object,
correct? Am wanting to add some variables to the class so not calling the same
query so many times...
Thanks again.
George
On 2011-06-
All of the above with a clarification: they are instance methods which you
are calling statically. The object is not instantiated in this case. PHP
allows this but will issue an E_STRICT warning. To remove the warning just
add "static" before each of them, assuming they are only ever called
statica
On Thu, Jun 09, 2011 at 03:42:49PM -0600, George Langley wrote:
> Hi all. Am fixing some inherited code, and the previous coder created a
> class, ie:
>
> class myClass {
> function &doThis($passedVar) {
> doSomething;
> }
>
> function &doThat($anotherVar)
On 9 June 2011 22:42, George Langley wrote:
> Hi all. Am fixing some inherited code, and the previous coder created
> a class, ie:
>
> class myClass {
> function &doThis($passedVar) {
> doSomething;
> }
>
> function &doThat($anotherVar) {
>
Hi all. Am fixing some inherited code, and the previous coder created a
class, ie:
class myClass {
function &doThis($passedVar) {
doSomething;
}
function &doThat($anotherVar) {
doSomethingElse;
}
}
BUT, I don't see anywhere
On 13 April 2011 19:04, Floyd Resler wrote:
> That didn't quite work. Here's what I did:
> $const=$argv[1];
> $value=email::$const;
>
> When I run it I get an "Access to undeclared static property" error.
>
> Thanks!
> Floyd
>
> On Apr 13, 2011, at 1:16 PM, Richard Quadling wrote:
>
>> On 13 Apri
David,
That worked great!
Thanks!
Floyd
On Apr 13, 2011, at 2:25 PM, David Harkness wrote:
> On Wed, Apr 13, 2011 at 11:04 AM, Floyd Resler wrote:
>
>> That didn't quite work. Here's what I did:
>> $const=$argv[1];
>> $value=email::$const;
>>
>
> Instead try this:
>
> $const = $argv
On Wed, Apr 13, 2011 at 11:04 AM, Floyd Resler wrote:
> That didn't quite work. Here's what I did:
> $const=$argv[1];
> $value=email::$const;
>
Instead try this:
$const = $argv[1];
$reflector = new ReflectionClass('email');
$value = $reflector->getConstant($const);
David
That didn't quite work. Here's what I did:
$const=$argv[1];
$value=email::$const;
When I run it I get an "Access to undeclared static property" error.
Thanks!
Floyd
On Apr 13, 2011, at 1:16 PM, Richard Quadling wrote:
> On 13 April 2011 17:45, Floyd Resler wrote:
>> I'm doing some testing fro
On 13 April 2011 17:45, Floyd Resler wrote:
> I'm doing some testing from the command line and would like to be able =
> to pass along a constant from a class. For example:
> php emailTest.,php OrderConfirmation
>
> OrderConfirmation is a constant in a class. Is there any way I can take =
> the
I'm doing some testing from the command line and would like to be able =
to pass along a constant from a class. For example:
php emailTest.,php OrderConfirmation
OrderConfirmation is a constant in a class. Is there any way I can take =
the value passed on the command line and have PHP figure out
Larry,
I suggested the docblock tag because it seemed you didn't want to mandate
that plugins that extend other plugins be forced to include the interface in
an actual PHP implements clause. Duplicating the implements clause doesn't
cause any problems for PHP as you said, so that's one route.
Adv
> -Original Message-
> From: Steve Staples [mailto:sstap...@mnsi.net]
> Sent: Thursday, January 20, 2011 5:16 AM
> To: Larry Garfield
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Class and interface location
>
> On Wed, 2011-01-19 at 21:46 -0600, Larr
On Wed, 2011-01-19 at 21:46 -0600, Larry Garfield wrote:
> On Wednesday, January 19, 2011 8:56:50 pm Tommy Pham wrote:
>
> > > And actually, thinking about it, I wonder if requiring the explicit
> > declaration
> > > is a good thing anyway because then it's immediately obvious and
> > > greppable
On 20 January 2011 03:46, Larry Garfield wrote:
> Does that make it clearer what I'm trying to do?
Some ideas. I've no idea if any of them are any good.
1 - All plugins implement a self-registration mechanism.
A analogy to this in the Windows world would be an ActiveX component.
All ActiveX com
> -Original Message-
> From: Larry Garfield [mailto:la...@garfieldtech.com]
> Sent: Wednesday, January 19, 2011 7:47 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Class and interface location
>
> On Wednesday, January 19, 2011 8:56:50 pm Tommy Pham wrote:
On Wednesday, January 19, 2011 8:56:50 pm Tommy Pham wrote:
> > And actually, thinking about it, I wonder if requiring the explicit
> declaration
> > is a good thing anyway because then it's immediately obvious and
> > greppable what the class does. :-)
> >
> > --Larry Garfield
>
> You mean requ
> -Original Message-
> From: la...@garfieldtech.com [mailto:la...@garfieldtech.com]
> Sent: Wednesday, January 19, 2011 2:21 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Class and interface location
>
> On 1/19/11 3:44 PM, David Harkness wrote:
> > W
How often would this profiling have to happen? Seems to me that if
it's a "once per build" or "once per someone pressing the button",
then go for the more expensive analysis checking through the files.
Just build up a tree that shows which classes implement what or
inherit from where, save that alo
On 1/19/11 3:44 PM, David Harkness wrote:
What about creating your own docblock tag such as @plugin-interface? While
it still requires each plugin to explicitly define the interface(s) it
implements, it won't be in the class declaration. This would be very easy to
nab for a tree of files using gr
What about creating your own docblock tag such as @plugin-interface? While
it still requires each plugin to explicitly define the interface(s) it
implements, it won't be in the class declaration. This would be very easy to
nab for a tree of files using grep, removing the need to do any static
analy
On 1/19/11 10:52 AM, Richard Quadling wrote:
There is a pecl extension called inclued [1]&[2] which could be used I
think.
It can be used to produce a list of all the relationships between
included files, so a one off pass of all the class files (simply
include them) and then retrieve the a
On 1/19/11 11:16 AM, Adam Richardson wrote:
As long as the static analysis tool builds a composite of class
hierarchy
established in all the files (project wide, at least in terms of the
plugin), you wouldn't have to double declare interfaces so they could be
detected.
Adam
That is essentia
On Wed, Jan 19, 2011 at 11:23 AM, la...@garfieldtech.com <
la...@garfieldtech.com> wrote:
> On 1/19/11 10:09 AM, Adam Richardson wrote:
>
>> On Wed, Jan 19, 2011 at 8:21 AM, Richard Quadling> >wrote:
>>
>> On 19 January 2011 07:46, Adam Richardson wrote:
>>>
On Wed, Jan 19, 2011 at 2:07 AM,
On 19 January 2011 16:23, la...@garfieldtech.com wrote:
> On 1/19/11 10:09 AM, Adam Richardson wrote:
>>
>> On Wed, Jan 19, 2011 at 8:21 AM, Richard
>> Quadlingwrote:
>>
>>> On 19 January 2011 07:46, Adam Richardson wrote:
On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfield>>> wrote:
>
On 1/19/11 10:09 AM, Adam Richardson wrote:
On Wed, Jan 19, 2011 at 8:21 AM, Richard Quadlingwrote:
On 19 January 2011 07:46, Adam Richardson wrote:
On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfield
3) Static analysis. Instead of reflection, either tokenize or string
parse
all files to deter
On Wed, Jan 19, 2011 at 8:21 AM, Richard Quadling wrote:
> On 19 January 2011 07:46, Adam Richardson wrote:
> > On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfield >wrote:
> >
> >> 3) Static analysis. Instead of reflection, either tokenize or string
> parse
> >> all files to determine what classes
On Wed, 2011-01-19 at 01:07 -0600, Larry Garfield wrote:
> Hi all. I'm trying to come up with a solution to an architectural problem I
> could use some extra eyes on.
>
> I have (or will have) a large code base with lots of classes, spread out over
> many optional plugin components. These clas
On 19 January 2011 07:46, Adam Richardson wrote:
> On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfield wrote:
>
>> 3) Static analysis. Instead of reflection, either tokenize or string parse
>> all files to determine what classes implement what interfaces and then
>> cache
>> that information. We are
On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfield wrote:
> 3) Static analysis. Instead of reflection, either tokenize or string parse
> all files to determine what classes implement what interfaces and then
> cache
> that information. We are actually using this method now to locate classes,
> and
Hi all. I'm trying to come up with a solution to an architectural problem I
could use some extra eyes on.
I have (or will have) a large code base with lots of classes, spread out over
many optional plugin components. These classes, of course, will have
interfaces on them. These classes will,
s should be a
> > fast solution, while still giving you the power of encapsulation, getters
> > and setters.
> >
> > Hope that helps!
> > Chris.
> >
>
> Hi Chris,
>
> Thanks for the reply. The sample I made is just for simplicity and
> comparison.
rs and
> setters would key off that element of the master array. This should be a
> fast solution, while still giving you the power of encapsulation, getters
> and setters.
>
> Hope that helps!
> Chris.
>
Hi Chris,
Thanks for the reply. The sample I made is just for simplicity and
c
On Tue, Oct 12, 2010 at 2:38 AM, Tommy Pham wrote:
> Hi everyone,
>
> It's been a couple years since I've did a project in PHP. The current
> project I'm working on is for PHP 5.3 and I noticed a performance issue.
> Is
> it just me or is there a BIG difference in performance between class obje
Hi everyone,
It's been a couple years since I've did a project in PHP. The current
project I'm working on is for PHP 5.3 and I noticed a performance issue. Is
it just me or is there a BIG difference in performance between class object
vs array for PHP 5.3? Below is the sample:
class MyTable
{
ctober 06, 2010 9:09 PM
Subject: Re: [PHP] Class mysqli not found
On Wed, 2010-10-06 at 21:00 +0100, sueandant wrote:
I'm still fighting a losing battle in my attempts to get PHP speak to
mysqli. I can access MySql via the prompt. Apache and PHP are installed
and working. In Apache
> -Original Message-
> From: chris h [mailto:chris...@gmail.com]
> Sent: Wednesday, October 06, 2010 1:44 PM
> To: Alejandro Michelin Salomon
> Cc: sueandant; php-general@lists.php.net
> Subject: Re: [PHP] Class mysqli not found
>
> mysqli is set of functions
I'm running phpinfo from my browser under localhost.
- Original Message -
From: chris h
To: sueandant
Cc: PHP
Sent: Wednesday, October 06, 2010 10:12 PM
Subject: Re: RES: [PHP] Class mysqli not found
Are you doing phpinfo() off the CLI or via apache mod? Is it the
mysqli.max_persistent Unlimited Unlimited
> mysqli.reconnect Off Off
>
> - Original Message - From: "Simon J Welsh"
> To: "Alejandro Michelin Salomon"
> Cc: "'sueandant'" ; <
> php-general@lists.php.net>
> Sent: We
mysqli.max_links Unlimited Unlimited
mysqli.max_persistent Unlimited Unlimited
mysqli.reconnect Off Off
- Original Message -
From: "Simon J Welsh"
To: "Alejandro Michelin Salomon"
Cc: "'sueandant'" ;
Sent: Wednesday, October 06, 2010 9:43 PM
Subjec
I've tried this and get the same error message.
- Original Message -
From: "Alejandro Michelin Salomon"
To: "'sueandant'"
Cc:
Sent: Wednesday, October 06, 2010 9:33 PM
Subject: RES: [PHP] Class mysqli not found
Sueandant :
mysqli is set of
Yes, I've run phpinfo() and mysqli is listed in the detailed output.
- Original Message -
From: "Jay Blanchard"
To: "sueandant" ;
Cc: "PHP"
Sent: Wednesday, October 06, 2010 9:31 PM
Subject: RE: [PHP] Class mysqli not found
[snip]
When I run thi
t; printf("Host information: %s\n", mysqli_get_host_info($mysqli));
> }
>
>
> Try adodb lib for php ( http://adodb.sourceforge.net/ ), is great layer on
> top of php db functions.
>
> Alejandro M.S.
>
> -Mensagem original-
> De: sueandant [mailto:hollandsath...@ti
> Alejandro M.S.
>
> -Mensagem original-
> De: sueandant [mailto:hollandsath...@tiscali.co.uk]
> Enviada em: quarta-feira, 6 de outubro de 2010 17:27
> Para: sstap...@mnsi.net
> Cc: PHP
> Assunto: Re: [PHP] Class mysqli not found
>
> Thanks Steve. Her
x27;php-general@lists.php.net'
Assunto: RES: [PHP] Class mysqli not found
Sueandant :
mysqli is set of functions not a class. The name to connect is mysqli_connect
/**
*
*
* @version $Id$
* @copyright 2010
*/
$mysqli = mysqli_connect ("localhost", "root", "woodcote",
sueandant [mailto:hollandsath...@tiscali.co.uk]
Enviada em: quarta-feira, 6 de outubro de 2010 17:27
Para: sstap...@mnsi.net
Cc: PHP
Assunto: Re: [PHP] Class mysqli not found
Thanks Steve. Here's the php file:
When I run this small program I get a Fatal Error: Class mysqli not found
er
[snip]
When I run this small program I get a Fatal Error: Class mysqli not
found
error message.
[/snip]
Have you run a simple phpinfo(); to see if you have the mysqli module?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks Steve. Here's the php file:
When I run this small program I get a Fatal Error: Class mysqli not found
error message.
- Original Message -
From: "Steve Staples"
To: "sueandant"
Cc: "PHP"
Sent: Wednesday, October 06, 2010 9:09 PM
On Wed, 2010-10-06 at 21:00 +0100, sueandant wrote:
> I'm still fighting a losing battle in my attempts to get PHP speak to mysqli.
> I can access MySql via the prompt. Apache and PHP are installed and
> working. In Apache's config file PHPIniDir is set to "C:\php", which is
> where I unzipp
I'm still fighting a losing battle in my attempts to get PHP speak to mysqli.
I can access MySql via the prompt. Apache and PHP are installed and working.
In Apache's config file PHPIniDir is set to "C:\php", which is where I unzipped
the binary download files, and set LoadModule php5_module
Gary . wrote:
> On Mon, Apr 19, 2010 at 3:12 PM, Ashley Sheridan wrote:
>> On 19 April 2010 14:24, Gary wrote:
>
>>> Okay. Why not?
> ...
>> Class constants must be defined with static values, not variables. They are
>> constants after all! If they relied on the value of a variable, surely that
On Mon, Apr 19, 2010 at 7:25 AM, Peter Lind wrote:
> Per the PHP manual: "The value must be a constant expression". Is
> something that depends on other classes, variables or functions
> constant?
>
When I came up against this problem myself, I read "a constant expression"
to mean "an expression
On Mon, Apr 19, 2010 at 10:25 AM, Peter Lind wrote:
> On 19 April 2010 16:18, Gary . wrote:
> > On Mon, Apr 19, 2010 at 2:37 PM, Peter Lind
> wrote:
> >> On 19 April 2010 14:24, Gary wrote:
> >>> On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote:
> >
> So no, you shouldn't be able to do t
On 19 April 2010 16:18, Gary . wrote:
> On Mon, Apr 19, 2010 at 2:37 PM, Peter Lind wrote:
>> On 19 April 2010 14:24, Gary wrote:
>>> On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote:
>
So no, you shouldn't be able to do that.
>>>
>>> Okay. Why not?
>>
>> Hate to ask, but did you at any po
On Mon, Apr 19, 2010 at 3:12 PM, Ashley Sheridan wrote:
> On 19 April 2010 14:24, Gary wrote:
> > Okay. Why not?
...
> Class constants must be defined with static values, not variables. They are
> constants after all! If they relied on the value of a variable, surely that
> would mean that their
On Mon, Apr 19, 2010 at 2:37 PM, Peter Lind wrote:
> On 19 April 2010 14:24, Gary wrote:
>> On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote:
>>> So no, you shouldn't be able to do that.
>>
>> Okay. Why not?
>
> Hate to ask, but did you at any point consider to read the PHP docs on
> this? The
On Mon, 2010-04-19 at 14:37 +0200, Peter Lind wrote:
> On 19 April 2010 14:24, Gary . wrote:
> > On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote:
> >> On 19 April 2010 10:30, Gary wrote:
> >>> Should I be able to do this:
> >>>
> >>> class X
> >>> {
> >>> const FOO = 'foo';
> >>> const FOOBA
On 19 April 2010 14:24, Gary . wrote:
> On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote:
>> On 19 April 2010 10:30, Gary wrote:
>>> Should I be able to do this:
>>>
>>> class X
>>> {
>>> const FOO = 'foo';
>>> const FOOBAR = X::FOO . 'bar';
>>>
>>> ...
>>> }
>
>> So no, you shouldn't be able
On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote:
> On 19 April 2010 10:30, Gary wrote:
>> Should I be able to do this:
>>
>> class X
>> {
>> const FOO = 'foo';
>> const FOOBAR = X::FOO . 'bar';
>>
>> ...
>> }
> So no, you shouldn't be able to do that.
Okay. Why not?
--
PHP General Mailing L
On 19 April 2010 10:30, Gary . wrote:
> Should I be able to do this:
>
> class X
> {
> const FOO = 'foo';
> const FOOBAR = X::FOO . 'bar';
>
> ...
> }
>
> ?
>
> Because I can't. I get "syntax error, unexpected '.', expecting ',' or
> ';'". I assume this is because the constants are like statics
Should I be able to do this:
class X
{
const FOO = 'foo';
const FOOBAR = X::FOO . 'bar';
...
}
?
Because I can't. I get "syntax error, unexpected '.', expecting ',' or
';'". I assume this is because the constants are like statics which
can't be initialised by functions etc. but is there rea
On Thursday 15 April 2010 08:37:40 am Ashley Sheridan wrote:
> I know I could move it to __construct and give it a default value in the
> arguments list, but that brings it's own problems. What if the argument
> list grows too big, and which attribute would be deemed more important
> than another
> -Original Message-
> From: Fernando [mailto:ferna...@ggtours.ca]
> Sent: Thursday, April 15, 2010 10:24 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] class attributes and __construct
>
> Hello Ashely,
>
> I would initialize the variable when I
5/04/2010 11:54, Ashley Sheridan wrote:
On Thu, 2010-04-15 at 07:42 -0700, Tommy Pham wrote:
Hi Ashley,
-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thursday, April 15, 2010 6:38 AM
To: PHP General List
Subject: [PHP] class attributes and __con
On Thu, 2010-04-15 at 07:42 -0700, Tommy Pham wrote:
> Hi Ashley,
>
> > -Original Message-
> > From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> > Sent: Thursday, April 15, 2010 6:38 AM
> > To: PHP General List
> > Subject: [PHP] class attribu
Hi Ashley,
> -Original Message-
> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> Sent: Thursday, April 15, 2010 6:38 AM
> To: PHP General List
> Subject: [PHP] class attributes and __construct
>
> I think this is probably going to end up as one of those
I think this is probably going to end up as one of those coders'
preference type of things, but I was wondering what was considered the
general best approach.
When creating a class, you can define default values for the object in
the class itself, and within the __construct function. Now, while I
I looked into registries (singleton registries), and while I can see the
advantage they provide, most every article I read advised AGAINST using
singleton registries because it creates extra dependencies (ie. a file needs
the database class AND the registry class instead of just the database
class)
Allen,
Before you go with my static-approach, please do consider Shawn's registry
pattern suggestion. That's pretty sweet too ;-).
A little response to your long text, before I help you fix the bug. A static
property is basically the same as a regular property on an object. Only
difference is tha
Sorry, and then I didn't keep it on list :-(
Shawn McKenzie wrote:
> Please reply to the list. Just google for "php registry pattern". Here is a
> very basic example. There are better OOP people here than I.
>
> class Registry {
> protected $_objects = array();
>
> function set($name,
Wouter,
Implementing your static idea was pretty easy, I was already referencing
Notifier with the :: operator in my other methods, however I am running into
trouble assigning new values to the static array.
I am getting a "syntax error, unexpected '[' " on this line of my Notifier
class:
Notifi
teSingle($id, 1); // This completes a function within
> Meetgreet class. That function needs to be able to use the Notifier
> function
> addtoQ(), how would this be accomplished?
>
> ?>
> ...
> ...
>
> printQ() ?>
>
> On Mon, Dec 14, 2009 at 6:07 PM,
Allen McCabe wrote:
> Hey all (and Nirmalya, thanks for the help!),
>
>
> I have a question that I just can't seem to find via Google.
>
> I want to be able to add messages to a qeue whenever my classes complete (or
> fail to complete) specific functions. I think have a call within my html to
>
be accomplished?
?>
...
...
printQ() ?>
On Mon, Dec 14, 2009 at 6:07 PM, Nirmalya Lahiri
wrote:
> --- On Tue, 12/15/09, Allen McCabe wrote:
>
> > From: Allen McCabe
> > Subject: [PHP] Class not functioning
> > To: "phpList"
> > Date: Tuesday, Dec
--- On Tue, 12/15/09, Allen McCabe wrote:
> From: Allen McCabe
> Subject: [PHP] Class not functioning
> To: "phpList"
> Date: Tuesday, December 15, 2009, 6:17 AM
> Hey everyone, I just delved into
> classes recently and have been having
> moderate success so fa
Hey everyone, I just delved into classes recently and have been having
moderate success so far.
I have a puzzler though.
I have the following class decalred and instantiated:
class Notify {
var $q = array();
public function addtoQ($string, $class)
{
$message = ''. $string .'';
$this->q[]
Hi
This is my first class and it does not work, i do a return
$this->responseArray; with the public function getResult() method, but get
nothing. Can someone please help me.
Thsi is how i create the object
$number = new Smsgate($cell_numbers, $message, "27823361602", "27");
$result = $number->g
Tom Worster wrote:
On 10/4/09 9:39 AM, "Michael A. Peters" wrote:
I wrote a php class to generate flowplayer/html5 media code for my site:
http://www.shastaherps.org/xml_MMmediaClass.phps
The "buildFlashvars()" function in it is really ugly and will be a pain
to update a
> I'm thinking (hoping) there is already a php class somewhere for
> generating JavaScript object strings that I can instead of my ugly
> easily breakable way of doing it.
>
> Anyone know of one?
json_encode
http://uk3.php.net/manual/en/function.json
On 10/4/09 9:39 AM, "Michael A. Peters" wrote:
> I wrote a php class to generate flowplayer/html5 media code for my site:
>
> http://www.shastaherps.org/xml_MMmediaClass.phps
>
> The "buildFlashvars()" function in it is really ugly and will be a pain
>
I wrote a php class to generate flowplayer/html5 media code for my site:
http://www.shastaherps.org/xml_MMmediaClass.phps
The "buildFlashvars()" function in it is really ugly and will be a pain
to update as I modify the class in the future.
What it does is generate a JavaScript obj
Hi,
I have developed a listing site which is totally class based. Now when it
authenticates a user login and set appropriate class variables to true and
set user info in user class variables, value of all the set variables are
lost when I forward the user to members page. When I check the the valu
Ashley Sheridan wrote:
On Tue, 2009-08-11 at 17:57 +0200, Aschwin Wesselius wrote:
Ashley Sheridan wrote:
And I really would use a PHP 5 server given the choice. I've tried
speaking to the hosting company a few times, but they brush me off!
Hi Ashley,
And how is their SLA then? Do you take
On Tue, 2009-08-11 at 17:57 +0200, Aschwin Wesselius wrote:
> Ashley Sheridan wrote:
> > And I really would use a PHP 5 server given the choice. I've tried
> > speaking to the hosting company a few times, but they brush me off!
> >
> Hi Ashley,
>
> And how is their SLA then? Do you take full re
1 - 100 of 591 matches
Mail list logo