* Optimize api page style.

This commit is contained in:
caoyanyi
2023-04-03 17:11:27 +08:00
parent 489ae36491
commit ec2e0276de
8 changed files with 169 additions and 142 deletions
+2 -2
View File
@@ -889,10 +889,10 @@ class apiModel extends model
*
* @param string $table
* @param stirng $version
* @access private
* @access public
* @return array
*/
private function getDemoData($table, $version)
public function getDemoData($table, $version)
{
$file = $this->app->getAppRoot() . 'db' . DS . 'api' . DS . $version . DS . $table;
return unserialize(preg_replace_callback('#s:(\d+):"(.*?)";#s', function($match){return 's:'.strlen($match[2]).':"'.$match[2].'";';}, file_get_contents($file)));