propel/generated-classes/Base/Profile.php
/**
     * Exports the object as an array.
     *
     * You can specify the key type of the array by passing one of the class
     * type constants.
     *
     * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME,
     *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
     *                    Defaults to TableMap::TYPE_PHPNAME.
     * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
     * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
     * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
     *
     * @return array an associative array containing the field names (as keys) and field values
     */
Exports the object as an array.
You can specify the key type of the array by passing one of the class
type constants.



@return array an associative array containing the field names (as keys) and field values
Exports the object as an array . You can specify the key type of the array by passing one of the class type constants . @return array an associative array containing the field names ( as keys ) and field values
public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
    {
        if (isset($alreadyDumpedObjects['Profile'][$this->getPrimaryKey()])) {
            return '*RECURSION*';
        }
        $alreadyDumpedObjects['Profile'][$this->getPrimaryKey()] = true;
        $keys = ProfileTableMap::getFieldNames($keyType);
        $result = array(
            $keys[0] => $this->getID(),
            $keys[1] => $this->getUUID(),
            $keys[2] => $this->getUserID(),
            $keys[3] => $this->getDealerID(),
            $keys[4] => $this->getFirstName(),
            $keys[5] => $this->getLastName(),
            $keys[6] => $this->getGender(),
            $keys[7] => $this->getDateOfBirth(),
            $keys[8] => $this->getPhoneNumber(),
            $keys[9] => $this->getMobileNumber(),
            $keys[10] => $this->getProfileImage(),
            $keys[11] => $this->getCompanyName(),
            $keys[12] => $this->getPrimaryAddressStreet(),
            $keys[13] => $this->getPrimaryAddressStreet2(),
            $keys[14] => $this->getPrimaryAddressCity(),
            $keys[15] => $this->getPrimaryAddressState(),
            $keys[16] => $this->getPrimaryAddressPostCode(),
            $keys[17] => $this->getPrimaryAddressCountry(),
            $keys[18] => $this->getBillingAddressStreet(),
            $keys[19] => $this->getBillingAddressCity(),
            $keys[20] => $this->getBillingAddressState(),
            $keys[21] => $this->getBillingAddressPostCode(),
            $keys[22] => $this->getBillingAddressCountry(),
            $keys[23] => $this->getFirstSecurityQuestion(),
            $keys[24] => $this->getFirstSecurityQuestionAnswer(),
            $keys[25] => $this->getSecondSecurityQuestion(),
            $keys[26] => $this->getSecondSecurityQuestionAnswer(),
            $keys[27] => $this->getCustomSecurityQuestion(),
            $keys[28] => $this->getCustomSecurityAnswer(),
            $keys[29] => $this->getCreatedAt(),
            $keys[30] => $this->getUpdatedAt(),
        );
        $virtualColumns = $this->virtualColumns;
        foreach ($virtualColumns as $key => $virtualColumn) {
            $result[$key] = $virtualColumn;
        }
        if ($includeForeignObjects) {
            if (null !== $this->aUser) {
                $result['User'] = $this->aUser->toArray($keyType, $includeLazyLoadColumns,  $alreadyDumpedObjects, true);
            }
        }
        return $result;
    }
public function toArray ( $ keyType = TableMap :: TYPE_PHPNAME , $ includeLazyLoadColumns = true , $ alreadyDumpedObjects = array ( ) , $ includeForeignObjects = false ) { if ( isset ( $ alreadyDumpedObjects [ 'Profile' ] [ $ this -> getPrimaryKey ( ) ] ) ) { return '*RECURSION*' ; } $ alreadyDumpedObjects [ 'Profile' ] [ $ this -> getPrimaryKey ( ) ] = true ; $ keys = ProfileTableMap :: getFieldNames ( $ keyType ) ; $ result = array ( $ keys [ 0 ] => $ this -> getID ( ) , $ keys [ 1 ] => $ this -> getUUID ( ) , $ keys [ 2 ] => $ this -> getUserID ( ) , $ keys [ 3 ] => $ this -> getDealerID ( ) , $ keys [ 4 ] => $ this -> getFirstName ( ) , $ keys [ 5 ] => $ this -> getLastName ( ) , $ keys [ 6 ] => $ this -> getGender ( ) , $ keys [ 7 ] => $ this -> getDateOfBirth ( ) , $ keys [ 8 ] => $ this -> getPhoneNumber ( ) , $ keys [ 9 ] => $ this -> getMobileNumber ( ) , $ keys [ 10 ] => $ this -> getProfileImage ( ) , $ keys [ 11 ] => $ this -> getCompanyName ( ) , $ keys [ 12 ] => $ this -> getPrimaryAddressStreet ( ) , $ keys [ 13 ] => $ this -> getPrimaryAddressStreet2 ( ) , $ keys [ 14 ] => $ this -> getPrimaryAddressCity ( ) , $ keys [ 15 ] => $ this -> getPrimaryAddressState ( ) , $ keys [ 16 ] => $ this -> getPrimaryAddressPostCode ( ) , $ keys [ 17 ] => $ this -> getPrimaryAddressCountry ( ) , $ keys [ 18 ] => $ this -> getBillingAddressStreet ( ) , $ keys [ 19 ] => $ this -> getBillingAddressCity ( ) , $ keys [ 20 ] => $ this -> getBillingAddressState ( ) , $ keys [ 21 ] => $ this -> getBillingAddressPostCode ( ) , $ keys [ 22 ] => $ this -> getBillingAddressCountry ( ) , $ keys [ 23 ] => $ this -> getFirstSecurityQuestion ( ) , $ keys [ 24 ] => $ this -> getFirstSecurityQuestionAnswer ( ) , $ keys [ 25 ] => $ this -> getSecondSecurityQuestion ( ) , $ keys [ 26 ] => $ this -> getSecondSecurityQuestionAnswer ( ) , $ keys [ 27 ] => $ this -> getCustomSecurityQuestion ( ) , $ keys [ 28 ] => $ this -> getCustomSecurityAnswer ( ) , $ keys [ 29 ] => $ this -> getCreatedAt ( ) , $ keys [ 30 ] => $ this -> getUpdatedAt ( ) , ) ; $ virtualColumns = $ this -> virtualColumns ; foreach ( $ virtualColumns as $ key => $ virtualColumn ) { $ result [ $ key ] = $ virtualColumn ; } if ( $ includeForeignObjects ) { if ( null !== $ this -> aUser ) { $ result [ 'User' ] = $ this -> aUser -> toArray ( $ keyType , $ includeLazyLoadColumns , $ alreadyDumpedObjects , true ) ; } } return $ result ; }
Exports the object as an array.
Exports the object as an array .