Exemple #1
0
 /**
  * Creates a new VendorInfo instance.
  *
  * @param string $type RDBMS type (optional)
  */
 public function __construct($type = null)
 {
     parent::__construct();
     $this->parameters = array();
     if (null !== $type) {
         $this->setType($type);
     }
 }
Exemple #2
0
 /**
  * Creates a new Index instance.
  *
  * @param string $name Name of the index
  */
 public function __construct($name = null)
 {
     parent::__construct();
     $this->columns = [];
     $this->columnsSize = [];
     if (null !== $name) {
         $this->setName($name);
     }
 }
 /**
  * Creates a new VendorInfo instance.
  *
  * @param string $type       RDBMS type (optional)
  * @param array  $parameters An associative array of vendor's parameters (optional)
  */
 public function __construct($type = null, array $parameters = array())
 {
     parent::__construct();
     $this->parameters = [];
     if (null !== $type) {
         $this->setType($type);
     }
     if ($parameters) {
         $this->setParameters($parameters);
     }
 }
Exemple #4
0
 /**
  * Constructs a new ForeignKey object.
  *
  * @param string $name
  */
 public function __construct($name = null)
 {
     parent::__construct();
     if (null !== $name) {
         $this->setName($name);
     }
     $this->onUpdate = self::NONE;
     $this->onDelete = self::NONE;
     $this->localColumns = array();
     $this->foreignColumns = array();
     $this->skipSql = false;
 }
Exemple #5
0
 private function assertObjectDoesNotExist($object)
 {
     $pk_value = $object->{$this->model->get_primary_key()->getter()}();
     if (!empty($pk_value)) {
         try {
             $this->sqldao->find_by_id($pk_value);
             self::assertFalse(true, 'object with id ' . $pk_value . ' exists');
         } catch (ObjectNotFoundException $ex) {
             // object not found
         }
     }
 }
 public function actionProductMapping()
 {
     if (isset($_REQUEST['contractorId'])) {
         $mappingModel = new MappingModel();
         $products = $mappingModel->getProductsList();
         $contractorModel = new ContractorModel();
         $contracts = $contractorModel->getContaractorDetails($mappingModel->contractorId);
         $mappingModel->setContracts($contracts);
         $this->render("ProductMapping", array('mappingModel' => $mappingModel));
     } else {
     }
 }
 /**
  * Constructs a new scoped model object.
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->packageOverridden = false;
 }