src/handlers/BaseHandler.php
public function read($path, $asArray = false)
    {
        if (file_exists($path)) {
            Yii::info('Read file: ' . $path, 'file');

            return $asArray ? file($path) : file_get_contents($path);
        } else {
            Yii::warning('Couldn\'t read file: ' . $path, 'file');

            return;
        }
    }
public function read($path, $asArray = false)
    {
        if (file_exists($path)) {
            Yii::info('Read file: ' . $path, 'file');

            return $asArray ? file($path) : file_get_contents($path);
        } else {
            Yii::warning('Couldn\'t read file: ' . $path, 'file');

            return;
        }
    }
public function read ( $ path , $ asArray = false ) { if ( file_exists ( $ path ) ) { Yii :: info ( 'Read file: ' . $ path , 'file' ) ; return $ asArray ? file ( $ path ) : file_get_contents ( $ path ) ; } else { Yii :: warning ( 'Couldn\'t read file: ' . $ path , 'file' ) ; return ; } }
Read file into a string or array.
@param string $path
@param bool $asArray
@return string|array
Read file into a string or array .