PluginProbe
ShiftController Employee Shift Scheduling / 4.9.92
ShiftController Employee Shift Scheduling v4.9.92
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
shiftcontroller / hc3 / lib / packedarray.php

packedarray.php in ShiftController Employee Shift Scheduling 4.9.92, at hc3/lib/packedarray.php

32 lines 715 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
2 class HC3_Lib_PackedArray implements ArrayAccess
3 {
4 private $container = '';
5
6 public function __construct( $size, $fill = 0 )
7 {
8 $this->container = str_repeat( chr($fill), $size );
9 }
10
11 public function offsetSet( $i, $v )
12 {
13 $this->container[$i] = chr( $v & 0xff ); // store value $v into $x[$i]
14 }
15
16 public function offsetExists( $i )
17 {
18 return TRUE;
19 // return isset($this->container[$offset]);
20 }
21
22 public function offsetUnset( $i )
23 {
24 // unset($this->container[$offset]);
25 }
26
27 public function offsetGet( $i )
28 {
29 $return = ord( $this->container[$i] ); // get value $v from $x[$i]
30 return $return;
31 }
32 }