4 Replies - 351 Views - Last Post: 18 May 2013 - 11:41 PM Rate Topic: -----

#1 shadachi  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 141
  • Joined: 25-January 08

Multiple Pointers instances ?

Posted 18 May 2013 - 10:58 AM

Hi Guys , I am a newbie in PHP . Would like to seek more information .

I've recently stumbled upon PHPExcel , as the code below , they kept on using pointers non stop. May i know why and how they did that ?

$objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('b')->setwidth(15);

$objPHPExcel->setActiveSheetIndex(0)
		->setCellValue('A1','Hello')
		->setCellValue('A2','World');



Is This A Good Question/Topic? 0
  • +

Replies To: Multiple Pointers instances ?

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3473
  • View blog
  • Posts: 11,785
  • Joined: 12-December 12

Re: Multiple Pointers instances ?

Posted 18 May 2013 - 11:32 AM

-> is the object operator in PHP and is essential to an understanding of object-oriented programming in PHP. (It is best not to think of this as a pointer.)

the docs

Check the Tutorials page here @DIC as well.

This post has been edited by andrewsw: 18 May 2013 - 11:34 AM

Was This Post Helpful? 1
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6063
  • View blog
  • Posts: 23,515
  • Joined: 23-August 08

Re: Multiple Pointers instances ?

Posted 18 May 2013 - 12:24 PM

It's called chaining.
Was This Post Helpful? 2
  • +
  • -

#4 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3473
  • View blog
  • Posts: 11,785
  • Joined: 12-December 12

Re: Multiple Pointers instances ?

Posted 18 May 2013 - 12:45 PM

View PostJackOfAllTrades, on 18 May 2013 - 07:24 PM, said:

It's called chaining.

Ah, yes, this may be more specifically what the OP is referring to :) (the use of the term pointers threw me).
Was This Post Helpful? 0
  • +
  • -

#5 shadachi  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 141
  • Joined: 25-January 08

Re: Multiple Pointers instances ?

Posted 18 May 2013 - 11:41 PM

thanks guys for the wonderful insights. Will go through the documents and learn more about the object operator and chaining . The reason why I use the term "pointer" was because I come from C++ background . xD
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1