public function PHPExcel_Worksheet_HeaderFooterDrawing::setPath in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/HeaderFooterDrawing.php \PHPExcel_Worksheet_HeaderFooterDrawing::setPath()
Set Path
Parameters
string $pValue File path:
boolean $pVerifyFile Verify file:
Return value
PHPExcel_Worksheet_HeaderFooterDrawing
Throws
Overrides PHPExcel_Worksheet_Drawing::setPath
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet/ HeaderFooterDrawing.php, line 302
Class
- PHPExcel_Worksheet_HeaderFooterDrawing
- PHPExcel_Worksheet_HeaderFooterDrawing
Code
public function setPath($pValue = '', $pVerifyFile = true) {
if ($pVerifyFile) {
if (file_exists($pValue)) {
$this->_path = $pValue;
if ($this->_width == 0 && $this->_height == 0) {
// Get width/height
list($this->_width, $this->_height) = getimagesize($pValue);
}
}
else {
throw new PHPExcel_Exception("File {$pValue} not found!");
}
}
else {
$this->_path = $pValue;
}
return $this;
}