/**
  * <p>
  * Gets all of the root-level <tt>&lt;object></tt> elements and parses them.
  * </p>
  */
 protected function handle()
 {
     $queries = $this->xml->get('query', false);
     $this->getLog()->debug('Processing queries. Found: ' . count($queries) . ' queries in: ' . $this->file);
     foreach ($queries as $queryElement) {
         $query = QueryParser::parseQuery($queryElement);
         $this->query($query);
     }
     $objects = $this->xml->get('object', false);
     $this->getLog()->debug('Processing ' . count($objects) . ' objects in: ' . $this->file);
     foreach ($objects as $element) {
         $dataObject = $this->parseObject($element);
         $this->populator->save();
     }
 }
 public function testParse()
 {
     $xml = '<query name="myobj" statement="the_statement" type="My\\Class\\Object" projection="object" />';
     $parser = new QueryParser();
     $element = new XmlElement($xml);
     $query = $parser->parse($element);
     $this->assertEquals('myobj', $query->getName());
     $this->assertEquals('the_statement', $query->getStatement());
     $this->assertEquals('My\\Class\\Object', $query->getType());
     $this->assertEquals('object', $query->getProjection());
 }