Skip to content

Instantly share code, notes, and snippets.

@AJ
Last active December 15, 2015 09:59
Show Gist options
  • Save AJ/5242960 to your computer and use it in GitHub Desktop.
Save AJ/5242960 to your computer and use it in GitHub Desktop.

Revisions

  1. AJ revised this gist Mar 26, 2013. 1 changed file with 17 additions and 1 deletion.
    18 changes: 17 additions & 1 deletion Custom_Cache.php
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,22 @@ function __construct() {
    }

    function create($location, $filename, $extension) {
    error_log("AJ::Success!!! Succeeded in reaching the cache class::create()");
    error_log("AJ::Success!!! Succeeded in reaching the cache class");
    die;
    return new Skimr_DB_Cache(/*$location, $filename, $extension*/);
    }
    }

    class Skimr_DB_Cache extends SimplePie_Cache_DB {
    .
    .
    .
    public function __construct($location, $name, $type);
    public function save($data);
    public function load();
    //And so on
    .
    .
    .

    }
  2. AJ revised this gist Mar 26, 2013. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions Custom_Cache.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    //Script location: /public/myapp/includes/simplepie/library/SimplePie/Cache/Custom_Cache.php

    class Custom_Cache extends SimplePie_Cache {
    function __construct() {
    error_log("AJ::Success!!! Succeeded in reaching the cache class::Constructor");
    }

    function create($location, $filename, $extension) {
    error_log("AJ::Success!!! Succeeded in reaching the cache class::create()");
    }
    }
  3. AJ revised this gist Mar 26, 2013. 1 changed file with 2 additions and 10 deletions.
    12 changes: 2 additions & 10 deletions fetchFeed.php
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,10 @@
    //Script location: /public/myapp/includes/utils.php

    function fetchFeed() {
    $feed = new SimplePie();
    $feed->set_feed_url($feedURL);
    $feed->handle_content_type();
    $feed->force_feed(true);
    $feed->get_registry()->register('Cache', 'Custom_Cache');
    $feed->init();
    }

    class Custom_Cache extends SimplePie_Cache {
    function __construct() {
    error_log("AJ::Success!!! Succeeded in reaching the cache class::Constructor");
    }

    function create($location, $filename, $extension) {
    error_log("AJ::Success!!! Succeeded in reaching the cache class::create()");
    }
    }
  4. AJ created this gist Mar 26, 2013.
    18 changes: 18 additions & 0 deletions fetchFeed.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    function fetchFeed() {
    $feed = new SimplePie();
    $feed->set_feed_url($feedURL);
    $feed->handle_content_type();
    $feed->force_feed(true);
    $feed->get_registry()->register('Cache', 'Custom_Cache');
    $feed->init();
    }

    class Custom_Cache extends SimplePie_Cache {
    function __construct() {
    error_log("AJ::Success!!! Succeeded in reaching the cache class::Constructor");
    }

    function create($location, $filename, $extension) {
    error_log("AJ::Success!!! Succeeded in reaching the cache class::create()");
    }
    }