[PHP] objects and $_SESSION access control

2010-10-26 Thread Lorenzo Marussi
hi List, I have written a library of php classes to manage database objects. So my application now access to this library instead of accessing directly to the database. Now, I need to add an access control to my classes, like a check to a $_SESSION variable. A solution can be add this lines in f

Re: [PHP] Objects and Arrays Conversion

2008-12-03 Thread Nathan Nobbe
On Tue, Dec 2, 2008 at 7:48 PM, Micah Gersten <[EMAIL PROTECTED]> wrote: > VamVan wrote: > > Hello All, > > > > I was stuck with this issue. So just felt the need to reach out to other > > strugglers. > > May be people might enjoy this: > > > > Here is the code for object to array and array to obj

Re: [PHP] Objects and Arrays Conversion

2008-12-02 Thread Micah Gersten
VamVan wrote: > Hello All, > > I was stuck with this issue. So just felt the need to reach out to other > strugglers. > May be people might enjoy this: > > Here is the code for object to array and array to object conversion: > > function object_2_array($data) > { > if(is_array($data) || is_obje

[PHP] Objects and Arrays Conversion

2008-12-02 Thread VamVan
Hello All, I was stuck with this issue. So just felt the need to reach out to other strugglers. May be people might enjoy this: Here is the code for object to array and array to object conversion: function object_2_array($data) { if(is_array($data) || is_object($data)) { $result

Re: [PHP] Objects and Traversing

2008-06-04 Thread Jim Lucas
VamVan wrote: Hello Guys, Here is the object. How can I get access to the [Name] = access. People who help me with this can you please tell me what is the logic behind traversing the objects and how do you gather the values. Thanks. I am looking for an answer like this $queryResult->f->dsfsd

Re: [PHP] Objects and Traversing

2008-06-04 Thread Ted Wood
You should be able to access the "Name" field using this syntax: QueryResult->records[0]->sobjects[0]->fields->Name Reading from left-to-right: 1. accessing index 0 (zero) of the "records" array. 2. accessing index 0 (zero) of the "objects" array. 3. accessing the "Name" property of the "fields

[PHP] Objects and Traversing

2008-06-04 Thread VamVan
Hello Guys, Here is the object. How can I get access to the [Name] = access. People who help me with this can you please tell me what is the logic behind traversing the objects and how do you gather the values. Thanks. I am looking for an answer like this $queryResult->f->dsfsdf QueryResult O

Re: [PHP] objects stored in sessions

2008-04-08 Thread Julien Pauli
Just a customer of mine who said that he'll be running PHP 4 and 5 on the same server, and that he would share session data ;-) Bye. Julien.P 2008/4/7 Richard Heyes <[EMAIL PROTECTED]>: > Have you seen how PHP makes difference between private, protected and > > public > > attributes of an object

Re: [PHP] objects stored in sessions

2008-04-07 Thread Richard Heyes
Have you seen how PHP makes difference between private, protected and public attributes of an object, into the session file ? There are special caracters before them to recognize them. So the question is : is PHP4 able to read such a session file ? And how will it interpret them when we ask him t

Re: [PHP] objects stored in sessions

2008-04-07 Thread Julien Pauli
Have you seen how PHP makes difference between private, protected and public attributes of an object, into the session file ? There are special caracters before them to recognize them. So the question is : is PHP4 able to read such a session file ? And how will it interpret them when we ask him to

Re: [PHP] objects stored in sessions

2008-04-06 Thread Kevin Waterson
On Sun, 2008-04-06 at 11:02 -0400, Mark Weaver wrote: > So, if I create a user object, set the properties of said user object > and store that object in the user session will that object be available > throughout the application from the session? http://phpro.org/tutorials/Introduction-To-PHP-

Re: [PHP] objects stored in sessions

2008-04-06 Thread Mark Weaver
Richard Heyes wrote: So, if I create a user object, set the properties of said user object and store that object in the user session will that object be available throughout the application from the session? Yes. Just remember to include the class definition before you start the session on su

Re: [PHP] objects stored in sessions

2008-04-06 Thread Richard Heyes
So, if I create a user object, set the properties of said user object and store that object in the user session will that object be available throughout the application from the session? Yes. Just remember to include the class definition before you start the session on subsequent pages, otherw

[PHP] objects stored in sessions

2008-04-06 Thread Mark Weaver
Hi All, I've got something on my little mind, and please keep in mind I'm still somewhat new to PHP Oop, so please excuse my silly ass if I ask something that should be obvious. I've got an application that I'm re-writing from PERL to PHP Oop. At the beginning of the application, at log in,

Re: [PHP] Objects as array key names??

2008-03-19 Thread Nathan Nobbe
On Wed, Mar 19, 2008 at 10:37 AM, Jim Lucas <[EMAIL PROTECTED]> wrote: > I would be interested in your examples. From what you described, I can't > see in > my head how it all goes together. > there was one caveat; i had to introduce a keyVal() instance method so client code can get the object t

Re: [PHP] Objects as array key names??

2008-03-19 Thread Jim Lucas
Nathan Nobbe wrote: another developer brought to my attention the spl method spl_object_hash() method which afforded a mod in the previously posted class whereby foreach could be used properly. also, it allows a more efficient internal implementation. however, to my dismay, it appears that impl

Re: [PHP] Objects as array key names??

2008-03-18 Thread Nathan Nobbe
another developer brought to my attention the spl method spl_object_hash() method which afforded a mod in the previously posted class whereby foreach could be used properly. also, it allows a more efficient internal implementation. however, to my dismay, it appears that implementing ArrayAccess d

Re: [PHP] Objects as array key names??

2008-03-16 Thread Jim Lucas
Sorry for the long post, but I thought it would explain much of my thinking... Anyway, here we go... Jeremy Mcentire wrote: You may have meant the while loop to iterate over $row = fetch_object($res) ... You are correct, I was simply trying to get the concept across. But you are correct,

Re: [PHP] Objects as array key names??

2008-03-16 Thread Jim Lucas
Robert Cummings wrote: On Sun, 2008-03-16 at 11:42 -0700, Jim Lucas wrote: Robert Cummings wrote: Imagine 200 customers in your example... your example will hit the DB 201 times. The above hits the DB twice. My code was intended to get the concept across. Thanks for the suggestions though.

Re: [PHP] Objects as array key names??

2008-03-16 Thread Robert Cummings
On Sun, 2008-03-16 at 11:42 -0700, Jim Lucas wrote: > Robert Cummings wrote: > > Imagine 200 customers in your example... your example will hit the DB > > 201 times. The above hits the DB twice. > > My code was intended to get the concept across. Thanks for the > suggestions though. Ah, ok. I'

Re: [PHP] Objects as array key names??

2008-03-16 Thread Jim Lucas
Richard Heyes wrote: Hi, Going off the subject alone, you might want to investigate the __tostring() magic method that you can define to handle objects being cast to a string. Also, there's a whole bunch of magic methods that you can use to handle PHP operations on user defined objects: htt

Re: [PHP] Objects as array key names??

2008-03-16 Thread Jim Lucas
Robert Cummings wrote: Imagine 200 customers in your example... your example will hit the DB 201 times. The above hits the DB twice. My code was intended to get the concept across. Thanks for the suggestions though. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Objects as array key names??

2008-03-16 Thread Nathan Nobbe
after talking w/ marcus it sounds like theyve explicitly decided not to support objects in the aforementioned context. -nathan

Re: [PHP] Objects as array key names??

2008-03-16 Thread Nathan Nobbe
On Sat, Mar 15, 2008 at 6:02 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > It has been brought to my attention that with Perl and Ruby, you can use > Objects as the value of the key within an array. The examples that were > shown to me make me think that this would be an awesome ability to have > wi

Re: [PHP] Objects as array key names??

2008-03-16 Thread Richard Heyes
Hi, Going off the subject alone, you might want to investigate the __tostring() magic method that you can define to handle objects being cast to a string. Also, there's a whole bunch of magic methods that you can use to handle PHP operations on user defined objects: http://uk.php.net/manual/

Re: [PHP] Objects as array key names??

2008-03-15 Thread Robert Cummings
On Sat, 2008-03-15 at 15:02 -0700, Jim Lucas wrote: > This question should probably be directed at the PHP Internals list, but > I thought I would start by asking here first if anybody would even use > this feature. > > It has been brought to my attention that with Perl and Ruby, you can use >

Re: [PHP] Objects as array key names??

2008-03-15 Thread Jeremy Mcentire
On Mar 15, 2008, at 7:16 PM, Ray Hauge wrote: Jim Lucas wrote: It has been brought to my attention that with Perl and Ruby, you can use Objects as the value of the key within an array. The examples that were shown to me make me think that this would be an awesome ability to have within PHP

Re: [PHP] Objects as array key names??

2008-03-15 Thread Ray Hauge
Jim Lucas wrote: This question should probably be directed at the PHP Internals list, but I thought I would start by asking here first if anybody would even use this feature. It has been brought to my attention that with Perl and Ruby, you can use Objects as the value of the key within an arr

[PHP] Objects as array key names??

2008-03-15 Thread Jim Lucas
This question should probably be directed at the PHP Internals list, but I thought I would start by asking here first if anybody would even use this feature. It has been brought to my attention that with Perl and Ruby, you can use Objects as the value of the key within an array. The examples

Re: [PHP] Objects

2007-08-08 Thread Nathan Nobbe
On 8/8/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > > On Tue, July 31, 2007 8:40 am, Eric Butera wrote: > > On 7/31/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > >> i > >> feel sorry for Richard; if youd ever seen a successful > >> implementation of > >> design patterns in the wild > >> well you

Re: [PHP] Objects

2007-08-07 Thread Robert Cummings
On Tue, 2007-08-07 at 23:44 -0500, Richard Lynch wrote: > > I'm not trying to be a jerk or pick a fight here, but am suggesting > list members think about this before they post. Especially that whole > PHP-Editors thread, which always consists of one person from each camp > posting their favorite

Re: [PHP] Objects

2007-08-07 Thread Richard Lynch
On Tue, July 31, 2007 8:40 am, Eric Butera wrote: > On 7/31/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: >> i >> feel sorry for Richard; if youd ever seen a successful >> implementation of >> design patterns in the wild >> well you would probly feel like i do... gotta have em :) This post is a res

Re: [PHP] Objects

2007-07-31 Thread Nathan Nobbe
well im not trying to convince everyone to start doing oop, just because i dont have time. maybe if i get rich and have time ill go on a dedicated mission or something. anyway i think its obvious that objects are powerful. look at the big php projects out there; wikipedia, facebook, many of the n

Re: [PHP] Objects

2007-07-31 Thread tedd
At 1:25 AM -0500 7/31/07, Richard Lynch wrote: On Sun, July 29, 2007 12:45 pm, Nathan Nobbe wrote: one of the hardest parts about using design patterns in reality is you have to be able to recognize a certain problem and then you can begin to understand how to apply a particular pattern or

Re: [PHP] Objects

2007-07-31 Thread Eric Butera
On 7/31/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > On 7/31/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > > Or, in my experience with pattern zealots, mis-recognize a problem as > > a pattern it isn't, mis-apply the "solution" and then spend years > > dealing with a square peg in a round hole.

Re: [PHP] Objects

2007-07-31 Thread Nathan Nobbe
> On 7/31/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > Or, in my experience with pattern zealots, mis-recognize a problem as > a pattern it isn't, mis-apply the "solution" and then spend years > dealing with a square peg in a round hole... The funny thing about that is w/ OOP and design patterns

Re: [PHP] Objects

2007-07-30 Thread Richard Lynch
On Sun, July 29, 2007 12:45 pm, Nathan Nobbe wrote: > one of the hardest parts about using design patterns in reality is you > have > to be able to recognize a certain > problem and then you can begin to understand how to apply a particular > pattern or set of patterns to your > solution. Or, in m

Re: [PHP] Objects

2007-07-29 Thread Nathan Nobbe
tedd, have you looked at the book we're talking about? also, there are several other books on design patterns available, but the Heads First book is one ive heard mentioned a lot. you can check out a really sweet site online phppatterns.com; in particular follow the design link on the right hand n

Re: [PHP] Objects

2007-07-29 Thread tedd
At 2:00 PM -0400 7/25/07, Nathan Nobbe wrote: yes well at the beginning of the design patterns book they basically explain the same thing. if you dont understand the basic oo priciples, then design patterns arent going to make any sense. these basic concepts are (not looking in the book [testing

Re: [PHP] Objects

2007-07-27 Thread Nathan Nobbe
> On 7/27/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > And the practical issues, well, few OOP courses really dive into that, > to tell you the truth... This is why the study of design patterns is so important, imho. -nathan On 7/27/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > > On Wed, July

Re: [PHP] Objects

2007-07-26 Thread Richard Lynch
On Wed, July 25, 2007 6:33 am, Suporte - DPRJ Sistemas wrote: > Is there anyone here interested in teaching (lond distance, off > course) OOP? > > I would like to learn how to use objects (I have been working all my > life using structured language). All the books I have tried just > "talk" about t

Re: [PHP] Objects

2007-07-25 Thread Eric Butera
On 7/25/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: Eric, i was referring to the exact book you mentioned. here is an excerpt from page 32 of the book: ' we assume you know the oo basics of using classes polymorphically, how inheritance is like design by contract, and how encapsulation works.

Re: [PHP] Objects

2007-07-25 Thread Nathan Nobbe
Eric, i was referring to the exact book you mentioned. here is an excerpt from page 32 of the book: ' we assume you know the oo basics of using classes polymorphically, how inheritance is like design by contract, and how encapsulation works. if you are a little rusty on these, pull out your hea

Re: [PHP] Objects

2007-07-25 Thread Eric Butera
On 7/25/07, Tony Marston <[EMAIL PROTECTED]> wrote: Design patterns will just confuse the issue. If you come from a non-OO background (just like me) and want to know what all this OO stuff is about you might want to take a look at the following: http://www.tonymarston.net/php-mysql/good-bad-oop.h

Re: [PHP] Objects

2007-07-25 Thread Nathan Nobbe
yes well at the beginning of the design patterns book they basically explain the same thing. if you dont understand the basic oo priciples, then design patterns arent going to make any sense. these basic concepts are (not looking in the book [testing myself]..) encapsulation abstraction polymorphi

Re: [PHP] Objects

2007-07-25 Thread Tony Marston
Design patterns will just confuse the issue. If you come from a non-OO background (just like me) and want to know what all this OO stuff is about you might want to take a look at the following: http://www.tonymarston.net/php-mysql/good-bad-oop.html http://www.tonymarston.net/php-mysql/hero-or-her

Re: [PHP] Objects

2007-07-25 Thread Nathan Nobbe
eric is exactly right; design patterns are key; and so is that book ;) -nathan On 7/25/07, Eric Butera <[EMAIL PROTECTED]> wrote: On 7/25/07, Suporte - DPRJ Sistemas <[EMAIL PROTECTED]> wrote: > Hello! > > Is there anyone here interested in teaching (lond distance, off course) OOP? > > I would

Re: [PHP] Objects

2007-07-25 Thread Eric Butera
On 7/25/07, Suporte - DPRJ Sistemas <[EMAIL PROTECTED]> wrote: Hello! Is there anyone here interested in teaching (lond distance, off course) OOP? I would like to learn how to use objects (I have been working all my life using structured language). All the books I have tried just "talk" about

RE: [PHP] Objects

2007-07-25 Thread Jay Blanchard
[snip] Is there anyone here interested in teaching (lond distance, off course) OOP? I would like to learn how to use objects (I have been working all my life using structured language). All the books I have tried just "talk" about theory not practical issues. I intend to pay for the classes. [/sn

[PHP] Objects

2007-07-25 Thread Suporte - DPRJ Sistemas
Hello! Is there anyone here interested in teaching (lond distance, off course) OOP? I would like to learn how to use objects (I have been working all my life using structured language). All the books I have tried just "talk" about theory not practical issues. I intend to pay for the classes.

Re: [PHP] objects destroyed in same order as created?

2005-07-21 Thread Jasper Bryant-Greene
Shaw, Chris - Accenture wrote: Jasper, I would have thought php would have called the destructors on each of the classes in a LIFO fashion, but if it doesn't, just use unset() as a workaround, where you can remove the classes in the order you want. I should add that this behaviour seems to hav

RE: [PHP] objects destroyed in same order as created?

2005-07-21 Thread Shaw, Chris - Accenture
EMAIL PROTECTED] Sent: 21 July 2005 05:45 To: php-general@lists.php.net Subject: [PHP] objects destroyed in same order as created? * This e-mail has been received by the Revenue Internet e-mail service. * Hi all I am curr

[PHP] objects destroyed in same order as created?

2005-07-20 Thread Jasper Bryant-Greene
Hi all I am currently working on a PHP 5 application. For the sake of simplicity, I'll only describe 3 classes here, as that is all that is required for you to see my problem. I have a DB class that interacts with the database, a Session class that controls the session with the user, and a U

Re: [PHP] Objects and Performance

2005-06-09 Thread Greg Donald
On 6/9/05, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote: > Actually, that is the point. If I decide the write a script, and it is my idea, then the point of the script is my own. It's a simple benchmark. I doubt a client would ever come to me and say "Can you write me a script to add two ra

Re: [PHP] Objects and Performance

2005-06-09 Thread Matthew Weier O'Phinney
* Greg Donald <[EMAIL PROTECTED]> : > On 6/8/05, Greg Beaver <[EMAIL PROTECTED]> wrote: > > If you want to compare object methods versus functions, you should > > compare identical code inside a method to code inside a function. > > Greg's benchmarks compare two different ideological code structure

Re: [PHP] Objects and Performance

2005-06-09 Thread Greg Donald
On 6/8/05, Greg Beaver <[EMAIL PROTECTED]> wrote: > If you want to compare object methods versus functions, you should > compare identical code inside a method to code inside a function. > Greg's benchmarks compare two different ideological code structures. > Quite honestly, the wrapping of mt_sran

Re: [PHP] Objects and Performance

2005-06-08 Thread Greg Beaver
Greg Donald wrote: > On 6/8/05, NSK <[EMAIL PROTECTED]> wrote: > >>Hi, I am creating a small API in PHP, i.e. a collection of reusable functions >>for other programmers. As it is now, it is just many functions together in >>the same file. Do you think I should make it object-oriented? What are the

Re: [PHP] Objects and Performance

2005-06-08 Thread Greg Donald
On 6/8/05, NSK <[EMAIL PROTECTED]> wrote: > Hi, I am creating a small API in PHP, i.e. a collection of reusable functions > for other programmers. As it is now, it is just many functions together in > the same file. Do you think I should make it object-oriented? What are the > pros and cons of this

[PHP] Objects and Performance

2005-06-08 Thread NSK
Hi, I am creating a small API in PHP, i.e. a collection of reusable functions for other programmers. As it is now, it is just many functions together in the same file. Do you think I should make it object-oriented? What are the pros and cons of this approach in PHP? I am particularly very conce

Re: [PHP] Objects in Arrays (without the READ prompt)

2005-05-05 Thread Jason Petersen
Hi, I think you need to serialize your objects. http://us3.php.net/manual/en/language.oop.serialization.php Jason On 5/5/05, Stuart Nielson <[EMAIL PROTECTED]> wrote: > Sorry to everyone about the stupid READ notification on the posting. I > completely forgot that it was enabled. This one s

[PHP] Objects in Arrays (without the READ prompt)

2005-05-05 Thread Stuart Nielson
Sorry to everyone about the stupid READ notification on the posting. I completely forgot that it was enabled. This one shouldn't have that problem. I am using PHP version 4.3.4. I'm creating an authorization module that uses a users object, that includes the username, usertype, etc. I want to

[PHP] Objects in Arrays

2005-05-04 Thread Stuart G Nielson
I am using PHP version 4.3.4. I'm creating an authorization module that uses a users object, that includes the username, usertype, etc. I want to store this in a session variable (i.e. $_SESSION['objects']['auth'] = new Authorization();) so that I can keep the information from page to page. Ho

Re: [PHP] Objects and sessions

2004-12-09 Thread Thomas Munz
I think, its not possible to init an Objeect on a session. Session will be rebuild on each reload of the site based on the session id, i think... Maybe here the object can't be rebuild anymore... > Following code: > > > class SessionTestC { > protected $value; > > function __construct (

[PHP] [SOLUTION] Re: [PHP] Objects and sessions

2004-12-09 Thread Francisco M. Marzoa Alonso
Thomas Munz wrote: I think, its not possible to init an Objeect on a session. Yes, it can. The problem was with serialization. With session.auto_start set to 1 on php.ini, seems like session's objects are unserialized before loading the script, so the class is not loaded when the session unseri

[PHP] Objects and sessions

2004-12-09 Thread Francisco M. Marzoa Alonso
Following code: class SessionTestC { protected $value; function __construct ( $val ) { $this->value = $val; } function GetValue () { return $this->value; } } if ( isset ($_SESSION['TestObj'])) { echo 'Session Test is set to: '.$_SESSION['TestObj']->GetValue().''; }

Re: [PHP] objects - is that possible at runtime in php4 or php5 ?

2004-10-04 Thread Marek Kilimajer
Alawi Albaity wrote: I want to create and defined variables of an object in runtime , is that possible ? I can do that with arrays but I want the access it as variable from obbject it self and not like member of an array are defined on object before I load it ! What about trying it before asking? -

[PHP] objects - is that possible at runtime in php4 or php5 ?

2004-10-04 Thread Alawi Albaity
I want to create and defined variables of an object in runtime , is that possible ? I can do that with arrays but I want the access it as variable from obbject it self and not like member of an array are defined on object before I load it ! -- Alawi Albaity Jeddah - KSA Mobile : +966506660442 --

[PHP] objects in sessions again

2004-04-21 Thread daniel
Hi there, needing some more advise, is this function correct ? function create_object($class_name,$dir = null, $serialize = null) { $dir ? $dir = $dir."/" : $dir = ""; require_once("".CLASS_PATH.$dir.$class_name.".php");

[PHP] objects in a session

2004-04-21 Thread electroteque
Hi there going back to the discussions of objects in a session. I would like to know what are the benifits of this, and in what scenarios would it be used. I have an application I am trying to make scalable if possible, it uses a sub class to a phplayers menu class which parses an xml file and gene

[PHP] objects in session

2004-03-13 Thread marc serra
Hi, I got problem when i want to save object in session. I got my first page when I create my object and save it to session: Load($_Get['id']); $_SESSION['save'] = $test; ?> In my second page I want to retrieve my object When I do get_class($_SESSION['test']); I got

[PHP] Objects and Arrays - need help?

2004-02-21 Thread John Romero
Here is my code. Two files: 1) myclass.php 2)test.php to instantiate the objects. I have two classes. One is a "parts" class with some basic properties in an array. And the other class is the "repair" class which needs to hold MANY parts. In the "repair" class, I have a $partsarray so that I can j

[PHP] PHP objects problem

2003-11-05 Thread Michal O¹kera
Hi, I've discovered strange behavior of PHP. The following script has no sense and value, it is simplified due to clearness. The output of the script should be (in my opinion): class A2 class A1 But it isn't (using PHP 4.3.4). The problem arise, when the Callback function of a1 object calls GetOt

[PHP] objects in header / sharing data among frames

2003-09-01 Thread Ronald van Raaphorst
Hi all, I want to share data between two frames. My object should be a php script (if possible). The object should know (using a session variable) which id is currently displayed in each frame. This way, the object can decide if the frame should be refreshed or not, because it knows what ID alread

[PHP] Objects: Cant set object variables with refrences ...

2003-02-11 Thread James
My problem is illistrated by the following test code: class test { var $flag = 0; function getFlag() { return $this->flag; } var $t; function Init() { $c = new test; $this->t = $c; $c->flag = 1000; }

Re: [PHP] objects within arrays

2002-12-24 Thread Beth Gore
ALL in your php.ini file (or temporarly at the top of your scripts with error_reporting (E_ALL);, this will help debug programs like this :)) Andrew - Original Message - From: "Beth Gore" <[EMAIL PROTECTED]> To: "PHP General List" <[EMAIL PROTECTED]> Sent: Tuesday,

Re: [PHP] objects within arrays

2002-12-24 Thread Andrew Brampton
ge - From: "Beth Gore" <[EMAIL PROTECTED]> To: "PHP General List" <[EMAIL PROTECTED]> Sent: Tuesday, December 24, 2002 6:42 PM Subject: [PHP] objects within arrays > Hi, > > I'm really struggling with this - I'm writing a simple webmail clie

[PHP] objects within arrays

2002-12-24 Thread Beth Gore
Hi, I'm really struggling with this - I'm writing a simple webmail client for myself (because they've blocked the common ones at work hehe) Anyway, as soon as I tried to access.. $header = imap_header($inbox,$msgID); $header->from['mailbox']; ... I get nothing. I did a print_r on that, and I

[PHP] Objects and Classes?

2002-12-10 Thread Shawn McKenzie
First, I'm more of a quick learning hack than a developer. I have some code with a few functions that I've written. I have moved a good part of this to a class and have updated the code to define an object based on this class and do its stuff. I feel that I understand objects/classes and how to

Re: [PHP] objects in an array

2002-07-13 Thread Alberto Serra
ðÒÉ×ÅÔ! Alexander Ross wrote: > I have an array filled with objects. Each object has a method called > "display". > > I have > > $var = $arr[0]; > $var->display(); > > but I keep getting an error. What am I doing wrong? > (I do a print_r of the array immediately before this code and there is

[PHP] objects in an array

2002-07-13 Thread Alexander Ross
I have an array filled with objects. Each object has a method called "display". I have $var = $arr[0]; $var->display(); but I keep getting an error. What am I doing wrong? (I do a print_r of the array immediately before this code and there is an object at array[0]) Thanks Alex -- PHP Ge

[PHP] RE: [php-objects] XML parser vs objects

2002-05-21 Thread Fredrik Davidsson
Handles closing of tags! / } } Best regards Fredrik Davidsson Alfaproject AB -Original Message- From: Mirek Novak [mailto:[EMAIL PROTECTED]] Sent: den 21 maj 2002 14:52 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Su

Re: [PHP] objects handling objects

2002-04-04 Thread Steve Cayford
Doh, typo: // this next line would generate a parse error // print("c:a1: " . $c->echo($a)->method1() . "\n"); should read // this next line would generate a parse error // print("c:a1: " . $c->echoMethod($a)->method1() . "\n"); On Thursday, April 4, 2002, at 05:25 PM, Steve Cayford wrote:

Re: [PHP] objects handling objects

2002-04-04 Thread Steve Cayford
On Thursday, April 4, 2002, at 04:21 PM, Erik Price wrote: > I looked in the manual, but didn't see anything about this. I've read > that PHP isn't a true object-oriented language, but rather simulates > elements of object-oriented programming. Can I write a class that > performs operation

[PHP] objects handling objects

2002-04-04 Thread Erik Price
I looked in the manual, but didn't see anything about this. I've read that PHP isn't a true object-oriented language, but rather simulates elements of object-oriented programming. Can I write a class that performs operations and manipulates objects? Can objects be placed into arrays etc? E

[PHP] objects in sessions.

2002-02-27 Thread Aric Caley
If you register an object as a session variable, do you need to include the objects class *before* start_session()? What if I use serialize() on my object, and then register a variable with the serialized data; then I can start_session(), do some other things, then include the class definition, t

Re: [PHP] Objects and sessions

2001-11-27 Thread Tamas Arpad
On Monday 26 November 2001 23:37, Christopher William Wesley wrote: > On Mon, 26 Nov 2001, Greg Sidelinger wrote: > > Can someone tell me how to store a class in a session var. I > > want to > > There are several things you need to do. > > 1) include the class definition before you do anything >

Re: [PHP] Objects and sessions

2001-11-26 Thread Christopher William Wesley
On Mon, 26 Nov 2001, Greg Sidelinger wrote: > Can someone tell me how to store a class in a session var. I want to There are several things you need to do. 1) include the class definition before you do anything 2) start the session shortly thereafter 3) register a session variable 4) create y

Re: [PHP] Objects and sessions

2001-11-26 Thread Tamas Arpad
> later on I get errors about the class functions being undefined. > Can anyone please point me in the right direction on how to > register my objects as session vars. Class definition *must* be before any session_start() or sessgion_register() if there are previously stored objects in the se

[PHP] Objects and sessions

2001-11-26 Thread Greg Sidelinger
Can someone tell me how to store a class in a session var. I want to test to see if it has been defined and if not create it. I'm having problems with it right now. This is what I'm trying currently temp=1; } } session_start(); if ( !isset( $c )

Re: [PHP] Objects and sessions

2001-07-03 Thread Brad Hubbard
On Tue, 3 Jul 2001 11:47, Ethan Schroeder wrote: > If what you mean is if PHP sessions can register objects, that is true and > quite effective. Can you elaborate on this Ethan so I'm sure I understand what you're saying. Cheers, Brad -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] Objects and sessions

2001-07-02 Thread Ethan Schroeder
If what you mean is if PHP sessions can register objects, that is true and quite effective. Ethan Schroeder - Original Message - From: "Brandon Orther" <[EMAIL PROTECTED]> To: "PHP User Group" <[EMAIL PROTECTED]> Sent: Monday, July 02, 2001 4:36 PM Sub

[PHP] Objects and sessions

2001-07-02 Thread Brandon Orther
Hello, I was informed by someone that is a blatent liar and regulary makes things up that PHP session can handle Objects. Is this true? Thank you, Brandon Orther

Re: [PHP] objects in functions?

2001-03-11 Thread Carsten Gehling
From: "Jørg Vidar Bryne" <[EMAIL PROTECTED]> Sent: Saturday, March 10, 2001 11:52 PM > What do you mean by it fails? Any particular error, or does it just time > out? > > I've made a different recursive function to print a tree-menu, you can have > a look at it if you want but it might not be wh

Re: [PHP] objects in functions?

2001-03-10 Thread Yasuo Ohgaki
> Hi, > I want to make a recursive function generating a hierarchy using a class. > > The following code works fine when I don't wrap the function around it, > but when I do it fails. I can't figure out why... > I'm thinking I may need to make some vars global, or maybe you can't use > objects ins

Re: [PHP] objects in functions?

2001-03-10 Thread Jørg Vidar Bryne
ects (starting node) ?> - Original Message ----- From: "Peter Van Dijck" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 10, 2001 9:43 PM Subject: [PHP] objects in functions? > Hi, > I want to make a recursive function generating a hierarch

[PHP] objects in functions?

2001-03-10 Thread Peter Van Dijck
Hi, I want to make a recursive function generating a hierarchy using a class. The following code works fine when I don't wrap the function around it, but when I do it fails. I can't figure out why... I'm thinking I may need to make some vars global, or maybe you can't use objects inside function