本文整理汇总了PHP中clsTinyButStrong::f_Loc_EnlargeToStr方法的典型用法代码示例。如果您正苦于以下问题:PHP clsTinyButStrong::f_Loc_EnlargeToStr方法的具体用法?PHP clsTinyButStrong::f_Loc_EnlargeToStr怎么用?PHP clsTinyButStrong::f_Loc_EnlargeToStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clsTinyButStrong
的用法示例。
在下文中一共展示了clsTinyButStrong::f_Loc_EnlargeToStr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: meth_Locator_FindTbs
function meth_Locator_FindTbs(&$Txt, $Name, $Pos, $ChrSub)
{
// Find a TBS Locator
$PosEnd = false;
$PosMax = strlen($Txt) - 1;
$Start = $this->_ChrOpen . $Name;
do {
// Search for the opening char
if ($Pos > $PosMax) {
return false;
}
$Pos = strpos($Txt, $Start, $Pos);
// If found => next chars are analyzed
if ($Pos === false) {
return false;
} else {
$Loc = new clsTbsLocator();
$ReadPrm = false;
$PosX = $Pos + strlen($Start);
$x = $Txt[$PosX];
if ($x === $this->_ChrClose) {
$PosEnd = $PosX;
} elseif ($x === $ChrSub) {
$Loc->SubOk = true;
// it is no longer the false value
$ReadPrm = true;
$PosX++;
} elseif (strpos(';', $x) !== false) {
$ReadPrm = true;
$PosX++;
} else {
$Pos++;
}
$Loc->PosBeg = $Pos;
if ($ReadPrm) {
clsTinyButStrong::f_Loc_PrmRead($Txt, $PosX, false, '\'', $this->_ChrOpen, $this->_ChrClose, $Loc, $PosEnd);
if ($PosEnd === false) {
$this->meth_Misc_Alert('', 'can\'t found the end of the tag \'' . substr($Txt, $Pos, $PosX - $Pos + 10) . '...\'.');
$Pos++;
}
}
}
} while ($PosEnd === false);
$Loc->PosEnd = $PosEnd;
if ($Loc->SubOk) {
$Loc->FullName = $Name . '.' . $Loc->SubName;
$Loc->SubLst = explode('.', $Loc->SubName);
$Loc->SubNbr = count($Loc->SubLst);
} else {
$Loc->FullName = $Name;
}
if ($ReadPrm and isset($Loc->PrmLst['comm'])) {
$Loc->PosBeg0 = $Loc->PosBeg;
$Loc->PosEnd0 = $Loc->PosEnd;
$comm = $Loc->PrmLst['comm'];
if ($comm === true or $comm === '') {
$Loc->Enlarged = clsTinyButStrong::f_Loc_EnlargeToStr($Txt, $Loc, '<!--', '-->');
} else {
$Loc->Enlarged = clsTinyButStrong::f_Loc_EnlargeToTag($Txt, $Loc, $comm, false);
}
}
return $Loc;
}