/home/techb158/dev.balacoffee.com/vendor/league/commonmark/src/Node
NameSizeModeActions
Block/-0755rm
Inline/-0755rm
Query/-0755rm
Node.php64660644editdlrm
NodeIterator.php13780644editdlrm
NodeWalker.php22010644editdlrm
NodeWalkerEvent.php8930644editdlrm
Query.php33120644editdlrm
RawMarkupContainerInterface.php4650644editdlrm
StringContainerHelper.php13560644editdlrm
StringContainerInterface.php6400644editdlrm
Edit: /home/techb158/dev.balacoffee.com/vendor/league/commonmark/src/Node/StringContainerHelper.php (1356B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace League\CommonMark\Node; final class StringContainerHelper { /** * Extract text literals from all descendant nodes * * @param Node $node Parent node * @param array $excludeTypes Optional list of node class types to exclude * * @return string Concatenated literals */ public static function getChildText(Node $node, array $excludeTypes = []): string { $text = ''; foreach ($node->iterator() as $child) { if ($child instanceof StringContainerInterface && ! self::isOneOf($child, $excludeTypes)) { $text .= $child->getLiteral(); } } return $text; } /** * @param string[] $classesOrInterfacesToCheck * * @psalm-pure */ private static function isOneOf(object $object, array $classesOrInterfacesToCheck): bool { foreach ($classesOrInterfacesToCheck as $type) { if ($object instanceof $type) { return true; } } return false; } }