public function PHPExcel_Worksheet_Drawing::setPath in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Drawing.php \PHPExcel_Worksheet_Drawing::setPath()
Set Path
Parameters
string $pValue File path:
boolean $pVerifyFile Verify file:
Return value
Throws
1 method overrides PHPExcel_Worksheet_Drawing::setPath()
- PHPExcel_Worksheet_HeaderFooterDrawing::setPath in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet/ HeaderFooterDrawing.php - Set Path
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet/ Drawing.php, line 104
Class
- PHPExcel_Worksheet_Drawing
- PHPExcel_Worksheet_Drawing
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;
}