Apache Zeta Components Manual :: File Source for visitor_yui.php

Source for file visitor_yui.php

Documentation is available at visitor_yui.php

  1. <?php
  2. /**
  3.  * File containing the ezcTreeVisitorYUIOptions class.
  4.  *
  5.  * Licensed to the Apache Software Foundation (ASF) under one
  6.  * or more contributor license agreements.  See the NOTICE file
  7.  * distributed with this work for additional information
  8.  * regarding copyright ownership.  The ASF licenses this file
  9.  * to you under the Apache License, Version 2.0 (the
  10.  * "License"); you may not use this file except in compliance
  11.  * with the License.  You may obtain a copy of the License at
  12.  * 
  13.  *   http://www.apache.org/licenses/LICENSE-2.0
  14.  * 
  15.  * Unless required by applicable law or agreed to in writing,
  16.  * software distributed under the License is distributed on an
  17.  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  18.  * KIND, either express or implied.  See the License for the
  19.  * specific language governing permissions and limitations
  20.  * under the License.
  21.  *
  22.  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  23.  * @version //autogentag//
  24.  * @filesource
  25.  * @package Tree
  26.  */
  27.  
  28. /**
  29.  * Class containing the options for the ezcTreeVisitorYUIOptions class.
  30.  *
  31.  * @property string $basePath 
  32.  *            Which string to prefix the href-targets with.
  33.  * @property bool $displayRootNode 
  34.  *            Whether the root node should be displayed. The root node will
  35.  *            still be disabled from the links that the visitor create when
  36.  *            $selectedNodeLink is set to true.
  37.  * @property array(string) $highlightNodeIds 
  38.  *            Which IDs should have the 'highlight' CSS class added.
  39.  * @property bool $selectedNodeLink 
  40.  *            If enabled, only the requested node is shown in links, and not the full path.
  41.  *
  42.  * @package Tree
  43.  * @version //autogentag//
  44.  */
  45. {
  46.     /**
  47.      * Constructs an object with the specified values.
  48.      *
  49.      * @throws ezcBasePropertyNotFoundException
  50.      *          if $options contains a property not defined
  51.      * @throws ezcBaseValueException
  52.      *          if $options contains a property with a value not allowed
  53.      * @param array(string=>mixed) $options 
  54.      */
  55.     public function __constructarray $options array() )
  56.     {
  57.         $this->basePath '';
  58.         $this->displayRootNode false;
  59.         $this->highlightNodeIds array();
  60.         $this->selectedNodeLink false;
  61.  
  62.         parent::__construct$options );
  63.     }
  64.  
  65.     /**
  66.      * Sets the option $name to $value.
  67.      *
  68.      * @throws ezcBasePropertyNotFoundException
  69.      *          if the property $name is not defined
  70.      * @throws ezcBaseValueException
  71.      *          if $value is not correct for the property $name
  72.      * @param string $name 
  73.      * @param mixed $value 
  74.      * @ignore
  75.      */
  76.     public function __set$name$value )
  77.     {
  78.         switch $name )
  79.         {
  80.             case 'basePath':
  81.                 if !is_string$value ) )
  82.                 {
  83.                     throw new ezcBaseValueException$name$value'string' );
  84.                 }
  85.                 $this->properties[$name$value;
  86.                 break;
  87.  
  88.             case 'displayRootNode':
  89.             case 'selectedNodeLink':
  90.                 if !is_bool$value ) )
  91.                 {
  92.                     throw new ezcBaseValueException$name$value'bool' );
  93.                 }
  94.                 $this->properties[$name$value;
  95.                 break;
  96.  
  97.             case 'highlightNodeIds':
  98.                 if !is_array$value ) )
  99.                 {
  100.                     throw new ezcBaseValueException$name$value'array(string)' );
  101.                 }
  102.                 $this->properties[$name$value;
  103.                 break;
  104.  
  105.             default:
  106.                 throw new ezcBasePropertyNotFoundException$name );
  107.         }
  108.     }
  109. }
  110. ?>
Documentation generated by phpDocumentor 1.4.3