<?php
/**
* Sample function class for Yii 1.x
*
* Usage:
* – File: protected/controllers/functions/Orders/Test.php
* – Call: $this->runFunction(‘test’, [$model]);
*/
class Test
{
public $controller; // auto assigned by runFunction()
/**
* Executes custom logic
* @param mixed $model
*/
public function run($model)
{
echo “This is a test function running with model: ” . get_class($model);
}
}