Skip to content

Commit

Permalink
Support for Obj
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Feb 12, 2021
1 parent 1bad5e5 commit 25ac46b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/Kql/Interceptors/Toolkit/Obj.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace Kirby\Kql\Interceptors\Toolkit;

use Kirby\Kql\Interceptors\Interceptor;

class Obj extends Interceptor
{
const CLASS_ALIAS = 'obj';

public function allowedMethods(): array
{
return [
'get',
'toArray',
'toJson',
];
}

public function toArray(): array
{
return $this->object->toArray();
}
}

0 comments on commit 25ac46b

Please sign in to comment.