How to change dynamically at runtime the collection?
<?php
class Robots extends \Phalcon\Mvc\Collection {
$_sourceName = 'robots';
function setSource($xpto){
$this->_sourceName = 'robots_'.$xpto;
}
function getSource(){
return $this->_sourceName;
}
function findConditions($xpto, $conditions){
$this->setSource($xpto);
return $this->find(['conditions' => $conditions];)
}
}