moadminModel::_unserialize PHP 메소드

_unserialize() 보호된 메소드

Returns a serialized element back to its native PHP form
protected _unserialize ( string $_id, string $idtype ) : mixed
$_id string
$idtype string
리턴 mixed
    protected function _unserialize($_id, $idtype)
    {
        if ($idtype == 'object') {
            $errLevel = error_reporting();
            error_reporting(0);
            //unserializing an object that is not serialized throws a warning
            $_idObj = unserialize($_id);
            error_reporting($errLevel);
            if ($_idObj !== false) {
                $_id = $_idObj;
            }
        } else {
            if (gettype($_id) != $idtype) {
                settype($_id, $idtype);
            }
        }
        return $_id;
    }