本文整理汇总了PHP中ApiFormatBase::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiFormatBase::__construct方法的具体用法?PHP ApiFormatBase::__construct怎么用?PHP ApiFormatBase::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiFormatBase
的用法示例。
在下文中一共展示了ApiFormatBase::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct( $main, $format ) {
parent :: __construct( $main, $format );
$this->dmRecords = array();
$this->languages = array();
$this->excluded = array();
$this->errorMessages = array();
}
示例2: __construct
/**
* @param ApiMain $main
* @param ApiFormatBase|null $errorFallback Object to fall back on for errors
*/
public function __construct(ApiMain $main, ApiFormatBase $errorFallback = null)
{
parent::__construct($main, 'raw');
if ($errorFallback === null) {
$this->errorFallback = $main->createPrinterByName($main->getParameter('format'));
} else {
$this->errorFallback = $errorFallback;
}
}
示例3: __construct
public function __construct(ApiMain $main, $format)
{
parent::__construct($main, $format);
$this->isRaw = $format === 'rawfm';
if ($this->getMain()->getCheck('callback')) {
# T94015: jQuery appends a useless '_' parameter in jsonp mode.
# Mark the parameter as used in that case to avoid a warning that's
# outside the control of the end user.
# (and do it here because ApiMain::reportUnusedParams() gets called
# before our ::execute())
$this->getMain()->getCheck('_');
}
}
示例4: __construct
public function __construct($main, $format)
{
parent::__construct($main, $format);
}
示例5: __construct
public function __construct($main, $format)
{
parent::__construct($main, $format);
$this->mIsRaw = $format === 'rawfm';
}
示例6: __construct
public function __construct($main)
{
parent::__construct($main, 'feed');
}
示例7: __construct
/**
* Constructor
* @param $main ApiMain object
* @param $errorFallback ApiFormatBase object to fall back on for errors
*/
public function __construct($main, $errorFallback)
{
parent::__construct($main, 'raw');
$this->mErrorFallback = $errorFallback;
}
示例8: __construct
public function __construct(ApiMain $main, ApiFormatBase $errorFallback)
{
parent::__construct($main, 'file');
$this->errorFallback = $errorFallback;
}