Extending EntityFieldQuery. Which variables should I define? I have been playing around with extending EntityFieldQuery, and I was wondering which variables I should define on the class. I am also a beginner in OOP so this is an experiment. 

class nodematcher extends EntityFieldQuery
 {
  private $pathtomatch = NULL;
  private $nodestocheck = array();
  private $matchingnode = NULL;
  private $query = NULL;
  private $results = NULL;
  public $nodes = NULL;
  public $path = NULL;
  public $json = NULL;
  public function __construct()
   {
    $this-&gt;query = New entityFieldQuery;
    $this-&gt;query-&gt;entityCondition('entity_type', 'node')-&gt;fieldCondition('geoslate_slate_entry_path', 'value', '', '&lt;&gt;');
    $this-&gt;results = $this-&gt;query-&gt;execute();
    foreach($this-&gt;results['node'] as $result)
     {
      $this-&gt;nodestocheck[] = $result-&gt;nid;
     }
    $this-&gt;nodes = entity_load('node', $this-&gt;nodestocheck);
    return $this-&gt;nodes;
   }
  public function lookupfullpath($path)
   {
    foreach($this-&gt;nodes as $key =&gt; $value)
     {
      $wrapper = entity_metadata_wrapper('node', $value);
      $entry_path = $wrapper-&gt;geoslate_slate_entry_path-&gt;value();
      if(reset($entry_path) == $path)
       {
        $this-&gt;matchingnode[] = $wrapper-&gt;nid-&gt;value();
       }
     }
    $loadedentities = entity_load('node', $this-&gt;matchingnode);
    //$this-&gt;json = drupal_json_encode($loadedentities);
    return $loadedentities;
   }
 }
class nodematcher extends EntityFieldQuery {
  public function __construct() {
    $this-&gt;query = New entityFieldQuery;


This doesn't make any sense. You are either subclassing EntityFieldQuery or you are using a delegate pattern. Doing both makes little sense. What you wanted here is perhaps parent::__construct and wherever you used $this-&gt;query just use $this.