forked from HumanDevice/yii2-app-basic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bizley
committed
Apr 6, 2017
1 parent
6448864
commit 3df0def
Showing
7 changed files
with
873 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace app\components\db; | ||
|
||
use Yii; | ||
|
||
/** | ||
* ActiveRecord extended. | ||
*/ | ||
class ActiveRecord extends yii\db\ActiveRecord | ||
{ | ||
/** | ||
* Short for load() with POST data. | ||
* @param string|null $formName form name to use to load the data into the model. If not set, formName() is used. | ||
* @return bool | ||
*/ | ||
public function loadPost($formName = null) | ||
{ | ||
return $this->load(Yii::$app->request->post(), $formName); | ||
} | ||
|
||
/** | ||
* Short for load() with GET data. | ||
* @param string|null $formName form name to use to load the data into the model. If not set, formName() is used. | ||
* @return bool | ||
*/ | ||
public function loadGet($formName = null) | ||
{ | ||
return $this->load(Yii::$app->request->get(), $formName); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.