-
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.
- Loading branch information
Frederico Gendorf
committed
May 11, 2018
1 parent
821fb3f
commit d2e894a
Showing
2 changed files
with
31 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,34 @@ | ||
<?php | ||
/** | ||
* Classe que trata as digitais do relogio | ||
*/ | ||
class REPDigitais extends REPEmpregado { | ||
|
||
class REPDigitais extends REPUsuario { | ||
|
||
public function __construct() { | ||
parent::__construct(); | ||
} | ||
|
||
public function getTemplateDigital(){ | ||
return $this->queryREP("00+RD+00+D]{$this->matriculaUsuario}"); | ||
/** | ||
* | ||
* @return type | ||
*/ | ||
public function getTemplateDigital() { | ||
return $this->queryREP("00+RD+00+D]{$this->matriculaEmpregado}"); | ||
} | ||
/** | ||
* | ||
* @return array | ||
*/ | ||
public function listMatriculasDigitalRelogio() { | ||
|
||
$ret = $this->queryREP("00+RD+00+L]1000}0"); | ||
$chkcalc = ord($this->checkSum(substr($ret, 3, -2))); | ||
$chkrcv = ord(substr($ret, -2, 1)); | ||
if ($chkcalc == $chkrcv) { | ||
$proc = preg_split('/]/', substr(str_replace(chr(3), '', str_replace(chr(2), '', $ret)),0,-1)); | ||
array_shift($proc); | ||
|
||
} | ||
return $proc; | ||
} | ||
|
||
} |
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