Download the PHP package helsingborg-stad/acfservice without Composer
On this page you can find all versions of the php package helsingborg-stad/acfservice. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download helsingborg-stad/acfservice
More information about helsingborg-stad/acfservice
Files in helsingborg-stad/acfservice
Package acfservice
Short Description Simplifies ACF integration by providing a centralized AcfService that exposes global ACF functions in a streamlined manner. Simplify your development workflow and enhance ACF integration with ease.
License MIT
Informations about the package acfservice
AcfService
Simplifies ACF integration by providing a centralized AcfService that exposes global ACF functions in a streamlined manner. Simplify your development workflow and enhance ACF integration with ease.
About AcfService
Enable the use of global ACF functions in plugins and themes where applying Interface Segregation. Different flavors of the ACF Service can be utilized by applying available decorators.
Getting Started
Installation
-
Install the package via composer:
- Use the AcfService in your plugin or theme:
Built With
- PHP
Tests
Run tests
Run composer test
in the terminal.
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Using AcfService in tests
To make it easier when testing code that depends on the AcfService or parts of it, a FakeAcfService implementation is available. This implementation is useful when you want to test your code without having to rely on the ACF functions.
Example
Consider that you have the following class that utilizes a part of the AcfService:
You can then use FakeAcfService in your tests to fake the results of the AcfService as well as verifying the calls made to the AcfService functions:
Passing return values to the FakeAcfService
The FakeAcfService constructor accepts an array of key-value pairs where the key is the name of the method and the value is the return value of the method.
License
Distributed under the MIT License.