public static function create($name) { $reflectClass = new ReflectionClass($name); $result = new ckXsdComplexType($name, ckXsdNamespace::get('tns')); foreach ($reflectClass->getProperties() as $property) { $type = ckDocBlockParser::parseProperty($property->getDocComment()); if (!empty($type)) { $result->addElement(new ckXsdComplexTypeElement($property->getName(), ckXsdType::get($type['type']))); } } return $result; }
/** * (non-PHPdoc) * @see strategy/ckAbstractPropertyStrategy#getProperties() */ public function getProperties() { $properties = array(); foreach ($this->getClass()->getProperties() as $property) { if (!$property->isPublic() || $property->isStatic()) { continue; } $type = ckDocBlockParser::parseProperty($property->getDocComment()); if (isset($type['type'])) { $properties[] = array('name' => $property->getName(), 'type' => $type['type']); } } return $properties; }