<?php

namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Hashes;

use FernleafSystems\Wordpress\Services;

/**
 * Class ClassicPress
 * @package FernleafSystems\Wordpress\Services\Utilities\WpOrg\Hashes
 */
class ClassicPress extends Base {

	const API_ENDPOINT = 'classicpress';

	/**
	 * @param string $sVersion
	 * @param string $sHashAlgo
	 * @return string[]|null
	 */
	public function getHashes( $sVersion, $sHashAlgo = null ) {
		$oReq = new HashesRequestVO();
		$oReq->version = $sVersion;
		$oReq->hash = $sHashAlgo;
		return $this->queryHashes( $oReq );
	}

	/**
	 * @return string[]|null
	 */
	public function getCurrent() {
		$oWp = Services\Services::WpGeneral();
		return $this->getHashes( $oWp->getVersion(), $this->getHashAlgo() );
	}
}