public static function serve($preparedItem, $options = null) { if (!burntCheck($preparedItem, false)) { // empty discards '0' too unfortunately. return false; } elseif ($preparedItem instanceof PreparedItem) { return $preparedItem->serve($options); } elseif (is_scalar($preparedItem)) { $contentType = !empty($options['type']) ? $options['type'] : null; echo Glaze::value($preparedItem, $contentType); } }
public function setAttributeChecking($attributeName, &$attributeValueToCheck, $attributeValueToUse = null, $valueType = null) { if (Glaze::check($attributeValueToCheck) === false) { return; } $this->setAttribute($attributeName, isset($attributeValueToUse) ? $attributeValueToUse : $attributeValueToCheck, $valueType); }