23 lines
319 B
PHP
23 lines
319 B
PHP
<?php
|
|
|
|
class Route extends Model
|
|
{
|
|
|
|
function __construct($fromArray = array())
|
|
{
|
|
$this->_tableName_ = 'routes';
|
|
parent::__construct($fromArray);
|
|
}
|
|
|
|
static function model()
|
|
{
|
|
return new self();
|
|
}
|
|
|
|
function getByAuthor($authorId)
|
|
{
|
|
return $this->getAll(array('where' => '`author` = ' . $authorId));
|
|
}
|
|
|
|
}
|