PHP Class N98\Magento\Command\Database\QueryCommand

Inheritance: extends AbstractDatabaseCommand
Datei anzeigen Open project: netz98/n98-magerun

Public Methods

Method Description
isEnabled ( ) : boolean

Protected Methods

Method Description
configure ( )
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | void
getEscapedSql ( string $query ) : string Returns the query string with escaped ' characters so it can be used within the mysql -e argument.

Method Details

configure() protected method

protected configure ( )

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return integer | void

getEscapedSql() protected method

The -e argument is enclosed by single quotes. As you can't escape the single quote within the single quote, you have to end the quote, then escape the single quote character and reopen the quote.
protected getEscapedSql ( string $query ) : string
$query string
return string

isEnabled() public method

public isEnabled ( ) : boolean
return boolean