oop

  • Basics of Object Oriented Programming in PHP - Part I

    PHP is a Computer Language that embraced OOP (Object Oriented Programming) and currently it fully supports all OOP Principles and Patterns. This makes PHP a very powerful, yet friendly Programming Language. Mastering OOP in PHP requires to fully

    ...
  • Basics of Object Oriented Programming in PHP - Part II

    Understanding key Object Oriented Programming concepts is required to be able to produce Modern, High Quality PHP Software Applications that stick to OOP Best Practices and Principles.

    Prerequisites:

    ...
  • Basics of Object Oriented Programming in PHP - Part III

     As I was mentioning in past Article, understanding key Object Oriented Programming concepts is required to be able to produce Modern, High Quality PHP Software Applications that stick to OOP Best Practices and

    ...
  • Demystifying Object Inheritance in Computer Programming: Building Hierarchies of Reusable Code

    In the world of computer programming, building complex software systems often involves managing relationships between objects. Object inheritance is a fundamental concept that allows developers to create hierarchical relationships between

    ...
  • Fundamentals of Object Oriented Programming - Part I Objects

    Object Oriented Programming is about writing code using constructs called objects. We can say that everything can be called an object if we stick to the accepted definition by the Language Academia1. To understand the

    ...
  • Fundamentals of Object Oriented Programming - Part II OOP Principles

    Once we understand the concept of Software Objects taking physical real life examples as I explained in previous Article, then we need to dive into their characteristics and behavior before we can effectively write Object Oriented

    ...
  • Fundamentals of Object Oriented Programming - Part III Writing Object Oriented Programs

    Object Oriented Programming is about writing code using Objects. Once we understand the concept of an "Object" and its main Principles, we are ready to start writing OOP code.

    Prerequisites:

    ...
  • How to convert Time Zones in PHP

    Date calculations are probably one of the most challenging requirements for PHP Developers.  Some of these are timezone calculations. Here are some examples on how to use the DateTime and DateTimeZone classes available in PHP core to deal with

    ...
  • How to deserialize Xml into a DTO in Symfony

    You can deserialize complex nested Xml files into DTO Classes in Symfony in very simple steps using the JMS Serializer Bundle. Just follow these steps:

     

    Step 1: Install

    ...
  • How to implement a pub - sub pattern in php

    Implementing the Publish-Subscribe (Pub-Sub) pattern in PHP involves creating a system where publishers send messages (events) to a central event bus, and subscribers receive and handle those events. This pattern decouples the publishers from

    ...
  • How to implement Actions that respond to Events in PHP Symfony

    One of the most powerful features of Symfony Framework is its Event Driven Architecture. It is very easy and simple to implement PHP logic that responds to certain events during the request - response cycle.

    How to implement Arrow Functions in PHP

    Arrow functions, also known as short closures, were introduced in PHP 7.4 as a more concise syntax for defining anonymous functions. They provide a shorthand way to create simple, one-line functions without the need for the function keyword or

    ...
  • How to implement autowiring in PHP using DI Container

    In PHP, autowiring refers to a technique for automatically resolving dependencies when instantiating classes. To implement autowiring in PHP, you can use a dependency injection container, such as PHP-DI package, which provides autowiring out of

    ...
  • How to implement autowiring in php using reflexion class

    Autowiring in PHP refers to the ability to automatically resolve dependencies of a class without the need for manual instantiation or injection of dependencies.To implement autowiring in PHP using the ReflectionClass, you can follow these

    ...
  • How to implement Closures in PHP

    In PHP, a closure is an anonymous function that can access variables outside of its own scope. It "closes" over those variables and retains their values even if they are no longer in scope. This allows closures to have a persistent state and

    ...
  • How to transform a Json String into a DTO in PHP

    In PHP, a DTO (Data Transfer Object) is a design pattern that is used to transfer data between different layers or components of an application. It acts as a container or data structure that holds the data.The

    ...
  • How to upgrade to php 8+ from older versions

     Upgrading old PHP code to the new 8 series could be a very difficult task, but its absolutely necessary. Main reasons are security, performance and compatibility. I will try to document here things I haven't found

    ...
  • How to use array_column function in php

    array_column(array, column_name) is another very powerful function available in PHP. It allows to extract all the values from the specified column from a multi-dimensional array without looping into each one of the nested arrays. These are the

    ...
  • How to use array_filter function in PHP

    array_filter(callable, array1) is another very powerful function available in PHP. Basically is a way to remove elements from an array that does not pass given rules in the callable function. These are the most common ways to implement this

    ...
  • How to use array_map function in PHP

    array_map(callable, array1,array2,array3,...) is a very powerful function available in PHP. Basically is a way to transform one or more arrays applying the logic in the callable function and output the result as another array. These are the most

    ...