Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function getAll()
 {
     return array_map(function ($proxy_properties) {
         return new Proxy($proxy_properties);
     }, parent::getAll());
 }
Пример #2
0
 /**
  * Create new instance of UserAgentProvider.
  * 
  * If all callables are set, raw data will be read from/written to
  * the cache.
  * 
  * @param callable $cache_checker checks cache for validity; must return
  * true or false (optional parameter)
  * @param callable $cache_reader reads data from the cache; must return
  * the data without modification (optional parameter)
  * @param callable $cache_writer writes data to the cache; accepts
  * <code>$data</code> as a single argument and must write it to the cache
  * without modification (optional parameter)
  */
 public function __construct(callable $cache_checker = null, callable $cache_reader = null, callable $cache_writer = null)
 {
     parent::__construct(new WhatsmyuseragentComBackend(), $cache_checker, $cache_reader, $cache_writer);
 }