public function ParsedMarkdown::getSize in Markdown 3.0.x
Retrieves the file size of the parsed HTML.
Parameters
bool $formatted: Flag indicating whether to retrieve the formatted, human-readable, file size.
int $decimals: The number of decimal points to use if $formatted is TRUE.
Return value
int|string The raw file size in bytes or the formatted human-readable file size.
Overrides ParsedMarkdownInterface::getSize
1 call to ParsedMarkdown::getSize()
File
- src/
ParsedMarkdown.php, line 171
Class
Namespace
Drupal\markdownCode
public function getSize($formatted = FALSE, $decimals = 2) {
if ($this->size === NULL) {
$this->size = Unicode::strlen($this
->getHtml());
}
return $formatted ? number_format($this->size, $decimals) : $this->size;
}