V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
darasion
V2EX  ›  问与答

Yii framework 的数据库取出对象很复杂,有没有标准的办法实现CJSON::decode(CJSON::encode($object)); 的效果?

  •  
  •   darasion · Jul 20, 2011 · 5628 views
    This topic created in 5404 days ago, the information mentioned may be changed or developed.
    2 replies    1970-01-01 08:00:00 +08:00
    sangxiaolong
        1
    sangxiaolong  
       Jul 21, 2011
    为什么要先encode再decode呢?直接取数据不行么
    darasion
        2
    darasion  
    OP
       Jul 24, 2011
    我找到办法了,看了源码,发现我要找的就是$ojbect->attributes;
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5740 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 08:36 · PVG 16:36 · LAX 01:36 · JFK 04:36
    ♥ Do have faith in what you're doing.