FireDI can do a lot more than just resolve your dependencies for you. This tutorial, we are going to cover other scenarios where FireDI can become helpful. For Mocking In Test Cases When working on testing your code, you will find that from time to time, you will need to mock a dependency for the […]
Getting started with FireTest is easy. Our goal with FireTest was to make it as simple as possible to integrate it into your project and start writing tests for the code you’ve written. Install FireTest Create Your First Test Creating test cases in FireTest is as simple as adding a TestCase class and running the […]
UA1Labs\Fire\Di get($classname) Attempts to retrieve an instance object of the given classname by resolving its dependencies and creating an instance of the object. @param $classname string The class you would like to instantiate @throws \UA1Labs\Fire\Di\NotFoundException If the class cannot be resolved @return object The instantiated object based on the $classname set($classname, $entry) Puts an object into the object cache that is used to resolve dependencies. @param string $classname The classname the instance object should resolve for @param object|callable $entry The object or callable you’d like to place in the object cache @return void has($classname) Determines if the class can be resolved. @param string $classname The classname of the instance you would like to resolve @return boolean getWith($classname, $dependencies) […]
In this tutorial, you will learn how to get started with FireDI! A quick recap, FireDI is a PHP dependency injection library that makes it simple to help you manage dependencies within your classes. If you haven’t quite decided whether you should be using FireDI or not, checkout our page about When Should I Use […]
UA1 Labs has been at this for a while and has made many wonder tools for developers to help keep them focused on the development they are doing. When we interact with other developers and talk with them about dependency injection, there is a bit of confusion on when they should be using it. This […]
How do you move all files from nested directories into one directory in Linux or bash?
This past week I move migrating my Google Photos to my newly setup Amazon Photos. So I downloaded all of my Photos from Google Photos. One problem, when I downloaded, I got sub directories in sub directories and had a bunch of JSON files included. Since I’m only moving Image Files, I didn’t need the […]
I’ve been doing some work lately in BigCommerce for some friends. I’ve been working specifically on Stencil themes and have been looking for a way to tell what data was available to me in page I am working on. Keep reading below to find out how I debug my BigCommerce Stencil pages.
Deleting elements from an array is easy as long as you know which index you or offset value you will be deleting. To delete an element, simply call unset() and pass in the array along with its index or offset.
If you’re here, it’s probably because you are looking for answers to why you are seeing the error Warning: Cannot modify header information – headers already sent being generated from your code. There are many reasons that this can happen. Answers below…