Php 将任意对象树导入红豆orm
当我得到一个客户端应用程序交付的JSON对象树时,我想使用红豆php ORM将它们存储到我的数据库中 目前我正试图这样做Php 将任意对象树导入红豆orm,php,redbean,Php,Redbean,当我得到一个客户端应用程序交付的JSON对象树时,我想使用红豆php ORM将它们存储到我的数据库中 目前我正试图这样做 $object = json_decode($json); // since I know that the input should be of class, let's say, "PRODUCT" // I can handle the data recursivly and store child object as beans // through red bea
$object = json_decode($json);
// since I know that the input should be of class, let's say, "PRODUCT"
// I can handle the data recursivly and store child object as beans
// through red beans
$ProductController = new ProductController();
return $ProductController->_store($object);
(ProductController可以将任意对象递归存储为bean)
但我时不时地绞尽脑汁使用这种方法,我想知道我是否可能在这一点上重新发明轮子
我可以使用红豆的import
功能吗?还是有限制?在我的发言中,医生对这一点并不清楚