2012-08-10 28 views
0

我得到奇怪的錯誤的manifest.php文件中註冊。請幫助未知項目類型的錯誤,即使在模塊

我創建了一個名爲 「Advinvite」

我已經創建表自定義模塊: 「engine4_advinvite_matchinvites」

我已經創建DBTABLE: 「Advinvite_Model_DbTable_Matchinvites」

我創建DBTABLE的行級車型: 「Advinvite_Model_Matchinvite」 並在表的主鍵是 「matchinvite_id」

我也創建API: 「Advinvite_Api_Core」

主要部分,我也註冊在像模塊的設置文件夾中的文件manifest.php項目:

// Items --------------------------------------------------------------------- 
    'items' => array(
    'advinvite_matchinvite', 
) 

現在就錯誤:

我收到錯誤「未知的項目類型:advinvite_matchinvite」當我想用

Engine:Api:_()->getItem('advinvite_matchinvite',its_Identity)

我送過下面的清單文件的代碼。請你幫我檢查一下並幫助我。它已經來了我人生第一次(奇怪的錯誤),我試圖解決這個去年三/四天。即使我所做的一切正確,爲什麼它發生不理解。請幫助我的隊友。這將非常感激。

而且,如果你還可以幫我這個也意味着路線也沒有工作....不知道爲什麼這些兩個錯誤來了

請幫助我。

Manifest.php代碼:

<?php return array (
    'package' => 
    array (
    'type' => 'module', 
    'name' => 'advinvite', 
    'version' => '4.0.0', 
    'path' => 'application/modules/Advinvite', 
    'title' => 'Advanced Invites', 
    'description' => 'This will invite the users for matches and nets', 
    'author' => 'Gitesh Dang', 
    'callback' => 
    array (
     'class' => 'Engine_Package_Installer_Module', 
    ), 
    'actions' => 
    array (
     0 => 'install', 
     1 => 'upgrade', 
     2 => 'refresh', 
     3 => 'enable', 
     4 => 'disable', 
    ), 
    'directories' => 
    array (
     0 => 'application/modules/Advinvite', 
    ), 
    'files' => 
    array (
     0 => 'application/languages/en/advinvite.csv', 
    ), 
    // Items --------------------------------------------------------------------- 
    'items' => array(
    'advinvite_matchinvite', 
), 
    // Routes -------------------------------------------------------------------- 
    'routes' => array(
    'advinvite_general' => array(
     'route' => 'invites/:action/*', 
     'defaults' => array(
     'module' => 'advinvite', 
     'controller' => 'index', 
     'action' => '(match|matchview)', 
    ), 
     'reqs' => array(
     'action' => '\D+', 
    ) 
    ), 
) 
), 
); ?> 

等待陽性反應。 親切的問候

回答

0

配合, 它已得到修復。 問題是次要的:)

項目在封裝陣列註冊,它應該封裝陣列之外進行登記。軟件包數組只能關閉文件數組。

修正清單文件:

<?php return array (
     'package' => 
     array (
     'type' => 'module', 
     'name' => 'advinvite', 
     'version' => '4.0.0', 
     'path' => 'application/modules/Advinvite', 
     'title' => 'Advanced Invites', 
     'description' => 'This will invite the users for matches and nets', 
     'author' => 'Gitesh Dang', 
     'callback' => 
     array (
      'class' => 'Engine_Package_Installer_Module', 
     ), 
     'actions' => 
     array (
      0 => 'install', 
      1 => 'upgrade', 
      2 => 'refresh', 
      3 => 'enable', 
      4 => 'disable', 
     ), 
     'directories' => 
     array (
      0 => 'application/modules/Advinvite', 
     ), 
     'files' => 
     array (
      0 => 'application/languages/en/advinvite.csv', 
     ), 
    ), 
// Items --------------------------------------------------------------------- 
     'items' => array(
     'advinvite_matchinvite', 
    ), 
     // Routes -------------------------------------------------------------------- 
     'routes' => array(
     'advinvite_general' => array(
      'route' => 'invites/:action/*', 
      'defaults' => array(
      'module' => 'advinvite', 
      'controller' => 'index', 
      'action' => '(match|matchview)', 
     ), 
      'reqs' => array(
      'action' => '\D+', 
     ) 
     ), 
    ) 
    ); ?> 

乾杯! :)

相關問題