/**
  * Find all post
  */
 public function findAll()
 {
     //Magazines
     $posts = get_posts(['post_type' => static::$associate_post_type, 'post_status' => 'publish', 'suppress_filters' => false]);
     //Hydrate them
     return Hydratator::hydrates($posts, static::$fields, static::$depth);
 }
 /**
  * Find All terms and hydrate them
  */
 public function findAll()
 {
     //Get all the terms
     $terms = get_terms(static::$associate_post_type, ['hide_empty' => false]);
     //Hydrate them all
     $terms = Hydratator::hydrates($terms, static::$fields, static::$depth);
     return $terms;
 }
 /**
  * Find one page by ID and hydrate it
  * @param $pageId int ID of the page to retrieve
  */
 public function findOne($pageId)
 {
     $page = get_post($pageId);
     return Hydratator::hydrate($page, static::$fields, static::$depth);
 }