This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
generated from spawnia/php-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from mll-lab/fixes_for_handling
feat: Add predefined classes that implement `Rack`- and `LiquidClass`…
- Loading branch information
Showing
27 changed files
with
360 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Mll\LiquidHandlingRobotics\Tecan\LiquidClass; | ||
|
||
final class CustomLiquidClass implements LiquidClass | ||
{ | ||
private string $name; | ||
|
||
public function __construct(string $name) | ||
{ | ||
$this->name = $name; | ||
} | ||
|
||
public function name(): string | ||
{ | ||
return $this->name; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/Tecan/LiquidClass.php → src/Tecan/LiquidClass/LiquidClass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Mll\LiquidHandlingRobotics\Tecan\LiquidClass; | ||
|
||
use BenSampo\Enum\Enum; | ||
|
||
/** | ||
* @method static static DNA_DILUTION() | ||
* @method static static DNA_DILUTION_WATER() | ||
* @method static static TRANSFER_PCR_PRODUKT() | ||
* @method static static TRANSFER_MASTERMIX_MP() | ||
* @method static static TRANSFER_TEMPLATE() | ||
*/ | ||
final class MllLiquidClass extends Enum implements LiquidClass | ||
{ | ||
public const DNA_DILUTION = 'DNA_Dilution'; | ||
public const DNA_DILUTION_WATER = 'DNA_Dilution_Water'; | ||
public const TRANSFER_PCR_PRODUKT = 'Transfer_PCR_Produkt'; | ||
public const TRANSFER_MASTERMIX_MP = 'Transfer_Mastermix_MP'; | ||
public const TRANSFER_TEMPLATE = 'Transfer_Template'; // DNA-templates and BUFFER! | ||
|
||
public function name(): string | ||
{ | ||
assert(is_string($this->value)); | ||
|
||
return $this->value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Mll\LiquidHandlingRobotics\Tecan\Rack; | ||
|
||
final class CustomRack implements Rack | ||
{ | ||
private string $name; | ||
|
||
private string $type; | ||
|
||
public function __construct(string $name, string $type) | ||
{ | ||
$this->type = $type; | ||
$this->name = $name; | ||
} | ||
|
||
public function name(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public function type(): string | ||
{ | ||
return $this->type; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Mll\LiquidHandlingRobotics\Tecan\Rack; | ||
|
||
use BenSampo\Enum\Enum; | ||
use Exception; | ||
|
||
/** | ||
* @method static static A() | ||
* @method static static MP_CDNA() | ||
* @method static static MP_SAMPLE() | ||
* @method static static MP_WATER() | ||
* @method static static FLUID_X() | ||
* @method static static MM() | ||
* @method static static DEST_LC() | ||
* @method static static DEST_PCR() | ||
* @method static static DEST_TAQMAN() | ||
*/ | ||
final class MllLabWareRack extends Enum implements Rack | ||
{ | ||
public const A = 'A'; | ||
public const MP_CDNA = 'MPCDNA'; | ||
public const MP_SAMPLE = 'MPSample'; | ||
public const MP_WATER = 'MPWasser'; | ||
public const FLUID_X = 'FluidX'; | ||
public const MM = 'MM'; | ||
public const DEST_LC = 'DestLC'; | ||
public const DEST_PCR = 'DestPCR'; | ||
public const DEST_TAQMAN = 'DestTaqMan'; | ||
|
||
public function type(): string | ||
{ | ||
switch ($this->value) { | ||
case self::A: | ||
return 'Eppis 24x0.5 ml Cooled'; | ||
case self::MP_CDNA: | ||
return 'MP cDNA'; | ||
case self::MP_SAMPLE: | ||
return 'MP Microplate'; | ||
case self::MP_WATER: | ||
return 'Trough 300ml MCA Portrait'; | ||
case self::FLUID_X: | ||
return '96FluidX'; | ||
case self::MM: | ||
return 'Eppis 32x1.5 ml Cooled'; | ||
case self::DEST_LC: | ||
return '96 Well MP LightCycler480'; | ||
case self::DEST_PCR: | ||
return '96 Well PCR ABI semi-skirted'; | ||
case self::DEST_TAQMAN: | ||
return '96 Well PCR TaqMan'; | ||
default: | ||
throw new Exception('Type not defined for ' . $this->value); | ||
} | ||
} | ||
|
||
public function name(): string | ||
{ | ||
assert(is_string($this->value)); | ||
|
||
return $this->value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.