- Timestamp:
- 2012/03/06 22:37:30 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/helper/SC_Helper_Transform.php
r21595 r21596 104 104 $cur_idx = 0; 105 105 // ツリーを初めから全検索する 106 for ($iLoop=0; $iLoop < count($this->arrElementTree); $iLoop++){106 for ($iLoop=0; $iLoop < count($this->arrElementTree); $iLoop++) { 107 107 if (preg_match($regex, $this->arrElementTree[$iLoop][0])) { 108 108 // インデックスが指定されていない(見つけたエレメント全て)、もしくは指定されたインデックスなら選択する … … 146 146 $cur_idx = 0; 147 147 // 親エレメント位置からツリーを検索する 148 for ($iLoop=$objElement[0]; $iLoop < count($this->arrElementTree); $iLoop++){148 for ($iLoop=$objElement[0]; $iLoop < count($this->arrElementTree); $iLoop++) { 149 149 if (preg_match($regex, $this->arrElementTree[$iLoop][0])) { 150 150 // インデックスが指定されていない(見つけたエレメント全て)、もしくは指定されたインデックスなら選択する … … 179 179 if ($this->search_depth >= $back_num) { 180 180 $this->search_depth -= $back_num; 181 } else{181 } else { 182 182 $this->search_depth = 0; 183 183 } … … 278 278 if (count($this->arrErr)) { 279 279 // エラーメッセージ組み立て 280 $err_msg = "";280 $err_msg = ''; 281 281 foreach ($this->arrErr as $arrErr) { 282 282 if ($arrErr['err_msg']) { 283 $err_msg .= "<br />".$arrErr['err_msg'];283 $err_msg .= '<br />'.$arrErr['err_msg']; 284 284 } else { 285 285 if ($arrErr['type'] == self::ERR_TARGET_ELEMENT_NOT_FOUND) { 286 286 $err_msg .= "<br />${arrErr['selector']} が存在しません"; 287 287 } else { 288 $err_msg .= "<br />".print_r($arrErr, true);288 $err_msg .= '<br />'.print_r($arrErr, true); 289 289 } 290 290 } … … 507 507 508 508 $objElement = false; 509 if (isset($this->arrElementTree[$target_key]) && $this->arrElementTree[$target_key][0]){509 if (isset($this->arrElementTree[$target_key]) && $this->arrElementTree[$target_key][0]) { 510 510 $objElement = &$this->arrElementTree[$target_key][1]; 511 511 } … … 514 514 515 515 try { 516 switch ($mode) {516 switch ($mode) { 517 517 case 'appendFirst': 518 518 if ($objElement->hasChildNodes()) { … … 532 532 if ($objElement->nextSibling) { 533 533 $objElement->parentNode->insertBefore($objSnip, $objElement->nextSibling); 534 } 535 else { 534 } else { 536 535 $objElement->parentNode->appendChild($objSnip); 537 536 } … … 570 569 } 571 570 } 572 573 ?>
Note: See TracChangeset
for help on using the changeset viewer.
