Jump to content

poisa

New Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About poisa

  • Rank
    Newbie

Profile Information

  • Gender
    Not Telling
  1. Hmm... Interesting ideas. ignace, yours in particular reminds me of Java a bit. I do have a question about it though. In your getOptions() method you are returning strings. Do you see any benefit in doing the following instead? public static function getOptions() { return [static::ACTIVE(), static::INACTIVE(), static::BANNED()]; }
  2. Let's take this status table: id | name ---+------- 1 | active 2 | inactive 3 | banned In this case, I know that this table will not be edited ever, and if it is, it will happen extremely rarely and most likely a status will only be added. Also, the name is basically for when you look at the DB manually as it is never displayed anywhere. Let's say a user table has a status_id field (with a foreign key constraint to the status table, for good measure). Knowing the status of the user by looking at the database is pretty straight forward. But let's go to the code... In PHP it's very
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.