Download the PHP package damarbob/starcore without Composer

On this page you can find all versions of the php package damarbob/starcore. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package starcore

StarCore

The HMVC and Hook Orchestration Kernel for CodeIgniter 4

StarCore is a lightweight, powerful library designed to bring Hierarchical Model-View-Controller (HMVC) architecture and a robust Hook Orchestration system to CodeIgniter 4 applications. It enables modular application development and provides a flexible event-driven architecture.

Features

Installation

Install via Composer:

Configuration

Active Modules

By default, StarCore looks for modules in the modules/ directory. You can configure active modules in Config/Star.php (publish this file to your application's app/Config directory if needed, or modify it in place for the library).

Alternatively, you can set this in your .env file:

Development Modules

Development modules are located in the modules/.star-dev/ directory. These modules are either experimental or intended for development tools and features, and should not be enabled in production.

You can configure active development modules in Config/Star.php:

Alternatively, you can set this in your .env file:

Note: Development modules are automatically disabled when safeMode is enabled.

Safe Mode

Safe mode disables all modules, useful for debugging or maintenance.

Usage

Hooks

StarCore provides a global helper function hook() and a service HyperHooks to manage events.

Registering a Hook

You can register hooks in your module's init.php or any other loaded file.

Triggering a Hook

Using the hook() Helper

The hook() helper is used to retrieve hook configurations or values from Hooks/ files in your modules.

Creating a Hook

To create a hook that can be retrieved via the hook() helper, create a file in your module's Hooks/ directory (e.g., modules/Blog/Hooks/Frontend.php). This file should return an associative array of Star\HyperHook objects.

You can then access these hooks using hook('Frontend.header') or hook('Frontend.footer').

Dynamic Hook Names

You can use placeholders in your hook values to make them dynamic. Placeholders are defined using curly braces, e.g., {name}.

1. Create a hook with a placeholder:

2. Retrieve the hook with parameters:

Pass an associative array as the second argument to the hook() helper to replace the placeholders.

Module Structure

A typical module structure looks like this:

Development Module Structure

A typical development module structure looks like this:

Module Autoloading

StarCore automatically discovers and loads modules located in the modules/ directory (and modules/.star-dev/ for development modules). This process happens immediately when the library is loaded (before the pre_system event) to ensure namespaces and event listeners are available during the application bootstrapping.

  1. Namespace Registration: The autoloader automatically registers the module's namespace based on its directory name. For example, a module in modules/Blog will have the Blog namespace registered.
  2. Initialization: If an init.php file exists in the module's root, it is executed. This is the ideal place to register hooks or perform other setup tasks.

Composer Compatibility

StarCore is designed to work seamlessly with Composer.

Choose the option that best fits your needs.

License

This project is licensed under the MIT License.


All versions of starcore with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
codeigniter4/framework Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package damarbob/starcore contains the following files

Loading the files please wait ...