Prado\Data\ActiveRecord\TActiveRecordGateway::getCommand PHP Метод

getCommand() публичный Метод

public getCommand ( TActiveRecord $record ) : TDataGatewayCommand
$record TActiveRecord
Результат Prado\Data\DataGateway\TDataGatewayCommand
    public function getCommand(TActiveRecord $record)
    {
        $conn = $record->getDbConnection();
        $connStr = $conn->getConnectionString();
        $tableInfo = $this->getRecordTableInfo($record);
        if (!isset($this->_commandBuilders[$connStr])) {
            $builder = $tableInfo->createCommandBuilder($record->getDbConnection());
            $command = new TDataGatewayCommand($builder);
            $command->OnCreateCommand[] = array($this, 'onCreateCommand');
            $command->OnExecuteCommand[] = array($this, 'onExecuteCommand');
            $this->_commandBuilders[$connStr] = $command;
        }
        $this->_commandBuilders[$connStr]->getBuilder()->setTableInfo($tableInfo);
        $this->_currentRecord = $record;
        return $this->_commandBuilders[$connStr];
    }