Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

put stubs

  • Loading branch information...
commit c865de4615148e74930a086ee9f49b5b0777e20e 1 parent ca302a7
@chobie authored
Showing with 394 additions and 1 deletion.
  1. +394 −1 src/php_sundown.c
View
395 src/php_sundown.c
@@ -24,7 +24,7 @@
#include "php_sundown.h"
-zend_class_entry *sundown_class_entry;
+zend_class_entry *sundown_class_entry, *sundown_render_base_class_entry, *sundown_markdown_class_entry, *sundown_render_html_class_entry;
void php_sundown_init(TSRMLS_D);
@@ -586,6 +586,8 @@ static zend_function_entry php_sundown_methods[] = {
PHP_MINIT_FUNCTION(sundown) {
php_sundown_init(TSRMLS_C);
+ php_sundown_render_base_init(TSRMLS_C);
+ php_sundown_render_html_init(TSRMLS_C);
return SUCCESS;
}
@@ -611,6 +613,397 @@ zend_module_entry sundown_module_entry = {
STANDARD_MODULE_PROPERTIES
};
+
+/* begin Todo: move these declaration to each files */
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_enable_pants, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_block_code, 0, 0, 2)
+ ZEND_ARG_INFO(0, code)
+ ZEND_ARG_INFO(0, language)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_block_quote, 0, 0, 1)
+ ZEND_ARG_INFO(0, quote)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_block_html, 0, 0, 1)
+ ZEND_ARG_INFO(0, raw_html)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_header, 0, 0, 2)
+ ZEND_ARG_INFO(0, htext)
+ ZEND_ARG_INFO(0, header_level)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_hrule, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_list_box, 0, 0, 2)
+ ZEND_ARG_INFO(0, contents)
+ ZEND_ARG_INFO(0, list_type)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_list_item, 0, 0, 2)
+ ZEND_ARG_INFO(0, text)
+ ZEND_ARG_INFO(0, list_type)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_paragraph, 0, 0, 1)
+ ZEND_ARG_INFO(0, text)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_table, 0, 0, 2)
+ ZEND_ARG_INFO(0, header)
+ ZEND_ARG_INFO(0, body)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_table_row, 0, 0, 1)
+ ZEND_ARG_INFO(0, content)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_table_cell, 0, 0, 2)
+ ZEND_ARG_INFO(0, content)
+ ZEND_ARG_INFO(0, alignment)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_autolink, 0, 0, 2)
+ ZEND_ARG_INFO(0, link)
+ ZEND_ARG_INFO(0, link_type)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_codespan, 0, 0, 1)
+ ZEND_ARG_INFO(0, code)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_double_emphasis, 0, 0, 1)
+ ZEND_ARG_INFO(0, text)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_emphasis, 0, 0, 1)
+ ZEND_ARG_INFO(0, text)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_image, 0, 0, 3)
+ ZEND_ARG_INFO(0, link)
+ ZEND_ARG_INFO(0, title)
+ ZEND_ARG_INFO(0, alt_text)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_linebreak, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_link, 0, 0, 3)
+ ZEND_ARG_INFO(0, link)
+ ZEND_ARG_INFO(0, title)
+ ZEND_ARG_INFO(0, content)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_raw_html, 0, 0, 1)
+ ZEND_ARG_INFO(0, raw_html)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_triple_emphasis, 0, 0, 1)
+ ZEND_ARG_INFO(0, text)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_strikethrough, 0, 0, 1)
+ ZEND_ARG_INFO(0, text)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_superscript, 0, 0, 1)
+ ZEND_ARG_INFO(0, text)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_entity, 0, 0, 1)
+ ZEND_ARG_INFO(0, text)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_normal_text, 0, 0, 1)
+ ZEND_ARG_INFO(0, text)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_doc_header, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_doc_footer, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_preprocess, 0, 0, 1)
+ ZEND_ARG_INFO(0, full_document)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sundown_render_base_postprocess, 0, 0, 1)
+ ZEND_ARG_INFO(0, full_document)
+ZEND_END_ARG_INFO()
+
+/* {{{ proto void enable_pants()
+*/
+PHP_METHOD(sundown_render_base, enable_pants)
+{
+}
+/* }}} */
+
+/* {{{ proto void block_code($code, $language)
+*/
+PHP_METHOD(sundown_render_base, block_code)
+{
+}
+/* }}} */
+
+/* {{{ proto void block_quote($quote)
+*/
+PHP_METHOD(sundown_render_base, block_quote)
+{
+}
+/* }}} */
+
+/* {{{ proto void block_html($raw_html)
+*/
+PHP_METHOD(sundown_render_base, block_html)
+{
+}
+/* }}} */
+
+/* {{{ proto void header($htext,$header_level)
+*/
+PHP_METHOD(sundown_render_base, header)
+{
+}
+/* }}} */
+
+/* {{{ proto void hrule()
+*/
+PHP_METHOD(sundown_render_base, hrule)
+{
+}
+/* }}} */
+
+/* {{{ proto void list_box($contents, $list_type)
+*/
+PHP_METHOD(sundown_render_base, list_box)
+{
+}
+/* }}} */
+
+/* {{{ proto void list_item($text, $list_type)
+*/
+PHP_METHOD(sundown_render_base, list_item)
+{
+}
+/* }}} */
+
+/* {{{ proto void paragraph($text)
+*/
+PHP_METHOD(sundown_render_base, paragraph)
+{
+}
+/* }}} */
+
+/* {{{ proto void table($header, $body)
+*/
+PHP_METHOD(sundown_render_base, table)
+{
+}
+/* }}} */
+
+/* {{{ proto void table_row($content)
+*/
+PHP_METHOD(sundown_render_base, table_row)
+{
+}
+/* }}} */
+
+/* {{{ proto void table_cell($content, $alignment)
+*/
+PHP_METHOD(sundown_render_base, table_cell)
+{
+}
+/* }}} */
+
+/* {{{ proto void autolink($link, $link_type)
+*/
+PHP_METHOD(sundown_render_base, autolink)
+{
+}
+/* }}} */
+
+/* {{{ proto void codespan($code)
+*/
+PHP_METHOD(sundown_render_base, codespan)
+{
+}
+/* }}} */
+
+/* {{{ proto void double_emphasis($text)
+*/
+PHP_METHOD(sundown_render_base, double_emphasis)
+{
+}
+/* }}} */
+
+/* {{{ proto void emphasis($text)
+*/
+PHP_METHOD(sundown_render_base, emphasis)
+{
+}
+/* }}} */
+
+/* {{{ proto void image($link, $title, $alt_text)
+*/
+PHP_METHOD(sundown_render_base, image)
+{
+}
+/* }}} */
+
+/* {{{ proto void linebreak()
+*/
+PHP_METHOD(sundown_render_base, linebreak)
+{
+}
+/* }}} */
+
+/* {{{ proto void link($link,$title,$content)
+*/
+PHP_METHOD(sundown_render_base, link)
+{
+}
+/* }}} */
+
+/* {{{ proto void raw_html($raw_html)
+*/
+PHP_METHOD(sundown_render_base, raw_html)
+{
+}
+/* }}} */
+
+/* {{{ proto void triple_emphasis($text)
+*/
+PHP_METHOD(sundown_render_base, triple_emphasis)
+{
+}
+/* }}} */
+
+/* {{{ proto void strikethrough($text)
+*/
+PHP_METHOD(sundown_render_base, strikethrough)
+{
+}
+/* }}} */
+
+/* {{{ proto void superscript($text)
+*/
+PHP_METHOD(sundown_render_base, superscript)
+{
+}
+/* }}} */
+
+/* {{{ proto void entity($text)
+*/
+PHP_METHOD(sundown_render_base, entity)
+{
+}
+/* }}} */
+
+/* {{{ proto void normal_text($text)
+*/
+PHP_METHOD(sundown_render_base, normal_text)
+{
+}
+/* }}} */
+
+/* {{{ proto void doc_header()
+*/
+PHP_METHOD(sundown_render_base, doc_header)
+{
+}
+/* }}} */
+
+/* {{{ proto void doc_footer()
+*/
+PHP_METHOD(sundown_render_base, doc_footer)
+{
+}
+/* }}} */
+
+/* {{{ proto void preprocess($full_document)
+*/
+PHP_METHOD(sundown_render_base, preprocess)
+{
+}
+/* }}} */
+
+/* {{{ proto void postprocess($full_document)
+*/
+PHP_METHOD(sundown_render_base, postprocess)
+{
+}
+/* }}} */
+
+static zend_function_entry php_sundown_render_base_methods[] = {
+ PHP_ME(sundown_render_base, enable_pants, arginfo_sundown_render_base_enable_pants, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, block_code, arginfo_sundown_render_base_block_code, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, block_quote, arginfo_sundown_render_base_block_quote, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, block_html, arginfo_sundown_render_base_block_html, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, header, arginfo_sundown_render_base_header, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, hrule, arginfo_sundown_render_base_hrule, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, list_box, arginfo_sundown_render_base_list_box, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, list_item, arginfo_sundown_render_base_list_item, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, paragraph, arginfo_sundown_render_base_paragraph, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, table, arginfo_sundown_render_base_table, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, table_row, arginfo_sundown_render_base_table_row, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, table_cell, arginfo_sundown_render_base_table_cell, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, autolink, arginfo_sundown_render_base_autolink, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, codespan, arginfo_sundown_render_base_codespan, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, double_emphasis, arginfo_sundown_render_base_double_emphasis, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, emphasis, arginfo_sundown_render_base_emphasis, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, image, arginfo_sundown_render_base_image, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, linebreak, arginfo_sundown_render_base_linebreak, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, link, arginfo_sundown_render_base_link, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, raw_html, arginfo_sundown_render_base_raw_html, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, triple_emphasis, arginfo_sundown_render_base_triple_emphasis, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, strikethrough, arginfo_sundown_render_base_strikethrough, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, superscript, arginfo_sundown_render_base_superscript, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, entity, arginfo_sundown_render_base_entity, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, normal_text, arginfo_sundown_render_base_normal_text, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, doc_header, arginfo_sundown_render_base_doc_header, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, doc_footer, arginfo_sundown_render_base_doc_footer, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, preprocess, arginfo_sundown_render_base_preprocess, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown_render_base, postprocess, arginfo_sundown_render_base_postprocess, ZEND_ACC_PUBLIC)
+ {NULL,NULL,NULL}
+};
+
+void php_sundown_render_base_init(TSRMLS_D)
+{
+ zend_class_entry ce;
+ INIT_NS_CLASS_ENTRY(ce, ZEND_NS_NAME("Sundown","Render"),"Base", php_sundown_render_base_methods);
+ sundown_render_base_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
+}
+
+static zend_function_entry php_sundown_render_html_methods[] = {
+ {NULL,NULL,NULL}
+};
+
+void php_sundown_render_html_init(TSRMLS_D)
+{
+ zend_class_entry ce;
+ INIT_NS_CLASS_ENTRY(ce, ZEND_NS_NAME("Sundown","Render"),"HTML", php_sundown_render_html_methods);
+ sundown_render_html_class_entry = zend_register_internal_class_ex(&ce, sundown_render_base_class_entry, NULL TSRMLS_CC);
+}
+
+static zend_function_entry php_sundown_markdown_methods[] = {
+ {NULL,NULL,NULL}
+};
+
+void php_sundown_markdown_init(TSRMLS_D)
+{
+ zend_class_entry ce;
+ INIT_NS_CLASS_ENTRY(ce, "Sundown","Markdown", php_sundown_markdown_methods);
+ sundown_markdown_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
+}
+
+/* end Todo: move these declaration to each files */
+
void php_sundown_init(TSRMLS_D)
{
zend_class_entry ce;
Please sign in to comment.
Something went wrong with that request. Please try again.