getting closer to full port of web app starter
This commit is contained in:
parent
d1167aec3b
commit
af642c8167
@ -444,7 +444,7 @@ Common failure modes:
|
||||
- WebSocket upgrade fails
|
||||
Check that nginx is routing `.ws.uce` to `proxy_pass`, not `fastcgi_pass`, and that `HTTP_PORT` is reachable on localhost.
|
||||
- Requests compile but immediately crash
|
||||
Check `journalctl -u uce.service` and clear stale generated artifacts under `BIN_DIRECTORY` if you have changed runtime ABI or entrypoint signatures.
|
||||
Check `journalctl -u uce.service`. Generated units now carry an ABI metadata sidecar and should be recompiled automatically after runtime ABI changes, but clearing stale artifacts under `BIN_DIRECTORY` is still a useful last-resort recovery step if the cache has been damaged manually.
|
||||
- nginx serves raw source or internal files
|
||||
Tighten the server root and add explicit deny rules for non-public directories.
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
/*load_declarations*/
|
||||
|
||||
extern "C" void set_current_request(Request* _request)
|
||||
extern "C" void __uce_set_current_request(Request* _request)
|
||||
{
|
||||
context = _request;
|
||||
/*load_units*/
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
String Functions
|
||||
|
||||
ascii_safe_name
|
||||
contains
|
||||
concat
|
||||
filter
|
||||
first
|
||||
@ -8,6 +9,10 @@ join
|
||||
json_encode
|
||||
nibble
|
||||
print
|
||||
strpos
|
||||
str_ends_with
|
||||
str_starts_with
|
||||
substr
|
||||
split
|
||||
split_space
|
||||
split_utf8
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
Types
|
||||
|
||||
array_merge
|
||||
DTree
|
||||
get_by_path
|
||||
set_status
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
URI Functions
|
||||
|
||||
encode_query
|
||||
redirect
|
||||
session_id_create
|
||||
parse_query
|
||||
uri_decode
|
||||
|
||||
@ -168,6 +168,10 @@ RENDER(Request& context)
|
||||
{
|
||||
?><h3>Description</h3><?
|
||||
}
|
||||
else if(layout_class == "related")
|
||||
{
|
||||
?><h3>Related PHP and JS</h3><?
|
||||
}
|
||||
else if(layout_class == "see")
|
||||
{
|
||||
?><h3>Related</h3><?
|
||||
|
||||
@ -69,3 +69,7 @@ Invokes another UCE file using the current or supplied request context
|
||||
|
||||
:see
|
||||
>types
|
||||
|
||||
:related
|
||||
**PHP:** `$_SERVER`, `$_GET`, `$_POST`, `$_COOKIE`, `$_SESSION`, `header()`, and `http_response_code()`
|
||||
**JavaScript / Node.js:** Express `req` and `res`, Fetch `Request`, `Headers`, cookies or session middleware, and per-connection state in WebSocket handlers
|
||||
|
||||
@ -34,3 +34,7 @@ Examples:
|
||||
>component_render
|
||||
>1_RENDER
|
||||
>1_WS
|
||||
|
||||
:related
|
||||
**PHP:** View partials, reusable include files, small template helpers, and server-side component-like rendering patterns
|
||||
**JavaScript / Node.js:** Reusable component functions, React or Vue components, and server-rendered partials
|
||||
|
||||
@ -20,3 +20,7 @@ Pages intended to serve WebSocket traffic may expose both `RENDER(Request& conte
|
||||
|
||||
:see
|
||||
>ob
|
||||
|
||||
:related
|
||||
**PHP:** Front controller entrypoints, template files, `include`, `require`, and route handlers that write the HTTP response
|
||||
**JavaScript / Node.js:** Express or Fastify route handlers, page controller functions, and SSR entrypoints that build a response
|
||||
|
||||
@ -12,15 +12,15 @@ UCE reassembles fragmented messages before calling `WS(Request& context)`. Text
|
||||
|
||||
The current message data is available in `context.call`:
|
||||
|
||||
context.call["message"] : current message payload
|
||||
- `context.call["message"]`: current message payload
|
||||
- `context.call["connection_id"]`: sender connection ID
|
||||
- `context.call["scope"]`: current endpoint scope
|
||||
- `context.call["opcode"]`: WebSocket opcode of the current message
|
||||
- `context.call["document_uri"]`: request URI of the current endpoint
|
||||
|
||||
context.call["connection_id"] : sender connection ID
|
||||
|
||||
context.call["scope"] : current endpoint scope
|
||||
|
||||
context.call["opcode"] : WebSocket opcode of the current message
|
||||
|
||||
context.call["document_uri"] : request URI of the current endpoint
|
||||
:related
|
||||
**PHP:** Ratchet `onMessage`, Workerman WebSocket handlers, or lower-level callbacks around accepted socket connections.
|
||||
**JavaScript / Node.js:** Browser `WebSocket` `message` handlers and Node `ws` server `connection` and `message` callbacks.
|
||||
|
||||
:see
|
||||
>websocket
|
||||
|
||||
@ -18,7 +18,7 @@ The implementation lives in `src/lib/compiler.cpp`. It does not try to parse all
|
||||
|
||||
:Pipeline
|
||||
- The generated file starts by including `COMPILER_SYS_PATH/src/lib/uce_lib.h`.
|
||||
- It then inlines the configured setup template from `SETUP_TEMPLATE` (by default `scripts/setup.h.template`), which defines `set_current_request(Request*)`.
|
||||
- It then inlines the configured setup template from `SETUP_TEMPLATE` (by default `scripts/setup.h.template`), which defines the internal hook `__uce_set_current_request(Request*)`.
|
||||
- It inserts `#line 1` before page code so compiler diagnostics point back to the original `.uce` file.
|
||||
- Each literal block is rewritten into one or more `print(R"( ... )");` calls.
|
||||
- `<? ... ?>` temporarily breaks out of literal printing, emits the enclosed C++ unchanged, then resumes literal output.
|
||||
@ -26,7 +26,8 @@ The implementation lives in `src/lib/compiler.cpp`. It does not try to parse all
|
||||
- `<?: ... ?>` becomes `print(...);` and is intended for trusted markup or already-escaped content.
|
||||
- `#load "file.uce"` is replaced with a generated C++ `#include` that points at the loaded unit's preprocessed `.cpp` file under `BIN_DIRECTORY`.
|
||||
- Lines beginning with `EXPORT` are scanned so their declarations can be written to a sibling `.exports.txt` file.
|
||||
- Lines beginning with `COMPONENT:NAME(...)` are rewritten into exported `component_render_NAME(...)` functions for the component helpers.
|
||||
- Lines beginning with `RENDER:NAME(...)` are rewritten into exported `__uce_render_NAME(...)` functions.
|
||||
- Lines beginning with `COMPONENT:NAME(...)` are rewritten into exported `__uce_component_NAME(...)` functions for the component helpers.
|
||||
- The final generated source is written to `BIN_DIRECTORY + src_path + "/" + source_file + ".cpp"`.
|
||||
- `scripts/compile` then compiles that generated `.cpp` into `source_file + ".so"` with `clang++ -shared -std=c++20 ...`.
|
||||
|
||||
@ -96,3 +97,7 @@ unit_render
|
||||
unit_call
|
||||
0_context
|
||||
1_COMPONENT
|
||||
|
||||
:related
|
||||
**PHP:** Template tags like `<?php ... ?>`, `<?= ... ?>`, output buffering, and compile-time include patterns
|
||||
**JavaScript / Node.js:** JSX transforms, tagged templates, server-side rendering pipelines, and build-time HTML generation
|
||||
|
||||
@ -9,20 +9,24 @@ Dynamic tree/container type used throughout UCE for structured data.
|
||||
Use `t["key"]` to access or create child entries. Use `push()` / `pop()` when treating it like an array-like container with numeric string keys.
|
||||
|
||||
Common uses include:
|
||||
`json_decode()` / `json_encode()`
|
||||
`context.var`
|
||||
`context.call`
|
||||
`unit_call()` return values
|
||||
- `json_decode()` / `json_encode()`
|
||||
- `context.var`
|
||||
- `context.call`
|
||||
- `unit_call()` return values
|
||||
|
||||
Useful methods include:
|
||||
`to_string()`
|
||||
`to_json()`
|
||||
`get_type_name()`
|
||||
`get_by_path()`
|
||||
`set_bool()`
|
||||
`remove()`
|
||||
`clear()`
|
||||
`each()`
|
||||
- `to_string()`
|
||||
- `to_json()`
|
||||
- `get_type_name()`
|
||||
- `get_by_path()`
|
||||
- `set_bool()`
|
||||
- `remove()`
|
||||
- `clear()`
|
||||
- `each()`
|
||||
|
||||
:related
|
||||
**PHP:** Nested associative arrays, `stdClass`, decoded JSON trees, and helper accessors for deep array paths.
|
||||
**JavaScript / Node.js:** Plain objects, arrays, `Map`, and JSON-shaped data passed between handlers.
|
||||
|
||||
:see
|
||||
>types
|
||||
|
||||
@ -14,3 +14,7 @@ For UTF-8-aware splitting, use helpers such as `split_utf8()` instead of assumin
|
||||
|
||||
:see
|
||||
>types
|
||||
|
||||
:related
|
||||
**PHP:** Native PHP strings with helpers such as `substr()`, `trim()`, `explode()`, and `implode()`
|
||||
**JavaScript / Node.js:** JavaScript `string` values with methods such as `slice()`, `trim()`, `split()`, and `join()`
|
||||
|
||||
@ -20,3 +20,7 @@ Related helpers such as `parse_query()` and `encode_query()` convert between que
|
||||
|
||||
:see
|
||||
>types
|
||||
|
||||
:related
|
||||
**PHP:** Associative arrays keyed by string, especially request bags like `$_GET` and `$_SERVER`
|
||||
**JavaScript / Node.js:** Plain objects, dictionaries, `Map`, and header or query objects in web frameworks
|
||||
|
||||
@ -12,3 +12,7 @@ This is useful when turning user- or config-provided names into handler suffixes
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** Slug or safe-filename helpers built with `preg_replace()` and transliteration utilities
|
||||
**JavaScript / Node.js:** Regex-based slugify or safe-name helpers used for URLs and filenames
|
||||
|
||||
@ -10,3 +10,7 @@ Isolates the file name component from a path/file name.
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `basename()`
|
||||
**JavaScript / Node.js:** Node `path.basename()`
|
||||
|
||||
@ -28,3 +28,7 @@ Example:
|
||||
|
||||
:see
|
||||
>ob
|
||||
|
||||
:related
|
||||
**PHP:** Reusable template partials or helper-rendered view fragments returned as strings
|
||||
**JavaScript / Node.js:** Component render helpers, especially patterns that return markup as a string
|
||||
|
||||
@ -12,3 +12,7 @@ This is useful when a page wants to render an optional component if it is presen
|
||||
|
||||
:see
|
||||
>ob
|
||||
|
||||
:related
|
||||
**PHP:** `function_exists()`, `class_exists()`, or file-existence checks before including a partial
|
||||
**JavaScript / Node.js:** Module existence checks, dynamic import guards, or registry lookups for named components
|
||||
|
||||
@ -19,3 +19,7 @@ Example:
|
||||
|
||||
:see
|
||||
>ob
|
||||
|
||||
:related
|
||||
**PHP:** Rendering a partial directly into the current output buffer rather than returning a string
|
||||
**JavaScript / Node.js:** Direct `res.write()`-style partial rendering or imperative component mount helpers
|
||||
|
||||
@ -12,3 +12,7 @@ This is primarily a debugging helper so you can see which concrete file a shorth
|
||||
|
||||
:see
|
||||
>ob
|
||||
|
||||
:related
|
||||
**PHP:** Resolving include paths or view names to a concrete template file before rendering
|
||||
**JavaScript / Node.js:** Resolving module paths, alias-based imports, or component registry entries
|
||||
|
||||
@ -9,3 +9,7 @@ Returns a string with all the parameters concatenated into one.
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** String concatenation with `.` or helpers like `implode()`
|
||||
**JavaScript / Node.js:** String concatenation with `+`, template literals, or `Array.prototype.join()`
|
||||
|
||||
@ -9,3 +9,7 @@ Returns the current working directory.
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `getcwd()`
|
||||
**JavaScript / Node.js:** Node `process.cwd()`
|
||||
|
||||
@ -9,3 +9,7 @@ Sets a new working directory.
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `chdir()`
|
||||
**JavaScript / Node.js:** Node `process.chdir()`
|
||||
|
||||
@ -10,3 +10,7 @@ Isolates the directory name component from a path/file name.
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `dirname()`
|
||||
**JavaScript / Node.js:** Node `path.dirname()`
|
||||
|
||||
@ -11,3 +11,7 @@ This function works exactly like generate_float(), but context.random_index is u
|
||||
|
||||
:see
|
||||
>noise
|
||||
|
||||
:related
|
||||
**PHP:** `random_int()`, `mt_rand()`, and custom numeric random helpers
|
||||
**JavaScript / Node.js:** `Math.random()` or `crypto.getRandomValues()`-based helpers for numeric ranges
|
||||
|
||||
@ -11,3 +11,7 @@ This function works exactly like generate_int(), but context.random_index is use
|
||||
|
||||
:see
|
||||
>noise
|
||||
|
||||
:related
|
||||
**PHP:** `random_int()`, `mt_rand()`, and custom numeric random helpers
|
||||
**JavaScript / Node.js:** `Math.random()` or `crypto.getRandomValues()`-based helpers for numeric ranges
|
||||
|
||||
@ -10,3 +10,7 @@ Encodes a StringMap containing URL parameters into a single String.
|
||||
|
||||
:see
|
||||
>uri
|
||||
|
||||
:related
|
||||
**PHP:** `http_build_query()`
|
||||
**JavaScript / Node.js:** `URLSearchParams` and `toString()`
|
||||
|
||||
@ -11,3 +11,7 @@ Converts a relative path name into an absolute path, using the current working d
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `realpath()` and application-specific path normalization helpers
|
||||
**JavaScript / Node.js:** Node `path.resolve()` and `path.normalize()`
|
||||
|
||||
@ -10,3 +10,7 @@ Opens or creates a given file and appends data to it.
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `file_put_contents($file, $data, FILE_APPEND)`
|
||||
**JavaScript / Node.js:** Node `fs.appendFileSync()` or `fs.promises.appendFile()`
|
||||
|
||||
@ -10,3 +10,7 @@ Checks whether the file or path specified by 'path' exists.
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `file_exists()` or `is_file()`
|
||||
**JavaScript / Node.js:** Node `fs.existsSync()` or `fs.stat()`
|
||||
|
||||
@ -10,3 +10,7 @@ Reads the file identified by 'file_name' and returns it as a String. If the file
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `file_get_contents()`
|
||||
**JavaScript / Node.js:** Node `fs.readFileSync()` or `fs.promises.readFile()`
|
||||
|
||||
@ -11,3 +11,7 @@ Retrieves the last modification date of 'file_name' as a Unix timestamp.
|
||||
:see
|
||||
>sys
|
||||
>time
|
||||
|
||||
:related
|
||||
**PHP:** `filemtime()`
|
||||
**JavaScript / Node.js:** Node `fs.statSync().mtimeMs` or `fs.promises.stat()`
|
||||
|
||||
@ -11,3 +11,7 @@ Writes the String 'content' into a file identified by 'file_name'. Any pre-exist
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `file_put_contents()`
|
||||
**JavaScript / Node.js:** Node `fs.writeFileSync()` or `fs.promises.writeFile()`
|
||||
|
||||
@ -9,3 +9,7 @@ Deletes the file identified by `file_name`.
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `unlink()`
|
||||
**JavaScript / Node.js:** Node `fs.unlinkSync()` or `fs.promises.unlink()`
|
||||
|
||||
@ -12,3 +12,7 @@ Returns a list containing the members of 'items' for which 'f' returned boolean
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** `array_filter()` for arrays or custom predicate-based filtering over strings and collections
|
||||
**JavaScript / Node.js:** `Array.prototype.filter()` and custom predicate helpers
|
||||
|
||||
@ -10,3 +10,7 @@ Given a variable number of String parameters, the first() function returns the f
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** Null-coalescing patterns like `$a ?? $b`, fallback helpers, or `reset()` for arrays
|
||||
**JavaScript / Node.js:** `??`, `||`, and small fallback helper functions
|
||||
|
||||
@ -8,3 +8,7 @@ return value : a f64 containing the number (0 if no number could be identified).
|
||||
:desc
|
||||
Extracts a floating point number from a String.
|
||||
|
||||
|
||||
:related
|
||||
**PHP:** `floatval()`
|
||||
**JavaScript / Node.js:** `Number()` or `parseFloat()`
|
||||
|
||||
@ -14,3 +14,7 @@ Generates a noise value between 'from' and 'to', given the 'index' and 'seed' nu
|
||||
|
||||
:see
|
||||
>noise
|
||||
|
||||
:related
|
||||
**PHP:** `random_int()`, `mt_rand()`, and custom numeric random helpers
|
||||
**JavaScript / Node.js:** `Math.random()` or `crypto.getRandomValues()`-based helpers for numeric ranges
|
||||
|
||||
@ -14,3 +14,7 @@ Generates a noise value between 'from' and 'to', given the 'index' and 'seed' nu
|
||||
|
||||
:see
|
||||
>noise
|
||||
|
||||
:related
|
||||
**PHP:** `random_int()`, `mt_rand()`, and custom numeric random helpers
|
||||
**JavaScript / Node.js:** `Math.random()` or `crypto.getRandomValues()`-based helpers for numeric ranges
|
||||
|
||||
@ -11,3 +11,7 @@ Generates a noise value in the range from 0 to 1 for the given 'index' and 'seed
|
||||
|
||||
:see
|
||||
>noise
|
||||
|
||||
:related
|
||||
**PHP:** There is no built-in PHP equivalent; this is closest to userland noise or deterministic pseudo-random helpers
|
||||
**JavaScript / Node.js:** There is no built-in browser equivalent; closest matches are userland noise libraries or deterministic PRNG helpers
|
||||
|
||||
@ -11,3 +11,7 @@ Generates a noise value for the given 'index' and 'seed' values.
|
||||
|
||||
:see
|
||||
>noise
|
||||
|
||||
:related
|
||||
**PHP:** There is no built-in PHP equivalent; this is closest to userland noise or deterministic pseudo-random helpers
|
||||
**JavaScript / Node.js:** There is no built-in browser equivalent; closest matches are userland noise libraries or deterministic PRNG helpers
|
||||
|
||||
@ -11,3 +11,7 @@ Generates a noise value for the given 'index' and 'seed' values.
|
||||
|
||||
:see
|
||||
>noise
|
||||
|
||||
:related
|
||||
**PHP:** There is no built-in PHP equivalent; this is closest to userland noise or deterministic pseudo-random helpers
|
||||
**JavaScript / Node.js:** There is no built-in browser equivalent; closest matches are userland noise libraries or deterministic PRNG helpers
|
||||
|
||||
@ -11,3 +11,7 @@ Returns the sha1 hash of 's'.
|
||||
|
||||
:see
|
||||
>noise
|
||||
|
||||
:related
|
||||
**PHP:** `sha1()`
|
||||
**JavaScript / Node.js:** Node `crypto.createHash("sha1")` or browser `SubtleCrypto` wrappers
|
||||
|
||||
@ -18,3 +18,7 @@ Typical usage:
|
||||
DTree
|
||||
0_context
|
||||
>types
|
||||
|
||||
:related
|
||||
**PHP:** Deep array access helpers for associative arrays, decoded JSON, or configuration trees
|
||||
**JavaScript / Node.js:** Optional chaining like `obj?.a?.b`, lodash `get`, or small path-walking helpers
|
||||
|
||||
@ -11,3 +11,7 @@ Returns a version of the input string where the following characters have been r
|
||||
- < → lt;
|
||||
- > → >
|
||||
- " → "
|
||||
|
||||
:related
|
||||
**PHP:** `htmlspecialchars()` or `htmlentities()`
|
||||
**JavaScript / Node.js:** Safe text insertion via `textContent` or server-side HTML escaping libraries
|
||||
|
||||
@ -9,3 +9,7 @@ return value : a u64 containing the number (0 if no number could be identified).
|
||||
:desc
|
||||
Extracts an integer from a String.
|
||||
|
||||
|
||||
:related
|
||||
**PHP:** `intval()`
|
||||
**JavaScript / Node.js:** `Number()` or `parseInt()`
|
||||
|
||||
@ -11,3 +11,7 @@ Joins the items contained in 'l' into a single String.
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** `implode()`
|
||||
**JavaScript / Node.js:** `Array.prototype.join()`
|
||||
|
||||
@ -8,3 +8,7 @@ return value : a DTree object containing the deserialized JSON data
|
||||
:desc
|
||||
Deserializes 's' into a DTree structure.
|
||||
|
||||
|
||||
:related
|
||||
**PHP:** `json_decode()`
|
||||
**JavaScript / Node.js:** `JSON.parse()`
|
||||
|
||||
@ -13,3 +13,7 @@ Serializes either a `String` or a `DTree` into JSON notation.
|
||||
When passed a `String`, `json_encode()` returns a quoted and escaped JSON string literal.
|
||||
|
||||
When passed a `DTree`, scalar values are serialized directly and nested map values are emitted as JSON objects.
|
||||
|
||||
:related
|
||||
**PHP:** `json_encode()`
|
||||
**JavaScript / Node.js:** `JSON.stringify()`
|
||||
|
||||
@ -9,3 +9,7 @@ Includes another UCE file
|
||||
|
||||
:see
|
||||
>ob
|
||||
|
||||
:related
|
||||
**PHP:** `include`, `require`, and config-loader patterns that resolve and import another file
|
||||
**JavaScript / Node.js:** `import()`, `require()`, or file-loader helpers that resolve modules at runtime
|
||||
|
||||
@ -10,3 +10,7 @@ Returns a list of files and subdirectories within the given 'path'.
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `scandir()`, `glob()`, or `DirectoryIterator`
|
||||
**JavaScript / Node.js:** Node `fs.readdirSync()` or `fs.promises.readdir()`
|
||||
|
||||
@ -75,3 +75,7 @@ component
|
||||
component_render
|
||||
json_encode
|
||||
DTree
|
||||
|
||||
:related
|
||||
**PHP:** CommonMark or Parsedown parsing pipelines that expose a syntax tree or token stream
|
||||
**JavaScript / Node.js:** `remark`, `micromark`, or `markdown-it` token streams and AST-like structures
|
||||
|
||||
@ -98,3 +98,7 @@ component
|
||||
component_render
|
||||
json_decode
|
||||
String
|
||||
|
||||
:related
|
||||
**PHP:** Parsedown, League CommonMark, or similar Markdown-to-HTML renderers
|
||||
**JavaScript / Node.js:** `marked`, `markdown-it`, `remark-html`, or other Markdown renderers
|
||||
|
||||
@ -11,3 +11,7 @@ Executes a command on an open memcache connection.
|
||||
|
||||
:see
|
||||
>memcache
|
||||
|
||||
:related
|
||||
**PHP:** The `Memcache` or `Memcached` extension methods such as `get()`, `set()`, `delete()`, and `getMulti()`
|
||||
**JavaScript / Node.js:** Node clients like `memjs`, `memcached`, or similar Memcached packages
|
||||
|
||||
@ -11,3 +11,7 @@ Connects to a memcache server instance.
|
||||
|
||||
:see
|
||||
>memcache
|
||||
|
||||
:related
|
||||
**PHP:** The `Memcache` or `Memcached` extension methods such as `get()`, `set()`, `delete()`, and `getMulti()`
|
||||
**JavaScript / Node.js:** Node clients like `memjs`, `memcached`, or similar Memcached packages
|
||||
|
||||
@ -11,3 +11,7 @@ Deletes entry specified by the 'key'.
|
||||
|
||||
:see
|
||||
>memcache
|
||||
|
||||
:related
|
||||
**PHP:** The `Memcache` or `Memcached` extension methods such as `get()`, `set()`, `delete()`, and `getMulti()`
|
||||
**JavaScript / Node.js:** Node clients like `memjs`, `memcached`, or similar Memcached packages
|
||||
|
||||
@ -12,3 +12,7 @@ Retrieves a value from an existing connection to a Memcache server.
|
||||
|
||||
:see
|
||||
>memcache
|
||||
|
||||
:related
|
||||
**PHP:** The `Memcache` or `Memcached` extension methods such as `get()`, `set()`, `delete()`, and `getMulti()`
|
||||
**JavaScript / Node.js:** Node clients like `memjs`, `memcached`, or similar Memcached packages
|
||||
|
||||
@ -11,3 +11,7 @@ Retrieves a bunch of entries all at once.
|
||||
|
||||
:see
|
||||
>memcache
|
||||
|
||||
:related
|
||||
**PHP:** The `Memcache` or `Memcached` extension methods such as `get()`, `set()`, `delete()`, and `getMulti()`
|
||||
**JavaScript / Node.js:** Node clients like `memjs`, `memcached`, or similar Memcached packages
|
||||
|
||||
@ -13,3 +13,7 @@ Stores a 'value' on the Memcache server.
|
||||
|
||||
:see
|
||||
>memcache
|
||||
|
||||
:related
|
||||
**PHP:** The `Memcache` or `Memcached` extension methods such as `get()`, `set()`, `delete()`, and `getMulti()`
|
||||
**JavaScript / Node.js:** Node clients like `memjs`, `memcached`, or similar Memcached packages
|
||||
|
||||
@ -10,3 +10,7 @@ Creates a directory stated by 'path'
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `mkdir()`
|
||||
**JavaScript / Node.js:** Node `fs.mkdirSync()` or `fs.promises.mkdir()`
|
||||
|
||||
@ -12,3 +12,7 @@ Establishes a connection to a MySQL server.
|
||||
|
||||
:see
|
||||
>mysql
|
||||
|
||||
:related
|
||||
**PHP:** Modern PHP database access through `mysqli_*` or PDO methods rather than the old `mysql_*` family
|
||||
**JavaScript / Node.js:** Node database clients such as `mysql2`, query builders, or ORM adapters
|
||||
|
||||
@ -9,3 +9,7 @@ Closes a connection to a MySQL server.
|
||||
|
||||
:see
|
||||
>mysql
|
||||
|
||||
:related
|
||||
**PHP:** Modern PHP database access through `mysqli_*` or PDO methods rather than the old `mysql_*` family
|
||||
**JavaScript / Node.js:** Node database clients such as `mysql2`, query builders, or ORM adapters
|
||||
|
||||
@ -10,3 +10,7 @@ Returns the last error message from a connection to a MySQL server.
|
||||
|
||||
:see
|
||||
>mysql
|
||||
|
||||
:related
|
||||
**PHP:** Modern PHP database access through `mysqli_*` or PDO methods rather than the old `mysql_*` family
|
||||
**JavaScript / Node.js:** Node database clients such as `mysql2`, query builders, or ORM adapters
|
||||
|
||||
@ -11,3 +11,7 @@ Escapes a string such that it can be passed as a safe value into an SQL expressi
|
||||
|
||||
:see
|
||||
>mysql
|
||||
|
||||
:related
|
||||
**PHP:** Modern PHP database access through `mysqli_*` or PDO methods rather than the old `mysql_*` family
|
||||
**JavaScript / Node.js:** Node database clients such as `mysql2`, query builders, or ORM adapters
|
||||
|
||||
@ -10,3 +10,7 @@ This retrieves the last row ID that was used for a column with an AUTO_INCREMENT
|
||||
|
||||
:see
|
||||
>mysql
|
||||
|
||||
:related
|
||||
**PHP:** Modern PHP database access through `mysqli_*` or PDO methods rather than the old `mysql_*` family
|
||||
**JavaScript / Node.js:** Node database clients such as `mysql2`, query builders, or ORM adapters
|
||||
|
||||
@ -15,3 +15,7 @@ Executes a MySQL query and returns the resulting data (if any).
|
||||
|
||||
:see
|
||||
>mysql
|
||||
|
||||
:related
|
||||
**PHP:** Modern PHP database access through `mysqli_*` or PDO methods rather than the old `mysql_*` family
|
||||
**JavaScript / Node.js:** Node database clients such as `mysql2`, query builders, or ORM adapters
|
||||
|
||||
@ -11,3 +11,7 @@ Returns the part of 'haystack' before the first occurrence of 'delim', removing
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** Small parsing helpers built with `strpos()`, `substr()`, and `explode()`
|
||||
**JavaScript / Node.js:** Manual parsing with `indexOf()`, `slice()`, and `split()`
|
||||
|
||||
@ -9,3 +9,7 @@ Discard the current output buffer. If are more output buffers on the stack, swit
|
||||
|
||||
:see
|
||||
>ob
|
||||
|
||||
:related
|
||||
**PHP:** `ob_start()`, `ob_get_contents()`, `ob_get_clean()`, and related output-buffering APIs
|
||||
**JavaScript / Node.js:** String accumulation, buffer capture, or render-to-string patterns in server code
|
||||
|
||||
@ -9,3 +9,7 @@ Returns the contents of the current output buffer.
|
||||
|
||||
:see
|
||||
>ob
|
||||
|
||||
:related
|
||||
**PHP:** `ob_start()`, `ob_get_contents()`, `ob_get_clean()`, and related output-buffering APIs
|
||||
**JavaScript / Node.js:** String accumulation, buffer capture, or render-to-string patterns in server code
|
||||
|
||||
@ -10,3 +10,7 @@ If are more output buffers on the stack, switch to the next one.
|
||||
|
||||
:see
|
||||
>ob
|
||||
|
||||
:related
|
||||
**PHP:** `ob_start()`, `ob_get_contents()`, `ob_get_clean()`, and related output-buffering APIs
|
||||
**JavaScript / Node.js:** String accumulation, buffer capture, or render-to-string patterns in server code
|
||||
|
||||
@ -9,3 +9,7 @@ Starts a new output buffer. All subsequent output will be directed into this buf
|
||||
|
||||
:see
|
||||
>ob
|
||||
|
||||
:related
|
||||
**PHP:** `ob_start()`, `ob_get_contents()`, `ob_get_clean()`, and related output-buffering APIs
|
||||
**JavaScript / Node.js:** String accumulation, buffer capture, or render-to-string patterns in server code
|
||||
|
||||
@ -10,3 +10,7 @@ Decodes a string of the format 'a=b&c=d' into a StringMap containing keyed entri
|
||||
|
||||
:see
|
||||
>uri
|
||||
|
||||
:related
|
||||
**PHP:** `parse_str()`
|
||||
**JavaScript / Node.js:** `URLSearchParams` or Node `querystring.parse()`
|
||||
|
||||
@ -13,3 +13,7 @@ If `child` is empty, `base` is returned. If `child` already starts with `/`, it
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** Manual path composition with `DIRECTORY_SEPARATOR` or helper wrappers around it
|
||||
**JavaScript / Node.js:** Node `path.join()`
|
||||
|
||||
@ -9,3 +9,7 @@ Appends data to the current request's output stream.
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** `echo`, `print`, and output buffering patterns
|
||||
**JavaScript / Node.js:** `res.write()`, stream writes, or string-returning render helpers depending on context
|
||||
|
||||
@ -12,3 +12,7 @@ Replace all occurrences of 'search' with the string defined in 'replace_with'.
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** `str_replace()` or `preg_replace()`
|
||||
**JavaScript / Node.js:** `String.prototype.replace()` or `replaceAll()`
|
||||
|
||||
@ -9,3 +9,7 @@ Deletes the cookie specified by 'session_name' and clears the data stored under
|
||||
|
||||
:see
|
||||
>session
|
||||
|
||||
:related
|
||||
**PHP:** `session_destroy()`
|
||||
**JavaScript / Node.js:** Express session store teardown or manual cookie-session invalidation
|
||||
|
||||
@ -9,3 +9,7 @@ Creates a session ID.
|
||||
|
||||
:see
|
||||
>session
|
||||
|
||||
:related
|
||||
**PHP:** `session_create_id()` or custom session token generators
|
||||
**JavaScript / Node.js:** `crypto.randomUUID()` or custom secure session ID generation
|
||||
|
||||
@ -16,3 +16,7 @@ context.session : the current session data. The session data is automatically sa
|
||||
|
||||
:see
|
||||
>session
|
||||
|
||||
:related
|
||||
**PHP:** `session_start()`
|
||||
**JavaScript / Node.js:** Express `express-session`, `cookie-session`, or similar request-bound session middleware
|
||||
|
||||
@ -13,3 +13,7 @@ When `reason` is omitted, UCE fills in a standard reason phrase for common HTTP
|
||||
:see
|
||||
0_context
|
||||
>types
|
||||
|
||||
:related
|
||||
**PHP:** `http_response_code()` and explicit status-line header control
|
||||
**JavaScript / Node.js:** `res.status(...)`, `Response` init status, or low-level status assignment on an HTTP response
|
||||
|
||||
@ -10,3 +10,7 @@ Escapes a parameter for shell_exec
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `escapeshellarg()` and `escapeshellcmd()`
|
||||
**JavaScript / Node.js:** There is no direct built-in equivalent; prefer `spawn()` argument arrays and avoid shell interpolation
|
||||
|
||||
@ -10,3 +10,7 @@ Executes a Linux shell command and returns the generated output
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:related
|
||||
**PHP:** `shell_exec()`, `exec()`, or `proc_open()`
|
||||
**JavaScript / Node.js:** Node `child_process.exec()` or `spawn()`
|
||||
|
||||
@ -9,3 +9,7 @@ Closes an existing socket connection.
|
||||
|
||||
:see
|
||||
>socket
|
||||
|
||||
:related
|
||||
**PHP:** PHP sockets and stream APIs like `socket_connect()`, `fread()`, `fwrite()`, and stream clients
|
||||
**JavaScript / Node.js:** Node `net.Socket` connect, read, write, and close operations
|
||||
|
||||
@ -11,3 +11,7 @@ Opens a socket connection to the given 'host' and 'port'.
|
||||
|
||||
:see
|
||||
>socket
|
||||
|
||||
:related
|
||||
**PHP:** PHP sockets and stream APIs like `socket_connect()`, `fread()`, `fwrite()`, and stream clients
|
||||
**JavaScript / Node.js:** Node `net.Socket` connect, read, write, and close operations
|
||||
|
||||
@ -12,3 +12,7 @@ Reads data from a socket connection.
|
||||
|
||||
:see
|
||||
>socket
|
||||
|
||||
:related
|
||||
**PHP:** PHP sockets and stream APIs like `socket_connect()`, `fread()`, `fwrite()`, and stream clients
|
||||
**JavaScript / Node.js:** Node `net.Socket` connect, read, write, and close operations
|
||||
|
||||
@ -11,3 +11,7 @@ Writes a string of 'data' to the given socket.
|
||||
|
||||
:see
|
||||
>socket
|
||||
|
||||
:related
|
||||
**PHP:** PHP sockets and stream APIs like `socket_connect()`, `fread()`, `fwrite()`, and stream clients
|
||||
**JavaScript / Node.js:** Node `net.Socket` connect, read, write, and close operations
|
||||
|
||||
@ -11,3 +11,7 @@ Splits 'str' into multiple strings based on the given delimiter 'delim'.
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** `explode()` or `preg_split()`
|
||||
**JavaScript / Node.js:** `String.prototype.split()`
|
||||
|
||||
@ -10,3 +10,7 @@ Splits 'str' into multiple strings along any whitespace characters (multiple whi
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** Whitespace splitting via `preg_split(/\s+/, ...)`
|
||||
**JavaScript / Node.js:** Whitespace splitting via regex with `split(/\\s+/)`
|
||||
|
||||
@ -18,3 +18,7 @@ If 'compound_characters' is true, split_utf8 will attempt to combine compound ch
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** `preg_split(//u, ...)`, `mb_*` helpers, or grapheme-aware libraries
|
||||
**JavaScript / Node.js:** `Array.from(str)` or iterator-based Unicode-aware splitting
|
||||
|
||||
@ -11,3 +11,7 @@ task() starts the 'exec_func' in a new process and returns that process' ID. If
|
||||
|
||||
:see
|
||||
>task
|
||||
|
||||
:related
|
||||
**PHP:** Background-process patterns using `proc_open()`, queues, cron, or worker supervisors
|
||||
**JavaScript / Node.js:** Node `child_process`, worker queues, timers, schedulers, and supervised background jobs
|
||||
|
||||
@ -13,3 +13,7 @@ Possible signal numbers are: SIGABND, SIGABRT, SIGALRM, SIGBUS, SIGFPE, SIGHUP,
|
||||
|
||||
:see
|
||||
>task
|
||||
|
||||
:related
|
||||
**PHP:** Background-process patterns using `proc_open()`, queues, cron, or worker supervisors
|
||||
**JavaScript / Node.js:** Node `child_process`, worker queues, timers, schedulers, and supervised background jobs
|
||||
|
||||
@ -10,3 +10,7 @@ Checks whether a process with the given 'key' is running and returns its PID if
|
||||
|
||||
:see
|
||||
>task
|
||||
|
||||
:related
|
||||
**PHP:** Background-process patterns using `proc_open()`, queues, cron, or worker supervisors
|
||||
**JavaScript / Node.js:** Node `child_process`, worker queues, timers, schedulers, and supervised background jobs
|
||||
|
||||
@ -15,3 +15,7 @@ If a process with the same `key` is already running, `task_repeat()` does not st
|
||||
|
||||
:see
|
||||
>task
|
||||
|
||||
:related
|
||||
**PHP:** Background-process patterns using `proc_open()`, queues, cron, or worker supervisors
|
||||
**JavaScript / Node.js:** Node `child_process`, worker queues, timers, schedulers, and supervised background jobs
|
||||
|
||||
@ -9,3 +9,7 @@ Returns a 64 bit integer containing the current Unix timestamp.
|
||||
|
||||
:see
|
||||
>time
|
||||
|
||||
:related
|
||||
**PHP:** `time()`
|
||||
**JavaScript / Node.js:** `Math.floor(Date.now() / 1000)` or `Date.now()` depending on units
|
||||
|
||||
@ -123,3 +123,7 @@ Returns a formatted date. This is based on the Linux date() command. The formatt
|
||||
|
||||
:see
|
||||
>time
|
||||
|
||||
:related
|
||||
**PHP:** `date()` and `DateTime` formatting in the server local timezone
|
||||
**JavaScript / Node.js:** `Intl.DateTimeFormat`, `Date#toLocaleString()`, or date libraries
|
||||
|
||||
@ -123,3 +123,7 @@ Returns a formatted date in the GMT/UTC timezone. This is based on the Linux dat
|
||||
|
||||
:see
|
||||
>time
|
||||
|
||||
:related
|
||||
**PHP:** `gmdate()` and UTC `DateTime` formatting
|
||||
**JavaScript / Node.js:** `Date#toISOString()` and UTC formatting helpers
|
||||
|
||||
@ -10,3 +10,7 @@ Attempts to parse the given 'time_string' into a Unix timestamp.
|
||||
|
||||
:see
|
||||
>time
|
||||
|
||||
:related
|
||||
**PHP:** `strtotime()` or `DateTimeImmutable` parsing
|
||||
**JavaScript / Node.js:** `Date.parse()` or date-library parsing helpers
|
||||
|
||||
@ -9,3 +9,7 @@ Returns a 64 bit float containing the current Unix timestamp with millisecond ac
|
||||
|
||||
:see
|
||||
>time
|
||||
|
||||
:related
|
||||
**PHP:** `microtime(true)` or high-resolution timers
|
||||
**JavaScript / Node.js:** `performance.now()` or high-resolution Node timers
|
||||
|
||||
@ -12,3 +12,7 @@ Note: this function is not yet Unicode-aware.
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** `strtolower()`
|
||||
**JavaScript / Node.js:** `String.prototype.toLowerCase()`
|
||||
|
||||
@ -12,3 +12,7 @@ Note: this function is not yet Unicode-aware.
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** `strtoupper()`
|
||||
**JavaScript / Node.js:** `String.prototype.toUpperCase()`
|
||||
|
||||
@ -10,3 +10,7 @@ Returns a string where leading an trailing whitespace characters have been trimm
|
||||
|
||||
:see
|
||||
>string
|
||||
|
||||
:related
|
||||
**PHP:** `trim()`
|
||||
**JavaScript / Node.js:** `String.prototype.trim()`
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user