| Server IP : 139.59.63.204 / Your IP : 216.73.217.62 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ubuntu-s-1vcpu-1gb-blr1-01 6.8.0-110-generic #110-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 19 15:09:20 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/billing/vendor/yajra/laravel-datatables-oracle/src/Processors/ |
Upload File : |
<?php
namespace Yajra\DataTables\Processors;
use Illuminate\Support\Arr;
use Yajra\DataTables\Utilities\Helper;
class RowProcessor
{
/**
* @var mixed
*/
private $data;
/**
* @var mixed
*/
private $row;
/**
* @param mixed $data
* @param mixed $row
*/
public function __construct($data, $row)
{
$this->data = $data;
$this->row = $row;
}
/**
* Process DT RowId and Class value.
*
* @param string $attribute
* @param string|callable $template
* @return $this
*/
public function rowValue($attribute, $template)
{
if (! empty($template)) {
if (! is_callable($template) && Arr::get($this->data, $template)) {
$this->data[$attribute] = Arr::get($this->data, $template);
} else {
$this->data[$attribute] = Helper::compileContent($template, $this->data, $this->row);
}
}
return $this;
}
/**
* Process DT Row Data and Attr.
*
* @param string $attribute
* @param array $template
* @return $this
*/
public function rowData($attribute, array $template)
{
if (count($template)) {
$this->data[$attribute] = [];
foreach ($template as $key => $value) {
$this->data[$attribute][$key] = Helper::compileContent($value, $this->data, $this->row);
}
}
return $this;
}
/**
* @return mixed
*/
public function getData()
{
return $this->data;
}
}