As great as Node.js is for “traditional” web applications, its potential uses are far broader. Microservices, REST APIs, tooling, working with the Internet of Things and even desktop applications: it’s got your back. Another area where Node.js is really useful is for building command-line applications — and that’s what we’re […]
Daily Archives: October 17, 2019
This sponsored article was created by our content partner, BAW Media. Thank you for supporting the partners who make SitePoint possible. Doing a great job of showcasing your work doesn’t have to be difficult. You don’t have to print out a batch of fancy brochures to distribute or carry around […]
I have created this playlist a few months ago. I will be glad if anyone here will find it useful and learn something from it. The topics covered: – Classes, properties and methods. – Constructors and destructors – Static properties and methods – Class constants – Magic methods – Inheritance […]
Instead of having interfaces for every single model type in your database, for example UserRepositoryInterface, ArticleRepositoryInterface, etc, you could have RepositoryInterface with methods like findOne(): T, and then each Repository implements that interface for its respective Model. Is there an advantage for doing what we currently have to do? submitted […]
This is more of an r/NoStupidQuestions intent, but How the heck is PHP executed? It has to be tested somehow. There is a way to run PHO for testing, but what is it? PHP is a server-side language, so do you require a fully-functional, hosted server to test the code? […]
In Magento version 2.3.2 and 2.3.3, in a UI form, I have a field element input, of type price*: price Price price false true Looks like this: Here, I found documentation for field types, from UI form. I want the price in that field to be displayed with two decimal […]
I know what object manager is. I know why it is used. I know that as a general rule it shouldn’t be used. I know why from reading this. https://devdocs.magento.com/guides/v2.3/extension-dev-guide/object-manager.html#exceptions. Then I see code like this https://github.com/magento/magento2/blob/2.3/app/code/Magento/Catalog/Model/Indexer/Product/Eav/Action/Full.php#L83-L85 public function __construct( [...] $this->scopeConfig = $scopeConfig ?: ObjectManager::getInstance()->get( ScopeConfigInterface::class ); [...] } […]