diff --git a/src/docs/article/overview.diviner b/src/docs/article/overview.diviner --- a/src/docs/article/overview.diviner +++ b/src/docs/article/overview.diviner @@ -23,12 +23,12 @@ = Loading libphutil = To include libphutil in another project, include the -##src/__phutil_library_init__.php## file: +`src/__phutil_library_init__.php` file: require_once 'path/to/libphutil/src/__phutil_library_init__.php'; This loads global functions and registers an autoload function with -##spl_autoload_register()##, so you can also use classes. +`spl_autoload_register()`, so you can also use classes. = Major Components = @@ -43,7 +43,7 @@ primitive in @{class:ExecFuture} which makes it far easier to write command-line scripts which execute system commands (see @{article:Command Execution}); - - **@{function:xsprintf}**: allows you to define ##sprintf()##-style functions + - **@{function:xsprintf}**: allows you to define `sprintf()`-style functions which use custom conversions; and - **Library System**: an introspectable, inventoried system for organizing PHP code and managing dependencies, supported by static analysis. diff --git a/src/docs/article/using_futures.diviner b/src/docs/article/using_futures.diviner --- a/src/docs/article/using_futures.diviner +++ b/src/docs/article/using_futures.diviner @@ -27,7 +27,7 @@ = Basics = You create a future by instantiating the relevant class and ask it to return the -result by calling ##resolve()##: +result by calling `resolve()`: $gzip_future = new ExecFuture("gzip %s", $some_file); $gzip_future->start(); @@ -37,17 +37,17 @@ list($err, $stdout, $stderr) = $gzip_future->resolve(); -When you call ##resolve()##, the future blocks until the result is ready. You -can test if a future's result is ready by calling ##isReady()##: +When you call `resolve()`, the future blocks until the result is ready. You +can test if a future's result is ready by calling `isReady()`: $is_ready = $gzip_future->isReady(); Being "ready" indicates that the future's computation has completed and it will -not need to block when you call ##resolve()##. +not need to block when you call `resolve()`. Note that when you instantiate a future, it does not immediately initiate -computation. You must call ##start()##, ##isReady()## or ##resolve()## to -activate it. If you simply call ##resolve()## it will start, block until it is +computation. You must call `start()`, `isReady()` or `resolve()` to +activate it. If you simply call `resolve()` it will start, block until it is complete, and then return the result, acting in a completely synchronous way. See @{article:Command Execution} for more detailed documentation on how to