mirror of
https://github.com/crypto-pro-web/crypto-pro-php.git
synced 2025-01-18 19:25:51 +03:00
34 lines
509 B
PHP
34 lines
509 B
PHP
|
<?php
|
||
|
|
||
|
namespace Webmasterskaya\CryptoPro;
|
||
|
|
||
|
/**
|
||
|
* @property-read $algorithm
|
||
|
* @property-read $oid
|
||
|
*/
|
||
|
abstract class AbstractAlgorithmInfo implements AlgorithmInfoInterface
|
||
|
{
|
||
|
protected $algorithm;
|
||
|
protected $oid;
|
||
|
|
||
|
public function __construct($algorithm, $oid)
|
||
|
{
|
||
|
$this->algorithm = $algorithm;
|
||
|
$this->oid = $oid;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param $name
|
||
|
*
|
||
|
* @return string|void
|
||
|
*/
|
||
|
public function __get($name)
|
||
|
{
|
||
|
switch ($name)
|
||
|
{
|
||
|
case 'algorithm':
|
||
|
case 'oid':
|
||
|
return $this->{$name};
|
||
|
}
|
||
|
}
|
||
|
}
|