* [misc] add param define.
This commit is contained in:
@@ -5,10 +5,16 @@ class deliverable extends control
|
||||
* 交付物列表。
|
||||
* Browse deliverables.
|
||||
*
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($browseType = '', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 0, $pageID = 1)
|
||||
public function browse(string $browseType = '', int $param = 0, string $orderBy = 'id_desc', int $recTotal = 0, int $recPerPage = 0, int $pageID = 1)
|
||||
{
|
||||
$this->app->loadClass('pager', true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
@@ -63,7 +69,7 @@ class deliverable extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetModelList($type = 'execution')
|
||||
public function ajaxGetModelList(string $type = 'execution')
|
||||
{
|
||||
$items = array();
|
||||
$modelList = $this->deliverable->buildModelList($type);
|
||||
|
||||
@@ -12,7 +12,7 @@ class deliverableModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getList($browseType = '', $queryID = 0, $orderBy = 'id_desc', $pager = null)
|
||||
public function getList(string $browseType = '', int $queryID = 0, string $orderBy = 'id_desc', object $pager = null)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_DELIVERABLE)
|
||||
->where('deleted')->eq(0)
|
||||
@@ -29,7 +29,7 @@ class deliverableModel extends model
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function create($deliverable)
|
||||
public function create(object $deliverable)
|
||||
{
|
||||
$this->dao->insert(TABLE_DELIVERABLE)->data($deliverable)->exec();
|
||||
if(dao::isError()) return false;
|
||||
@@ -56,7 +56,7 @@ class deliverableModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function buildModelList($type = 'all')
|
||||
public function buildModelList(string $type = 'all')
|
||||
{
|
||||
$this->app->loadLang('stage');
|
||||
$this->app->loadLang('execution');
|
||||
@@ -89,4 +89,4 @@ class deliverableModel extends model
|
||||
|
||||
return $modelList;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user