/** * get_analysis * * @access public * @return Response (json) */ public function get_analysis() { $this->controller_common_api(function () { if (!($url = \Input::get('url'))) { throw new \HttpBadRequestException(); } if (!filter_var($url, FILTER_VALIDATE_URL)) { throw new \ValidationFailedException('URLが正しくありません。'); } $cache_conf = conf('view_params_default.post.url2link.displaySummary.cache'); $response = Site_OpenGraph::get_analized_data($url, $cache_conf['isEnabled'], $cache_conf['prefix'], $cache_conf['expire']); return $response; }); }
protected function set_url2link_site_summary_data() { if ($this->options['url2link_display_summary_type'] != 'server') { return; } if ($this->url2link_site_summary_data) { return; } if (!$this->url2link_site_summary_url) { return; } $this->url2link_site_summary_data = Site_OpenGraph::get_analized_data($this->url2link_site_summary_url, $this->options['url2link_summary_cache_is_enabled'], $this->options['url2link_summary_cache_prefix'], $this->options['url2link_summary_cache_expire']); }