PHP Classes

File: demo/UpdateOneGoods.php

Recommend this page to a friend!
  Classes of Oleksii Mylotskyi   PHP MoySklad Client   demo/UpdateOneGoods.php   Download  
File: demo/UpdateOneGoods.php
Role: Example script
Content type: text/plain
Description: Demo Files
Class: PHP MoySklad Client
Access the MoySklad API using ORM like objects
Author: By
Last change:
Date: 9 years ago
Size: 704 bytes
 

Contents

Class file image Download
<?php
namespace Zf2ClientMoysklad;

require_once
__DIR__.'/_config.php';

use
Zf2ClientMoysklad\Entity\Good;

global
$sm;

/* @var $entityManager EntityManager */
$entityManager = $sm->get('zf2clientmoysklad_entity_manager');

/*====================== Method for sending payments ==========================*/


/* @var $goodEntity Good */
$goodEntity = $entityManager->find('Zf2ClientMoysklad\Entity\Good',
                                  
'd606476e-5ccb-11e3-c096-7054d21a8d1e');



$entityManager->persist($goodEntity);
$goodEntity->setMinPrice(600000);
$goodEntity->setBuyPrice(888888);
$entityManager->flush();

/*---------------------------------------------------------------------------------*/