清理、遺留
你可以留下一些你需要的資料,然後移除你不需要的,
當然你也可以移除你指定的資料,然後留下其他資料。
留下指定資料
透過 keep(資料名稱)
留下這些指定的資料。
$data = Koru::build($_POST);
/** 單一個資料 */
$data->keep('username');
/** 或多個資料 */
$data->keep('username, password, birthday');
移除指定資料
透過 remove(資料名稱)
移除這些指定的資料。
$data = Koru::build($_POST);
/** 單一個資料 */
$data->remove('username');
/** 或多個資料 */
$data->remove('username, password, birthday');