2017 © Pedro Peláez
 

library hilo

Hierarchy Loader

image

shen2/hilo

Hierarchy Loader

  • Tuesday, March 29, 2016
  • by shen2
  • Repository
  • 1 Watchers
  • 2 Stars
  • 130 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 6 % Grown

The README.md

Hilo

Hierarchical Loader., (*1)

Installation

composer require shen2/hilo

Usage


class PromotionAdapter extends \Hilo\CustomAdapter { use \Hilo\JsonSerializer; protected $_cacheNamespace = 'promotion'; protected $_ttl = 3600; public function fetch($key) { $ads = \Ad::select() ->where('find_in_set(?, positions)', $key) ->order('ad_id desc') ->fetchAll(); return $ads; } } $redisConfig = [...]; $redisManager = new RedisManager($redisConfig); $adapter = new PromotionAdapter($redisManager); $container = new Hilo\Container($adapter); $container->get('key'); $container->getMulti(['key1', 'key2']);

The Versions

29/03 2016

dev-master

9999999-dev

Hierarchy Loader

  Sources   Download

MIT

The Requires

 

by Avatar shen2