Subversion Repositories oidplus

Rev

Rev 1116 | Rev 1152 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1116 Rev 1130
Line 22... Line 22...
22
// phpcs:disable PSR1.Files.SideEffects
22
// phpcs:disable PSR1.Files.SideEffects
23
\defined('INSIDE_OIDPLUS') or die;
23
\defined('INSIDE_OIDPLUS') or die;
24
// phpcs:enable PSR1.Files.SideEffects
24
// phpcs:enable PSR1.Files.SideEffects
25
 
25
 
26
class OIDplusQueryResultPDO extends OIDplusQueryResult {
26
class OIDplusQueryResultPDO extends OIDplusQueryResult {
-
 
27
        /**
-
 
28
         * @var bool
-
 
29
         */
27
        protected $no_resultset;
30
        protected $no_resultset;
-
 
31
 
-
 
32
        /**
-
 
33
         * @var mixed
-
 
34
         */
28
        protected $res;
35
        protected $res;
29
 
36
 
30
        /**
37
        /**
31
         * @param $res
38
         * @param mixed $res
32
         */
39
         */
33
        public function __construct($res) {
40
        public function __construct($res) {
34
                $this->no_resultset = is_bool($res);
41
                $this->no_resultset = is_bool($res);
35
 
42
 
36
                if (!$this->no_resultset) {
43
                if (!$this->no_resultset) {
Line 113... Line 120...
113
 
120
 
114
                return $ret;
121
                return $ret;
115
        }
122
        }
116
 
123
 
117
        /**
124
        /**
118
         * @param $ary
125
         * @param array $ary
119
         * @return \stdClass
126
         * @return \stdClass
120
         */
127
         */
121
        private static function array_to_stdobj($ary) {
128
        private static function array_to_stdobj(array $ary): \stdClass {
122
                $obj = new \stdClass;
129
                $obj = new \stdClass;
123
                foreach ($ary as $name => $val) {
130
                foreach ($ary as $name => $val) {
124
                        $obj->$name = $val;
131
                        $obj->$name = $val;
125
                }
132
                }
126
                return $obj;
133
                return $obj;