One way to acomplish this is to include the table prefix within your config object. For each model that you define, you will also need the set the source so that the table prefix is applied.
config.php
return new \Phalcon\Config(array(
'db' => array(
'tblPrefix' => 'xyz_'
)
));
Robot Model
class Robots extends \Phalcon\Mvc\Collection
{
public function getSource()
{
$source = $this->getDi()->getConfig()->db->tblPrefix . 'robots';
return $source;
}
}
services.php
$config = include APPLICATION_PATH . '/config/config.php';
$di->set('config', $config);