[ Index ] |
|
Code source de Symfony 1.0.0 |
1 <?php 2 3 /* 4 * $Id: Inheritance.php 118 2005-06-15 13:14:48Z kaspars $ 5 * 6 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17 * 18 * This software consists of voluntary contributions made by many individuals 19 * and is licensed under the LGPL. For more information please see 20 * <http://propel.phpdb.org>. 21 */ 22 23 require_once 'propel/engine/database/model/XMLElement.php'; 24 25 /** 26 * A Class for information regarding possible objects representing a table 27 * 28 * @author Hans Lellelid <hans@xmpl.org> (Propel) 29 * @author John McNally <jmcnally@collab.net> (Torque) 30 * @version $Revision: 118 $ 31 * @package propel.engine.database.model 32 */ 33 class Inheritance extends XMLElement { 34 35 private $key; 36 private $className; 37 private $pkg; 38 private $ancestor; 39 private $parent; 40 41 /** 42 * Sets up the Inheritance object based on the attributes that were passed to loadFromXML(). 43 * @see parent::loadFromXML() 44 */ 45 protected function setupObject() 46 { 47 $this->key = $this->getAttribute("key"); 48 $this->className = $this->getAttribute("class"); 49 $this->pkg = $this->getAttribute("package"); 50 $this->ancestor = $this->getAttribute("extends"); 51 } 52 53 /** 54 * Get the value of key. 55 * @return value of key. 56 */ 57 public function getKey() 58 { 59 return $this->key; 60 } 61 62 /** 63 * Set the value of key. 64 * @param v Value to assign to key. 65 */ 66 public function setKey($v) 67 { 68 $this->key = $v; 69 } 70 71 /** 72 * Get the value of parent. 73 * @return value of parent. 74 */ 75 public function getColumn() 76 { 77 return $this->parent; 78 } 79 80 /** 81 * Set the value of parent. 82 * @param v Value to assign to parent. 83 */ 84 public function setColumn(Column $v) 85 { 86 $this->parent = $v; 87 } 88 89 /** 90 * Get the value of className. 91 * @return value of className. 92 */ 93 public function getClassName() 94 { 95 return $this->className; 96 } 97 98 /** 99 * Set the value of className. 100 * @param v Value to assign to className. 101 */ 102 public function setClassName($v) 103 { 104 $this->className = $v; 105 } 106 107 /** 108 * Get the value of package. 109 * @return value of package. 110 */ 111 public function getPackage() 112 { 113 return $this->pkg; 114 } 115 116 /** 117 * Set the value of package. 118 * @param v Value to assign to package. 119 */ 120 public function setPackage($v) 121 { 122 $this->pkg = $v; 123 } 124 125 /** 126 * Get the value of ancestor. 127 * @return value of ancestor. 128 */ 129 public function getAncestor() 130 { 131 return $this->ancestor; 132 } 133 134 /** 135 * Set the value of ancestor. 136 * @param v Value to assign to ancestor. 137 */ 138 public function setAncestor($v) 139 { 140 $this->ancestor = $v; 141 } 142 143 /** 144 * String representation of the foreign key. This is an xml representation. 145 */ 146 public function toString() 147 { 148 $result = " <inheritance key=\"" 149 . $this->key 150 . "\" class=\"" 151 . $this->className 152 . '"'; 153 154 if ($this->ancestor !== null) { 155 $result .= " extends=\"" 156 . $this->ancestor 157 . '"'; 158 } 159 160 $result .= "/>"; 161 162 return $result; 163 } 164 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |