PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / 1.3.2
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel v1.3.2
trunk 0.9.0 0.9.1 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.10 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0
wp-all-export / classes / session.php
wp-all-export / classes Last commit date
CdataStrategy.php 8 years ago CdataStrategyAlways.php 8 years ago CdataStrategyFactory.php 9 years ago CdataStrategyIllegalCharacters.php 8 years ago CdataStrategyIllegalCharactersHtmlEntities.php 8 years ago CdataStrategyNever.php 8 years ago XMLWriter.php 8 years ago chunk.php 5 years ago config.php 7 years ago download.php 6 years ago handler.php 10 years ago helper.php 12 years ago input.php 7 years ago installer.php 9 years ago session.php 10 years ago wpallimport.php 4 years ago zip.php 10 years ago
session.php
96 lines
1 <?php
2
3 abstract class PMXE_Session {
4
5 /** @var int $_customer_id */
6 protected $_import_id;
7
8 /** @var array $_data */
9 protected $_data = array();
10
11 /** @var bool $_dirty When something changes */
12 protected $_dirty = false;
13
14 /**
15 * __get function.
16 *
17 * @access public
18 * @param mixed $key
19 * @return mixed
20 */
21 public function __get( $key ) {
22 return $this->get( $key );
23 }
24
25 /**
26 * __set function.
27 *
28 * @access public
29 * @param mixed $key
30 * @param mixed $value
31 * @return void
32 */
33 public function __set( $key, $value ) {
34 $this->set( $key, $value );
35 }
36
37 /**
38 * __isset function.
39 *
40 * @access public
41 * @param mixed $key
42 * @return bool
43 */
44 public function __isset( $key ) {
45 return isset( $this->_data[ sanitize_title( $key ) ] );
46 }
47
48 /**
49 * __unset function.
50 *
51 * @access public
52 * @param mixed $key
53 * @return void
54 */
55 public function __unset( $key ) {
56
57 if ( isset( $this->_data[ $key ] ) ) {
58 unset( $this->_data[ $key ] );
59 $this->_dirty = true;
60 }
61
62 }
63
64 /**
65 * Get a session variable
66 *
67 * @param string $key
68 * @param mixed $default used if the session variable isn't set
69 * @return mixed value of session variable
70 */
71 public function get( $key, $default = null ) {
72 $key = sanitize_key( $key );
73 return isset( $this->_data[ $key ] ) ? maybe_unserialize( $this->_data[ $key ] ) : $default;
74 }
75
76 /**
77 * Set a session variable
78 *
79 * @param string $key
80 * @param mixed $value
81 */
82 public function set( $key, $value ) {
83 $this->_data[ sanitize_key( $key ) ] = maybe_serialize( $value );
84 $this->_dirty = true;
85 }
86
87 /**
88 * get_import_id function.
89 *
90 * @access public
91 * @return int
92 */
93 public function get_import_id() {
94 return $this->_import_id;
95 }
96 }