public function getDeployInfo($package) {
    $deployInfoFile = $package->getRootDirectory()->getFile('deploy-info.json');

    $deployInfo = new \stdClass;
    if ($deployInfoFile->exists()) {
      $deployInfo = JSONConverter::create()->parseFile($deployInfoFile);
    }

    if (!isset($deployInfo->isStaging)) {
      $deployInfo->isStaging = NULL;
    }

    if (!isset($deployInfo->isDevelopment)) {
      $deployInfo->isDevelopment = NULL;
    }

    if (!isset($deployInfo->isBuilt)) {
      $deployInfo->isBuilt = NULL;
    }

    return $deployInfo;
  }
public function getDeployInfo($package) {
    $deployInfoFile = $package->getRootDirectory()->getFile('deploy-info.json');

    $deployInfo = new \stdClass;
    if ($deployInfoFile->exists()) {
      $deployInfo = JSONConverter::create()->parseFile($deployInfoFile);
    }

    if (!isset($deployInfo->isStaging)) {
      $deployInfo->isStaging = NULL;
    }

    if (!isset($deployInfo->isDevelopment)) {
      $deployInfo->isDevelopment = NULL;
    }

    if (!isset($deployInfo->isBuilt)) {
      $deployInfo->isBuilt = NULL;
    }

    return $deployInfo;
  }
public function getDeployInfo ( $ package ) { $ deployInfoFile = $ package -> getRootDirectory ( ) -> getFile ( 'deploy-info.json' ) ; $ deployInfo = new \ stdClass ; if ( $ deployInfoFile -> exists ( ) ) { $ deployInfo = JSONConverter :: create ( ) -> parseFile ( $ deployInfoFile ) ; } if ( ! isset ( $ deployInfo -> isStaging ) ) { $ deployInfo -> isStaging = NULL ; } if ( ! isset ( $ deployInfo -> isDevelopment ) ) { $ deployInfo -> isDevelopment = NULL ; } if ( ! isset ( $ deployInfo -> isBuilt ) ) { $ deployInfo -> isBuilt = NULL ; } return $ deployInfo ; }
Returns the deploy info written as a file in directory root

notice: the properties:
.isStaging, .isDevelopment, .isBuilt
are ALWAYS set but they can be: NULL|FALSE|TRUE
meaning NULL that it was not set in json (or invalid)
@return object
Returns the deploy info written as a file in directory root