public function itemValue() {
    $itemprop = $this->itemProp();
    if (empty($itemprop))
      return null;
    if ($this->itemScope()) {
      return $this;
    }
    switch (strtoupper($this->tagName)) {
      case 'META':
        return $this->getAttribute('content');
      case 'AUDIO':
      case 'EMBED':
      case 'IFRAME':
      case 'IMG':
      case 'SOURCE':
      case 'TRACK':
      case 'VIDEO':
        // @todo Should this test that the URL resolves?
        return $this->getAttribute('src');
      case 'A':
      case 'AREA':
      case 'LINK':
        // @todo Should this test that the URL resolves?
        return $this->getAttribute('href');
      case 'OBJECT':
        // @todo Should this test that the URL resolves?
        return $this->getAttribute('data');
      case 'DATA':
        return $this->getAttribute('value');
      case 'TIME':
        $datetime = $this->getAttribute('datetime');
        if (!empty($datetime))
          return $datetime;
      default:
        return $this->textContent;
    }
  }
public function itemValue() {
    $itemprop = $this->itemProp();
    if (empty($itemprop))
      return null;
    if ($this->itemScope()) {
      return $this;
    }
    switch (strtoupper($this->tagName)) {
      case 'META':
        return $this->getAttribute('content');
      case 'AUDIO':
      case 'EMBED':
      case 'IFRAME':
      case 'IMG':
      case 'SOURCE':
      case 'TRACK':
      case 'VIDEO':
        // @todo Should this test that the URL resolves?
        return $this->getAttribute('src');
      case 'A':
      case 'AREA':
      case 'LINK':
        // @todo Should this test that the URL resolves?
        return $this->getAttribute('href');
      case 'OBJECT':
        // @todo Should this test that the URL resolves?
        return $this->getAttribute('data');
      case 'DATA':
        return $this->getAttribute('value');
      case 'TIME':
        $datetime = $this->getAttribute('datetime');
        if (!empty($datetime))
          return $datetime;
      default:
        return $this->textContent;
    }
  }
public function itemValue ( ) { $ itemprop = $ this -> itemProp ( ) ; if ( empty ( $ itemprop ) ) return null ; if ( $ this -> itemScope ( ) ) { return $ this ; } switch ( strtoupper ( $ this -> tagName ) ) { case 'META' : return $ this -> getAttribute ( 'content' ) ; case 'AUDIO' : case 'EMBED' : case 'IFRAME' : case 'IMG' : case 'SOURCE' : case 'TRACK' : case 'VIDEO' : // @todo Should this test that the URL resolves? return $ this -> getAttribute ( 'src' ) ; case 'A' : case 'AREA' : case 'LINK' : // @todo Should this test that the URL resolves? return $ this -> getAttribute ( 'href' ) ; case 'OBJECT' : // @todo Should this test that the URL resolves? return $ this -> getAttribute ( 'data' ) ; case 'DATA' : return $ this -> getAttribute ( 'value' ) ; case 'TIME' : $ datetime = $ this -> getAttribute ( 'datetime' ) ; if ( ! empty ( $ datetime ) ) return $ datetime ; default : return $ this -> textContent ; } }
Retrieve the element's value, determined by the element type.

@return string
The string value if the element is not an item, or $this if it is
an item.
Retrieve the element s value determined by the element type .