public function getSourceRow($source)
    {
        if (strpos($source, PHP_EOL) === false) {
            return $this->indentionStr . $source . PHP_EOL;
        }

        $ret = '';
        $rows = explode(PHP_EOL, $source);
        if (strlen(trim($rows[0])) == 0) {
            $rows = array_splice($rows, 1);
        }
        if (strlen(trim($rows[(count($rows) - 1)])) == 0) {
            $rows = array_splice($rows, 0, count($rows) - 1);
        }
        foreach ($rows as $row) {
            $ret .= $this->indentionStr . $row . PHP_EOL;
        }

        return $ret;
    }
public function getSourceRow($source)
    {
        if (strpos($source, PHP_EOL) === false) {
            return $this->indentionStr . $source . PHP_EOL;
        }

        $ret = '';
        $rows = explode(PHP_EOL, $source);
        if (strlen(trim($rows[0])) == 0) {
            $rows = array_splice($rows, 1);
        }
        if (strlen(trim($rows[(count($rows) - 1)])) == 0) {
            $rows = array_splice($rows, 0, count($rows) - 1);
        }
        foreach ($rows as $row) {
            $ret .= $this->indentionStr . $row . PHP_EOL;
        }

        return $ret;
    }
public function getSourceRow ( $ source ) { if ( strpos ( $ source , PHP_EOL ) === false ) { return $ this -> indentionStr . $ source . PHP_EOL ; } $ ret = '' ; $ rows = explode ( PHP_EOL , $ source ) ; if ( strlen ( trim ( $ rows [ 0 ] ) ) == 0 ) { $ rows = array_splice ( $ rows , 1 ) ; } if ( strlen ( trim ( $ rows [ ( count ( $ rows ) - 1 ) ] ) ) == 0 ) { $ rows = array_splice ( $ rows , 0 , count ( $ rows ) - 1 ) ; } foreach ( $ rows as $ row ) { $ ret .= $ this -> indentionStr . $ row . PHP_EOL ; } return $ ret ; }
Takes a string and prepends ith with the current indention string
Has support for multiple lines

@param string $source
@return string
Takes a string and prepends ith with the current indention string Has support for multiple lines