@@ -653,7 +653,7 @@ public function getType(): String
653653 return $ this ->type ;
654654 }
655655
656- public function columnNames (): array
656+ public function getColumnNames (): array
657657 {
658658 return array_keys ($ this ->columns );
659659 }
@@ -2282,7 +2282,7 @@ private function getAddTableSQL(ReflectedTable $newTable): String
22822282 $ p1 = $ this ->quote ($ tableName );
22832283 $ fields = [];
22842284 $ constraints = [];
2285- foreach ($ newTable ->columnNames () as $ columnName ) {
2285+ foreach ($ newTable ->getColumnNames () as $ columnName ) {
22862286 $ newColumn = $ newTable ->getColumn ($ columnName );
22872287 $ f1 = $ this ->quote ($ columnName );
22882288 $ f2 = $ this ->getColumnType ($ newColumn , false );
@@ -2929,7 +2929,7 @@ private function handleColumns(String $operation, String $tableName) /*: void*/
29292929 $ columnHandler = $ this ->getProperty ('columnHandler ' , '' );
29302930 if ($ columnHandler ) {
29312931 $ table = $ this ->reflection ->getTable ($ tableName );
2932- foreach ($ table ->columnNames () as $ columnName ) {
2932+ foreach ($ table ->getColumnNames () as $ columnName ) {
29332933 $ allowed = call_user_func ($ columnHandler , $ operation , $ tableName , $ columnName );
29342934 if (!$ allowed ) {
29352935 $ table ->removeColumn ($ columnName );
@@ -3777,7 +3777,7 @@ private function setComponentSchema(String $tableName) /*: void*/
37773777 $ prefix = "components|schemas| $ operation- $ tableName " ;
37783778 }
37793779 $ this ->openapi ->set ("$ prefix|type " , "object " );
3780- foreach ($ table ->columnNames () as $ columnName ) {
3780+ foreach ($ table ->getColumnNames () as $ columnName ) {
37813781 if (!$ this ->isOperationOnColumnAllowed ($ operation , $ tableName , $ columnName )) {
37823782 continue ;
37833783 }
@@ -4232,7 +4232,7 @@ private function select(String $tableName, bool $primaryTable, array $params, St
42324232 public function getNames (ReflectedTable $ table , bool $ primaryTable , array $ params ): array
42334233 {
42344234 $ tableName = $ table ->getName ();
4235- $ results = $ table ->columnNames ();
4235+ $ results = $ table ->getColumnNames ();
42364236 $ results = $ this ->select ($ tableName , $ primaryTable , $ params , 'include ' , $ results , true );
42374237 $ results = $ this ->select ($ tableName , $ primaryTable , $ params , 'exclude ' , $ results , false );
42384238 return $ results ;
@@ -4427,7 +4427,7 @@ public function getColumnOrdering(ReflectedTable $table, array $params): array
44274427 if ($ pk ) {
44284428 $ fields [] = [$ pk ->getName (), 'ASC ' ];
44294429 } else {
4430- foreach ($ table ->columnNames () as $ columnName ) {
4430+ foreach ($ table ->getColumnNames () as $ columnName ) {
44314431 $ fields [] = [$ columnName , 'ASC ' ];
44324432 }
44334433
@@ -4602,7 +4602,7 @@ private function sanitizeRecord(String $tableName, /* object */ $record, String
46024602 }
46034603 if ($ id != '' ) {
46044604 $ pk = $ this ->reflection ->getTable ($ tableName )->getPk ();
4605- foreach ($ this ->reflection ->getTable ($ tableName )->columnNames () as $ key ) {
4605+ foreach ($ this ->reflection ->getTable ($ tableName )->getColumnNames () as $ key ) {
46064606 $ field = $ this ->reflection ->getTable ($ tableName )->getColumn ($ key );
46074607 if ($ field ->getName () == $ pk ->getName ()) {
46084608 unset($ record ->$ key );
0 commit comments