SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Canada
    Posts
    730
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    what is this: $this ->

    Can someone define what this is? What's happening here ?
    PHP Code:
        //public function fetchPagedNavigation($queryVars = "") {
        
    public function fetchPagedNavigation($queryVars) {
            return 
    $this->getLayout()->fetchPagedLinks($this$queryVars);
        }
    //end writeNavigation 
    Compare bible texts (and other tools):
    TheWheelofGod

  2. #2
    We're from teh basements.
    Join Date
    Apr 2007
    Posts
    1,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fetchPagedNavigation is a method of whatever class it was defined in. $this refers to the current object that is an instance of that class. $this->whatever is used to either call a method on behalf of that object or to specify a property (aka member variable) of that object.

  3. #3
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Canada
    Posts
    730
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm trying to insert making $queryVars equal to this for-loop.
    PHP Code:
    $queryVars "";
    //for the url
        
    for ($j=0$j count($newSearchTheseArr); $j++){
            if(
    $j!= count($newSearchTheseArr)-1){
                
    $queryVars .= $newSearchTheseArr[$j]."+";
            }else{
                
    $queryVars .= $newSearchTheseArr[$j];
            }
        }
        
    //echo "hi".$queryVars."hi<br />"; 
    in this:
    PHP Code:
    //public function fetchPagedNavigation($queryVars = "") {
    public function fetchPagedNavigation($queryVars) {
        return 
    $this->getLayout()->fetchPagedLinks($this$queryVars);
    }
    //end writeNavigation 
    Compare bible texts (and other tools):
    TheWheelofGod


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •