コード例 #1
0
 /**
  * @param \GoogleAnalyticsTracker\HitTypes\Page $page
  * @return mixed
  */
 public function map($page)
 {
     if (!$page instanceof \GoogleAnalyticsTracker\HitTypes\Page) {
         throw new \UnexpectedValueException("The Page Mapper only accepts Page HitTypes");
     }
     $data = array('t' => \GoogleAnalyticsTracker\HitTypes\Page::TYPE, 'dh' => $page->getDomain(), 'dp' => $page->getPage());
     if ($page->hasTitle()) {
         $data['dt'] = $page->getTitle();
     }
     $data = array_merge($data, parent::map($page));
     return $data;
 }
コード例 #2
0
 /**
  * @param Event $event
  * @return mixed
  */
 public function map($event)
 {
     if (!$event instanceof \GoogleAnalyticsTracker\HitTypes\Event) {
         throw new \UnexpectedValueException("The Event Mapper only accepts Event HitTypes");
     }
     $data = array('t' => \GoogleAnalyticsTracker\HitTypes\Event::TYPE, 'ea' => $event->getAction(), 'ec' => $event->getCategory());
     if ($event->hasLabel()) {
         $data['el'] = $event->getLabel();
     }
     if ($event->hasValue()) {
         $data['ev'] = $event->getValue();
     }
     $data = array_merge($data, parent::map($event));
     return $data;
 }
コード例 #3
0
ファイル: Table.php プロジェクト: Chocanto/autoTab
 public function __construct($_caption = '')
 {
     $this->caption = $_caption;
     $this->rows = array();
     parent::__construct();
 }
コード例 #4
0
ファイル: Cell.php プロジェクト: Chocanto/autoTab
 public function __construct($_content = '')
 {
     $this->content = $_content;
     parent::__construct();
 }