public function sources($model = null)
{
$_config = $this->_config;
$params = compact('model');
return $this->_filter(__METHOD__, $params, function ($self, $params) use($_config) {
$name = $self->name($_config['database']);
if (!($result = $self->invokeMethod('_execute', array("SHOW TABLES FROM {$name};")))) {
return null;
}
$sources = array();
foreach ($result as $row) {
$sources[] = $row[0];
}
return $sources;
});
}