This discussion is archived
1 Reply Latest reply: Aug 8, 2013 2:20 PM by cj RSS

Use of scope resolution operator in PHP development example

0e31cab3-02e4-4fb9-8a6a-3634fbf7a8b4 Newbie
Currently Being Moderated

I am relatively new to OOP in general so this question may sound dumb but

 

In this documentation:  Query Performance and Prefetching

To quote that text, "

The $db->setPrefetch() call is used to set the prefetch value. The microtime() calls are used to show how long the report took to generate.

A new Db::fetchRow() method is used to get one row at a time. It is called in a loop after the query has been run"

 

 

Why the does it use the scope resolution operator? Isn't it used for just static methods and overridden methods.

I do not see any static declaration when this method is entered into class.

 

To quote the method declaration:

  /** * Fetch a row of data. Call this in a loop after calling Db::execute() * * @return array An array of data for one row of the query */

public function fetchRow() {

$row = oci_fetch_array($this->stid, OCI_ASSOC + OCI_RETURN_NULLS);

return($row);

}

 

Am I missing something really trivial thing about this concept?

 

Thank you.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points