### Install jphp-sql-ext
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-sql-ext/api-docs/README.md
Instructions on how to install the jphp-sql-ext library using the JPPM package manager.
```Shell
jppm add jphp-sql-ext@1.0.0
```
--------------------------------
### Build and Install JPPM from Source
Source: https://github.com/jphp-group/jphp/blob/master/CONTRIBUTE.md
This command compiles and installs the JPPM (JPHP Package Manager) from the project's source code. It's a prerequisite for managing JPHP packages locally.
```bash
gradle packager:install
```
--------------------------------
### Install jphp-compress-ext with JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-compress-ext/api-docs/README.md
This command demonstrates how to install the jphp-compress-ext library using the JPPM package manager, specifying version 1.1.0.
```jppm
jppm add jphp-compress-ext@1.1.0
```
--------------------------------
### Install jphp-firebirdsql-ext library
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-firebirdsql-ext/api-docs/README.md
This snippet demonstrates how to install the jphp-firebirdsql-ext library using the JPPM package manager. The command adds version 1.0.0 of the library to your project.
```Shell
jppm add jphp-firebirdsql-ext@1.0.0
```
--------------------------------
### Install jphp-xml-ext Library
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-xml-ext/api-docs/README.md
Instructions for installing the jphp-xml-ext library using the JPPM package manager. This command adds the specified version of the library to your project dependencies.
```Shell
jppm add jphp-xml-ext@1.0.0
```
--------------------------------
### Install jphp-httpserver-ext using JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpserver-ext/api-docs/README.md
This snippet demonstrates how to install the jphp-httpserver-ext extension using the JPPM package manager. It specifies version 1.1.1 for installation, ensuring a consistent and stable dependency.
```jppm
jppm add jphp-httpserver-ext@1.1.1
```
--------------------------------
### Install jphp-runtime using JPPM
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/README.md
This snippet demonstrates how to add the jphp-runtime library to your project using the JPPM package manager. It specifies the version 1.3.1 for installation.
```jppm
jppm add jphp-runtime@1.3.1
```
--------------------------------
### Install jphp-mongo-ext Library
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-mongo-ext/api-docs/README.md
Command to install the jphp-mongo-ext library using the jppm package manager. This command adds the specified version of the library to your project.
```shell
jppm add jphp-mongo-ext@1.1.0
```
--------------------------------
### Install jphp-debugger
Source: https://github.com/jphp-group/jphp/blob/master/jphp-debugger/api-docs/README.md
Instructions to install the jphp-debugger package using the jppm package manager.
```CLI
jppm add jphp-debugger@1.0.0
```
--------------------------------
### Install jphp-jsoup-ext using JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-jsoup-ext/api-docs/README.md
This command demonstrates how to add the jphp-jsoup-ext library to your project using the JPPM package manager. It specifies the package name and its version for installation.
```Shell
jppm add jphp-jsoup-ext@1.1.0
```
--------------------------------
### Initialize a New JPPM Project
Source: https://github.com/jphp-group/jphp/blob/master/packager/README.md
Run this command to start the interactive project creation wizard. It prompts for various options, including whether to add the `AppPlugin`.
```bash
jppm init
```
--------------------------------
### Install jphp-ssh-ext via JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-ssh-ext/api-docs/README.md
This snippet shows how to install the jphp-ssh-ext library using the JPPM package manager. The command adds version 1.0.0 of the library to your project.
```shell
jppm add jphp-ssh-ext@1.0.0
```
--------------------------------
### Install jphp-semver-ext with JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-semver-ext/api-docs/README.md
Instructions on how to add the jphp-semver-ext library to your project using the JPPM package manager.
```Shell
jppm add jphp-semver-ext@1.1.0
```
--------------------------------
### Install jphp-crypto-ext using JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-crypto-ext/api-docs/README.md
This command installs the jphp-crypto-ext library version 1.0.0 using the JPPM package manager. It adds the specified dependency to your project.
```Shell
jppm add jphp-crypto-ext@1.0.0
```
--------------------------------
### Install jphp-yaml-ext via JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-yaml-ext/api-docs/README.md
This command installs the jphp-yaml-ext library, version 1.1.0, using the JPPM package manager. JPPM is used to manage dependencies for JPHP projects.
```Shell
jppm add jphp-yaml-ext@1.1.0
```
--------------------------------
### Install jphp-mysql-ext library
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-mysql-ext/api-docs/README.md
Command-line instruction to add the jphp-mysql-ext library to a JPHP project using the JPPM package manager.
```Shell
jppm add jphp-mysql-ext@1.0.0
```
--------------------------------
### Install jphp-zip-ext Library
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-zip-ext/api-docs/README.md
Instructions for installing the jphp-zip-ext library using the jppm package manager.
```shell
jppm add jphp-zip-ext@1.0.0
```
--------------------------------
### Install jphp-sqlite-ext via JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-sqlite-ext/api-docs/README.md
This command installs the jphp-sqlite-ext library version 1.0.0 using the JPPM package manager.
```Shell
jppm add jphp-sqlite-ext@1.0.0
```
--------------------------------
### Run HTTP Server with Hello World Page in JPHP
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpserver-ext/README.md
Demonstrates how to initialize an HttpServer instance, define a GET route for '/hello-world', and send a 'Hello, World' HTML response. The server listens on port 8888 and host 127.0.0.1.
```php
use php\http\{HttpServer, HttpServerRequest, HttpServerResponse};
// create server at 8888 port, 127.0.0.1 host.
$server = new HttpServer(8888, '127.0.0.1'); // port & host.
// add route with method + path + handler.
$server->route('GET', '/hello-world', function (HttpServerRequest $req, HttpServerResponse $res) {
$res->contentType('text/html');
$res->body('Hello, World');
});
// run server.
$server->run();
```
--------------------------------
### Build and Install JPPM from Source on Windows
Source: https://github.com/jphp-group/jphp/blob/master/packager/README.md
This command builds and installs JPPM from source on Windows systems. Ensure you add the JPPM bin path (`%UserProfile%\.jppm\dist`) to your system properties after execution.
```bash
gradlew packager:install --no-daemon
```
--------------------------------
### Build and Install JPPM from Source on Linux
Source: https://github.com/jphp-group/jphp/blob/master/packager/README.md
This command builds and installs JPPM from source on Linux systems. It creates a symbolic link of jppm to `/usr/bin/jppm`. `sudo` may be required for permissions.
```bash
sudo ./gradlew packager:install --no-daemon
```
--------------------------------
### APIDOC: Process->start() Method
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lang/Process.md
Starts the external process, allowing it to execute independently.
```APIDOC
start(): Process
```
--------------------------------
### Install jphp-pgsql-ext Library
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-pgsql-ext/api-docs/README.md
Instructions to add the jphp-pgsql-ext library to your project using the JPPM package manager. This command will download and integrate the specified version of the library.
```Shell
jppm add jphp-pgsql-ext@1.0.0
```
--------------------------------
### Install SQL Driver using SqlDriverManager
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-sql-ext/api-docs/classes/php/sql/SqlDriverManager.md
Installs a SQL driver with the specified name. This static method is crucial for registering database drivers before establishing connections. It takes a driver name as a string and returns void upon successful installation.
```php
SqlDriverManager::install(string $driverName): void
```
--------------------------------
### Install jphp-markdown-ext with JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-markdown-ext/api-docs/README.md
Command to add the jphp-markdown-ext library to a project using the JPPM package manager. This command ensures the specified version is installed.
```Shell
jppm add jphp-markdown-ext@1.0.0
```
--------------------------------
### Log in to JPPM Hub
Source: https://github.com/jphp-group/jphp/blob/master/CONTRIBUTE.md
Before publishing packages to the central hub (develnext.org), you need to authenticate using this command. It establishes your session with the JPPM hub.
```bash
jppm hub:login
```
--------------------------------
### Install jphp-parser-ext using JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-parser-ext/api-docs/README.md
This command installs the jphp-parser-ext library version 1.0.0 using the JPPM package manager. JPPM is used for managing JPHP project dependencies.
```shell
jppm add jphp-parser-ext@1.0.0
```
--------------------------------
### Build API Documentation for a Specific JPHP Extension
Source: https://github.com/jphp-group/jphp/blob/master/CONTRIBUTE.md
This command generates API documentation for a single, specified JPHP extension, like 'jphp-mysql-ext'. The generated documentation will be found in the 'api-docs' directory.
```bash
gradle docBuild -p exts/jphp-mysql-ext
```
--------------------------------
### Install jphp-zend-ext with JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-zend-ext/api-docs/README.md
Command to add the jphp-zend-ext library using the JPPM package manager.
```Shell
jppm add jphp-zend-ext@1.1.0
```
--------------------------------
### Install jphp-git-ext via JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-git-ext/api-docs/README.md
This snippet shows how to add the jphp-git-ext library to your project using the JPPM package manager.
```Shell
jppm add jphp-git-ext@2.0.0
```
--------------------------------
### Create a Bootstrap Script for JPPM Application
Source: https://github.com/jphp-group/jphp/blob/master/packager/README.md
Define the main entry point for your JPPM application, typically `src/index.php`. This PHP script will be executed when the application starts.
```php
getTime() / 1000;
```
--------------------------------
### System Class Instance Methods Overview
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lang/System.md
Lists instance methods for the `System` class.
```APIDOC
__construct()
```
--------------------------------
### Check if a string starts with a prefix in JPHP
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lib/str.md
Tests if the substring of this string, beginning at the specified offset, starts with the given prefix. Returns true if the prefix is found at the specified index; false otherwise. The result is false if `offset` is negative or greater than the length of the string. Example usage: `startsWith(sub($offset), $prefix)`.
```php
str::startsWith(string $string, string $prefix, int $offset): bool
```
--------------------------------
### PHP Flow: Reduce Elements to a Single Result
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.ru.md
Iterates elements and gets a result of this operation. It can be used for calculate some results, for example::
// calculates a sum of elements
$sum = .. ->reduce(function($result, $el){ $result = $result + $el });
```php
reduce(callable $callback): int
```
--------------------------------
### SourceFile Constructor Method
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-parser-ext/api-docs/classes/phpx/parser/SourceFile.md
Initializes a new `SourceFile` instance. It requires a path (string or Stream) and a unique identifier.
```PHP
__construct(string|Stream $path, string $uniqueId): void
```
--------------------------------
### Install jphp-mail-ext with JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-mail-ext/api-docs/README.md
Command to add the jphp-mail-ext library to a project using the JPPM package manager. This ensures the library's dependencies are managed and it's available for use.
```bash
jppm add jphp-mail-ext@1.0.0
```
--------------------------------
### Install jphp-graphic-ext using JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-graphic-ext/api-docs/README.md
Command to add the jphp-graphic-ext library to a project using the JPPM package manager.
```shell
jppm add jphp-graphic-ext@1.0.0
```
--------------------------------
### HttpClient get() Method Signature
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpclient-ext/api-docs/classes/httpclient/HttpClient.md
Sends a GET request to the specified URL with optional arguments.
```php
get(string $url, array $args): httpclient\HttpResponse
```
--------------------------------
### Install jphp-httpclient-ext via JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpclient-ext/api-docs/README.md
Instructions to add the jphp-httpclient-ext library to a JPHP project using the JPPM package manager. This command fetches and integrates the specified version of the library.
```jppm
jppm add jphp-httpclient-ext@1.0.1
```
--------------------------------
### GzipInputStream Constructor Method
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-compress-ext/api-docs/classes/compress/GzipInputStream.md
Documents the `__construct` method for `GzipInputStream`, detailing its parameters and purpose for initializing the stream. Note: The original source describes it as 'GzipOutStream constructor.', which may be a typo.
```php
__construct(Stream|File|string $input, bool $decompressConcatenated): void
```
```APIDOC
__construct()
description: GzipOutStream constructor.
parameters:
input:
type: Stream|File|string
description: The input source for decompression.
decompressConcatenated:
type: bool
description: If true, concatenated Gzip members will be decompressed.
returns: void
```
--------------------------------
### Route HTTP GET Method in PHP
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpserver-ext/api-docs/classes/php/http/HttpServer.ru.md
The `get` method specifically routes a handler for HTTP GET requests to a given path. This is the standard way to define routes for retrieving resources. It returns an `HttpRouteHandler` instance.
```php
get(string $path, callable $handler): php\http\HttpRouteHandler
```
--------------------------------
### Initialize JPHP Project with jppm
Source: https://github.com/jphp-group/jphp/blob/master/README.md
Initializes a new JPHP project using the jppm package manager, creating a default project structure including `src/index.php` for the 'Hello World' program.
```Bash
jppm init
```
--------------------------------
### Run JPHP Sandbox Project
Source: https://github.com/jphp-group/jphp/blob/master/CONTRIBUTE.md
This command executes the JPHP sandbox project, which is used for testing JPHP functionalities. The PHP source files for the sandbox are located in the 'sandbox/src' directory.
```bash
gradle sandbox:run
```
--------------------------------
### PHP Flow: Get Sum of Elements
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.ru.md
Get sum of elements.
```php
sum(): int|float
```
--------------------------------
### PHP Flow: Get Median of Elements
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.ru.md
Get median of elements.
```php
median(callable|null $comparator): mixed
```
--------------------------------
### Run a JPPM Application
Source: https://github.com/jphp-group/jphp/blob/master/packager/README.md
Use `jppm start` to run your JPPM application. This command is available if `AppPlugin` is enabled, either during `jppm init` or explicitly configured in `package.php.yml`.
```bash
jppm start
```
--------------------------------
### Install jphp-core with JPPM
Source: https://github.com/jphp-group/jphp/blob/master/jphp-core/api-docs/README.md
Instructions to add the jphp-core library to a project using the JPPM package manager, specifying version 1.3.1.
```Shell
jppm add jphp-core@1.3.1
```
--------------------------------
### PHP Flow: Get Minimum Element
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.ru.md
Get min of elements.
```php
min(callable|null $comparator): mixed
```
--------------------------------
### PHP Flow: Get Maximum Element
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.ru.md
Get max of elements.
```php
max(callable|null $comparator): mixed
```
--------------------------------
### Configure AppPlugin in package.php.yml
Source: https://github.com/jphp-group/jphp/blob/master/packager/README.md
To enable application-specific commands like `start`, `build`, and `clean`, add `AppPlugin` to the `plugins` section of your `package.php.yml` configuration file.
```yaml
name: test
plugins:
- AppPlugin # include app plugin
# ...
```
--------------------------------
### APIDOC: bin::__construct() Constructor Method Signature
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lib/bin.md
Documents the constructor method for the `bin` class, indicating that it takes no parameters and returns `void`. This method initializes a new instance of the `bin` class.
```APIDOC
__construct(): void
```
--------------------------------
### Install jphp-json-ext with JPPM
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-json-ext/api-docs/README.md
This command adds the jphp-json-ext library to your project using the JPPM package manager, specifying version 1.0.0.
```cli
jppm add jphp-json-ext@1.0.0
```
--------------------------------
### PHP Flow: Get Average of Elements
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.ru.md
Get avg number of elements.
```php
avg(): int|float
```
--------------------------------
### API Reference for System
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/README.md
API documentation for the `System` class.
```APIDOC
System:
Description: Class System
```
--------------------------------
### Install jppm package
Source: https://github.com/jphp-group/jphp/blob/master/packager/api-docs/README.md
Installs the jppm package at version 0.4.2 using the jppm package manager command line interface.
```Shell
jppm add jppm@0.4.2
```
--------------------------------
### Writing Tar.gz Archives with JPHP
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-compress-ext/README.md
Illustrates how to create and write content to a tar.gz archive using `TarArchive` and `GzipOutputStream`. Examples include adding strings, files, and streams, with progress tracking.
```php
use compress, std;
$tar = new TarArchive(new GzipOutputStream('file.tar.gz'));
$tar->open(); // open for write.
// from string
$tar->addFromString(new TarArchiveEntry('file.txt'), 'Hello World'));
// add file
$tar->addFile('path/to/file', 'file', function ($copied, $n) {
// copy progress
}, 1024 * 8 /* buffer size */);
// add stream
$tar->addEntry(new TarArchiveEntry('file.txt', 5 /* size of stream */), new MemoryStream('hello'));
$tar->close(); // save.
```
--------------------------------
### Constructor: __construct()
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lib/bin.ru.md
Initializes a new instance of the `php\lib\bin` class. This constructor does not require any parameters for instantiation.
```APIDOC
__construct(): void
Returns: void
```
--------------------------------
### HttpServerResponse Class Definition and Overview
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpserver-ext/api-docs/classes/php/http/HttpServerResponse.ru.md
Defines the `HttpServerResponse` class, its package, and source file. It also provides a quick reference list of all public methods available for this class.
```APIDOC
Class: HttpServerResponse (php\http\HttpServerResponse)
Package: http
Source: php/http/HttpServerResponse.php
Methods:
- __construct()
- status()
- contentType()
- contentLength()
- charsetEncoding()
- write()
- body()
- header()
- redirect()
- addCookie()
- encodeRedirectUrl()
- encodeUrl()
- bodyStream()
- locale()
- flush()
```
--------------------------------
### Regex::start() Method
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Regex.md
Returns the start index of the previous match, or of a specific captured group.
```APIDOC
start(null|int $group): int
```
--------------------------------
### System Class Static Methods Overview
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lang/System.md
Lists all static methods available in the `System` class, offering various system interactions like program exit, garbage collection, environment and property management, I/O stream handling, and path utilities.
```APIDOC
System::halt() - Exit from program with status globally
System::gc() - Runs the garbage collector
System::getEnv()
System::getProperty() - Gets a system property by name
System::setProperty() - Sets a system property by name and value.
System::getProperties()
System::setProperties()
System::in()
System::out()
System::err()
System::setIn() - Set stdin stream.
System::setOut() - Set stdout stream.
System::setErr() - Set stderr stream.
System::tempDirectory() - Returns temp directory that has write access.
System::userDirectory()
System::userHome() - Returns user.home directory.
System::userName() - Returns os user name which logged.
System::osName() - Returns Operation System Name, eg: `Windows`.
System::osVersion() - Returns Operation System Version.
System::addClassPath() - Add jar from file or classpath dir at runtime to runtime.
System::setEngineLanguage() - Change language for engine, for its errors and messages
```
--------------------------------
### Run JPHP Project with jppm
Source: https://github.com/jphp-group/jphp/blob/master/README.md
Executes the current JPHP project using the jppm package manager, typically running the `src/index.php` file and displaying 'Hello World' in the console.
```Bash
jppm start
```
--------------------------------
### API Documentation for php\util\LauncherClassLoader Class
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/README.md
Provides API documentation for the `LauncherClassLoader` class.
```APIDOC
Class: `php\util\LauncherClassLoader`
Description: Class LauncherClassLoader
```
--------------------------------
### APIDOC: ZipArchiveOutput Methods Summary
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-compress-ext/api-docs/classes/compress/ZipArchiveOutput.md
Provides an overview of the methods available in the `ZipArchiveOutput` class, including `__construct` and `createEntry`, along with a note to refer to the parent class `ArchiveOutput` for inherited methods.
```APIDOC
Methods:
->__construct() - TarArchiveOutput constructor.
->createEntry()
See also in the parent class ArchiveOutput
```
--------------------------------
### API Reference: get() in PHP
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpserver-ext/api-docs/classes/php/http/HttpServer.md
Routes an HTTP request handler to a specific path, exclusively for GET requests. This method simplifies the definition of routes for retrieving resources, returning an HttpRouteHandler instance.
```php
get(string $path, callable $handler): php\http\HttpRouteHandler
```
--------------------------------
### Configure Source Directories and Included Files in package.php.yml
Source: https://github.com/jphp-group/jphp/blob/master/packager/README.md
Specify source directories (e.g., `src`) for class loading and list PHP files to be included at startup (e.g., `index.php`) in your `package.php.yml` configuration.
```yaml
name: test
plugins:
- AppPlugin # include app plugin
deps:
jphp-core: '*'
jphp-zend-ext: '*'
jphp-httpserver-ext: '*' # add http server extension
sources:
- 'src' # add 'src' dir as source directory (for class loader too).
includes:
- 'index.php' # include php files at start up from sources directories.
```
--------------------------------
### JPHP Maven SNAPSHOT Dependency
Source: https://github.com/jphp-group/jphp/blob/master/README.md
Maven dependency string for including JPHP modules and libraries built from SNAPSHOT sources in your project. Use `gradle install` to build and install the modules into your local Maven repository first.
```Maven
org.develnext.jphp:jphp-:-SNAPSHOT
```
--------------------------------
### region Method
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Regex.md
Sets the limits of this matcher's region. The region is the part of the input sequence that will be searched to find a match. Invoking this method resets the matcher, and then sets the region to start at the index specified by the $start parameter and end at the index specified by the $end parameter.
```php
Method: region
Signature: region(int $start, int $end): Regex
Parameters:
$start (int)
$end (int)
Returns: Regex
```
--------------------------------
### Publish All JPHP Packages to Central Hub
Source: https://github.com/jphp-group/jphp/blob/master/CONTRIBUTE.md
This command publishes all JPHP packages from the project to the central develnext.org hub. Ensure you are logged in to the hub before executing this.
```bash
gradle hubPublish
```
--------------------------------
### PHP Regex Matcher: region() Method
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Regex.ru.md
Sets the limits of this matcher's region. The region is the part of the input sequence that will be searched to find a match. Invoking this method resets the matcher, and then sets the region to start at the index specified by the $start parameter and end at the index specified by the $end parameter.
```php
region(int $start, int $end): Regex
```
--------------------------------
### SemVersion Class API Reference
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-semver-ext/api-docs/classes/semver/SemVersion.md
Detailed API documentation for the `SemVersion` class, including its constructor and various methods for version manipulation and comparison.
```APIDOC
class SemVersion (semver\\SemVersion)
__construct(string $value): void
Description: SemVersion constructor.
isStable(): bool
getMajorNum(): int
getMinorNum(): int
getPatchNum(): int
getPreReleaseString(): string
toNormal(): string
__toString(): string
incMajorNum(): semver\\SemVersion
incMinorNum(): semver\\SemVersion
incPatchNum(): semver\\SemVersion
satisfies(string $expr): bool
```
--------------------------------
### FileStream Class API Reference
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/io/FileStream.md
Detailed API documentation for the `php\io\FileStream` class, which extends `Stream`. This class provides methods for performing various file input/output operations, including reading data, writing data, checking end-of-file, seeking positions, getting current position, closing the stream, getting file length, and truncating the file.
```APIDOC
class FileStream (php\io\FileStream) extends Stream
package std
source php/io/FileStream.php
Methods:
read(int $length): mixed
readFully(): mixed
write(string $value, null|int $length): int
eof(): bool
seek(int $position): mixed
getPosition(): int
close(): mixed
length(): int
getFilePointer(): int
truncate(int $size): void
```
--------------------------------
### TarArchiveInput Class API Reference
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-compress-ext/api-docs/classes/compress/TarArchiveInput.md
Detailed API documentation for the `TarArchiveInput` class, including its inheritance, package, and all public methods with their signatures, parameters, and return types.
```APIDOC
class TarArchiveInput extends ArchiveInput
package: compress
source: compress/TarArchiveInput.php
Methods:
__construct(Stream|string|File $output, int $blockSize, string|null $encoding): void
description: TarArchiveOutput constructor.
parameters:
$output: Stream|string|File
$blockSize: int
$encoding: string|null
returns: void
nextEntry(): TarArchiveEntry
description: Retrieves the next entry from the archive.
parameters: None
returns: TarArchiveEntry
```
--------------------------------
### HttpDownloadFileHandler Constructor API
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpserver-ext/api-docs/classes/php/http/HttpDownloadFileHandler.md
Initializes a new `HttpDownloadFileHandler` instance.
```APIDOC
__construct(string|File $file, string|null $fileName, string|null $contentType): void
Description: HttpDownloadFileHandler constructor.
Parameters:
$file: string|File
$fileName: string|null
$contentType: string|null
Returns: void
```
--------------------------------
### PHP Flow: Get Current Element
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.ru.md
No description
```php
current(): mixed
```
--------------------------------
### PHP Flow: Get Current Element Key
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.ru.md
No description
```php
key(): mixed
```
--------------------------------
### PHP Flow: Get Numeric Median of Elements
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.ru.md
No description
```php
numMedian(callable|null $comparator): int|float
```
--------------------------------
### SourceMap Constructor
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lang/SourceMap.md
Initializes a new `SourceMap` instance with a specified module name.
```php
__construct(string $moduleName): void
```
--------------------------------
### Reading Tar.gz Archives with JPHP
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-compress-ext/README.md
Demonstrates how to read and unpack content from a tar.gz archive using `TarArchive` and `GzipInputStream`. It shows examples for unpacking all entries and reading a specific file.
```php
use compress, std;
$tar = new TarArchive(new GzipInputStream('file.tar.gz'));
// unpack all
$tar->readAll(function (TarArchiveEntry $entry, ?Stream $stream) {
echo "Unpack: ", $entry->name, "\n";
fs::copy($stream, '/path/to/dir/' . $entry->name);
});
// unpack one
$tar->read('file.txt', function (TarArchiveEntry $entry, ?Stream $stream) {
echo "Unpack: ", $entry->name, "\n";
var_dump($stream->readAll());
});
```
--------------------------------
### SourceTokenizer Class API Reference
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-parser-ext/api-docs/classes/phpx/parser/SourceTokenizer.md
Comprehensive API documentation for the SourceTokenizer class, including its constructor, static methods, and instance methods with their signatures and return types.
```APIDOC
SourceTokenizer Class:
Description: Class SourceTokenizer
Source: phpx/parser/SourceTokenizer.php
Static Methods:
parseAll(mixed $string): SourceToken[]
Methods:
__construct(string|Stream $source, string $name, string $charset): void
next(): SourceToken
fetchAll(): SourceToken[]
close(): void
```
--------------------------------
### PHP Flow: Concatenate All Elements
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.ru.md
Get concatenation of all elements.
```php
concat(): string
```
--------------------------------
### sum() - Get sum of elements
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.md
Calculates the sum of numerical elements in the stream.
```APIDOC
sum(): int|float
Get sum of elements.
```
--------------------------------
### SourceFile Class Overview
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-parser-ext/api-docs/classes/phpx/parser/SourceFile.md
Defines the `SourceFile` class, its properties, and a list of available methods for parsing and managing source code.
```APIDOC
class SourceFile (phpx\parser\SourceFile)
source: phpx/parser/SourceFile.php
Properties:
moduleRecord: ModuleRecord
Methods:
__construct()
isReadOnly()
fetchFullName()
update()
```
--------------------------------
### regionStart Method
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Regex.md
Reports the start index of this matcher's region. The searches this matcher conducts are limited to finding matches within regionStart() (inclusive) and regionEnd() (exclusive).
```php
Method: regionStart
Signature: regionStart(): int
Returns: int
```
--------------------------------
### API Reference for Process
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/README.md
API documentation for the `Process` class.
```APIDOC
Process:
Description: Class Process
```
--------------------------------
### Get Millisecond (Time::millisecond)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the millisecond of the second from a Time object.
```APIDOC
millisecond(): int
```
--------------------------------
### Get Second (Time::second)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the second of the minute from a Time object.
```APIDOC
second(): int
```
--------------------------------
### Get Minute (Time::minute)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the minute of the hour from a Time object.
```APIDOC
minute(): int
```
--------------------------------
### System::__construct() Method
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lang/System.md
The constructor for the `System` class.
```APIDOC
__construct(): void
```
--------------------------------
### Get File Size
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lib/fs.md
Returns the size of the specified file in bytes. This is useful for checking file dimensions.
```APIDOC
fs::size(mixed $path): int
```
--------------------------------
### Get SourceMap Module Name
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lang/SourceMap.md
Retrieves the module name associated with the source map.
```php
getModuleName(): string
```
--------------------------------
### APIDOC: Process->__construct() Method
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lang/Process.md
Constructs a new `Process` instance with the specified commands, working directory, and environment variables.
```APIDOC
__construct(array $commands, null|string|File $directory, array $environment): void
```
--------------------------------
### MongoClient databases Method Signature
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-mongo-ext/api-docs/classes/mongo/MongoClient.md
Signature for the method to get all databases on the Mongo server.
```php
databases(): mongo\MongoIterable
```
--------------------------------
### MongoClient database Method Signature
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-mongo-ext/api-docs/classes/mongo/MongoClient.md
Signature for the method to get a specific MongoDatabase instance.
```php
database(string $name): mongo\MongoDatabase
```
--------------------------------
### Get Git Reflog (PHP)
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-git-ext/api-docs/classes/git/Git.ru.md
Retrieves the reflog for a specified reference.
```APIDOC
reflog(string $ref): array
```
--------------------------------
### API Reference for SourceWriter Class
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-parser-ext/api-docs/classes/phpx/parser/SourceWriter.ru.md
Detailed API documentation for the `SourceWriter` class, including its full path, source file, and a description of its core methods for writing source files and modules.
```APIDOC
Class: SourceWriter
Full Path: phpx\parser\SourceWriter
Source File: phpx/parser/SourceWriter.php
Description: Class SourceWriter
Methods:
write:
Signature: write(phpx\parser\SourceManager $manager, phpx\parser\SourceFile $file): void
Parameters:
$manager: phpx\parser\SourceManager
$file: phpx\parser\SourceFile
Returns: void
writeModule:
Signature: writeModule(phpx\parser\SourceManager $manager, phpx\parser\SourceFile $file, phpx\parser\ModuleRecord $record, php\io\Stream $out): mixed
Parameters:
$manager: phpx\parser\SourceManager
$file: phpx\parser\SourceFile
$record: phpx\parser\ModuleRecord
$out: php\io\Stream
Returns: mixed
```
--------------------------------
### Publish Specific JPHP Package to Central Hub
Source: https://github.com/jphp-group/jphp/blob/master/CONTRIBUTE.md
This command allows publishing a single, specified JPHP package or extension to the central develnext.org hub. Provide the relative path to the package directory using the '-p' flag.
```bash
gradle hubPublish -p exts/jphp-mysql-ext
```
--------------------------------
### TarArchiveEntry Static Method: ofFile()
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-compress-ext/api-docs/classes/compress/TarArchiveEntry.md
Creates a `TarArchiveEntry` instance from a given file or file path and a specified file name within the archive. Returns a new `TarArchiveEntry` object.
```PHP
TarArchiveEntry::ofFile(File|string $file, string $fileName): compress\TarArchiveEntry
```
--------------------------------
### Get Variant for PHP Locale
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Locale.ru.md
Retrieves the variant code of the `php\util\Locale` object.
```APIDOC
getVariant(): string
```
--------------------------------
### API Documentation for php\util\Configuration Class
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/README.md
Provides API documentation for the `Configuration` class, which is used for managing configurations.
```APIDOC
Class: `php\util\Configuration`
Description: Class Configuration
```
--------------------------------
### avg() - Get average of elements
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.md
Calculates the average numerical value of elements in the stream.
```APIDOC
avg(): int|float
Get avg number of elements.
```
--------------------------------
### Get Hour of Day (Time::hourOfDay)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the hour of the day from a Time object.
```APIDOC
hourOfDay(): int
```
--------------------------------
### ZipArchiveEntry Class API Reference
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-compress-ext/api-docs/classes/compress/ZipArchiveEntry.md
Comprehensive API documentation for the `ZipArchiveEntry` class, outlining its inheritance, properties, static methods like `ofFile()`, and instance methods such as `__construct()`. This class is used for handling entries within zip archives.
```APIDOC
class ZipArchiveEntry (compress\ZipArchiveEntry) extends ArchiveEntry
Description: Class TarArchiveEntry
Properties:
unixMode: int
comment: string
method: int
crc: int
time: int
Static Methods:
ofFile(File|string $file, string $fileName): compress\ZipArchiveEntry
Methods:
__construct(string $name, int $size): void
Description: TarArchiveEntry constructor.
```
--------------------------------
### Get Current Year (Time::year)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the current year from a Time object.
```APIDOC
year(): int
```
```PHP
$now = Time::now();
echo $now->year();
```
--------------------------------
### Get HTTP Request Property in JPHP
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/net/URLConnection.md
Retrieves the value of a previously set request property for the HTTP connection.
```php
getRequestProperty(string $name): void
```
--------------------------------
### Build a JPPM Application
Source: https://github.com/jphp-group/jphp/blob/master/packager/README.md
After configuring your `package.php.yml` and bootstrap script, use this command to build your JPPM application, generating launch scripts for Windows and Linux.
```bash
jppm build
```
--------------------------------
### Get Last Modification Time
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lib/fs.md
Retrieves the last modification timestamp of a file or directory. The time is returned as an integer.
```APIDOC
fs::time(mixed $path): int
```
--------------------------------
### System::gc() Method
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lang/System.md
Initiates the garbage collection process.
```APIDOC
System::gc(): void
```
--------------------------------
### API Reference: php\lib\bin
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/README.md
Class for working with binary strings.
```APIDOC
Class: php\lib\bin
Description: Class for working with binary strings
Source: https://github.com/jphp-compiler/jphp/blob/master/jphp-runtime/api-docs/classes/php/lib/bin.md
```
--------------------------------
### lookingAt Method
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Regex.md
Attempts to match the input sequence, starting at the beginning of the region, against the pattern.
```php
Method: lookingAt
Signature: lookingAt(): bool
Returns: bool
```
--------------------------------
### MongoCollection __construct Method
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-mongo-ext/api-docs/classes/mongo/MongoCollection.md
Initializes a new instance of the `MongoCollection` class.
```php
__construct(): void
```
--------------------------------
### Timer Class Overview and Method Summary
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Timer.md
Defines the `Timer` class, its package, and source, along with a summary of its static and instance methods for time management.
```APIDOC
class Timer (php\time\Timer)
package: std
source: php/time/Timer.php
Static Methods:
after(): Run once after a period.
every(): Run repeatedly based on a period.
trigger(): Create a timer that calls when a trigger callback returns true.
setTimeout(): Schedule a task to run once after a delay (like JS).
setInterval(): Schedule a task to run repeatedly after a delay (like JS).
sleep(): Pause execution for a specified period.
cancelAll(): Cancel all scheduled timer tasks.
shutdownAll(): Shut down all timers and the timer system.
parsePeriod(): Convert a string period to milliseconds.
Instance Methods:
__construct(): Timer constructor.
cancel(): Cancel a specific timer task.
run(): Manually run a timer task.
scheduledTime(): Get the scheduled execution time of the most recent task.
```
--------------------------------
### TarArchiveEntry Class Overview
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-compress-ext/api-docs/classes/compress/TarArchiveEntry.md
Comprehensive API documentation for the `TarArchiveEntry` class, detailing its inheritance, package, source, properties, and lists of static and instance methods available for managing Tar archive entries.
```APIDOC
class TarArchiveEntry (compress\TarArchiveEntry) extends ArchiveEntry
package: compress
source: compress/TarArchiveEntry.php
Properties:
userId: int
userName: string
groupId: int
groupName: string
linkName: string
mode: int
modTime: int
realSize: int
devMinor: int
devMajor: int
Static Methods:
ofFile()
Methods:
isCheckSumOK()
isBlockDevice()
isFIFO()
isSparse()
isCharacterDevice()
isLink()
isSymbolicLink()
isFile()
isGlobalPaxHeader()
isPaxHeader()
isGNULongNameEntry()
isGNULongLinkEntry()
isStarSparse()
isPaxGNUSparse()
isOldGNUSparse()
isGNUSparse()
isExtended()
__construct() - TarArchiveEntry constructor.
addPaxHeader()
clearExtraPaxHeaders()
getExtraPaxHeader()
getExtraPaxHeaders()
```
--------------------------------
### Get All HTTP Request Properties in JPHP
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/net/URLConnection.md
Retrieves all request properties currently set for the HTTP connection as an associative array.
```php
getRequestProperties(): array
```
--------------------------------
### HttpServerResponse Constructor Method
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpserver-ext/api-docs/classes/php/http/HttpServerResponse.ru.md
Initializes a new instance of the `HttpServerResponse` class. This method is typically called internally when a new response object is created.
```APIDOC
__construct(): void
```
--------------------------------
### TextWord Get Length Method
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-text-ext/api-docs/classes/text/TextWord.md
Returns the character length of the text stored in the `TextWord` object.
```APIDOC
length(): int
```
--------------------------------
### HttpClient getAsync() Method Signature
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpclient-ext/api-docs/classes/httpclient/HttpClient.md
Sends an asynchronous GET request to the specified URL with optional arguments, returning a Promise.
```php
getAsync(string $url, array $args): php\concurrent\Promise
```
--------------------------------
### Get Git Repository Tags (PHP)
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-git-ext/api-docs/classes/git/Git.ru.md
Retrieves a list of tags in the Git repository.
```APIDOC
getTags(): array[]
```
--------------------------------
### MongoClient Class Definition and Overview
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-mongo-ext/api-docs/classes/mongo/MongoClient.md
Provides the definition and source file for the MongoClient class, along with an overview of its static and instance methods.
```APIDOC
class MongoClient (mongo\MongoClient)
source mongo/MongoClient.php
Description
Class MongoClient
Static Methods:
- MongoClient ::createFromURI()
Methods:
- ->__construct() - MongoClient constructor.
- ->database()
- ->databases() - Get All Databases of Mongo Server.
- ->close()
```
--------------------------------
### TextWord Constructor Method
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-text-ext/api-docs/classes/text/TextWord.md
Initializes a new `TextWord` instance with the provided text string.
```APIDOC
__construct(string $text): void
```
--------------------------------
### Check JPPM Version
Source: https://github.com/jphp-group/jphp/blob/master/packager/README.md
Use this command in your console to verify JPPM installation or after building from source, displaying the current version information.
```bash
jppm version
```
--------------------------------
### API Reference for Environment
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/README.md
API documentation for the `Environment` class.
```APIDOC
Environment:
Description: Class Environment
```
--------------------------------
### MongoClient Constructor Method Signature
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-mongo-ext/api-docs/classes/mongo/MongoClient.md
Signature for the MongoClient constructor, initializing with host and port.
```php
__construct(string $host, int $port): void
```
--------------------------------
### PHP rx Class Static Methods Summary
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/lib/rx.md
An overview of all static methods provided by the `rx` class, enabling various operations related to observable patterns such as subscription management.
```APIDOC
Static Methods:
observable()
subscribe()
unsubscribe()
subscribers()
unsubscribeAll()
```
--------------------------------
### median() - Get median of elements
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.md
Calculates the median element of the stream, optionally using a custom comparator.
```APIDOC
median(callable|null $comparator): mixed
Get median of elements.
```
--------------------------------
### min() - Get minimum element
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.md
Retrieves the minimum element from the stream, optionally using a custom comparator.
```APIDOC
min(callable|null $comparator): mixed
Get min of elements.
```
--------------------------------
### JsonProcessor Constructor
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-json-ext/api-docs/classes/php/format/JsonProcessor.md
Initializes a new `JsonProcessor` instance with specified flags, controlling parsing and formatting behavior.
```APIDOC
__construct(int $flags): void
```
--------------------------------
### ZipArchiveInput Class API Reference
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-compress-ext/api-docs/classes/compress/ZipArchiveInput.md
Comprehensive API documentation for the `ZipArchiveInput` class, detailing its inheritance, package, source, and all available methods with their signatures, parameters, return types, and descriptions.
```APIDOC
class ZipArchiveInput (compress\ZipArchiveInput) extends ArchiveInput
package: compress
source: compress/ZipArchiveInput.php
Methods:
__construct(Stream|string|File $output, string|null $encoding): void
Description: TarArchiveOutput constructor.
Parameters:
$output: Stream|string|File
$encoding: string|null
Returns: void
nextEntry(): ZipArchiveEntry
Description: Retrieves the next entry from the Zip archive.
Returns: ZipArchiveEntry
```
--------------------------------
### max() - Get maximum element
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Flow.md
Retrieves the maximum element from the stream, optionally using a custom comparator.
```APIDOC
max(callable|null $comparator): mixed
Get max of elements.
```
--------------------------------
### SourceToken Class API Reference
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-parser-ext/api-docs/classes/phpx/parser/SourceToken.md
Comprehensive API documentation for the `SourceToken` class, detailing its structure, properties, and the methods it provides for interacting with source code tokens.
```APIDOC
class SourceToken (phpx\parser\SourceToken)
Source: phpx/parser/SourceToken.php
Properties:
->type: string - ClassStmt, FunctionStmt, Name, ...
->word: string
->line: int
->position: int
->endLine: int
->endPosition: int
Methods:
->isNamedToken()
->isStatementToken()
->isExpressionToken()
->isOperatorToken()
->getMeta()
```
--------------------------------
### PHP Locale::getAvailableLocales() Method
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/Locale.md
Returns an array of all locales installed and supported by the Java runtime environment.
```APIDOC
Locale::getAvailableLocales(): Locale[]
```
--------------------------------
### Get Hour (Time::hour)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the hour (0-11) for a 12-hour clock. Noon and midnight are represented by 0.
```APIDOC
hour(): int
```
--------------------------------
### Get Day of Week (Time::dayOfWeek)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the day number within the current week from a Time object.
```APIDOC
dayOfWeek(): int
```
--------------------------------
### Get Day of Month (Time::dayOfMonth)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the day number within the current month from a Time object.
```APIDOC
dayOfMonth(): int
```
--------------------------------
### APIDOC: LauncherClassLoader Class and Method Reference
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/util/LauncherClassLoader.md
Provides the API documentation for the `LauncherClassLoader` class, detailing its inheritance, package, and the `loadClass` method signature and parameters.
```APIDOC
Class: LauncherClassLoader
Full Name: php\util\LauncherClassLoader
Extends: ClassLoader
Package: std
Source: php/util/LauncherClassLoader.php
Description: Class LauncherClassLoader
Methods:
loadClass(string $name): void
Description: Loads a class by its fully qualified name.
Parameters:
$name (string): The fully qualified name of the class to load.
Returns: void
```
--------------------------------
### ModuleRecord Class and Method Reference
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-parser-ext/api-docs/classes/phpx/parser/ModuleRecord.md
Comprehensive API documentation for the ModuleRecord class, including its inheritance, source file, and a detailed list of its public methods with their signatures and descriptions.
```APIDOC
ModuleRecord Class:
- Full Name: phpx\parser\ModuleRecord
- Extends: AbstractSourceRecord
- Source: phpx/parser/ModuleRecord.php
- Description: Class ModuleRecord
Methods:
- getNamespaces(): NamespaceRecord[]
- getClasses(): ClassRecord[]
- getFunctions(): MethodRecord[]
- findClass(string $name): phpx\parser\ClassRecord
- findMethod(string $name): phpx\parser\MethodRecord (Alias of findFunction())
- findFunction(string $name): phpx\parser\MethodRecord
```
--------------------------------
### Get Day of Year (Time::day)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the day number within the current year from a Time object.
```APIDOC
day(): int
```
--------------------------------
### Get Week of Month (Time::weekOfMonth)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the week number within the current month from a Time object.
```APIDOC
weekOfMonth(): int
```
--------------------------------
### SourceManager Class API Reference
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-parser-ext/api-docs/classes/phpx/parser/SourceManager.md
Detailed API documentation for the `SourceManager` class, including its full name and a list of all public methods with their signatures, parameters, and return types.
```APIDOC
class SourceManager (phpx\parser\SourceManager)
Description: Class SourceManager
Methods:
find(callable $filter): mixed
findAll(callable $filter): mixed
update(SourceFile $any): void
write(phpx\parser\SourceFile $file, phpx\parser
SourceWriter $writer): void
get(mixed $path, mixed $uniqueId): SourceFile
```
--------------------------------
### HttpDownloadFileHandler Available Methods
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-httpserver-ext/api-docs/classes/php/http/HttpDownloadFileHandler.md
Lists the public methods available in the `HttpDownloadFileHandler` class, including its constructor and methods for managing file details and handling HTTP requests.
```APIDOC
Methods:
- __construct()
- file()
- fileName()
- contentType()
- reset()
- __invoke()
```
--------------------------------
### Get Week of Year (Time::week)
Source: https://github.com/jphp-group/jphp/blob/master/jphp-runtime/api-docs/classes/php/time/Time.md
Retrieves the week number within the current year from a Time object.
```APIDOC
week(): int
```
--------------------------------
### PHP SSH Get Session Method
Source: https://github.com/jphp-group/jphp/blob/master/exts/jphp-ssh-ext/api-docs/classes/ssh/SSH.md
Retrieves an SSH session object for a specified username, host, and port. It returns an `ssh\SSHSession` object.
```php
getSession(string $username, string $host, int $port): ssh\SSHSession
```