for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Yeelight\Transformers;
use Yeelight\Models\ProductModel;
/**
* Class ProductModelTransformer
*
* @category Yeelight
* @package Yeelight\Transformers
* @author Sheldon Lee <[email protected]>
* @license https://opensource.org/licenses/MIT MIT
* @link https://www.yeelight.com
*/
class ProductModelTransformer extends BaseTransformer
{
* Transform the ProductModel entity.
* @param ProductModel $model
* @return array
public function transform(ProductModel $model)
return [
'product_model_id' => (int) $model->product_model_id,
product_model_id
Yeelight\Models\ProductModel
__get
'title' => (string) $model->title,
title
'model_name' => (string) $model->model_name,
model_name
'code' => (string) $model->code,
code
'status' => (int) $model->status,
status
'created_by' => (string) $model->created_by,
'created_at' => (string) $model->created_at,
'created_ip' => (string) $model->created_ip,
'updated_by' => (string) $model->updated_by,
'updated_at' => (string) $model->updated_at,
'updated_ip' => (string) $model->updated_ip,
];
}