31 lines
741 B
PHP
31 lines
741 B
PHP
<?php
|
|
namespace console\controllers;
|
|
|
|
use common\manager\DoorCardPassManager;
|
|
use common\models\Card;
|
|
use /** @noinspection PhpUnusedAliasInspection */
|
|
Yii;
|
|
use yii\console\Controller;
|
|
|
|
class DoorCardPassController extends Controller{
|
|
|
|
public function actionHardReset( )
|
|
{
|
|
// \Yii::$app->db->createCommand(Card::SQL_DENY_DOOR_CARD_PASS())->execute();
|
|
$manager = new DoorCardPassManager();
|
|
$manager->hardReset();
|
|
}
|
|
|
|
public function actionAllowAllCard( )
|
|
{
|
|
\Yii::$app->db->createCommand(Card::SQL_ALLOW_DOOR_CARD_PASS())->execute();
|
|
}
|
|
|
|
public function actionInvalidate( )
|
|
{
|
|
$manager = new DoorCardPassManager();
|
|
$manager->updateDoorCardPassStateForAllCard();
|
|
}
|
|
|
|
}
|