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; } }