lithium\data\source\Database::_buildMetas()
Helper for building columns metas
Parameters
-
array
$metas
The array of column metas.
-
array
$names
If
$names
is notnull
only build meta present in$names
-
type
$joiner
The join character
Returns
stringThe SQL constraints
Source
protected function _buildMetas($type, array $metas, $names = null, $joiner = ' ') {
$result = '';
$names = $names ? (array) $names : array_keys($metas);
foreach ($names as $name) {
$value = isset($metas[$name]) ? $metas[$name] : null;
if ($value && $meta = $this->_meta($type, $name, $value)) {
$result .= $joiner . $meta;
}
}
return $result;
}