PreviousOperation::model PHP Метод

model() публичный статический Метод

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : PreviousOperation
Результат PreviousOperation the static model class
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

Usage Example

Пример #1
0
 public function actionGetPreviousOperation()
 {
     if (!($po = PreviousOperation::model()->findByPk(@$_GET['operation_id']))) {
         throw new Exception("Previous operation not found: " . @$_GET['operation_id']);
     }
     $date = explode('-', $po->date);
     echo json_encode(array('operation' => $po->operation, 'side_id' => $po->side_id, 'fuzzy_year' => $date[0], 'fuzzy_month' => preg_replace('/^0/', '', $date[1]), 'fuzzy_day' => preg_replace('/^0/', '', $date[2])));
 }
All Usage Examples Of PreviousOperation::model