This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git://git.zendframework.com/zf into mikaelkael
- Loading branch information
Showing
16 changed files
with
635 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
/** | ||
* Zend Framework | ||
* | ||
* LICENSE | ||
* | ||
* This source file is subject to the new BSD license that is bundled | ||
* with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://framework.zend.com/license/new-bsd | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Zend | ||
* @package Zend_Navigation | ||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @version $Id$ | ||
*/ | ||
|
||
/** | ||
* @namespace | ||
*/ | ||
namespace Zend\Navigation; | ||
|
||
/** | ||
* A simple container class for {@link Zend_Navigation_Page} pages | ||
* | ||
* @uses \Zend\Navigation\Container | ||
* @uses \Zend\Navigation\Exception | ||
* @category Zend | ||
* @package Zend_Navigation | ||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
class Navigation extends Container | ||
{ | ||
/** | ||
* Creates a new navigation container | ||
* | ||
* @param array|\Zend\Config\Config $pages [optional] pages to add | ||
* @throws \Zend\Navigation\Exception if $pages is invalid | ||
*/ | ||
public function __construct($pages = null) | ||
{ | ||
if (is_array($pages) || $pages instanceof \Zend\Config\Config) { | ||
$this->addPages($pages); | ||
} elseif (null !== $pages) { | ||
throw new Exception( | ||
'Invalid argument: $pages must be an array, an ' . | ||
'instance of Zend_Config, or null'); | ||
} | ||
} | ||
} |
Oops, something went wrong.