Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move PostModel to Models\Post #10

Open
jplhomer opened this issue Aug 29, 2017 · 2 comments
Open

Move PostModel to Models\Post #10

jplhomer opened this issue Aug 29, 2017 · 2 comments
Milestone

Comments

@jplhomer
Copy link
Owner

namespace Models;

class Post extends Base {}

// Usage:

use Fresa\Models\Post;

class Event extends Post {}

// or

use Fresa\Models\Post as PostModel;

class Post extends PostModel {}

Do the same for Taxonomy.

@jplhomer jplhomer added this to the v2.0.0 milestone Aug 29, 2017
@jplhomer
Copy link
Owner Author

May be able to leave a fallback deprecated class that just extends the new class. That way it could be released as a minor update.

use Fresa\Models\Post;
class PostModel extends Post 
{
  // Deprecated!
}

@QWp6t
Copy link

QWp6t commented Sep 13, 2020

You could also use a class alias.

class_alias('Fresa\Models\Post', 'Fresa\Models\PostModel');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants