public static function getAllPersistedAttributes() {
    $calledClass = get_called_class();

    if (array_key_exists($calledClass, self::$allPersisted)) {
      return self::$allPersisted[$calledClass];
    } else {
      $persisted = [];
      if(property_exists($calledClass, 'persisted')) {
        $persisted  = $calledClass::$persisted;
      }
      $parent = get_parent_class($calledClass);
      if (method_exists($parent, 'getAllPersistedAttributes')) {
        $persisted = array_merge($persisted, $parent::getAllPersistedAttributes());
      }
    }
    self::$allPersisted[$calledClass] = $persisted;
    return self::$allPersisted[$calledClass];
  }
public static function getAllPersistedAttributes() {
    $calledClass = get_called_class();

    if (array_key_exists($calledClass, self::$allPersisted)) {
      return self::$allPersisted[$calledClass];
    } else {
      $persisted = [];
      if(property_exists($calledClass, 'persisted')) {
        $persisted  = $calledClass::$persisted;
      }
      $parent = get_parent_class($calledClass);
      if (method_exists($parent, 'getAllPersistedAttributes')) {
        $persisted = array_merge($persisted, $parent::getAllPersistedAttributes());
      }
    }
    self::$allPersisted[$calledClass] = $persisted;
    return self::$allPersisted[$calledClass];
  }
public static function getAllPersistedAttributes ( ) { $ calledClass = get_called_class ( ) ; if ( array_key_exists ( $ calledClass , self :: $ allPersisted ) ) { return self :: $ allPersisted [ $ calledClass ] ; } else { $ persisted = [ ] ; if ( property_exists ( $ calledClass , 'persisted' ) ) { $ persisted = $ calledClass :: $ persisted ; } $ parent = get_parent_class ( $ calledClass ) ; if ( method_exists ( $ parent , 'getAllPersistedAttributes' ) ) { $ persisted = array_merge ( $ persisted , $ parent :: getAllPersistedAttributes ( ) ) ; } } self :: $ allPersisted [ $ calledClass ] = $ persisted ; return self :: $ allPersisted [ $ calledClass ] ; }
Get all the persisted attributes that belongs to the class inheriting values declared on super classes

@return array
Get all the persisted attributes that belongs to the class inheriting values declared on super classes