Get Va Id.

@param \simplehtmldom_1_5\simple_html_dom $va_name_area

@return string
969400
private function getVaId($va_name_area)
    {
        $va_id = $va_name_area->find('a', 0)->href;
        $parsed_va_id = explode('/', $va_id);

        return $parsed_va_id[4];
    }
776406
public function getByArea(string $area, int $scopes = self::DEFAULT, int $limit = 15): LengthAwarePaginator
    {
        $query = $this->getModel()->newQuery()->where('area', $area);

        return $this->getScopes($query, $scopes)->paginate($limit);
    }
627823
public static function parse_areaid($areaid) {
        $parts = self::extract_areaid_parts($areaid);

        if (empty($parts[1])) {
            throw new \coding_exception('Trying to parse invalid search area id ' . $areaid);
        }

        $component = $parts[0];
        $area = $parts[1];

        if (strpos($component, 'core') === 0) {
            $plugin = 'core_search';
            $configprefix = str_replace('-', '_', $areaid);
        } else {
            $plugin = $component;
            $configprefix = 'search_' . $area;
        }

        return [$plugin, $configprefix];
    }
284945
private function getarea()
    {
        $byte = fread($this->fp, 1);    // 标志字节
        switch (ord($byte)) {
            case 0:                     // 没有区域信息
                $area = "";
                break;
            case 1:
            case 2:                     // 标志字节为1或2，表示区域信息被重定向
                fseek($this->fp, $this->getlong3());
                $area = $this->getstring();
                break;
            default:                    // 否则，表示区域信息没有被重定向
                $area = $this->getstring($byte);
                break;
        }
        
        return $area;
    }
998671
private function getVa()
    {
        $va = [];
        $va_index = 0;
        $html = $this->_parser->find('#content table tr', 0)->find('td', 0)->next_sibling();
        $va_area = $html->find('.normal_header', 0)->next_sibling();
        if ($va_area->tag == 'table') {
            if ($va_area->find('tr')) {
                foreach ($va_area->find('tr') as $each_va) {

                    // anime
                    $anime_image_area = $each_va->find('td', 0);
                    $anime_area = $each_va->find('td', 1);

                    $va[$va_index]['anime']['image'] = $this->getAnimeImage($anime_image_area);
                    $va[$va_index]['anime']['id'] = $this->getAnimeId($anime_area);
                    $va[$va_index]['anime']['title'] = $this->getAnimeTitle($anime_area);

                    // character
                    $character_image_area = $each_va->find('td', 3);
                    $character_area = $each_va->find('td', 2);

                    $va[$va_index]['character']['image'] = $this->getAnimeImage($character_image_area);
                    $va[$va_index]['character']['id'] = $this->getAnimeId($character_area);
                    $va[$va_index]['character']['name'] = $this->getAnimeTitle($character_area);
                    $va[$va_index]['character']['role'] = $this->getAnimeRole($character_area);

                    $va_index++;
                }
            }
        }

        return $va;
    }
911080
private function getArea($time_zone)
    {
        $area = null;

        if ($time_zone === 'UTC') {
            $area = 'UTC';
        } elseif ($time_zone !== null) {
            $parts = explode('/', $time_zone, 2);
            $area = reset($parts);
        }

        return $area;
    }
272474
public function get_area_title() {

        if ($this->get_context()->contextlevel == CONTEXT_SYSTEM) {
            return '';

        } else if ($this->get_context()->contextlevel >= CONTEXT_COURSE) {
            $this->ensure_isset(array('context', 'component', 'area'));
            $areas = $this->get_available_areas();
            if (array_key_exists($this->get_area(), $areas)) {
                return $areas[$this->get_area()];
            } else {
                debugging('Unknown area!');
                return '???';
            }

        } else {
            throw new coding_exception('Unsupported context level');
        }
    }
1170167
private function getVa()
    {
        $va = [];
        $va_index = 0;
        $html = $this->_parser->find('#content table tr', 0)->find('td', 0)->next_sibling();
        $va_area = $html->find('div[class=normal_header]', 1)->next_sibling();
        if ($va_area->tag == 'table') {
            while (true) {
                $va_name_area = $va_area->find('td', 1);
                $va[$va_index]['id'] = $this->getVaId($va_name_area);
                $va[$va_index]['name'] = $this->getVaName($va_name_area);
                $va[$va_index]['role'] = $this->getVaRole($va_name_area);
                $va[$va_index]['image'] = $this->getVaImage($va_area);

                $va_area = $va_area->next_sibling();
                if ($va_area->tag != 'table') {
                    break;
                } else {
                    $va_index++;
                }
            }
        }

        return $va;
    }
544254
protected function NextArea()
    {
        $area = $this->area;
        $this->area = $this->listProvider->NextOf($this->area);
        return $area;
    }
949619
public function getArea($name)
    {
        foreach ($this->areas as $area) {
            /** @var Area $area */
            if ($area->getName() == $name) {
                return $area;
            }
        }

        return;
    }
358762
public function getAuthority(): string
    {
        if ($this->host == '') {
            return '';
        }

        $authority = $this->host;
        if ($this->user != '') {
            $authority = $this->user.'@'.$authority;
        }

        if ($this->port !== null && !$this->isDefaultPort($this->scheme, $this->port)) {
            $authority .= ':'.$this->port;
        }

        return $authority;
    }
295350
public function getAuthorName()
    {
        if ($this->fvAuthorUID) {
            $app = Application::getFacadeApplication();
            $ui = $app->make(UserInfoRepository::class)->getByID($this->fvAuthorUID);
        } else {
            $ui = null;
        }

        return $ui === null ? t('(Unknown)') : $ui->getUserDisplayName();
    }
1326181
private function getEpisode($result_area)
    {
        $episode = $result_area->find('td', 3)->plaintext;
        $episode = trim($episode);

        return $episode == '-' ? '' : $episode;
    }
1061146
private function getRecomId($content_area)
    {
        $id = $content_area->find('a', 0)->href;
        $id = explode('/', $id);

        return $id[4];
    }
963067
protected function getTextarea(): string
    {
        return Html::textarea($this->name, $this->value, $this->options);
    }
1277900
private function getNickname($name_area)
    {
        $nickname = $name_area->find('small', 0);

        return $nickname ? substr($nickname->plaintext, 1, strlen($nickname->plaintext) - 2) : '';
    }
835263
public function getArea($name)
    {
        if(null === $this->areas)
        {
            $this->areas = array();

            $this->scanAreas($this->contentPath . $this->getNode()->getUri());
        }

        return array_key_exists($name, $this->areas) ? $this->areas[$name] : null;
    }