瀏覽代碼

rename installAs to targetDir

Igor Wiedler 13 年之前
父節點
當前提交
2edaf03a58
共有 2 個文件被更改,包括 11 次插入11 次删除
  1. 2 2
      src/Packagist/WebBundle/Command/UpdatePackagesCommand.php
  2. 9 9
      src/Packagist/WebBundle/Entity/Version.php

+ 2 - 2
src/Packagist/WebBundle/Command/UpdatePackagesCommand.php

@@ -188,8 +188,8 @@ EOF
             }
         }
 
-        if (isset($data['installAs'])) {
-            $version->setInstallAs($data['installAs']);
+        if (isset($data['target-dir'])) {
+            $version->setTargetDir($data['target-dir']);
         }
 
         if (isset($data['extra']) && is_array($data['extra'])) {

+ 9 - 9
src/Packagist/WebBundle/Entity/Version.php

@@ -51,7 +51,7 @@ class Version
     /**
      * @ORM\Column(nullable=true)
      */
-    private $installAs;
+    private $targetDir;
 
     /**
      * @ORM\Column(type="array", nullable=true)
@@ -204,7 +204,7 @@ class Version
             'time' => $this->getReleasedAt() ? $this->getReleasedAt()->format('Y-m-d\TH:i:sP') : null,
             'dist' => $this->getDist(),
             'type' => $this->getType(),
-            'installAs' => $this->getInstallAs(),
+            'target-dir' => $this->getTargetDir(),
             'extra' => $this->getExtra(),
         );
 
@@ -573,23 +573,23 @@ class Version
     }
 
     /**
-     * Set installAs
+     * Set targetDir
      *
-     * @param string $installAs
+     * @param string $targetDir
      */
-    public function setInstallAs($installAs)
+    public function setTargetDir($targetDir)
     {
-        $this->installAs = $installAs;
+        $this->targetDir = $targetDir;
     }
 
     /**
-     * Get installAs
+     * Get targetDir
      *
      * @return string
      */
-    public function getInstallAs()
+    public function getTargetDir()
     {
-        return $this->installAs;
+        return $this->targetDir;
     }
 
     /**