for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace nebula\route\collection;
use Iterator;
use IteratorAggregate;
/**
* 路由集合文件
*/
class CollectionFile
{
public static function fromFile(string $path)
return \unserialize(\file_get_contents($path));
}
* 保存到文件
*
* @param string $path
* @return boolean
public function save(string $path):bool
return \file_put_contents($path, \serialize($this));
return file_put_contents($path, serialize($this))
integer
boolean