Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. abstract class Entity {
  2.  
  3. abstract public function getEntityType() : int;
  4.  
  5. public function compareHash(array $dataItem) : bool {
  6.  
  7. // todo
  8. // Return big array from data base
  9. $hashBase = (new HashBase())->getData($this->getEntityType());
  10.  
  11. }
  12.  
  13. }
  14.  
  15. abstract class Entity {
  16. abstract public function getEntityType() : int;
  17. public static $hashBaseArr = [];
  18.  
  19. public function compareHash(array $dataItem) : bool {
  20. // todo
  21. // Return big array from data base
  22. if ( !isset(static::$hashBaseArr[get_called_class()]) ) {
  23. static::$hashBaseArr[get_called_class()] = (new HashBase())->getData($this->getEntityType());
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement