XCount

The Contact Form DB XCount class.

Defined (1)

The class is defined in the following location(s).

/phpunit/TransformsTest.php  
  1. class XCount extends BaseTransform { 
  2.  
  3. public function getTransformedData() { 
  4. $x1 = 0; 
  5. $x2 = 0; 
  6. foreach ($this->data as $entry) { 
  7. if (strpos(strtoupper($entry['misc']), 'X1') === 0) { 
  8. ++$x1; 
  9. if (strpos(strtoupper($entry['misc']), 'X2') === 0) { 
  10. ++$x2; 
  11. return array( 
  12. array('name' => 'X1', 'count' => $x1),  
  13. array('name' => 'X2', 'count' => $x2) 
  14. );