1. Go to this page and download the library: Download vegas-cmf/dao library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vegas-cmf / dao example snippets
use Phalcon\DiInterface;
use Vegas\DI\ServiceProviderInterface;
/**
* Class DaoServiceProvider
*/
class DaoServiceProvider implements ServiceProviderInterface
{
const SERVICE_NAME = 'dao';
/**
* {@inheritdoc}
*/
public function register(DiInterface $di)
{
$di->set(self::SERVICE_NAME, function() use ($di) {
$dao = new \Vegas\Db\Dao\Manager;
return $dao->setDI($di);
}, true);
}
public function getDependencies()
{
return [];
}
}