MicroORM for PHP

website·Indexed 32 days ago

https://opensource.byjg.com

A lightweight PHP ORM featuring a repository pattern for read/write separation, Active Record implementation, and a flexible query builder. It supports model attributes for table structure definition, mapper functions for data control, soft deletes via traits, and composite primary keys.

Tokens
443.8K
Snippets
2.5K
Records
3.1K
Agent score
63%

What's inside MicroORM

  1. Overview of OpenAPI integration in gluo

    The gluo framework uses an openapi.json file as a single source of truth to describe HTTP APIs. This specification drives three primary system functions:

    1. Runtime Routing: OpenApiRouteList reads the JSON file to map incoming requests to controller methods.
    2. Swagger UI: An interactive browser interface is served at http://localhost:8080/docs/ for exploring and testing endpoints.
    3. Contract Testing: OpenApiValidation (via ByJG\\ApiTools) ensures that test responses conform to the declared schema.
  2. Overview of byjg/text-classifier engines

    The byjg/text-classifier library provides two independent statistical text classification engines:

    1. BinaryClassifier: A Binary Robinson-Fisher Bayesian filter used for two-class filtering (e.g., spam vs. ham). It supports word degeneration for higher accuracy.
    2. NaiveBayes: A multi-class classifier used for categorizing text into any number of user-defined categories (e.g., language detection, topic tagging).

    Both engines return a ClassificationResult containing the winning category, a confidence score, and scores for all categories. They share a common tokenization pipeline (StandardLexer, StandardDegenerator) and support multiple storage backends: in-memory, SQLite, MySQL, PostgreSQL, and GDBM. Both also support optional LLM injection for active learning when the statistical model is uncertain.

  3. Overview of PSR-7 URI Implementation for PHP

    This library provides a PHP implementation of the PSR-7 UriInterface, extending the standard interface with additional utility methods for URI manipulation and analysis.
  4. Overview of AnyDataset XML for PHP

    AnyDataset XML is an agnostic data source abstraction layer for PHP that allows developers to process XML data using a consistent API. Key capabilities include XPath support, XML namespace handling, automatic repeated node processing (returning arrays), and custom field processing via closures. It accepts XML input as a string, DOMDocument, XmlNode, or File object.
  5. Introduction to n8n-gitops for workflow versioning

    n8n-gitops is a tool designed to bring GitOps principles to n8n workflows. While n8n natively relies on manual, UI-driven deployments, n8n-gitops enables workflows to be treated as versioned, reviewable, and reproducible artifacts managed via Git. This allows teams to implement change control, auditability, and automated deployment pipelines for their n8n production environments.
  6. Overview of n8n-gitops for workflow versioning

    n8n-gitops is a tool designed to bring GitOps principles to n8n workflows. While n8n natively uses a manual, UI-driven deployment process, n8n-gitops enables workflows to be treated as versioned, reviewable, and reproducible artifacts managed via Git and deployed through automation. This ensures change control, auditability, and reproducibility for production n8n environments.
  7. Overview of ByJG PHP Cache Engine features

    ByJG PHP Cache Engine is a versatile cache implementation that provides both PSR-6 (Cache Pool) and PSR-16 (Simple Cache) interfaces. Key capabilities include:

    • Support for multiple storage backends (Memory, File System, Redis, Memcached, etc.).
    • Atomic operations (increment, decrement, add) in compatible engines.
    • Automatic garbage collection for expired items.
    • PSR-11 container support for retrieving cache keys.
    • PSR-3 compatible logging for cache operations.
  8. Overview of the byjg MCP Server architecture

    The byjg MCP server converts markdown files from the byjg.github.io repository into searchable passages for LLMs using three MCP tools. Key architectural features include:

    • Hybrid Retrieval: Combines vector similarity for natural-language queries and BM25 for exact symbol matching, fused via Reciprocal Rank Fusion.
    • Heading-aware Chunking: Passages are split by markdown headings instead of fixed-size windows, ensuring coherent sections with associated heading paths and URLs.
    • GitHub-based Source of Truth: The server clones the docs repository into a temporary directory for each refresh. Indexing is incremental based on content hashes.
    • SQLite Storage: The entire index is stored in a 24 MB SQLite database using sqlite-vec for vectors and FTS5 for keyword search.
    • Abstracted Backends: Storage and embedding logic are decoupled via VectorStore and Embedder interfaces.
  9. Overview of jquery-sse

    jquery-sse is a lightweight jQuery plugin that provides a polyfill for Server-Sent Events (SSE). It attempts to use the native EventSource object if supported by the browser; otherwise, it falls back to Ajax polling. This allows for SSE functionality without requiring changes to the server-side implementation.
  10. Overview of byjg/jwt-wrapper

    The byjg/jwt-wrapper library is a straightforward wrapper for the Firebase JWT library designed to simplify the creation, encoding, and decoding of JWT tokens in PHP applications. It provides an abstraction layer that supports both HMAC and RSA signing methods, handles common JWT fields (such as issued at and expires) automatically, and offers an intuitive interface for data extraction.