mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-10 17:27:58 +01:00
* Replace https://secure.php.net with https://www.php.net * Replace http://www.php.net with https://www.php.net
33 lines
709 B
PHP
33 lines
709 B
PHP
<?php
|
|
/**
|
|
* @link http://www.yiiframework.com/
|
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
|
* @license http://www.yiiframework.com/license/
|
|
*/
|
|
|
|
namespace yiiunit\data\helpers;
|
|
|
|
/**
|
|
* CustomDebugInfo serves for the testing of `__debugInfo()` PHP magic method.
|
|
*
|
|
* @see \yiiunit\framework\helpers\VarDumperTest
|
|
*/
|
|
class CustomDebugInfo
|
|
{
|
|
public $volume;
|
|
public $unitPrice;
|
|
|
|
/**
|
|
* @see https://www.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.debuginfo
|
|
*
|
|
* @return array
|
|
*/
|
|
public function __debugInfo()
|
|
{
|
|
return [
|
|
'volume' => $this->volume,
|
|
'totalPrice' => $this->volume * $this->unitPrice,
|
|
];
|
|
}
|
|
}
|