for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Model\Repository;
use Nymfonya\Component\Container;
use App\Component\Model\Orm\Orm;
class Users extends Orm
{
/**
* table name
* @var string
*/
protected $tablename = 'users';
* table primary key
protected $primary = 'id';
* database name
protected $database = 'nymfonya';
* pool name
protected $slot = 'test';
* instanciate
*
* @param Container $container
* @return self
public function __construct(Container $container)
parent::__construct($container);
}
* find a user for a given id
* @param integer $uid
* @return Users
public function getById(int $uid): Users
$this->find(['*'], ['id' => $uid]);
return $this;
* find a user for a given email
public function getByEmail(string $email): Users
$this->find(['*'], ['email' => $email]);