9 public $name =
'SafeObject';
10 public $needed = array(
'object',
'param');
17 'allowScriptAccess' =>
'never',
18 'allowNetworking' =>
'internal',
30 if ($token->name ==
'object') {
31 $this->objectStack[] = $token;
32 $this->paramStack[] = array();
34 foreach ($this->addParam as
$name => $value) {
38 } elseif ($token->name ==
'param') {
39 $nest = count($this->currentNesting) - 1;
40 if ($nest >= 0 && $this->currentNesting[$nest]->name ===
'object') {
41 $i = count($this->objectStack) - 1;
42 if (!isset($token->attr[
'name'])) {
46 $n = $token->attr[
'name'];
50 if (!isset($this->objectStack[$i]->attr[
'data']) && $token->attr[
'name'] ==
'movie') {
51 $this->objectStack[$i]->attr[
'data'] = $token->attr[
'value'];
56 !isset($this->paramStack[$i][$n]) &&
57 isset($this->addParam[$n]) &&
58 $token->attr[
'name'] === $this->addParam[$n]
61 $this->paramStack[$i][$n] =
true;
62 } elseif (isset($this->allowedParam[$n])) {
79 if ($token->name ==
'object') {
80 array_pop($this->objectStack);
81 array_pop($this->paramStack);