Exemple #1
0
 public static function getDataSource()
 {
     $dataSource = new Atrox_Core_Data_PostgreSql_Source("TestMember");
     $dataSource->setRecordClassName("Atrox_Base_Member_Member");
     $dataSource->addProperty(new Atrox_Core_Data_Property("Id", Atrox_Core_Data_Property::TYPE_INTEGER, "Id", true))->addValidator(new Atrox_Core_Data_Validator_Required());
     $dataSource->addProperty(new Atrox_Core_Data_Property("EmailAddress", Atrox_Core_Data_Property::TYPE_STRING, "Email Address"))->addValidator(new Atrox_Core_Data_Validator_Required())->addValidator(new Atrox_Core_Data_Validator_MaxLength(500));
     $dataSource->addProperty(new Atrox_Core_Data_Property("Password", Atrox_Core_Data_Property::TYPE_STRING, "Password"))->addValidator(new Atrox_Core_Data_Validator_Required())->addValidator(new Atrox_Core_Data_Validator_MaxLength(500));
     $dataSource->addProperty(new Atrox_Core_Data_Property("FirstName", Atrox_Core_Data_Property::TYPE_STRING, "First Name"))->addValidator(new Atrox_Core_Data_Validator_MaxLength(50));
     $dataSource->addProperty(new Atrox_Core_Data_Property("LastName", Atrox_Core_Data_Property::TYPE_STRING, "Last Name"))->addValidator(new Atrox_Core_Data_Validator_Required())->addValidator(new Atrox_Core_Data_Validator_MaxLength(50));
     return $dataSource;
 }
Exemple #2
0
 /**
  *
  * @return Atrox_Core_Data_Source
  */
 public static function getDataSource()
 {
     $dataSource = new Atrox_Core_Data_PostgreSql_Source("TempBlog");
     $dataSource->setRecordClassName("UniqueTest");
     $dataSource->addProperty(new Atrox_Core_Data_Property("Id", Atrox_Core_Data_Property::TYPE_INTEGER, "Id", true))->setStorage(Atrox_Core_Data_Property::STORE_NEVER);
     $dataSource->addProperty(new Atrox_Core_Data_Property("Title", Atrox_Core_Data_Property::TYPE_STRING, "Title"))->addValidator(new Atrox_Core_Data_Validator_Required())->addValidator(new Atrox_Core_Data_Validator_MaxLength(50))->setDefault("This is the default title");
     $dataSource->addProperty(new Atrox_Core_Data_Property("Description", Atrox_Core_Data_Property::TYPE_STRING, "Description", true))->addValidator(new Atrox_Core_Data_Validator_Required())->addValidator(new Atrox_Core_Data_Validator_MaxLength(1000));
     $dataSource->addProperty(new Atrox_Core_Data_Property("DateCreated", Atrox_Core_Data_Property::TYPE_DATE, "Date Created"))->setStorage(Atrox_Core_Data_Property::STORE_NEVER);
     return $dataSource;
 }
 public static function getDataSource()
 {
     $dataSource = new Atrox_Core_Data_PostgreSql_Source("TestMember");
     $dataSource->setRecordClassName("TestMember");
     $dataSource->addProperty(new Atrox_Core_Data_Property("Id", Atrox_Core_Data_Property::TYPE_INTEGER, "Id", true))->setStorage(Atrox_Core_Data_Property::STORE_NEVER)->addValidator(new Atrox_Core_Data_Validator_Required());
     $dataSource->addProperty(new Atrox_Core_Data_Property("EmailAddress", Atrox_Core_Data_Property::TYPE_STRING, "Email Address"))->addValidator(new Atrox_Core_Data_Validator_Required())->addValidator(new Atrox_Core_Data_Validator_MaxLength(500));
     $dataSource->addProperty(new Atrox_Core_Data_Property("Password", Atrox_Core_Data_Property::TYPE_PASSWORD, "Password"))->addValidator(new Atrox_Core_Data_Validator_Required())->addValidator(new Atrox_Core_Data_Validator_MaxLength(500))->setStorage(Atrox_Core_Data_Property::STORE_CREATE);
     $dataSource->addProperty(new Atrox_Core_Data_Property("Token", Atrox_Core_Data_Property::TYPE_STRING, "Token"))->addValidator(new Atrox_Core_Data_Validator_MaxLength(50));
     return $dataSource;
 }
Exemple #4
0
 /**
  *
  * @return Atrox_Core_Data_Source
  */
 public static function getDataSource()
 {
     $dataSource = new Atrox_Core_Data_PostgreSql_Source("TempBlogComment");
     $dataSource->setRecordClassName("Mock_BlogComment");
     $dataSource->addProperty(new Atrox_Core_Data_Property("Id", Atrox_Core_Data_Property::TYPE_INTEGER, "Id", true))->setStorage(Atrox_Core_Data_Property::STORE_NEVER);
     $dataSource->addProperty(new Atrox_Core_Data_Property("BlogId", Atrox_Core_Data_Property::TYPE_RELATION, "Blog Id"))->setRelation("Mock_Blog");
     $dataSource->addProperty(new Atrox_Core_Data_Property("Comment", Atrox_Core_Data_Property::TYPE_STRING, "Comment"))->addValidator(new Atrox_Core_Data_Validator_Required())->addValidator(new Atrox_Core_Data_Validator_MaxLength(1000));
     $dataSource->addProperty(new Atrox_Core_Data_Property("DateCreated", Atrox_Core_Data_Property::TYPE_DATE, "Date Created"))->setStorage(Atrox_Core_Data_Property::STORE_NEVER);
     return $dataSource;
 }