00001 <?php
00002
00014 class spunQ_DefaultUrlManagerUrlTemplatePart implements spunQ_IUrlTemplatePart {
00015
00020 private $urlTemplate;
00021
00022 private $string;
00023
00024 private $variableName;
00025
00026 private $type;
00027
00028 private $options;
00029
00030 private $regularExpression;
00031
00036 public function __construct(spunQ_DefaultUrlManagerUrlTemplate $urlTemplate, $string) {
00037 $this->urlTemplate = $urlTemplate;
00038 $this->string = $string;
00039 return NULL;
00040 }
00041
00047 public function getLocaleShortName() {
00048 return $this->urlTemplate->getLocaleShortName();
00049 }
00050
00056 public function getLocale() {
00057 return $this->urlTemplate->getLocale();
00058 }
00059
00060 public function getString() {
00061 return $this->string;
00062 }
00063
00064 public function getVariableName() {
00065 return $this->variableName;
00066 }
00067
00068 public function setVariableName($variableName) {
00069 $this->variableName = $variableName;
00070 return $this;
00071 }
00072
00073 public function getType() {
00074 return $this->type;
00075 }
00076
00077 public function setType($type) {
00078 $this->type = $type;
00079 return $this;
00080 }
00081
00082 public function getOptions() {
00083 return $this->options;
00084 }
00085
00086 public function setOptions($options) {
00087 $this->options = $options;
00088 return $this;
00089 }
00090
00091 public function getRegularExpression() {
00092 if ($this->regularExpression !== NULL) {
00093 return $this->regularExpression;
00094 }
00095 return preg_quote($this->string, '!');
00096 }
00097
00098 public function setRegularExpression($regularExpression) {
00099 $this->regularExpression = $regularExpression;
00100 return $this;
00101 }
00102
00106 public function getUrlTemplate() {
00107 return $this->urlTemplate;
00108 }
00109
00113 public function isRegularExpression() {
00114 return $this->regularExpression !== NULL;
00115 }
00116
00117 }
00118