Imdb\Title::runtimes PHP Method

runtimes() public method

Retrieve all runtimes and their descriptions
See also: IMDB page / (TitlePage)
public runtimes ( ) : array
return array runtimes (array[0..n] of array[time,annotations]) where annotations is an array of comments meant to describe this cut
    public function runtimes()
    {
        if (empty($this->movieruntimes)) {
            $this->movieruntimes = array();
            $rt = $this->runtime_all();
            foreach (explode('|', strip_tags($rt)) as $runtimestring) {
                if (preg_match("/(\\d+) min/", $runtimestring, $matches)) {
                    $runtime = $matches[1];
                    $annotations = array();
                    if (preg_match_all("/\\((.+?)\\)/", $runtimestring, $matches)) {
                        $annotations = $matches[1];
                    }
                    $this->movieruntimes[] = array("time" => $runtime, "country" => '', "comment" => '', "annotations" => $annotations);
                }
            }
        }
        return $this->movieruntimes;
    }