Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7778785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:29:07+00:00 2026-06-01T18:29:07+00:00

File structure customerService.PHP include ‘vo/VOCustomer.php’; include ‘mydb.php’; class customerService { public function createCustomer(VOCustomer $cus)

  • 0

File structure

enter image description here

customerService.PHP

 include 'vo/VOCustomer.php';
 include 'mydb.php';
   
 class customerService 
 {    
  public function createCustomer(VOCustomer $cus)
  {
      $db = new mydb();
      $db->connect();
      
      $query = sprintf("insert into customer (CusId, CusName, CusContact,idcompany) values ('%s','%s','%s','%s')",
      mysql_real_escape_string($cus->CusId),
      mysql_real_escape_string($cus->CusName),
      mysql_real_escape_string($cus->CusContact),
      mysql_real_escape_string($cus->idcompany));

      $rs = mysql_query($query) or die ("Unable to complete query.");
      
      return 'success';
  }
 }

vo/VOCustomer.php

class VOCustomer {
    public $CusId;
    public $CusName;
    public $CusContact;
    public $idcompany;
}

When importing the customerService.php to a flex zend project Its possible that the data type may not return as VOCustomer sometimes it will show Object as type

enter image description here

How to make the passing object as VOcustomer object ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:29:08+00:00Added an answer on June 1, 2026 at 6:29 pm

    I’m not sure the ‘Connect to PHP’ wizard understands type hinting.
    Even if it does Zend AMF will pass an Objet not a VOCustomer to the method.
    It’s safer to add a PHPDoc comment:

    /**
     * @param VOCustomer $cus
     */
    public function createCustomer($cus)
    

    Second add dummy function to your service that returns VOCustomer. The ‘Connect to PHP’ wizard generates a value object only if it’s returned by a service method.

    /**
     * @return VOCustomer
     */    
    public function getCustomer() {
        //Do nothing
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following file structure: cron.php /includes/functions.php /classes/ClassName.php corn.php includes functions.php calls new
this is my php folder/file structure: mvc controller login.class.php model login.class.php lib login.class.php core
I have a function which gives me the complete file structure upto n-level, function
My website file structure currently looks like this: marketplace.php cats.php On marketplace.php I have
I've created a class to mimic a file structure for a program (a text-based
I've got the following file structure: / +--- inc/ | +--- lib1.php +--- inc2/
I have the following PHP code to display the file structure of my site.
I have the following file structure: /framework /.htaccess /index.php and the following rules in
My file structure: /holiday/admin/list.php /holiday/includes/functions.php # common functions /holiday/index.php # / is the document
Here's a sample file structure: page.php db.php folder1/subpage.php folder2/fn.php page.php require_once('folder2/fn.php'); folder1/subpage.php require_once('../folder2/fn.php'); folder2/fn.php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.