Pop\Nav\Nav::build PHP Метод

build() публичный Метод

Build the nav object
public build ( ) : Nav
Результат Nav
    public function build()
    {
        if (null === $this->nav) {
            $this->nav = $this->traverse($this->tree);
        }
        return $this;
    }

Usage Example

Пример #1
0
 public function testBuildAndGetNav()
 {
     $_SERVER['REQUEST_URI'] = '/first';
     $tree = array(array('name' => 'First Nav Item', 'href' => '/first'), array('name' => 'Second Nav Item', 'href' => '/second'));
     $n = new Nav($tree);
     $this->assertInstanceOf('Pop\\Nav\\Nav', $n->build());
 }