Skip to content

Copy the better frameworks out there? #4

@solidpulse

Description

@solidpulse

The following doesn't have autocompletion and is very error prone.

use \Bango\Model;

class User extends Model
{

    /**
     * Class constructor.
     *
     * @return void
     */
    public function __construct()
    {
        $this->bind_entity("users");
        $this->create_fields([
            "id" => "integer", 
            "email" => "string", 
            "password" => "string"
        ]);
    }
}

you could use the one from doctrine, https://symfony.com/doc/current/doctrine.html#creating-an-entity-class

with typed properties and annotations in PHP8, it will be perfect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions