Ejemplo n.º 1
0
 /**
  * Function that creates an object of the FileSystem in order to search the file
  * and pass the arguments to the file.
  *
  * @since 0.1.0
  *
  * @param string $file_name The name of the file.
  * @param string $type The type to be loaded.
  * @param array  $args The group of arguments to pass to the template or partial.
  */
 private static function loader($file_name = '', $type = '', $args = [])
 {
     $files = new FileSystem($file_name, $type);
     $path = $files->get_path();
     if (false !== $path) {
         include $path;
     }
 }
Ejemplo n.º 2
0
 /**
  * Function that creates an object of the FileSystem in order to search the file
  * and pass the arguments to the file.
  *
  * @since 0.1.0
  *
  * @param string $file_name The name of the file.
  * @param string $type The type to be loaded.
  * @param array  $args The group of arguments to pass to the template or partial.
  */
 private static function loader($file_name = '', $type = '', $args = [])
 {
     $files = new FileSystem($file_name, $type);
     $path = $files->get_path();
     unset($files);
     if (false === $path) {
         return;
     }
     include $path;
     // Clear arguments.
     unset($args);
 }