Skip to content

SocialNerds/Observer-Pattern-82

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Observer Pattern Example

An example of the observer design pattern using PHP. The same principles apply to almost any other programming language.

Check the full explanation video (GR)

Installation

Requirements

  • You need to have Docker installed

Run in root folder,

cp .env.example .env
docker-compose build && docker-compose up -d

Login to the container,

docker exec -it -u serveruser app_fpm /bin/bash -c "TERM=$TERM exec bash"

To check it works,

php hello.php

To check the tests,

composer install
phpunit

You should see something like this,

PHPUnit 8.1.4 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.5
Configuration: /home/serveruser/data/3/phpunit.xml

.                                                                   1 / 1 (100%)

Time: 106 ms, Memory: 10.00 MB

OK (1 test, 4 assertions)

Exit the container,

exit

By SocialNerds

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published