/** * 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; }
/** * (non-PHPdoc) * @see strategy/ckAbstractPropertyStrategy#__construct() */ public function __construct(ReflectionClass $class) { if (!$class->isSubclassOf('sfDoctrineRecord')) { throw new InvalidArgumentException(sprintf('The class \'%s\' has to be a subclass of sfDoctrineRecord.', $class->getName())); } parent::__construct($class); }
/** * 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; }
/** * (non-PHPdoc) * @see strategy/ckAbstractPropertyStrategy#__construct() */ public function __construct(ReflectionClass $class) { parent::__construct($class); }