Почему я получаюПочему эта возвращаемая переменная класса не найдена?
Undefined variable: req
Когда я объявленное свойство в верхней части моего класса:
<?php
namespace Craft;
class Disqus_ApiService extends BaseApplicationComponent
{
private $req = false;
public function init()
{
$d = craft()->plugins->getPlugin('disqus');
$settings = $d->getSettings();
$this->$req = new \DisqusAPI($settings['DISQUS_SECRET_KEY']);
}
public function trends()
{
return $this->req->trends;
}
}
'$ this-> req' не то же самое, как' $ это -> $ req' –
да я вижу ответ ниже ... человек я не вижу, как я не видел его. – lukemh