src/MVQN/Data/Models/Model.php
private static function getColumnName(string $name): ?string
    {
        // Get the calling child class, ensuring that the Model class was not used!
        $class = self::getStaticChildClass();

        // IF the column => property cache has not yet been built, or does not exist for this class...
        if (self::$columnPropertiesCache === null || !array_key_exists($class, self::$columnPropertiesCache) ||
            self::$columnPropertiesCache[$class] === null)
            // THEN build it now!
            self::buildColumnPropertiesCache();

        // IF the name exists as a column => property cache key...
        if(array_key_exists($name, self::$columnPropertiesCache[$class]))
            // THEN return the column name as is!
            return $name;

        // OTHERWISE, we need to loop through all of the column => property pairings in the cache...
        foreach(self::$columnPropertiesCache[$class] as $column => $properties)
        {
            // IF the current column name is associated with a property matching the name provided...
            if(in_array($name, $properties))
                // THEN return the current column name.
                return $column;
        }

        // Nothing was matched, return NULL!
        return null;
    }
private static function getColumnName(string $name): ?string
    {
        // Get the calling child class, ensuring that the Model class was not used!
        $class = self::getStaticChildClass();

        // IF the column => property cache has not yet been built, or does not exist for this class...
        if (self::$columnPropertiesCache === null || !array_key_exists($class, self::$columnPropertiesCache) ||
            self::$columnPropertiesCache[$class] === null)
            // THEN build it now!
            self::buildColumnPropertiesCache();

        // IF the name exists as a column => property cache key...
        if(array_key_exists($name, self::$columnPropertiesCache[$class]))
            // THEN return the column name as is!
            return $name;

        // OTHERWISE, we need to loop through all of the column => property pairings in the cache...
        foreach(self::$columnPropertiesCache[$class] as $column => $properties)
        {
            // IF the current column name is associated with a property matching the name provided...
            if(in_array($name, $properties))
                // THEN return the current column name.
                return $column;
        }

        // Nothing was matched, return NULL!
        return null;
    }
private static function getColumnName ( string $ name ) : ? string { // Get the calling child class, ensuring that the Model class was not used! $ class = self :: getStaticChildClass ( ) ; // IF the column => property cache has not yet been built, or does not exist for this class... if ( self :: $ columnPropertiesCache === null || ! array_key_exists ( $ class , self :: $ columnPropertiesCache ) || self :: $ columnPropertiesCache [ $ class ] === null ) // THEN build it now! self :: buildColumnPropertiesCache ( ) ; // IF the name exists as a column => property cache key... if ( array_key_exists ( $ name , self :: $ columnPropertiesCache [ $ class ] ) ) // THEN return the column name as is! return $ name ; // OTHERWISE, we need to loop through all of the column => property pairings in the cache... foreach ( self :: $ columnPropertiesCache [ $ class ] as $ column => $ properties ) { // IF the current column name is associated with a property matching the name provided... if ( in_array ( $ name , $ properties ) ) // THEN return the current column name. return $ column ; } // Nothing was matched, return NULL! return null ; }
Compares the provided name to the column => property cache to ensure that both column and property names can be
used in functions requiring only the column name.

@param string $name The name of the column or property of which to lookup.
@return string|null Returns the column name for the column or property name specified.
@throws ModelClassException
@throws \ReflectionException
Compares the provided name to the column = > property cache to ensure that both column and property names can be used in functions requiring only the column name .