['name' => 'profile_address_id', 'type' => 'int', 'internal' => 'id'], 'profile_address_type' => ['name' => 'profile_address_type', 'type' => 'int', 'internal' => 'type'], 'profile_address_address' => ['name' => 'profile_address_address', 'type' => 'string', 'internal' => 'address'], 'profile_address_street' => ['name' => 'profile_address_street', 'type' => 'string', 'internal' => 'street'], 'profile_address_city' => ['name' => 'profile_address_city', 'type' => 'string', 'internal' => 'city'], 'profile_address_zip' => ['name' => 'profile_address_zip', 'type' => 'string', 'internal' => 'postal'], 'profile_address_country' => ['name' => 'profile_address_country', 'type' => 'string', 'internal' => 'country'], ]; /** * Primary table. * * @var string * @since 1.0.0 */ protected static $table = 'profile_address'; /** * Primary field name. * * @var string * @since 1.0.0 */ protected static $primaryField = 'profile_address_id'; /** * Create object. * * @param mixed $obj Object * @param int $relations Behavior for relations creation * * @return mixed * * @since 1.0.0 */ public static function create($obj, int $relations = RelationType::ALL) { try { $objId = parent::create($obj, $relations); if($objId === null || !is_scalar($objId)) { return $objId; } } catch (\Exception $e) { var_dump($e->getMessage()); return false; } return $objId; } /** * Get object. * * @param mixed $primaryKey Key * @param int $relations Load relations * @param mixed $fill Object to fill * * @return Account * * @since 1.0.0 */ public static function get($primaryKey, int $relations = RelationType::ALL, $fill = null) { return parent::get($primaryKey, $relations, $fill); } }