Flitch\File\File::getFilename PHP Method

getFilename() public method

Get the filename of the represented file.
public getFilename ( ) : string
return string
    public function getFilename()
    {
        return $this->filename;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * addFile(): defined by Report interface.
  *
  * @see    Report::addFile()
  * @param  File $file
  * @return void
  */
 public function addFile(File $file)
 {
     $this->writer->startElement('file');
     $this->writer->writeAttribute('name', $file->getFilename());
     foreach ($file->getViolations() as $violation) {
         $this->writer->startElement('error');
         $this->writer->writeAttribute('line', $violation->getLine());
         if ($violation->getColumn() > 0) {
             $this->writer->writeAttribute('column', $violation->getColumn());
         }
         $this->writer->writeAttribute('severity', $violation->getSeverity());
         $this->writer->writeAttribute('message', $violation->getMessage());
         $this->writer->writeAttribute('source', $violation->getSource());
         $this->writer->endElement();
     }
     $this->writer->endElement();
 }
All Usage Examples Of Flitch\File\File::getFilename