Esempio n. 1
0
 public function update()
 {
     if (!$this->toFile->hasWriteAccess() || !$this->fromFile->hasReadAccess()) {
         return;
     }
     $trackingCode = new PiwikJsManipulator($this->fromFile->getContent(), $this->trackerFiles);
     $newContent = $trackingCode->manipulateContent();
     if ($newContent !== $this->toFile->getContent()) {
         $this->toFile->save($newContent);
     }
 }
Esempio n. 2
0
 public function getUpdatedTrackerFileContent()
 {
     $trackingCode = new PiwikJsManipulator($this->fromFile->getContent(), $this->trackerFiles);
     $newContent = $trackingCode->manipulateContent();
     return $newContent;
 }