escape_tag($matches[2]) . $matches[3]; } interface PostdataInterface { /* Postdata format: * * The Postdata array is a simple intermediate data format * for the Post content and metadata. * It is slightly abstracted from the SQL format itself but will * only reformat keys, *not* do any alteration of the data itself. * * Any supported fields will be integrated into the database. * Other fields will be saved in a JSON structure, and will * be restored afterward. * * The following fields are mandatory for *writing* * - path: String, must be sanitized to consist of just alphanumeric * characters, `_-./` * used to identify the post itself * * The following fields may be returned by the database: * - id * - created_at * - updated_at * - view_count * * The following fields may be supported by the database: * - markdown: String, markdown of the post. May be * stored separately and won't be returned by default! * - type: String, defining the type of the post * - title: String, self-explanatory * - tags: Array of strings * - settings: Hash, recursively merged settings (calculated by DB!) * * The following fields are *recommended*, but nothing more: * - icon: String, optionally defining */ public function stub_postdata($path); public function stub_postdata_tree($path); public function set_postdata($data); public function set_post_markdown($id, $markdown); public function get_postdata($path); // Returns a key-value pair of child paths => child data public function get_post_children($path, $limit = 50, $depth_start = 1, $depth_end = 1, $order_by = 'path'); public function get_post_markdown($id); // Returns an array of PostData information // based on the tag search list // // Tag searchlist is comprised of space-separated // tags. Each tag can have a weighting prefix, // and some special tags exist (such as limit:N, // order:S). public function search_posts($taglist); } ?>