Re: [PHP] Re: Looking for some PHP OO programming guides

2009-02-11 Thread Yannick Mortier
2009/2/11 German Geek geek...@gmail.com:
 I try to avoid nesting loops altogether if possible. Usually dont go beyond
 3 levels of nesting...
 How can you require 8 levels of nesting? surely there must be something
 wrong or a more efficient algorithm...


No! It's just that you can't think in 8 dimensions like him.



-- 
Currently developing a browsergame...
http://www.p-game.de
Trade - Expand - Fight

Follow me at twitter!
http://twitter.com/moortier

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Looking for some PHP OO programming guides

2009-02-11 Thread Christoph Boget
  How can you require 8 levels of nesting? surely there must be something
  wrong or a more efficient algorithm...
 No! It's just that you can't think in 8 dimensions like him.

Yeah, at that point you are dealing with space and time and that's not a
subject of contemplation for everyone. :p

thnx,
Christoph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Looking for some PHP OO programming guides

2009-02-10 Thread Tony Marston
Take a look at http://www.tonymarston.net/php-mysql/databaseobjects.html

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

Michael Kubler mdk...@gmail.com wrote in message 
news:49918ebf.4070...@gmail.com...
 Hi,
 I'm just getting into programming in an Object Oriented fashion, and am
 looking for some guides, tutorials, hints, tips, etc...

 I only just found out that you remove the $ from variables when calling
 them from $this-

 e.g :
 ?php
 class People
 {
 private $person = not set;
function __construct()
{
 *$person* = A person; //This doesn't work (well it creates a
 variable $person that only has the scope of the current function from
 what I can gather)..
 $this-*person* = A person; //This works properly
 }
function display_list()
{
echo $person; //This doesn't work
  echo $this-person; //This works.
}
 }

 $person= new People;
 $person-display_list();
 ?


 Instead of painstakingly working out most of the other mistakes I'm
 likely to make, I'd love to read about other peoples issues they had
 with learning OO so I can skip most of the hard stuff, and only make
 small mistakes (hopefully).
 -- 

 Michael Kubler
 *G*rey *P*hoenix *P*roductions http://www.greyphoenix.biz

 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Looking for some PHP OO programming guides

2009-02-10 Thread Kyle Terry
On Tue, Feb 10, 2009 at 9:46 AM, Tony Marston
t...@marston-home.demon.co.uk wrote:
 Take a look at http://www.tonymarston.net/php-mysql/databaseobjects.html

 --
 Tony Marston
 http://www.tonymarston.net
 http://www.radicore.org

 Michael Kubler mdk...@gmail.com wrote in message
 news:49918ebf.4070...@gmail.com...
 Hi,
 I'm just getting into programming in an Object Oriented fashion, and am
 looking for some guides, tutorials, hints, tips, etc...

 I only just found out that you remove the $ from variables when calling
 them from $this-

 e.g :
 ?php
 class People
 {
 private $person = not set;
function __construct()
{
 *$person* = A person; //This doesn't work (well it creates a
 variable $person that only has the scope of the current function from
 what I can gather)..
 $this-*person* = A person; //This works properly
 }
function display_list()
{
echo $person; //This doesn't work
  echo $this-person; //This works.
}
 }

 $person= new People;
 $person-display_list();
 ?


 Instead of painstakingly working out most of the other mistakes I'm
 likely to make, I'd love to read about other peoples issues they had
 with learning OO so I can skip most of the hard stuff, and only make
 small mistakes (hopefully).
 --

 Michael Kubler
 *G*rey *P*hoenix *P*roductions http://www.greyphoenix.biz





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



Don't next 8 foreach loops in OOP.

-- 
Kyle Terry | www.kyleterry.com
Help kick start VOOM (Very Open Object Model) for a library of PHP classes.
http://www.voom.me | IRC EFNet #voom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Looking for some PHP OO programming guides

2009-02-10 Thread Kyle Terry
On Tue, Feb 10, 2009 at 12:07 PM, Kyle Terry k...@kyleterry.com wrote:
 On Tue, Feb 10, 2009 at 9:46 AM, Tony Marston
 t...@marston-home.demon.co.uk wrote:
 Take a look at http://www.tonymarston.net/php-mysql/databaseobjects.html

 --
 Tony Marston
 http://www.tonymarston.net
 http://www.radicore.org

 Michael Kubler mdk...@gmail.com wrote in message
 news:49918ebf.4070...@gmail.com...
 Hi,
 I'm just getting into programming in an Object Oriented fashion, and am
 looking for some guides, tutorials, hints, tips, etc...

 I only just found out that you remove the $ from variables when calling
 them from $this-

 e.g :
 ?php
 class People
 {
 private $person = not set;
function __construct()
{
 *$person* = A person; //This doesn't work (well it creates a
 variable $person that only has the scope of the current function from
 what I can gather)..
 $this-*person* = A person; //This works properly
 }
function display_list()
{
echo $person; //This doesn't work
  echo $this-person; //This works.
}
 }

 $person= new People;
 $person-display_list();
 ?


 Instead of painstakingly working out most of the other mistakes I'm
 likely to make, I'd love to read about other peoples issues they had
 with learning OO so I can skip most of the hard stuff, and only make
 small mistakes (hopefully).
 --

 Michael Kubler
 *G*rey *P*hoenix *P*roductions http://www.greyphoenix.biz





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 Don't next 8 foreach loops in OOP.

 --
 Kyle Terry | www.kyleterry.com
 Help kick start VOOM (Very Open Object Model) for a library of PHP classes.
 http://www.voom.me | IRC EFNet #voom


Don't neSt 8 foreach loops in OOP.

-- 
Kyle Terry | www.kyleterry.com
Help kick start VOOM (Very Open Object Model) for a library of PHP classes.
http://www.voom.me | IRC EFNet #voom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Looking for some PHP OO programming guides

2009-02-10 Thread Andrew Ballard
On Tue, Feb 10, 2009 at 3:09 PM, Kyle Terry k...@kyleterry.com wrote:
 On Tue, Feb 10, 2009 at 12:07 PM, Kyle Terry k...@kyleterry.com wrote:
 On Tue, Feb 10, 2009 at 9:46 AM, Tony Marston
 t...@marston-home.demon.co.uk wrote:
 Take a look at http://www.tonymarston.net/php-mysql/databaseobjects.html

 --
 Tony Marston
 http://www.tonymarston.net
 http://www.radicore.org

 Michael Kubler mdk...@gmail.com wrote in message
 news:49918ebf.4070...@gmail.com...
 Hi,
 I'm just getting into programming in an Object Oriented fashion, and am
 looking for some guides, tutorials, hints, tips, etc...

 I only just found out that you remove the $ from variables when calling
 them from $this-

 e.g :
 ?php
 class People
 {
 private $person = not set;
function __construct()
{
 *$person* = A person; //This doesn't work (well it creates a
 variable $person that only has the scope of the current function from
 what I can gather)..
 $this-*person* = A person; //This works properly
 }
function display_list()
{
echo $person; //This doesn't work
  echo $this-person; //This works.
}
 }

 $person= new People;
 $person-display_list();
 ?


 Instead of painstakingly working out most of the other mistakes I'm
 likely to make, I'd love to read about other peoples issues they had
 with learning OO so I can skip most of the hard stuff, and only make
 small mistakes (hopefully).
 --

 Michael Kubler
 *G*rey *P*hoenix *P*roductions http://www.greyphoenix.biz





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 Don't next 8 foreach loops in OOP.

 --
 Kyle Terry | www.kyleterry.com
 Help kick start VOOM (Very Open Object Model) for a library of PHP classes.
 http://www.voom.me | IRC EFNet #voom


 Don't neSt 8 foreach loops in OOP.

Yikes! I'd try my best to avoid nesting 8 foreach loops in procedural code, too.

 --
 Kyle Terry | www.kyleterry.com
 Help kick start VOOM (Very Open Object Model) for a library of PHP classes.
 http://www.voom.me | IRC EFNet #voom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Looking for some PHP OO programming guides

2009-02-10 Thread German Geek
I try to avoid nesting loops altogether if possible. Usually dont go beyond
3 levels of nesting...
How can you require 8 levels of nesting? surely there must be something
wrong or a more efficient algorithm...

Tim-Hinnerk Heuer

http://www.ihostnz.com
Garry Shandling  - I'm dating a woman now who, evidently, is unaware of
it.

2009/2/11 Andrew Ballard aball...@gmail.com

 On Tue, Feb 10, 2009 at 3:09 PM, Kyle Terry k...@kyleterry.com wrote:
  On Tue, Feb 10, 2009 at 12:07 PM, Kyle Terry k...@kyleterry.com wrote:
  On Tue, Feb 10, 2009 at 9:46 AM, Tony Marston
  t...@marston-home.demon.co.uk wrote:
  Take a look at
 http://www.tonymarston.net/php-mysql/databaseobjects.html
 
  --
  Tony Marston
  http://www.tonymarston.net
  http://www.radicore.org
 
  Michael Kubler mdk...@gmail.com wrote in message
  news:49918ebf.4070...@gmail.com...
  Hi,
  I'm just getting into programming in an Object Oriented fashion, and
 am
  looking for some guides, tutorials, hints, tips, etc...
 
  I only just found out that you remove the $ from variables when
 calling
  them from $this-
 
  e.g :
  ?php
  class People
  {
  private $person = not set;
 function __construct()
 {
  *$person* = A person; //This doesn't work (well it creates a
  variable $person that only has the scope of the current function from
  what I can gather)..
  $this-*person* = A person; //This works properly
  }
 function display_list()
 {
 echo $person; //This doesn't work
   echo $this-person; //This works.
 }
  }
 
  $person= new People;
  $person-display_list();
  ?
 
 
  Instead of painstakingly working out most of the other mistakes I'm
  likely to make, I'd love to read about other peoples issues they had
  with learning OO so I can skip most of the hard stuff, and only make
  small mistakes (hopefully).
  --
 
  Michael Kubler
  *G*rey *P*hoenix *P*roductions http://www.greyphoenix.biz
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
  Don't next 8 foreach loops in OOP.
 
  --
  Kyle Terry | www.kyleterry.com
  Help kick start VOOM (Very Open Object Model) for a library of PHP
 classes.
  http://www.voom.me | IRC EFNet #voom
 
 
  Don't neSt 8 foreach loops in OOP.

 Yikes! I'd try my best to avoid nesting 8 foreach loops in procedural code,
 too.

  --
  Kyle Terry | www.kyleterry.com
  Help kick start VOOM (Very Open Object Model) for a library of PHP
 classes.
  http://www.voom.me | IRC EFNet #voom
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php