TheSeer\phpDox\Collector\SourceCollection::removeFile PHP Method

removeFile() public method

public removeFile ( TheSeer\phpDox\FileInfo $file )
$file TheSeer\phpDox\FileInfo
    public function removeFile(FileInfo $file)
    {
        if (!isset($this->collection[$file->getRealPath()])) {
            throw new SourceCollectionException(sprintf("File %s not found in collection", $file->getRealPath()), SourceCollectionException::SourceNotFound);
        }
        unset($this->collection[$file->getRealPath()]);
    }

Usage Example

Example #1
0
 /**
  * @param FileInfo $file
  */
 public function removeFile(FileInfo $file)
 {
     $this->removeFileReferences($file->getPathname());
     $this->source->removeFile($file);
 }