1

Is there any way to create data objects for MySQL database tables using Zend_Tool?

What I am trying to achieve is to create setter/getter methods and column variable of any table in some class by using command line zf utility. (like we can do it in pear)

1
  • 1
    Have you read the manual about the model and database generation with ZF_TOOL? If not, see if is it what you are looking for ... framework.zend.com/manual/en/… Commented Mar 4, 2012 at 22:33

1 Answer 1

1

You would need to create your own providers for Zend_Tool.

Essentially, you create a class that extends Zend_Tool_Project_Provider_Abstract. Every public method becomes an action available within the zf.sh tool.

You also need to register your new provider with Zend_Tool. Do this by running:

  1. run zf --setup storage-directory
  2. run zf --setup config-file
  3. edit ~/.zf.ini and add php.include_path and basicloader.classes.0 entries that point to your new provider's path and classname respectively.

Further details: http://akrabat.com/zend-framework/akrabat_db_schema_manager-zend-framework-database-migrations/ & https://github.com/akrabat/Akrabat/blob/master/zf1/Akrabat/Tool/DatabaseSchemaProvider.php

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.