Extending Class with self::

Marcus

Well-known member
When I extend a class with self:: and reusing something of its code at the beginning to check (calling the parent function later), from my understanding I should have to change self:: with $this, is that correct?

Or has self:: also access to the parent functions my class is extending?
 
PHP:
class Alerts_Model_Alert extends XFCP_Alerts_Model_Alert
{
public function markAllAlertsReadForUser($userId, $time = null)
  {
  if (self::PREVENT_MARK_READ)
  {
  return;
  }

So this code in my addon would also check against the extended classes constant PREVENT_MARK_THREAD, is that right?
 
Back
Top Bottom