Cachet/app/Presenters/MetricPointPresenter.php

33 lines
704 B
PHP
Raw Permalink Normal View History

2015-05-16 13:57:32 -05:00
<?php
/*
* This file is part of Cachet.
*
2015-07-06 17:37:01 +01:00
* (c) Alt Three Services Limited
2015-05-16 13:57:32 -05:00
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Presenters;
use CachetHQ\Cachet\Presenters\Traits\TimestampsTrait;
2015-05-16 13:57:32 -05:00
class MetricPointPresenter extends AbstractPresenter
2015-05-16 13:57:32 -05:00
{
use TimestampsTrait;
2015-05-16 13:57:32 -05:00
/**
* Convert the presenter instance to an array.
*
* @return string[]
2015-05-16 13:57:32 -05:00
*/
public function toArray()
{
return array_merge($this->wrappedObject->toArray(), [
'created_at' => $this->created_at(),
'updated_at' => $this->updated_at(),
]);
}
}