Download the PHP package zjkiza/default-access without Composer

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

PHP Package: Default Accessor

A package for easily accessing and invoking private and protected properties and methods, as well as static ones. It also supports access to the methods and properties of the parent class.

About the Package

This package provides a practical way to access and manage private and protected methods and properties in PHP objects through the Zjk\Accessor\Contract\DefaultAccessInterface.

Methods for Managing Properties and Methods

This tool is ideal for scenarios such as testing, debugging, or working with complex objects where modifying the visibility of methods and properties is not possible or practical.

Installation

Add the package to your composer.json file:

If you're using the Composer autoloader, all necessary files will be automatically included.

Working with the Package

Usage Without a Framework

If you're working in a plain PHP project without a framework, you can directly use the DefaultAccessor::create() class. This class implements the DefaultAccessInterface and provides access to all its methods.

Usage with a Framework

If you're using a PHP framework, you can integrate this package through dependency injection.

  1. Register the Interface and Implementation:

    • Configure the Zjk\Accessor\Contract\DefaultAccessInterface interface to instantiate the Zjk\Accessor\DefaultAccessor class.
    • This allows the DefaultAccessInterface to be injected into any class within the framework.
  2. Direct Usage:
    • Alternatively, you can use the static DefaultAccessor::create() method for instantiation without additional configuration.

Example in Symfony

Example in Laravel

Package Benefits

This package is an excellent tool for advanced PHP developers who need a powerful and practical way to access "hidden" parts of objects without compromising object-oriented design principles.

Example :


All versions of default-access with dependencies

PHP Build Version
Package Version
Requires php Version >=8.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 zjkiza/default-access contains the following files

Loading the files please wait ....