/** * Gets the ckAbstractPropertyStrategy associated with the managed object. * * @return ckAbstractPropertyStrategy The ckAbstractPropertyStrategy associated with the managed object */ protected function getPropertyStrategy() { if (is_null($this->propertyStrategy)) { $this->propertyStrategy = ckAbstractPropertyStrategy::getPropertyStrategy($this->getType()); } return $this->propertyStrategy; }
/** * Creates a new complex type object for the given php class. * * @param string $name A name of a php class * * @return ckXsdComplexType The complex type object */ public static function create($name) { $reflectClass = new ReflectionAnnotatedClass($name); $result = new ckXsdComplexType($name, ckXsdNamespace::get('tns')); ckXsdType::set($name, $result); foreach (ckAbstractPropertyStrategy::getPropertyStrategy($reflectClass)->getProperties() as $property) { $result->addElement(new ckXsdComplexTypeElement($property['name'], ckXsdType::get($property['type']))); } return $result; }