S
S
Sergey Beloventsev2016-09-07 21:39:23
Yii
Sergey Beloventsev, 2016-09-07 21:39:23

Why does the class ... not found error occur?

there is an addition

ratacibernetica/yii2-node-socket
it has this class
namespace YiiNodeSocket\Assets;
    
    use Yii;
    use yii\web\AssetBundle;
    
    /**
     * @author Woody <Woody@HandBid.com>
     * @since 1.0
     */
    class NodeSocketAssets extends AssetBundle

tried to connect it
\YiiNodeSocket\Assets\NodeSocketAssets::register($this);
so
use YiiNodeSocket\Assets\NodeSocketAssets;
    
    $nodeSocketAssets= new NodeSocketAssets;
    
    $nodeSocketAssets::register($this);

writes the same error
Class 'YiiNodeSocket\Assets\NodeSocketAssets' not found
why don't you tell me

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2016-09-08
@mhthnz

Try adding aliases:

'@YiiNodeSocket' => '@vendor/ratacibernetica/yii2-node-socket/lib/php',
 '@nodeWeb' => '@vendor/ratacibernetica/yii2-node-socket/lib/js',

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question