You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
iforp
changed the title
Wrong methods call (i.e. self instead of $this)
Add some Late Static Binding and fix some methods call (i.e. static instead of self)
Oct 9, 2014
iforp
changed the title
Add some Late Static Binding and fix some methods call (i.e. static instead of self)
Add Late Static Binding and fix some methods call (i.e. static instead of self)
Oct 9, 2014
@Agent-J please feel free to try this out and run the unit tests to make sure everything works fine and submit a PR.
That said I know that there are issues with using static in PHP v5.3.
With regard to calling $class::... When the method is run it is called from the inherited abstract class but the attributes belong to the child class. This allows access to the child's scope where other options will keep the scope relative to the abstract class. If this has been fixed in later versions we can add that as a conditional.
There are a lot of calling like
self::connection()
in\Purekid\Mongodm\Model
.Why don't you use
static::connection()
?Because of this issue I can't override some methods in my subclass.
For example:
in this simple example method
BaseModel::connection()
will never be executed.Moreover you use a lot of constructions like
instead you should use
The text was updated successfully, but these errors were encountered: