Piwik\DataTable::getMetadata PHP 메소드

getMetadata() 공개 메소드

Returns metadata by name.
public getMetadata ( string $name ) : mixed | false
$name string The metadata name.
리턴 mixed | false The metadata value or `false` if it cannot be found.
    public function getMetadata($name)
    {
        if (!isset($this->metadata[$name])) {
            return false;
        }
        return $this->metadata[$name];
    }

Usage Example

예제 #1
0
파일: Model.php 프로젝트: dorelljames/piwik
 public function getMetricTotalValue(DataTable $currentReport, $metric)
 {
     $totals = $currentReport->getMetadata('totals');
     if (!empty($totals[$metric])) {
         $totalValue = (int) $totals[$metric];
     } else {
         $totalValue = 0;
     }
     return $totalValue;
 }
All Usage Examples Of Piwik\DataTable::getMetadata