鼠笼管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
509 B

<?php
// namespace ISO8583\Mapper;
abstract class AbstractMapper
{
protected $length;
protected $variableLength;
public function __construct($length)
{
$this->variableLength = substr_count($length, '.');
$this->length = filter_var($length, FILTER_SANITIZE_NUMBER_INT);
}
abstract public function pack($message);
abstract public function unpack(&$message);
public function getLength()
{
return $this->length;
}
public function getVariableLength()
{
return $this->variableLength;
}
}