Skip to content

Commit

Permalink
Composer - update dompdf
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo committed Nov 5, 2023
1 parent 0e0e537 commit 0c8f2f5
Show file tree
Hide file tree
Showing 3 changed files with 326 additions and 74 deletions.
253 changes: 217 additions & 36 deletions _ide_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -16421,12 +16421,17 @@ public static function getRules($name)

}

namespace Barryvdh\DomPDF {
namespace Barryvdh\DomPDF\Facade {
/**
*
*
* @method static \Barryvdh\DomPDF\PDF setPaper($paper, $orientation = 'portrait')
* @method static \Barryvdh\DomPDF\PDF setBaseHost(string $baseHost)
* @method static \Barryvdh\DomPDF\PDF setProtocol(string $protocol)
* @method static \Barryvdh\DomPDF\PDF setHttpContext($httpContext)
* @method static \Barryvdh\DomPDF\PDF setCallbacks(array $callbacks)
*/
class Facade {
class Pdf {
/**
* Get the DomPDF instance
*
Expand All @@ -16439,23 +16444,180 @@ public static function getDomPDF()
return $instance->getDomPDF();
}
/**
* Set the paper size (default A4)
* Show or hide warnings
*
* @static
*/
public static function setWarnings($warnings)
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->setWarnings($warnings);
}
/**
* Load a HTML string
*
* @param string|null $encoding Not used yet
* @static
*/
public static function loadHTML($string, $encoding = null)
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->loadHTML($string, $encoding);
}
/**
* Load a HTML file
*
* @static
*/
public static function loadFile($file)
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->loadFile($file);
}
/**
* Add metadata info
*
* @param string $paper
* @param string $orientation
* @param array<string, string> $info
* @return static
* @static
*/
public static function addInfo($info)
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->addInfo($info);
}
/**
* Load a View and convert to HTML
*
* @param array<string, mixed> $data
* @param array<string, mixed> $mergeData
* @param string|null $encoding Not used yet
* @static
*/
public static function loadView($view, $data = [], $mergeData = [], $encoding = null)
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->loadView($view, $data, $mergeData, $encoding);
}
/**
* Set/Change an option (or array of options) in Dompdf
*
* @param array<string, mixed>|string $attribute
* @param null|mixed $value
* @return \Barryvdh\DomPDF\PDF
* @static
*/
public static function setPaper($paper, $orientation = 'portrait')
public static function setOption($attribute, $value = null)
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->setPaper($paper, $orientation);
return $instance->setOption($attribute, $value);
}
/**
* Replace all the Options from DomPDF
*
* @deprecated Use setOption to override individual options.
* @param array<string, mixed> $options
* @static
*/
public static function setOptions($options)
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->setOptions($options);
}
/**
* Output the PDF as a string.
*
* The options parameter controls the output. Accepted options are:
*
* 'compress' = > 1 or 0 - apply content stream compression, this is
* on (1) by default
*
* @param array<string, int> $options
* @return string The rendered PDF as string
* @static
*/
public static function output($options = [])
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->output($options);
}
/**
* Save the PDF to a file
*
* @static
*/
public static function save($filename, $disk = null)
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->save($filename, $disk);
}
/**
* Make the PDF downloadable by the user
*
* @static
*/
public static function download($filename = 'document.pdf')
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->download($filename);
}
/**
* Return a response with the PDF to show in the browser
*
* @static
*/
public static function stream($filename = 'document.pdf')
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->stream($filename);
}
/**
* Render the PDF
*
* @static
*/
public static function render()
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->render();
}
/**
*
*
* @param array<string> $pc
* @static
*/
public static function setEncryption($password, $ownerpassword = '', $pc = [])
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->setEncryption($password, $ownerpassword, $pc);
}

}
/**
*
*
* @method static \Barryvdh\DomPDF\PDF setPaper($paper, $orientation = 'portrait')
* @method static \Barryvdh\DomPDF\PDF setBaseHost(string $baseHost)
* @method static \Barryvdh\DomPDF\PDF setProtocol(string $protocol)
* @method static \Barryvdh\DomPDF\PDF setHttpContext($httpContext)
* @method static \Barryvdh\DomPDF\PDF setCallbacks(array $callbacks)
*/
class Pdf {
/**
* Get the DomPDF instance
*
* @return \Dompdf\Dompdf
* @static
*/
public static function getDomPDF()
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->getDomPDF();
}
/**
* Show or hide warnings
*
* @param bool $warnings
* @return \Barryvdh\DomPDF\PDF
* @static
*/
public static function setWarnings($warnings)
Expand All @@ -16466,9 +16628,7 @@ public static function setWarnings($warnings)
/**
* Load a HTML string
*
* @param string $string
* @param string $encoding Not used yet
* @return static
* @param string|null $encoding Not used yet
* @static
*/
public static function loadHTML($string, $encoding = null)
Expand All @@ -16479,8 +16639,6 @@ public static function loadHTML($string, $encoding = null)
/**
* Load a HTML file
*
* @param string $file
* @return static
* @static
*/
public static function loadFile($file)
Expand All @@ -16491,7 +16649,7 @@ public static function loadFile($file)
/**
* Add metadata info
*
* @param array $info
* @param array<string, string> $info
* @return static
* @static
*/
Expand All @@ -16503,11 +16661,9 @@ public static function addInfo($info)
/**
* Load a View and convert to HTML
*
* @param string $view
* @param array $data
* @param array $mergeData
* @param string $encoding Not used yet
* @return static
* @param array<string, mixed> $data
* @param array<string, mixed> $mergeData
* @param string|null $encoding Not used yet
* @static
*/
public static function loadView($view, $data = [], $mergeData = [], $encoding = null)
Expand All @@ -16516,10 +16672,23 @@ public static function loadView($view, $data = [], $mergeData = [], $encoding =
return $instance->loadView($view, $data, $mergeData, $encoding);
}
/**
* Set/Change an option in DomPdf
* Set/Change an option (or array of options) in Dompdf
*
* @param array $options
* @return static
* @param array<string, mixed>|string $attribute
* @param null|mixed $value
* @return \Barryvdh\DomPDF\PDF
* @static
*/
public static function setOption($attribute, $value = null)
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->setOption($attribute, $value);
}
/**
* Replace all the Options from DomPDF
*
* @deprecated Use setOption to override individual options.
* @param array<string, mixed> $options
* @static
*/
public static function setOptions($options)
Expand All @@ -16529,32 +16698,34 @@ public static function setOptions($options)
}
/**
* Output the PDF as a string.
*
* The options parameter controls the output. Accepted options are:
*
* 'compress' = > 1 or 0 - apply content stream compression, this is
* on (1) by default
*
* @param array<string, int> $options
* @return string The rendered PDF as string
* @static
*/
public static function output()
public static function output($options = [])
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->output();
return $instance->output($options);
}
/**
* Save the PDF to a file
*
* @param $filename
* @return static
* @static
*/
public static function save($filename)
public static function save($filename, $disk = null)
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->save($filename);
return $instance->save($filename, $disk);
}
/**
* Make the PDF downloadable by the user
*
* @param string $filename
* @return \Illuminate\Http\Response
* @static
*/
public static function download($filename = 'document.pdf')
Expand All @@ -16565,24 +16736,33 @@ public static function download($filename = 'document.pdf')
/**
* Return a response with the PDF to show in the browser
*
* @param string $filename
* @return \Illuminate\Http\Response
* @static
*/
public static function stream($filename = 'document.pdf')
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->stream($filename);
}
/**
* Render the PDF
*
* @static
*/
public static function render()
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->render();
}
/**
*
*
* @param array<string> $pc
* @static
*/
public static function setEncryption($password)
public static function setEncryption($password, $ownerpassword = '', $pc = [])
{
/** @var \Barryvdh\DomPDF\PDF $instance */
return $instance->setEncryption($password);
return $instance->setEncryption($password, $ownerpassword, $pc);
}

}
Expand Down Expand Up @@ -24620,10 +24800,11 @@ class View extends \Illuminate\Support\Facades\View {}
class Grapher extends \IXP\Support\Facades\Grapher {}
class Image extends \Intervention\Image\Facades\Image {}
class Former extends \Former\Facades\Former {}
class PDF extends \Barryvdh\DomPDF\Facade {}
class PDF extends \Barryvdh\DomPDF\Facade\Pdf {}
class Countries extends \Webpatser\Countries\CountriesFacade {}
class Google2FA extends \PragmaRX\Google2FALaravel\Facade {}
class Debugbar extends \Barryvdh\Debugbar\Facades\Debugbar {}
class Pdf extends \Barryvdh\DomPDF\Facade\Pdf {}
class Flare extends \Facade\Ignition\Facades\Flare {}
class Horizon extends \Laravel\Horizon\Horizon {}
class Socialite extends \Laravel\Socialite\Facades\Socialite {}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"guzzlehttp/guzzle": "^7.0.1",
"intervention/image": "^2.3",
"anahkiasen/former": "^4.6",
"barryvdh/laravel-dompdf": "^0.9.0",
"barryvdh/laravel-dompdf": "^2.0.0",
"mews/purifier": "^3.2",
"php-ds/php-ds": "^1.1",
"s1lentium/iptools": "^1.1",
Expand Down
Loading

0 comments on commit 0c8f2f5

Please sign in to comment.