Skip to content

Commit

Permalink
[Application] base service feature class
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoiriert committed Jun 28, 2024
1 parent bd8ca51 commit c13c4d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
9 changes: 7 additions & 2 deletions app/src/Feature/DemoFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

namespace App\Feature;

use Draw\Bundle\FrameworkExtraBundle\Feature\ServiceFeature;
use Draw\Component\Application\Feature\Attribute\Config;
use Draw\Component\Application\Feature\FeatureInitializer;
use Draw\Component\Application\Feature\SelfInitializeFeatureInterface;

class DemoFeature extends ServiceFeature implements SelfInitializeFeatureInterface
class DemoFeature implements SelfInitializeFeatureInterface
{
#[Config]
private bool $enabled = true;

private ?int $limit = null;

public function __construct(FeatureInitializer $featureInitializer)
{
$featureInitializer->initialize($this);
}

public function getName(): string
{
return 'acme_demo';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Draw\Component\Application\Feature;

interface SelfInitializeFeatureInterface
interface SelfInitializeFeatureInterface extends FeatureInterface
{
public function initialize(array $configuration): void;
}
14 changes: 0 additions & 14 deletions packages/framework-extra-bundle/Feature/ServiceFeature.php

This file was deleted.

0 comments on commit c13c4d6

Please sign in to comment.