[Console] Make getTerminalWith & getTerminalHeight public

This commit is contained in:
Eric GELOEN 2013-01-05 14:32:58 +01:00
parent d8652785cf
commit f299bd0968

View File

@ -794,7 +794,7 @@ class Application
* *
* @return int|null * @return int|null
*/ */
protected function getTerminalWidth() public function getTerminalWidth()
{ {
if (defined('PHP_WINDOWS_VERSION_BUILD') && $ansicon = getenv('ANSICON')) { if (defined('PHP_WINDOWS_VERSION_BUILD') && $ansicon = getenv('ANSICON')) {
return preg_replace('{^(\d+)x.*$}', '$1', $ansicon); return preg_replace('{^(\d+)x.*$}', '$1', $ansicon);
@ -810,7 +810,7 @@ class Application
* *
* @return int|null * @return int|null
*/ */
protected function getTerminalHeight() public function getTerminalHeight()
{ {
if (defined('PHP_WINDOWS_VERSION_BUILD') && $ansicon = getenv('ANSICON')) { if (defined('PHP_WINDOWS_VERSION_BUILD') && $ansicon = getenv('ANSICON')) {
return preg_replace('{^\d+x\d+ \(\d+x(\d+)\)$}', '$1', trim($ansicon)); return preg_replace('{^\d+x\d+ \(\d+x(\d+)\)$}', '$1', trim($ansicon));