示例#1
0
 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);
     }
 }
示例#2
0
 public function setAttributeChecking($attributeName, &$attributeValueToCheck, $attributeValueToUse = null, $valueType = null)
 {
     if (Glaze::check($attributeValueToCheck) === false) {
         return;
     }
     $this->setAttribute($attributeName, isset($attributeValueToUse) ? $attributeValueToUse : $attributeValueToCheck, $valueType);
 }