コード例 #1
0
ファイル: Curl.php プロジェクト: andrewhowdencom/m2onk8s
 /**
  * Create Attribute Set
  *
  * @param CatalogAttributeSet $fixture
  * @return string
  */
 protected function createAttributeSet(CatalogAttributeSet $fixture)
 {
     $data = $fixture->getData();
     if (!isset($data['gotoEdit'])) {
         $data['gotoEdit'] = 1;
     }
     $data['skeleton_set'] = $fixture->getDataFieldConfig('skeleton_set')['source']->getAttributeSet()->getAttributeSetId();
     $url = $_ENV['app_backend_url'] . 'catalog/product_set/save/';
     $curl = new BackendDecorator(new CurlTransport(), $this->_configuration);
     $curl->addOption(CURLOPT_HEADER, 1);
     $curl->write($url, $data);
     $response = $curl->read();
     $curl->close();
     return $response;
 }