There is no license information available for the latest version (dev-master) of this package.

Installs: 24

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:project

dev-master 2022-10-15 15:23 UTC

This package is auto-updated.

Last update: 2024-04-15 18:53:49 UTC


README

DEPRECATED

It seemd like a good idea but now I think it is much more relevant to use:

$result = SomeParticularView::create($data);

Reasons:

  1. It is more transparent(you can track what is used and where).
  2. It is more reliable(much more relevant to declare PostView::create(Post $post): array than PostView::createView($context): mixed
  3. In 90% of the cases we need stateless/dependency-free factories(no overhead with usage and even testing). So we can use static calls:
// this
$data = PostView::createView($post);

//instead of this
$viewFactory = new PostView();
$data = $view->createView($post);

You can more detailed "example" here https://github.com/TemirkhanN/blog