protected getFieldByName ( |
||
$nameExpression |
protected function getFieldByName(O\Expression $nameExpression, $static)
{
if ($nameExpression instanceof O\ValueExpression) {
$fieldName = $nameExpression->getValue();
foreach ($this->fields as $otherFieldName => $field) {
if ($field->isStatic() === $static && strcasecmp($fieldName, $otherFieldName) === 0) {
return $field;
}
}
}
return null;
}