: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<?php namespace la\core\cache;
if ( ! defined( 'WPINC' ) ) die;
use la\core\settings\LAGeneralSettings;
* @author Looks Awesome <email@looks-awesome.com>
* @link http://looks-awesome.com
* @copyright Looks Awesome
class LACacheAdapter implements LACache{
/** @var LAGeneralSettings */
private $generalSettings;
function __construct($context, $force = false){
$this->context = $context;
$dbm = $this->context['db_manager'];
$this->generalSettings = $dbm->getGeneralSettings();
$this->cache = new LACacheManager($this->context, $this->force);
public function setStream( $stream, $moderation = false ) {
$this->cache = $this->admin() ?
new LAAdminModerationCacheManager($this->context, $this->force) : new LAModerationCacheManager($this->context, $this->force);
$this->cache->setStream($stream);
public function posts( $feeds, $disableCache ) {
return $this->cache->posts( $feeds, $disableCache );
public function errors() {
return $this->cache->errors();
return $this->cache->hash();
public function transientHash( $streamId ) {
return $this->cache->transientHash($streamId);
public function moderate() {
$this->cache->moderate();
private function admin(){
return FF_USE_WP ? $this->generalSettings->canModerate() : ff_user_can_moderate();