This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Resque::enqueue("default", 'application\models\jobs\TestJob', array("arg1" => "myArg1"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Defines a php-resque job | |
*/ | |
interface Job | |
{ | |
/** | |
* Executes the job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class HelloJob implements Job | |
{ | |
public function perform() | |
{ | |
echo "Hello world"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
public function relations() { | |
return array( | |
'ParentModel' => array(self::BELONGS_TO, 'application\models\ParentModel', 'parent_model_id') | |
); | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
public function relations() { | |
return array( | |
'childModels' => array(self::HAS_MANY, 'application\models\ChildModel', 'parent_model_id') | |
); | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
public function relations() { | |
return array( | |
'childModels' => array(self::HAS_MANY, 'ChildModel', 'parent_model_id') | |
); | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
public function relations() { | |
return array( | |
'parentModel' => array(self::BELONGS_TO, 'ParentModel', 'parent_model_id') | |
); | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PHP Fatal error: Cannot redeclare class application\models\ChildModel in /var/www/demo/app/models/ChildModel.php on line 49 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*/2 * * * * php /home/user/Desktop/hw.php >> /home/user/Desktop/hw.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crontab -e |