PHP Class Hypernode\Magento\Command\Hypernode\Performance\PerformanceCommand

Inheritance: extends Hypernode\Magento\Command\AbstractHypernodeCommand
Afficher le fichier Open project: Hypernode/hypernode-magerun

Protected Properties

Свойство Type Description
$_batches
$_options
$_results
$_sitemaps
$_totalTime

Méthodes protégées

Méthode Description
askReplaceOrCompare ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, $definedUrl, $foundUrl ) : boolean | integer Asks the user what to do in case of a mismatched URL
askSitemapsToProcess ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : array | boolean Asks the user which sitemaps from Magento's sitemap collection to process.
configure ( ) Configure Command
convertTxtToXml ( $txt ) : string Convert a txt URL list to XML using Magento sitemap structure.
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : boolean | void Executes command.
executeBatches ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : array Executes all prepared batches of requests.
generateTablesData ( $results ) : array | boolean Generates data to output in a table.
generateTablesDataForFormat ( $results ) : array Generates table data without console styling.
getEffectiveUrl ( $url ) : mixed Gets the effective URL by following the redirects.
getSitemapFromInput ( $options ) : array | boolean Processes the sitemap data from input.
getStoreSitemaps ( ) : array | boolean Gets the store sitemap collection.
getStrippedUrl ( $url ) : boolean Strips the domain to only domain name and tld.
matchUrls ( $url, $match ) : mixed Checks if URL's are identical.
parseResponseCode ( $code ) : boolean | string Parses the response code colorized.
parseStatusMessage ( $result ) : string Parses the status message for the user in between requests.
prepareRequests ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : mixed Prepares all requests data by processing (sitemap) input.
replaceUrl ( $sitemapUrl, $replaceUrl ) : string Replaces the URL by a regex strip.
replaceUrlByParse ( $sitemapUrl, $replaceUrl ) : mixed Replaces the Sitemap URL
retrieveSitemaps ( ) : array Retrieve the sitemapCollection
simpleCurl ( $url ) : array A simple Curl function used to process the requests.
ttfbCompare ( $new, $old ) : string Compare the TTFB Values and give colorized response if necessary.
validateUrl ( $url ) : boolean Validates an URL

Method Details

askReplaceOrCompare() protected méthode

Asks the user what to do in case of a mismatched URL
protected askReplaceOrCompare ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, $definedUrl, $foundUrl ) : boolean | integer
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
$definedUrl
$foundUrl
Résultat boolean | integer

askSitemapsToProcess() protected méthode

Asks the user which sitemaps from Magento's sitemap collection to process.
protected askSitemapsToProcess ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : array | boolean
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Résultat array | boolean

configure() protected méthode

Configure Command
protected configure ( )

convertTxtToXml() protected méthode

Convert a txt URL list to XML using Magento sitemap structure.
protected convertTxtToXml ( $txt ) : string
$txt
Résultat string

execute() protected méthode

Executes command.
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : boolean | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Résultat boolean | void

executeBatches() protected méthode

Executes all prepared batches of requests.
protected executeBatches ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : array
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Résultat array

generateTablesData() protected méthode

Generates data to output in a table.
protected generateTablesData ( $results ) : array | boolean
$results
Résultat array | boolean

generateTablesDataForFormat() protected méthode

Generates table data without console styling.
protected generateTablesDataForFormat ( $results ) : array
$results
Résultat array

getEffectiveUrl() protected méthode

Gets the effective URL by following the redirects.
protected getEffectiveUrl ( $url ) : mixed
$url
Résultat mixed

getSitemapFromInput() protected méthode

Processes the sitemap data from input.
protected getSitemapFromInput ( $options ) : array | boolean
$options
Résultat array | boolean

getStoreSitemaps() protected méthode

Gets the store sitemap collection.
protected getStoreSitemaps ( ) : array | boolean
Résultat array | boolean

getStrippedUrl() protected méthode

Strips the domain to only domain name and tld.
protected getStrippedUrl ( $url ) : boolean
$url
Résultat boolean

matchUrls() protected méthode

Checks if URL's are identical.
protected matchUrls ( $url, $match ) : mixed
$url
$match
Résultat mixed

parseResponseCode() protected méthode

Parses the response code colorized.
protected parseResponseCode ( $code ) : boolean | string
$code
Résultat boolean | string

parseStatusMessage() protected méthode

Parses the status message for the user in between requests.
protected parseStatusMessage ( $result ) : string
$result
Résultat string

prepareRequests() protected méthode

Prepares all requests data by processing (sitemap) input.
protected prepareRequests ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : mixed
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Résultat mixed

replaceUrl() protected méthode

Replaces the URL by a regex strip.
protected replaceUrl ( $sitemapUrl, $replaceUrl ) : string
$sitemapUrl
$replaceUrl
Résultat string

replaceUrlByParse() protected méthode

Replaces the Sitemap URL
protected replaceUrlByParse ( $sitemapUrl, $replaceUrl ) : mixed
$sitemapUrl
$replaceUrl
Résultat mixed

retrieveSitemaps() protected méthode

Retrieve the sitemapCollection
protected retrieveSitemaps ( ) : array
Résultat array

simpleCurl() protected méthode

A simple Curl function used to process the requests.
protected simpleCurl ( $url ) : array
$url
Résultat array

ttfbCompare() protected méthode

Compare the TTFB Values and give colorized response if necessary.
protected ttfbCompare ( $new, $old ) : string
$new
$old
Résultat string

validateUrl() protected méthode

Validates an URL
protected validateUrl ( $url ) : boolean
$url
Résultat boolean

Property Details

$_batches protected_oe property

protected $_batches

$_options protected_oe property

protected $_options

$_results protected_oe property

protected $_results

$_sitemaps protected_oe property

protected $_sitemaps

$_totalTime protected_oe property

protected $_totalTime