/** * Increment an include size counter * * @param string $type The type of expansion * @param int $size The size of the text * @return bool false if this inclusion would take it over the maximum, true otherwise */ function incrementIncludeSize($type, $size) { if ($this->mIncludeSizes[$type] + $size > $this->mOptions->getMaxIncludeSize()) { return false; } else { $this->mIncludeSizes[$type] += $size; return true; } }