mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-09 09:47:25 +08:00
32 lines
638 B
PHP
32 lines
638 B
PHP
<?php
|
|
/**
|
|
* @link http://www.yiiframework.com/
|
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
|
* @license http://www.yiiframework.com/license/
|
|
*/
|
|
|
|
namespace yii\mongo\file;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* Class Query
|
|
*
|
|
* @author Paul Klimov <klimov.paul@gmail.com>
|
|
* @since 2.0
|
|
*/
|
|
class Query extends \yii\mongo\Query
|
|
{
|
|
/**
|
|
* Returns the Mongo collection for this query.
|
|
* @param \yii\mongo\Connection $db Mongo connection.
|
|
* @return Collection collection instance.
|
|
*/
|
|
public function getCollection($db = null)
|
|
{
|
|
if ($db === null) {
|
|
$db = Yii::$app->getComponent('mongo');
|
|
}
|
|
return $db->getFileCollection($this->from);
|
|
}
|
|
} |