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

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

Get the nav object
public nav ( ) : Child
Результат Pop\Dom\Child
    public function nav()
    {
        if (null === $this->nav) {
            $this->nav = $this->traverse($this->tree);
        }
        return $this->nav;
    }

Usage Example

Пример #1
0
 public function testGetNav()
 {
     $_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\\Dom\\Child', $n->nav());
 }