Why can't I see methods connected class in Yii2?

You need to create a controller for parsing in Yii2. Hooked up the library Simple HTML DOM parser. But for some reason does not see methods find. Can't understand why.
<?php

namespace app\controllers;

use keltstr\simplehtmldom\SimpleHTMLDom;
use yii\web\Controller;


class Controller extends ParseController
{
 public $news;
 public function actionParse($sel_from,$sel_as,$url,$how_many_news)
{
 $html = SimpleHTMLDom::file_get_html($url);
$i='0';
 foreach ($html--->find($sel_from) as $article)
{
$this->news=$article->find($sel_as,0)->innertext;
$i++;
 if ($i == $how_many_news) break; // abort cycle
}
 return $this->news;

}
}
July 9th 19 at 14:07
2 answers
July 9th 19 at 14:09
Solution
I assume that the error here.
$html->find($sel_from)

The find method is the Active Query, not AR. in short, the inward he did not accept. Specify the conditions and add strength.
//So 
Some::find()->where(['id'=> $model->id])->one();

//Or so 
Some::find()->where(['id'=> $model->id])->all();

//Or use a full AR findAll and findOne
there find-method from SimpleHTMLDom is used, not Ar's so all right - Brett.Haley commented on July 9th 19 at 14:12
: So deeply attached application I have not dug. But if it is custom, then Yes, you are right. ) - heber_Prohas commented on July 9th 19 at 14:15
July 9th 19 at 14:11
But for some reason does not see methods find. Can't understand why.

in what sense "does not see" - count($html->find($sel_from)) what returns?
$html = SimpleHTMLDom::file_get_html($url); - you have a straight url pull? in $html is the result?
or see methods in the sense that auto-completion does not work?

Find more questions by tags ParsingYiiWeb DevelopmentPHP