Skip to content

Commit

Permalink
EntityMapperConstantsTrait;
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Nov 8, 2023
1 parent d809bee commit 005fc13
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
9 changes: 1 addition & 8 deletions src/EntityMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,7 @@
class EntityMapper implements EventAwareInterface
{
use EventAwareTrait;

public const UPDATE_NULLS = 1 << 0;

public const IGNORE_EVENTS = 1 << 1;

public const IGNORE_OLD_DATA = 1 << 2;

public const TRANSACTION = 1 << 3;
use EntityMapperConstantsTrait;

/**
* @var ORM
Expand Down
16 changes: 16 additions & 0 deletions src/EntityMapperConstantsTrait.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace Windwalker\ORM;

trait EntityMapperConstantsTrait
{
public const UPDATE_NULLS = 1 << 0;

public const IGNORE_EVENTS = 1 << 1;

public const IGNORE_OLD_DATA = 1 << 2;

public const TRANSACTION = 1 << 3;
}
2 changes: 1 addition & 1 deletion src/ORM.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
class ORM implements EventAwareInterface
{
use EventAwareTrait;

use AttributesAwareTrait;
use EntityMapperConstantsTrait;

protected ?FieldHydratorInterface $hydrator = null;

Expand Down

0 comments on commit 005fc13

Please sign in to comment.