Piwik\Plugins\CustomPiwikJs\File::getContent PHP 메소드

getContent() 공개 메소드

public getContent ( )
    public function getContent()
    {
        if (!$this->hasReadAccess()) {
            return null;
        }
        return file_get_contents($this->file);
    }

Usage Example

예제 #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);
     }
 }
All Usage Examples Of Piwik\Plugins\CustomPiwikJs\File::getContent