Download the PHP package gcworld/objectmanager without Composer

On this page you can find all versions of the php package gcworld/objectmanager. 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 objectmanager

GCWorld Object Manager

Packagist Packagist

Packagist PHP Packagist GitHub

A simple object manager that maintains objects in memory

Version

2.9.3

ObjectManager Attributes

Use PHP attributes instead of docblocks to mark classes for manager generation.

Class Attribute

Available ObjectManagerAttribute arguments:

Argument Required Notes
method yes ObjectManagerMethod::GetObject, ::GetModel, ::GetFactoryObject, ::GetFactoryModelObject
name no Getter suffix override. Defaults to the class short name.
namespace no Namespace override used in generated manager methods.
gc no Automated garbage-collection limit. 0 disables it.

These enum cases map to the generated manager behaviors getObject, getModel, getFactoryObject, and getFactoryModelObject.

Classes in different namespaces may share a short name. The generator keeps those classes distinct by their fully qualified class names, but generated PHP methods must still have unique names. Use the attribute's name argument to disambiguate the getter while preserving the existing getter for the other class:

This example generates getADRMember(). Generation fails with a descriptive exception if two classes would produce the same getter name.

Factory Methods

Factory-backed classes use a class attribute plus one or more attributed public static methods.

The generator reflects the attributed static method parameters directly. There is no separate attribute syntax for ordered factory args.

Generating The Manager

Generate the manager after your models are autoloadable and your scan path has been added:

This writes the generated manager class to src/Generated/GeneratedManager.php.

Testing

The repository includes a PHPUnit suite that exercises the generator against fixture models.

Current coverage is focused on:

The tests generate a temporary manager file under src/Generated/ during execution and clean it up afterward.

Migrating Legacy @om-* Docblocks

Legacy class docblocks can be converted to attributes with the bundled migration script.

Dry run:

Apply changes:

What the migrator does:

The script only migrates factory metadata when every referenced legacy factory method can be resolved in the class. If a declared factory method is missing, the file is skipped and a warning is reported so existing metadata is not destroyed.


All versions of objectmanager with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
composer/composer Version >=2.7
gcworld/utilities Version >=2.0
symfony/yaml Version ^6.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 gcworld/objectmanager contains the following files

Loading the files please wait ...