public function __construct(DrPublishDomElement $drPublishDomElement)
 {
     parent::__construct($drPublishDomElement->domElement);
     $drPublishDomElementList = $drPublishDomElement->find("div.dp-article-image");
     $imageList = new DrPublishDomElementList();
     foreach ($drPublishDomElementList as $drPublishDomElement) {
         $drPublishApiClientArticleElement = new DrPublishApiClientArticleImageElement($drPublishDomElement);
         $imageList->add($drPublishApiClientArticleElement);
     }
     $this->dpImages = $imageList;
 }
 public function __construct(DrPublishDomElement $drPublishDomElement)
 {
     if (!class_exists('DrPublishApiClientImage', false)) {
         $dir = dirname(__FILE__);
         require $dir . '/DrPublishApiClientImage.php';
         require $dir . '/DrPublishApiClientPhotographer.php';
     }
     parent::__construct($drPublishDomElement->domElement);
 }
 public function find($query, $asArray = false)
 {
     if ($this->dom === null) {
         $this->initDom();
     }
     $query = DrPublishDomElement::parseQuery($query);
     $domNodeList = $this->xpath->query($query);
     if ($asArray) {
         $out = array();
         foreach ($domNodeList as $domElement) {
             $out[] = $domElement;
         }
         return $out;
     }
     return DrPublishDomElementList::convertDomNodeList($domNodeList);
 }
 public static function setQueryMode($mode)
 {
     self::$queryMode = $mode;
 }
 public function getDPImages()
 {
     DrPublishDomElement::$queryMode = QUERY_TYPE_XPATH;
     $q = 'div[@class and contains(concat(" ",normalize-space(@class)," ")," dp-article-image ") and descendant::img]';
     // $drPublishDomElementList =  $this->find("div.dp-article-image");
     $drPublishDomElementList = $this->find($q);
     DrPublishDomElement::$queryMode = QUERY_TYPE_JQUERY;
     $imageList = new DrPublishDomElementList();
     foreach ($drPublishDomElementList as $drPublishDomElement) {
         $drPublishApiClientArticleElement = $this->createDrPublishApiClientArticleImageElement($drPublishDomElement);
         $imageList->add($drPublishApiClientArticleElement);
     }
     return $imageList;
 }