| 93 | } |
| 94 | |
| 95 | private static function _pack_object( |
| 96 | /*object /*use type hint if you can removing initial comment*/ |
| 97 | $list, |
| 98 | /*int /*use type hint if you can removing initial comment*/ |
| 99 | $length |
| 100 | ) { |
| 101 | for ( |
| 102 | $keys = self::_getKeys($list[0]), |
| 103 | $klength = count($keys), |
| 104 | $result = array(), |
| 105 | $i = 0, |
| 106 | $j = 0, |
| 107 | $ki, $o; |
| 108 | $i < $length; ++$i |
| 109 | ) { |
| 110 | for ( |
| 111 | $o = $list[$i], $ki = 0; |
| 112 | $ki < $klength; |
| 113 | $result[$j++] = $o->$keys[$ki++] |
| 114 | ); |
| 115 | } |
| 116 | return array_merge(array($klength), $keys, $result); |
| 117 | } |
| 118 | |
| 119 | private static function _unpack_array( |
| 120 | /*array /*use type hint if you can removing initial comment*/ |