darcydriscoll / chat-room

A small chat room made w/ Vue, Tailwind, MySQL, and PHP.
MIT License
0 stars 0 forks source link

Re-evaluate visibility and lifetime (e.g. staticness) of PHP methods, classes, properties. #16

Open darcydriscoll opened 2 years ago

darcydriscoll commented 2 years ago

🐏 Now: Motivation

⚜️ Where's the issue?

public/api/db.php public/api/user.php

Example of visibility: public/api/db.php::DB::connect

⚜️ What's the issue?

Lifetime: I only ever have one DB and one User class instantiated at one time. Why are these not static? Why are they classes?

Visibility: Not sure.

⚜️ Any ideas on how to solve it?

Nope

🦄 Later: Solving it

💠 The problem

💠 The method

💠 Notes