Piwik\DataTable::getId PHP Method

getId() public method

Returns the DataTable ID.
public getId ( ) : integer
return integer
    public function getId()
    {
        return $this->currentId;
    }

Usage Example

Example #1
0
 public function testForInfiniteRecursion()
 {
     $dataTableBeingFiltered = new DataTable();
     // remark: this unit test would become invalid and would need to be rewritten if
     // Truncate filter stops calling getIdSubDataTable() on rows associated with a SubDataTable
     $rowBeingFiltered = $this->getMock('\\Piwik\\DataTable\\Row', array('getIdSubDataTable'));
     $rowBeingFiltered->expects($this->never())->method('getIdSubDataTable');
     $dataTableBeingFiltered->addRow($rowBeingFiltered);
     // we simulate a legitimate but rare circular reference between a Row and its
     // enclosing DataTable.
     // This can happen because identifiers are not thoroughly synchronized when the expanded parameter
     // is false.
     $rowBeingFiltered->subtableId = $dataTableBeingFiltered->getId();
     $filter = new Truncate($dataTableBeingFiltered, 1);
     $filter->filter($dataTableBeingFiltered);
 }
All Usage Examples Of Piwik\DataTable::getId