Skip to content

Commit

Permalink
Simplify v3.5.2 release for now
Browse files Browse the repository at this point in the history
holding off on Resource support.

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Nov 9, 2017
1 parent ebccf41 commit 3a98c56
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 230 deletions.
28 changes: 0 additions & 28 deletions Resources/Json/AnonymousResourceCollection.php

This file was deleted.

42 changes: 0 additions & 42 deletions Resources/Json/Resource.php

This file was deleted.

30 changes: 0 additions & 30 deletions Resources/Json/ResourceCollection.php

This file was deleted.

109 changes: 0 additions & 109 deletions Resources/Json/Transformable.php

This file was deleted.

15 changes: 15 additions & 0 deletions Traits/Transformable.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ public function options(array $options = [])
return $this;
}

/**
* Add options.
*
* @param array $options
*
* @return $this
*
* @deprecated v3.5.x
* @see static::options()
*/
public function withOptions(array $options = [])
{
return $this->options($options);
}

/**
* Get request instance.
*
Expand Down
21 changes: 0 additions & 21 deletions Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ abstract class Transformer extends BaseTransformer
{
use Traits\Transformable;

/**
* Resource instance.
*
* @var Orchestra\Http\Resources\Json\Resource
*/
protected $resource;

/**
* Invoke the transformation.
*
Expand All @@ -28,20 +21,6 @@ public static function with($instance, array $options = [])
return (new static())->options($options)->handle($instance);
}

/**
* Set resource.
*
* @param \Orchestra\Http\Resources\Json|resource $resource
*
* @return $this
*/
public function resource($resource)
{
$this->resource = $resource;

return $this;
}

/**
* Invoke the transformer.
*
Expand Down

0 comments on commit 3a98c56

Please sign in to comment.