Automattic\WooCommerce\EmailEditorVendor\Sabberworm\CSS\CSSList
CSSBlockList::allValues
Метод класса: CSSBlockList{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->allValues( $oElement, $aResult, $sSearchString, $bSearchInFunctionArguments );
- $oElement(CSSElement|строка) (обязательный)
- .
- $aResult(array<int, Value>) (обязательный)
- .
- $sSearchString(строка|null)
- .
По умолчанию:null - $bSearchInFunctionArguments(true|false)
- .
По умолчанию:false
Код CSSBlockList::allValues() CSSBlockList::allValues WC 11.3.0
protected function allValues($oElement, array &$aResult, $sSearchString = null, $bSearchInFunctionArguments = false)
{
if ($oElement instanceof CSSBlockList) {
foreach ($oElement->getContents() as $oContent) {
$this->allValues($oContent, $aResult, $sSearchString, $bSearchInFunctionArguments);
}
} elseif ($oElement instanceof RuleSet) {
foreach ($oElement->getRules($sSearchString) as $oRule) {
$this->allValues($oRule, $aResult, $sSearchString, $bSearchInFunctionArguments);
}
} elseif ($oElement instanceof Rule) {
$this->allValues($oElement->getValue(), $aResult, $sSearchString, $bSearchInFunctionArguments);
} elseif ($oElement instanceof ValueList) {
if ($bSearchInFunctionArguments || !($oElement instanceof CSSFunction)) {
foreach ($oElement->getListComponents() as $mComponent) {
$this->allValues($mComponent, $aResult, $sSearchString, $bSearchInFunctionArguments);
}
}
} else {
// Non-List `Value` or `CSSString` (CSS identifier)
$aResult[] = $oElement;
}
}