Squiz Matrix
4.12.2
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
All
Data Structures
Namespaces
Functions
Variables
Pages
serialise.inc
1
<?php
18
require_once SQ_INCLUDE_PATH.
'/asset_attribute.inc'
;
19
31
class
Asset_Attribute_Serialise
extends
Asset_Attribute
32
{
33
34
42
function
Asset_Attribute_Serialise
($attributeid=0, $value=null)
43
{
44
$this->
Asset_Attribute
($attributeid, $value);
45
46
}
//end constructor
47
48
57
function
validateValue
(&$value)
58
{
59
// cant serilise scalar variables
60
if
(is_scalar($value)) {
61
// see if it is already serilised
62
$unser = @unserialize(trim((
string
) $value));
63
if
(is_scalar($unser)) {
64
return
false
;
65
}
else
{
66
$value = $unser;
67
}
68
}
69
$value = serialize($value);
70
return
true
;
71
72
}
//end validateValue()
73
74
81
function
getContent
()
82
{
83
return
var_export($this->value,
true
).
';'
;
84
85
}
//end getContent()
86
87
88
}
//end class
89
90
?>
squiz_matrix
core
attributes
serialise
serialise.inc
Generated on Tue Jan 29 2013 14:04:44 for Squiz Matrix by
1.8.3.1