public function build()
    {
        $values = array( 'access'           => false,
                         'genres'           => false,
                         'publication_date' => false,
                         'title'            => true,
                         'keywords'         => true,
                         'stock_tickers'    => true
        );
        foreach ($values as $value => $isEscaped) {
            if ( ! is_null( $this->{$value} )) {
                $this->addChild( sprintf( 'news:%s', $value ), $this->{$value}, $isEscaped );
            }
        }
    }
public function build()
    {
        $values = array( 'access'           => false,
                         'genres'           => false,
                         'publication_date' => false,
                         'title'            => true,
                         'keywords'         => true,
                         'stock_tickers'    => true
        );
        foreach ($values as $value => $isEscaped) {
            if ( ! is_null( $this->{$value} )) {
                $this->addChild( sprintf( 'news:%s', $value ), $this->{$value}, $isEscaped );
            }
        }
    }
public function build ( ) { $ values = array ( 'access' => false , 'genres' => false , 'publication_date' => false , 'title' => true , 'keywords' => true , 'stock_tickers' => true ) ; foreach ( $ values as $ value => $ isEscaped ) { if ( ! is_null ( $ this -> { $ value } ) ) { $ this -> addChild ( sprintf ( 'news:%s' , $ value ) , $ this -> { $ value } , $ isEscaped ) ; } } }
Adds all the nodes in our news sitemap, with some values being escaped.
Adds all the nodes in our news sitemap with some values being escaped .