2015-06-10 62 views
1

是否可以在Yii的php框架或經典php中構造定向依賴關係圖。我要動態繪製這樣的圖表,php中的定向依賴關係圖

enter image description here

我有一個ID數組爲:

Array ([0] =>Array ([0] => 10 [1] => 12 [2] => 14 [3] => 19) 
     [1] => Array ([0] => 10 [1] => 13 [2] => 18 [3] => 20) 
     [2] => Array ([0] => 10 [1] => 16 [2] => 14 [3] => 21) 
     [3] => Array ([0] => 10 [1] => 12 [2] => 18 [3] => 19) 
     [4] => Array ([0] => 10 [1] => 13 [2] => 14 [3] => 20) 
     [5] => Array ([0] => 10 [1] => 16 [2] => 18 [3] => 21) 
     [6] => Array ([0] => 10 [1] => 12 [2] => 14 [3] => 19) 
     [7] => Array ([0] => 10 [1] => 13 [2] => 18 [3] => 20) 
     [8] => Array ([0] => 10 [1] => 16 [2] => 14 [3] => 21) 
     [9] => Array ([0] => 10 [1] => 12 [2] => 18 [3] => 19) 
     [10] => Array ([0] => 10 [1] => 13 [2] => 14 [3] => 20) 
     [11] => Array ([0] => 10 [1] => 16 [2] => 18 [3] => 21) 
     [12] => Array ([0] => 10 [1] => 12 [2] => 14 [3] => 19) 
     [13] => Array ([0] => 10 [1] => 13 [2] => 18 [3] => 20) 
     [14] => Array ([0] => 10 [1] => 16 [2] => 14 [3] => 21) 
     [15] => Array ([0] => 10 [1] => 12 [2] => 18 [3] => 19) 
     [16] => Array ([0] => 10 [1] => 13 [2] => 14 [3] => 20) 
     [17] => Array ([0] => 10 [1] => 16 [2] => 18 [3] => 21) 
    ) ; 
+0

任何人都可以幫助我嗎? – Zulqarnain

回答

0

我不知道PHP,但服用一片葉子出來的Maven的依賴圖中,您應該查找生成依賴關係樹的一段代碼。因爲依賴關係不能形成一個閉環;他們必須以樹形式。