private function loadDates() { $nodes = $this->page_details->find('#release_dates tr'); foreach ($nodes as $elements) { if ($elements->find('td', 0)->plaintext == "France") { $this->release_dates['france'] = convertToDate($elements->find('.release_date', 0)->plaintext); } } }
public function loadPage($id) { if (!isset($id)) { exit; } $this->page_home = file_get_html('http://www.allocine.fr/film/fichefilm_gen_cfilm=' . $id . '.html'); $this->page_casting = file_get_html('http://www.allocine.fr/film/fichefilm-' . $id . '/casting/'); $this->id = $id; // Chargement des détails (en prio) $this->loadDetails(); // TITRES $this->titles['french'] = trim($this->page_home->find('.tt_r26', 0)->plaintext); $this->titles['original'] = @$this->details['original_title']; // DATES $this->release_dates['france'] = convertToDate($this->page_home->find('span[itemprop="datePublished"]', 0)->plaintext); $this->release_dates['bluray'] = convertToDate($this->details['release_date_bluray']); $this->release_dates['dvd'] = convertToDate($this->details['release_date_dvd']); $this->release_dates['vod'] = convertToDate($this->details['release_date_vod']); $this->release_dates['reprise'] = convertToDate($this->details['release_date_reprise']); // AUTRES DETAILS $this->production_year = @$this->details['production_year']; $this->boxoffice_france = @$this->details['boxoffice_france']; $this->budget = @$this->details['budget']; $this->languages = @$this->details['languages']; $this->color = @$this->details['color']; $this->production_format = @$this->details['production_format']; $this->movie_type = @$this->details['movie_type']; $this->audio_format = @$this->details['audio_format']; $this->projection_format = @$this->details['projection_format']; $this->visa = @$this->details['visa']; // GENRES $this->loadGenres(); // PAYS $this->loadCountries(); // DISTRIBUTOR $this->distributor = $this->details['distributor']; // SYNOPSIS $this->synopsis = strip_tags(trim($this->page_home->find('p[itemprop="description"]', 0)->parent()->plaintext)); // REALISATEURS $this->loadDirectors(); // ACTEURS $this->loadActors(); // SCENARISTES $this->loadWriters(); // PRODUCTEURS $this->loadProducers(); }