Zend_Framework - Sınıf adlandırma

0 Cevap php

Benim Zend Framework proje gibi bu kodu kullanmak istedi:

public function indexAction() {
    $user = new User();
    $user->name = "Guest";
    $user->save();
}

The main thing that is important for me is that the class is called just User and not App_Model_User but how could I manage that? I thought I could add the path to the file User.php in the model-folder to the include_path:

<?php
class User {
    /* Some code */
}

But how could I config the autoloader to load that file/class? Currently I'm using the autoloader with the appnamespace ("App") to load classes called App_Model_User which works but the class naming is not the right I think. It should be cleaner and clearer.

0 Cevap