Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Soft..
Decoded Output download
<?php
/**
* @link https://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license https://www.yiiframework.com/license/
*/
namespace yiiunit\datar;
/**
* OrderItemWithConstructor.
*
* @property int $order_id
* @property int $item_id
* @property int $quantity
* @property string $subtotal
*/
class OrderItemWithConstructor extends ActiveRecord
{
public static function tableName()
{
return 'order_item';
}
public function __construct($item_id, $quantity)
{
$this->item_id = $item_id;
$this->quantity = $quantity;
parent::__construct();
}
public static function instance($refresh = false)
{
return self::instantiate([]);
}
public static function instantiate($row)
{
return (new \ReflectionClass(static::className()))->newInstanceWithoutConstructor();
}
public function getOrder()
{
return $this->hasOne(OrderWithConstructor::className(), ['id' => 'order_id']);
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* @link https://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license https://www.yiiframework.com/license/
*/
namespace yiiunit\data\ar;
/**
* OrderItemWithConstructor.
*
* @property int $order_id
* @property int $item_id
* @property int $quantity
* @property string $subtotal
*/
class OrderItemWithConstructor extends ActiveRecord
{
public static function tableName()
{
return 'order_item';
}
public function __construct($item_id, $quantity)
{
$this->item_id = $item_id;
$this->quantity = $quantity;
parent::__construct();
}
public static function instance($refresh = false)
{
return self::instantiate([]);
}
public static function instantiate($row)
{
return (new \ReflectionClass(static::className()))->newInstanceWithoutConstructor();
}
public function getOrder()
{
return $this->hasOne(OrderWithConstructor::className(), ['id' => 'order_id']);
}
}
Function Calls
None |
Stats
MD5 | 421184086c8efca59dda9fc73aaa5640 |
Eval Count | 0 |
Decode Time | 97 ms |