From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- buildscripts/chmbuilder/classes/pages/ClassDoc.php | 456 ++++++++++----------- 1 file changed, 228 insertions(+), 228 deletions(-) (limited to 'buildscripts/chmbuilder/classes/pages/ClassDoc.php') diff --git a/buildscripts/chmbuilder/classes/pages/ClassDoc.php b/buildscripts/chmbuilder/classes/pages/ClassDoc.php index 733cfc5b..fc239890 100644 --- a/buildscripts/chmbuilder/classes/pages/ClassDoc.php +++ b/buildscripts/chmbuilder/classes/pages/ClassDoc.php @@ -1,228 +1,228 @@ -_classes=unserialize(file_get_contents($dataFile)); - - if(($className=$this->Request['class'])!==null && isset($this->_classes[$className])) - { - $this->Class=$this->_classes[$className]; - $this->Class['Name']=$className; - $this->Title='PRADO - Documentation of '.$className; - } - else - $this->Response->redirect('/docs/classdoc/'); - } - - public function getAncestors() - { - $ancestors=array(); - $thisClass=$this->Class; - while(true) - { - $parentClass=$thisClass['ParentClass']; - if(isset($this->_classes[$parentClass])) - { - $ancestors[]=$parentClass; - $thisClass=$this->_classes[$parentClass]; - } - else - break; - } - $ancestors=array_reverse($ancestors); - $s=''; - foreach($ancestors as $ancestor) - $s.="$ancestor »\n"; - if($s!=='') - $s="
\nInheritance: $s
\n"; - return $s; - } - - public function getProperties() - { - $class=$this->Class; - $className=$this->Class['Name']; - $s=''; - foreach($class['Properties'] as $name=>$property) - { - $inherited=strcasecmp($property['class'],$className)!==0; - $rowclass=$inherited?'doc-inherited':'doc-native'; - $s.="\n"; - $access=''; - if($property['readonly']) - $access.='R'; - if($property['protected']) - $access.='P'; - if($access==='') - $access=' '; - $s.="$access\n"; - - if($inherited) - { - $parentClass=$property['class']; - if(isset($this->_classes[$parentClass])) - { - $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#methodget{$name}"; - $s.="$name\n"; - } - else - $s.="$name\n"; - } - else - { - $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#methodget{$name}"; - $s.="$name\n"; - } - - $type=$property['type']; - if(isset($this->_classes[$type])) - { - $url="$type.html"; - $s.="$type\n"; - } - else - $s.="$type\n"; - - $comments=rtrim($property['comments'],'.').'.'; - if($inherited) - { - $parentClass=$property['class']; - if(isset($this->_classes[$parentClass])) - { - $url="$parentClass.html"; - $comments.=" (inherited from $parentClass)"; - } - else - $comments.=" (inherited from {$parentClass})"; - } - $s.="$comments\n"; - $s.="\n"; - } - - $header="\n NameTypeDescription\n\n"; - return $s===''?'':"
\n\n$header$s
\n
\n"; - } - - public function getEvents() - { - $class=$this->Class; - $className=$this->Class['Name']; - $s=''; - foreach($class['Events'] as $name=>$event) - { - $inherited=strcasecmp($event['class'],$className)!==0; - $rowclass=$inherited?'doc-inherited':'doc-native'; - $s.="\n"; - - $methodName=$name; - $methodName[0]='o'; - if($inherited) - { - $parentClass=$event['class']; - if(isset($this->_classes[$parentClass])) - { - $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#method{$methodName}"; - $s.="$name\n"; - } - else - $s.="$name\n"; - } - else - { - $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#method{$methodName}"; - $s.="$name\n"; - } - - $comments=rtrim($event['comments'],'.').'.'; - if($inherited) - { - $parentClass=$event['class']; - if(isset($this->_classes[$parentClass])) - { - $url="$parentClass.html"; - $comments.=" (inherited from $parentClass)"; - } - else - $comments.=" (inherited from {$parentClass})"; - } - $s.="$comments\n"; - $s.="\n"; - } - $header="\nNameDescription\n\n"; - return $s===''?'':"
\n\n$header$s
\n
\n"; - } - - public function getMethods() - { - $class=$this->Class; - $className=$this->Class['Name']; - $s=''; - foreach($class['Methods'] as $name=>$method) - { - $inherited=strcasecmp($method['class'],$className)!==0; - $rowclass=$inherited?'doc-inherited':'doc-native'; - $s.="\n"; - $access=''; - if($method['static']) - $access.='S'; - if($method['protected']) - $access.='P'; - if($access==='') - $access=' '; - $s.="$access\n"; - - if($inherited) - { - $parentClass=$method['class']; - if(isset($this->_classes[$parentClass])) - { - $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#method{$name}"; - $s.="$name\n"; - } - else - $s.="$name\n"; - } - else - { - $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#method{$name}"; - $s.="$name\n"; - } - - $comments=rtrim($method['comments'],'.').'.'; - if($inherited) - { - $parentClass=$method['class']; - if(isset($this->_classes[$parentClass])) - { - $url="$parentClass.html"; - $comments.=" (inherited from $parentClass)"; - } - else - $comments.=" (inherited from {$parentClass})"; - } - $s.="$comments\n"; - $s.="\n"; - } - $header="\n NameDescription\n\n"; - return $s===''?'':"
\n\n$header$s
\n
\n"; - } - - public function getDerived() - { - $class=$this->Class; - $s=''; - foreach($class['ChildClasses'] as $childName) - $s.="
  • $childName
  • \n"; - return $s===''?'':"
    \n\n
    \n"; - } - -} - -?> +_classes=unserialize(file_get_contents($dataFile)); + + if(($className=$this->Request['class'])!==null && isset($this->_classes[$className])) + { + $this->Class=$this->_classes[$className]; + $this->Class['Name']=$className; + $this->Title='PRADO - Documentation of '.$className; + } + else + $this->Response->redirect('/docs/classdoc/'); + } + + public function getAncestors() + { + $ancestors=array(); + $thisClass=$this->Class; + while(true) + { + $parentClass=$thisClass['ParentClass']; + if(isset($this->_classes[$parentClass])) + { + $ancestors[]=$parentClass; + $thisClass=$this->_classes[$parentClass]; + } + else + break; + } + $ancestors=array_reverse($ancestors); + $s=''; + foreach($ancestors as $ancestor) + $s.="$ancestor »\n"; + if($s!=='') + $s="
    \nInheritance: $s
    \n"; + return $s; + } + + public function getProperties() + { + $class=$this->Class; + $className=$this->Class['Name']; + $s=''; + foreach($class['Properties'] as $name=>$property) + { + $inherited=strcasecmp($property['class'],$className)!==0; + $rowclass=$inherited?'doc-inherited':'doc-native'; + $s.="\n"; + $access=''; + if($property['readonly']) + $access.='R'; + if($property['protected']) + $access.='P'; + if($access==='') + $access=' '; + $s.="$access\n"; + + if($inherited) + { + $parentClass=$property['class']; + if(isset($this->_classes[$parentClass])) + { + $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#methodget{$name}"; + $s.="$name\n"; + } + else + $s.="$name\n"; + } + else + { + $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#methodget{$name}"; + $s.="$name\n"; + } + + $type=$property['type']; + if(isset($this->_classes[$type])) + { + $url="$type.html"; + $s.="$type\n"; + } + else + $s.="$type\n"; + + $comments=rtrim($property['comments'],'.').'.'; + if($inherited) + { + $parentClass=$property['class']; + if(isset($this->_classes[$parentClass])) + { + $url="$parentClass.html"; + $comments.=" (inherited from $parentClass)"; + } + else + $comments.=" (inherited from {$parentClass})"; + } + $s.="$comments\n"; + $s.="\n"; + } + + $header="\n NameTypeDescription\n\n"; + return $s===''?'':"
    \n\n$header$s
    \n
    \n"; + } + + public function getEvents() + { + $class=$this->Class; + $className=$this->Class['Name']; + $s=''; + foreach($class['Events'] as $name=>$event) + { + $inherited=strcasecmp($event['class'],$className)!==0; + $rowclass=$inherited?'doc-inherited':'doc-native'; + $s.="\n"; + + $methodName=$name; + $methodName[0]='o'; + if($inherited) + { + $parentClass=$event['class']; + if(isset($this->_classes[$parentClass])) + { + $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#method{$methodName}"; + $s.="$name\n"; + } + else + $s.="$name\n"; + } + else + { + $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#method{$methodName}"; + $s.="$name\n"; + } + + $comments=rtrim($event['comments'],'.').'.'; + if($inherited) + { + $parentClass=$event['class']; + if(isset($this->_classes[$parentClass])) + { + $url="$parentClass.html"; + $comments.=" (inherited from $parentClass)"; + } + else + $comments.=" (inherited from {$parentClass})"; + } + $s.="$comments\n"; + $s.="\n"; + } + $header="\nNameDescription\n\n"; + return $s===''?'':"
    \n\n$header$s
    \n
    \n"; + } + + public function getMethods() + { + $class=$this->Class; + $className=$this->Class['Name']; + $s=''; + foreach($class['Methods'] as $name=>$method) + { + $inherited=strcasecmp($method['class'],$className)!==0; + $rowclass=$inherited?'doc-inherited':'doc-native'; + $s.="\n"; + $access=''; + if($method['static']) + $access.='S'; + if($method['protected']) + $access.='P'; + if($access==='') + $access=' '; + $s.="$access\n"; + + if($inherited) + { + $parentClass=$method['class']; + if(isset($this->_classes[$parentClass])) + { + $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#method{$name}"; + $s.="$name\n"; + } + else + $s.="$name\n"; + } + else + { + $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#method{$name}"; + $s.="$name\n"; + } + + $comments=rtrim($method['comments'],'.').'.'; + if($inherited) + { + $parentClass=$method['class']; + if(isset($this->_classes[$parentClass])) + { + $url="$parentClass.html"; + $comments.=" (inherited from $parentClass)"; + } + else + $comments.=" (inherited from {$parentClass})"; + } + $s.="$comments\n"; + $s.="\n"; + } + $header="\n NameDescription\n\n"; + return $s===''?'':"
    \n\n$header$s
    \n
    \n"; + } + + public function getDerived() + { + $class=$this->Class; + $s=''; + foreach($class['ChildClasses'] as $childName) + $s.="
  • $childName
  • \n"; + return $s===''?'':"
    \n\n
    \n"; + } + +} + +?> -- cgit v1.2.3