Pergunta

Below is my shell class

FriendShell.php

require_once 'AppShell.php';

class FriendShell extends AppShell
{
      //code
}

AppShell.php

App::uses('Shell', 'Console');

class AppShell extends Shell {
    public function perform() {
        $this->initialize();
        $this->{array_shift($this->args)}();
    }
}

Reference to issue on

https://github.com/kamisama/Cake-Resque/issues/25

I removed

App::uses('AppShell', 'Console/Command');

and now using

require_once 'AppShell.php';

in FriendShell.php

But problem still remains because AppShell.php using

App::uses('Shell', 'Console');

That's why I am getting error Class 'App' not found when trying to run that shell.

Any help appreciated

Thank you

Foi útil?

Solução

Working with

Console/cake 

It is CakeResque plugin and FriendShell.php is a job class therefore whole command is look like this now

Console/cake CakeResque.CakeResque enqueue default Friend "swapnil"
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top