src/Behat/Gherkin/Keywords/KeywordsDumper.php
public function dump($language, $short = true, $excludeAsterisk = false)
    {
        $this->keywords->setLanguage($language);
        $languageComment = '';
        if ('en' !== $language) {
            $languageComment = "# language: $language\n";
        }

        $keywords = explode('|', $this->keywords->getFeatureKeywords());

        if ($short) {
            $keywords = call_user_func($this->keywordsDumper, $keywords, $short);

            return trim($languageComment . $this->dumpFeature($keywords, $short, $excludeAsterisk));
        }

        $features = array();
        foreach ($keywords as $keyword) {
            $keyword = call_user_func($this->keywordsDumper, array($keyword), $short);
            $features[] = trim($languageComment . $this->dumpFeature($keyword, $short, $excludeAsterisk));
        }

        return $features;
    }
public function dump($language, $short = true, $excludeAsterisk = false)
    {
        $this->keywords->setLanguage($language);
        $languageComment = '';
        if ('en' !== $language) {
            $languageComment = "# language: $language\n";
        }

        $keywords = explode('|', $this->keywords->getFeatureKeywords());

        if ($short) {
            $keywords = call_user_func($this->keywordsDumper, $keywords, $short);

            return trim($languageComment . $this->dumpFeature($keywords, $short, $excludeAsterisk));
        }

        $features = array();
        foreach ($keywords as $keyword) {
            $keyword = call_user_func($this->keywordsDumper, array($keyword), $short);
            $features[] = trim($languageComment . $this->dumpFeature($keyword, $short, $excludeAsterisk));
        }

        return $features;
    }
public function dump ( $ language , $ short = true , $ excludeAsterisk = false ) { $ this -> keywords -> setLanguage ( $ language ) ; $ languageComment = '' ; if ( 'en' !== $ language ) { $ languageComment = "# language: $language\n" ; } $ keywords = explode ( '|' , $ this -> keywords -> getFeatureKeywords ( ) ) ; if ( $ short ) { $ keywords = call_user_func ( $ this -> keywordsDumper , $ keywords , $ short ) ; return trim ( $ languageComment . $ this -> dumpFeature ( $ keywords , $ short , $ excludeAsterisk ) ) ; } $ features = array ( ) ; foreach ( $ keywords as $ keyword ) { $ keyword = call_user_func ( $ this -> keywordsDumper , array ( $ keyword ) , $ short ) ; $ features [ ] = trim ( $ languageComment . $ this -> dumpFeature ( $ keyword , $ short , $ excludeAsterisk ) ) ; } return $ features ; }
Dumps keyworded feature into string.

@param string  $language Keywords language
@param Boolean $short    Dump short version
@param bool    $excludeAsterisk

@return string|array String for short version and array of features for extended
Dumps keyworded feature into string .