function run() { $cache = new FileCache(); $box = $cache->get(self::TWITTER_CRAWL_KEY); if (!is_array($box)) { $box = array(); } $api = new TwitterApi(HIDETOBARA_OAUTH_KEY, HIDETOBARA_OAUTH_SECRET); $a = $api->getHomeTimeline($box); $storage = new TwitterStorage(); $storage->retrieveStatus($a); $storage->saveStatusByDate(LOG_DIR . "status/"); $box = $storage->updateUserCache($box); $cache->set(self::TWITTER_CRAWL_KEY, $box); }