CommonMark

目录

类摘要

CommonMark\Node\Document

final class CommonMark\Node\Document extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\Heading

final class CommonMark\Node\Heading extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 属性 */

public int $level ;

/* Constructor */

public __construct ( void )

public __construct ( int $level )

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

CommonMark\Node\Heading::__construct

Heading Construction

说明

public CommonMark\Node\Heading::__construct ( void )

public CommonMark\Node\Heading::__construct ( int $level )

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

类摘要

CommonMark\Node\Paragraph

final class CommonMark\Node\Paragraph extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\BlockQuote

final class CommonMark\Node\BlockQuote extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\BulletList

final class CommonMark\Node\BulletList extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 属性 */

public bool $tight ;

public int $delimiter ;

/* Constructor */

public __construct ( void )

public __construct ( int $tight )

public __construct ( int $tight , int $delimiter )

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

CommonMark\Node\BulletList::__construct

BulletList Construction

说明

public CommonMark\Node\BulletList::__construct ( void )

public CommonMark\Node\BulletList::__construct ( int $tight )

public CommonMark\Node\BulletList::__construct ( int $tight , int $delimiter )

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

类摘要

CommonMark\Node\OrderedList

final class CommonMark\Node\OrderedList extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 属性 */

public bool $tight ;

public int $delimiter ;

public int $start ;

/* Constructor */

public __construct ( void )

public __construct ( int $tight )

public __construct ( int $tight , int $delimiter )

public __construct ( int $tight , int $delimiter , int $start )

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

CommonMark\Node\OrderedList::__construct

OrderedList Construction

说明

public CommonMark\Node\OrderedList::__construct ( void )

public CommonMark\Node\OrderedList::__construct ( int $tight )

public CommonMark\Node\OrderedList::__construct ( int $tight , int $delimiter )

public CommonMark\Node\OrderedList::__construct ( int $tight , int $delimiter , int $start )

Warning

本函数还未编写文档,仅有参数列表。

参数

tight

delimiter

start

类摘要

CommonMark\Node\Item

final class CommonMark\Node\Item extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\Text

final class CommonMark\Node\Text extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 属性 */

public ?string $literal ;

/* Constructor */

public __construct ( void )

public __construct ( string $literal )

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

CommonMark\Node\Text::__construct

Text Construction

说明

public CommonMark\Node\Text::__construct ( void )

public CommonMark\Node\Text::__construct ( string $literal )

Warning

本函数还未编写文档,仅有参数列表。

参数

literal

类摘要

CommonMark\Node\Text\Strong

final class CommonMark\Node\Text\Strong extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\Text\Emphasis

final class CommonMark\Node\Text\Emphasis extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\ThematicBreak

final class CommonMark\Node\ThematicBreak extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\SoftBreak

final class CommonMark\Node\SoftBreak extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\LineBreak

final class CommonMark\Node\LineBreak extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\Code

final class CommonMark\Node\Code extends CommonMark\Node\Text implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

public ?string $literal ;

/* Constructor */

public CommonMark\Node\Text::__construct ( void )

public CommonMark\Node\Text::__construct ( string $literal )

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\CodeBlock

final class CommonMark\Node\CodeBlock extends CommonMark\Node\Text implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

public ?string $literal ;

/* 属性 */

public ?string $fence ;

/* Constructor */

public CommonMark\Node\Text::__construct ( void )

public CommonMark\Node\Text::__construct ( string $literal )

public __construct ( string $fence , string $literal )

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

CommonMark\Node\CodeBlock::__construct

CodeBlock Construction

说明

public CommonMark\Node\CodeBlock::__construct ( string $fence , string $literal )

Warning

本函数还未编写文档,仅有参数列表。

参数

fence

literal

类摘要

CommonMark\Node\HTMLBlock

final class CommonMark\Node\HTMLBlock extends CommonMark\Node\Text implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

public ?string $literal ;

/* Constructor */

public CommonMark\Node\Text::__construct ( void )

public CommonMark\Node\Text::__construct ( string $literal )

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\HTMLInline

final class CommonMark\Node\HTMLInline extends CommonMark\Node\Text implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

public ?string $literal ;

/* Constructor */

public CommonMark\Node\Text::__construct ( void )

public CommonMark\Node\Text::__construct ( string $literal )

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\Image

final class CommonMark\Node\Image extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 属性 */

public ?string $url ;

public ?string $title ;

/* Constructor */

public __construct ( void )

public __construct ( string $url )

public __construct ( string $url , string $title )

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

CommonMark\Node\Image::__construct

Image Construction

说明

public CommonMark\Node\Image::__construct ( void )

public CommonMark\Node\Image::__construct ( string $url )

public CommonMark\Node\Image::__construct ( string $url , string $title )

Warning

本函数还未编写文档,仅有参数列表。

参数

url

title

类摘要

CommonMark\Node\Link

final class CommonMark\Node\Link extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 属性 */

public ?string $url ;

public ?string $title ;

/* Constructor */

public __construct ( void )

public __construct ( string $url )

public __construct ( string $url , string $title )

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

CommonMark\Node\Link::__construct

Link Construction

说明

public CommonMark\Node\Link::__construct ( void )

public CommonMark\Node\Link::__construct ( string $url )

public CommonMark\Node\Link::__construct ( string $url , string $title )

Warning

本函数还未编写文档,仅有参数列表。

参数

url

title

类摘要

CommonMark\Node\CustomBlock

final class CommonMark\Node\CustomBlock extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 属性 */

public ?string $onEnter ;

public ?string $onLeave ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

类摘要

CommonMark\Node\CustomInline

final class CommonMark\Node\CustomInline extends CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 继承的属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 属性 */

public ?string $onEnter ;

public ?string $onLeave ;

/* 继承的方法 */

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

public void CommonMark\Node::unlink ( void )

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

}

简介

Represents an Abstract Node, this final abstract is not for direct use by the programmer.

类摘要

CommonMark\Node

final abstract class CommonMark\Node implements CommonMark\Interfaces\IVisitable , Traversable {

/* 属性 */

public readonly ?Node $parent ;

public readonly ?Node $previous ;

public readonly ?Node $next ;

public readonly ?Node $lastChild ;

public readonly ?Node $firstChild ;

public readonly int $startLine ;

public readonly int $endLine ;

public readonly int $startColumn ;

public readonly int $endColumn ;

/* 方法 */

public CommonMark\Node appendChild ( CommonMark\Node $child )

public CommonMark\Node prependChild ( CommonMark\Node $child )

public CommonMark\Node insertAfter ( CommonMark\Node $sibling )

public CommonMark\Node insertBefore ( CommonMark\Node $sibling )

public CommonMark\Node replace ( CommonMark\Node $target )

public void unlink ( void )

public void accept ( CommonMark\Interfaces\IVisitor $visitor )

}

CommonMark\Node::appendChild

AST Manipulation

说明

public CommonMark\Node CommonMark\Node::appendChild ( CommonMark\Node $child )

Warning

本函数还未编写文档,仅有参数列表。

参数

child

返回值

CommonMark\Node::prependChild

AST Manipulation

说明

public CommonMark\Node CommonMark\Node::prependChild ( CommonMark\Node $child )

Warning

本函数还未编写文档,仅有参数列表。

参数

child

返回值

CommonMark\Node::insertAfter

AST Manipulation

说明

public CommonMark\Node CommonMark\Node::insertAfter ( CommonMark\Node $sibling )

Warning

本函数还未编写文档,仅有参数列表。

参数

sibling

返回值

CommonMark\Node::insertBefore

AST Manipulation

说明

public CommonMark\Node CommonMark\Node::insertBefore ( CommonMark\Node $sibling )

Warning

本函数还未编写文档,仅有参数列表。

参数

sibling

返回值

CommonMark\Node::replace

AST Manipulation

说明

public CommonMark\Node CommonMark\Node::replace ( CommonMark\Node $target )

Warning

本函数还未编写文档,仅有参数列表。

参数

target

返回值

CommonMark\Node::unlink

AST Manipulation

说明

public void CommonMark\Node::unlink ( void )

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

CommonMark\Node::accept

Visitation

说明

public void CommonMark\Node::accept ( CommonMark\Interfaces\IVisitor $visitor )

参数

visitor
An object implementing CommonMark\Interfaces\IVisitor

参见

简介

类摘要

CommonMark\Interfaces\IVisitor

final class CommonMark\Interfaces\IVisitor {

/* Constants */

const integer CommonMark\Interfaces\IVisitor::Done ;

const integer CommonMark\Interfaces\IVisitor::Enter ;

const integer CommonMark\Interfaces\IVisitor::Leave ;

/* 方法 */

abstract public ?int|IVisitable enter ( IVisitable $visitable )

abstract public ?int|IVisitable leave ( IVisitable $visitable )

}

CommonMark\Interfaces\IVisitor::enter

Visitation

说明

abstract public ?int|IVisitable CommonMark\Interfaces\IVisitor::enter ( IVisitable $visitable )

参数

visitable
The current CommonMark\Interfaces\IVisitable being entered

返回值

Returning CommonMark\Interfaces\IVisitor::Done will cause the backing iterator to exit.

Returning CommonMark\Interfaces\IVisitor::Enter will reset the backing iterator at entering the current IVisitable

Returning CommonMark\Interfaces\IVisitor::Leave will reset the backing iterator at exiting the current IVisitable

Returning an IVisitable will reset the backing iterator at entering the given IVisitable

Returning nothing will allow the backing iterator to continue

参见

CommonMark\Interfaces\IVisitor::leave

Visitation

说明

abstract public ?int|IVisitable CommonMark\Interfaces\IVisitor::leave ( IVisitable $visitable )

参数

visitable
The current CommonMark\Interfaces\IVisitable being exited

返回值

Returning CommonMark\Interfaces\IVisitor::Done will cause the backing iterator to exit.

Returning CommonMark\Interfaces\IVisitor::Enter will reset the backing iterator at entering the current IVisitable

Returning CommonMark\Interfaces\IVisitor::Leave will reset the backing iterator at exiting the current IVisitable

Returning an IVisitable will reset the backing iterator at exiting the given IVisitable

Returning nothing will allow the backing iterator to continue

参见

简介

类摘要

CommonMark\Interfaces\IVisitable

final class CommonMark\Interfaces\IVisitable {

abstract public void accept ( CommonMark\Interfaces\IVisitor $visitor )

}

CommonMark\Interfaces\IVisitable::accept

Visitation

说明

abstract public void CommonMark\Interfaces\IVisitable::accept ( CommonMark\Interfaces\IVisitor $visitor )

参数

visitor
An object implementing CommonMark\Interfaces\IVisitor

参见

简介

Provides an incremental parser as an alternative to the simple Parsing API function

类摘要

CommonMark\Parser

final class CommonMark\Parser {

/* Constructor */

public __construct ([ int $options ] )

/* 方法 */

public void parse ( string $buffer )

public CommonMark\Node finish ( void )

}

CommonMark\Parser::__construct

Parsing

说明

public CommonMark\Parser::__construct ([ int $options ] )

Warning

本函数还未编写文档,仅有参数列表。

参数

options
A mask of:

CommonMark\Parser\Normal (integer)

CommonMark\Parser\Normalize (integer)

CommonMark\Parser\ValidateUTF8 (integer)

CommonMark\Parser\Smart (integer)

CommonMark\Parser::parse

Parsing

说明

public void CommonMark\Parser::parse ( string $buffer )

Warning

本函数还未编写文档,仅有参数列表。

参数

buffer

返回值

CommonMark\Parser::finish

Parsing

说明

public CommonMark\Node CommonMark\Parser::finish ( void )

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

简介

CommonMark Query Language is a DSL for describing how to travel through a CommonMark Node tree implemented as a parser and compiler for a small set of instructions, and a virtual machine for executing those instructions.

Paths:

In it's most simplistic form, a CQL query combines the following paths and / to describe how to travel through a tree:

  • firstChild
  • lastChild
  • previous
  • next
  • parent

For example, /firstChild/lastChild would travel to the last child node of the first child node.

Loops

CQL can be instructed to loop, for example through the children of, or siblings to a particular node, by using the path children, or siblings. For example, /firstChild/children will travel to all the children of the first child node.

Subqueries

CQL can be instructed how to travel by using a subquery like [/firstChild]. For example, /firstChild/children[/firstChild] will travel to the first child node of all the children of the first child node.

Loop Constraints

While looping, CQL can be instructed to constrict the travelled path to nodes of particular type. For example /children(BlockQuote) will travel to the children of a node where the type is BlockQuote. The following types are recognized (case insensitively):

  • BlockQuote
  • List
  • Item
  • CodeBlock
  • HtmlBlock
  • CustomBlock
  • Paragraph
  • Heading
  • ThematicBreak
  • Text
  • SoftBreak
  • LineBreak
  • Code
  • HtmlInline
  • CustomInline
  • Emphasis
  • Strong
  • Link
  • Image

Types may be used as a union, for example /children(BlockQuote|List) will travel to the children of a node where the type is BlockQuote or List. Types, or unions of types, may be also negated. For example /children(~BlockQuote) will travel to the children of a node where the type is not BlockQuote, and /children(~BlockQuote|Paragraph) will travel to the children of a node where the type is not BlockQuote or Paragraph

Path Constraints

CQL can be instructed to create a loop to travel to a node of a particular type, at a particular path. For example, /firstChild(BlockQuote) will travel to the first child node where the type is BlockQuote. Note that like other loops for children and siblings, this kind of path can only be followed by a subquery.

Implementation Notes

While CQL has been implemented as part of the PHP CommonMark extension, it stands separately from PHP and does not use PHP's virtual machine or internal representation of values.

类摘要

CommonMark\CQL

class CommonMark\CQL {

/* Constructor */

public __construct ( string $query )

/* 方法 */

public __invoke ( \CommonMark\Node $root , callable $handler )

}

CommonMark\CQL::__construct

CQL Construction

说明

public CommonMark\CQL::__construct ( string $query )

参数

query
a CQL string

CommonMark\CQL::__invoke

CQL Execution

说明

public CommonMark\CQL::__invoke ( \CommonMark\Node $root , callable $handler )

Shall invoke the current CQL function on the given root, executing the given handler on entry to a \CommonMark\Node

参数

root
the root node of a tree

handler
should have the prototype:

?bool handler ( \CommonMark\Node $root , \CommonMark\Node $entering )

  • Should handler fail to return (void), or return null, CQL will continue executing
  • Should the handler return a truthy value, CQL will continue executing.
  • Should the handler return a falsy value, CQL will stop executing