<?php
/*
    =========================================
        MethodPosts
    =========================================
*/

require_once( INC . 'Section.php' );

class MethodPosts
{
  public static function get_all()
  {
    return json_decode(file_get_contents(INC . "siteData/site-data.json"), true)["projects"];
  }

  public static function get_post_content ($file_name)
  {
    $rawContent = json_decode(file_get_contents(INC . "dictionnaries/projects/".LANG."/$file_name.json"), true);

    foreach ($rawContent as $raw_section)
    {
      $section = new Section( $raw_section );
      echo $section->run();
    }
  }
}
