Exemplo n.º 1
0
 /**
  * loadTableFromYamlFile
  *
  * @param string $table    name of table to load without prefix
  * @param string $yamlFile name of file containing data dump in YAML format
  *
  * @return int number of rows inserted
  */
 public static function loadTableFromYamlFile($table, $yamlFile)
 {
     $count = 0;
     $data = Yaml::loadWrapped($yamlFile);
     // work with phpmyadmin YAML dumps
     if (false !== $data) {
         $count = static::loadTableFromArray($table, $data);
     }
     return $count;
 }