This repo contains the class exercise we did on day 9 of the Programming in PHP course which is part of the Full Stack Web Development Program at Business College Helsinki. It's a continuation of the previous lessons we had. It was previously hosted on Heroku.
An SQL database was also enabled with CRUD commands implemented. The local db runs on SQLite and the hosted version used Heroku Postgres. Unfortunately, Heroku has removed the free plan for Heroku Postgres so the online instance was taken down.
Built with:
- PHP
- Symfony
- SQLite/PostgreSQL
Previously hosted on:
- Heroku
composer require maker
composer require orm
Mentor: Hoang Pham
- Database (class Bank in my case) saves an array of BankAccounts, can insert, find and delete BankAccount from its saved list of BankAccounts.
- Database shouldn’t allow insertion of a new account that shares the same key with an existing account
- Each BankAccount keeps a key: Key, balance: number, and has a deposit method that allows top up, a getBalance method that returns balance, and a getKey methods that returns the Key when asked
- Key has equals method to compare two Keys and return either true or false, and getNumber that returns the actual numerical key when asked