Forum Stats

  • 3,875,258 Users
  • 2,266,901 Discussions


Use of scope resolution operator in PHP development example

1030334 Member Posts: 1
edited Aug 8, 2013 5:20PM in PHP

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);

Am I missing something really trivial thing about this concept?

Thank you.



This discussion has been closed.