Example #1
0
 /**
  * Returns an array with all table columns
  *
  * It uses the static User::$columns.
  *
  * The columns can be used for SQL statements.
  *
  * @return array
  */
 public function getColumns()
 {
     if (self::$columns === null) {
         $props = $this->retrieveProperties();
         $cols = array();
         foreach ($props as $prop) {
             $cols[] = DataObject::decamelize($prop);
         }
         self::$columns = $cols;
     }
     return self::$columns;
 }
Example #2
0
 /**
  * Test decamelize method
  *
  * @dataProvider provideDecamelize
  */
 public function testDecamelizesCorrectly()
 {
     $failureAffects = "Full login failure";
     foreach ($this->provideDecamelize() as $test) {
         $this->assertEquals($test[1], DataObject::decamelize($test[0]), $failureAffects);
     }
 }