diff --git a/README.md b/README.md index c0ff996..2f5fb23 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,13 @@ table, and you may dispatch the URL based on the transition table in C. +Pattern Syntax +----------------------- + + /blog/post/{id} use [^/]+ regular expression by default. + + /blog/post/{id:\d+} use `\d+` regular expression instead of default. + Use case in PHP @@ -14,7 +21,7 @@ Use case in PHP ```php // Here is the paths data structure $paths = [ - '/blog/post/:id' => [ 'controller' => 'PostController', 'action' => 'item', 'method' => 'GET' ], + '/blog/post/{id}' => [ 'controller' => 'PostController', 'action' => 'item', 'method' => 'GET' ], '/blog/post' => [ 'controller' => 'PostController', 'action' => 'list', 'method' => 'GET' ], '/blog/post' => [ 'controller' => 'PostController', 'action' => 'create', 'method' => 'POST' ], '/blog' => [ 'controller' => 'BlogController', 'action' => 'list', 'method' => 'GET' ], diff --git a/configure.ac b/configure.ac index bdc92a3..a80fd30 100644 --- a/configure.ac +++ b/configure.ac @@ -1,24 +1,20 @@ -AC_INIT([r2],[1.4],[yoanlin93@gmail.com],[r2],[http://github.com/c9s/r2]) -# AC_CONFIG_AUX_DIR(config) -# AC_CONFIG_SRCDIR(Front/mona.cpp) -# AM_INIT_AUTOMAKE() +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.69]) +AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) +AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADERS([config.h]) -CFLAGS=$CXXFLAGS -AC_SUBST(CFLAGS) +# Checks for programs. +AC_PROG_CC -AC_HEADER_STDC +# Checks for libraries. -AC_CHECK_HEADERS(stdlib.h string.h sys/time.h unistd.h - ,,AC_MSG_ERROR(required header file not found)) +# Checks for header files. -dnl ========== checks for typedefs, structures, and compiler characteristics ========== +# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_INLINE -AC_TYPE_SIZE_T +# Checks for library functions. -AC_FUNC_MALLOC -AC_FUNC_MEMCMP -AC_FUNC_MMAP AC_OUTPUT