public function __construct($markup) { parent::__construct(""); $this->markup = $markup; $this->validator(NULL); // Can't really validate this. }
public function __construct($database, $name) { parent::__construct($database, $name); $this->setPresentation("n_sedie"); $this->addField("n_sedie", INT, 11, MANDATORY); $this->addField("stato", VARCHAR, 1); }
/** * @param Entity $entity_1 * @param Entity $entity_2 * @param string $name * @property $name nome della tabella sul db * @param null $roleName1 * @param null $roleName2 */ function __construct($entity_1, $entity_2, $name = "", $roleName1 = null, $roleName2 = null) { $this->entity_1 = $entity_1; $this->entity_2 = $entity_2; if (!$this->entity_1->name) { echo Message::getInstance()->getMessage(MSG_ERROR_UNKNOWN_ENTITY) . " (" . basename(__FILE__) . ":" . __LINE__ . ")"; exit; } if (isset($roleName1)) { $this->roleName1 = $roleName1; } else { $this->roleName1 = $this->entity_1->fields[0]->name . "_" . $this->entity_1->entityName; } if (isset($roleName2)) { $this->roleName2 = $roleName2; } else { $this->roleName2 = $this->entity_2->fields[0]->name . "_" . $this->entity_2->entityName; } if ($name != "") { parent::__construct(DB::getInstance(), "{$name}"); } else { parent::__construct(DB::getInstance(), "{$this->entity_1->entityName}_{$this->entity_2->entityName}"); } /** * *Relations do not have any primary key. * */ $this->addReference($this->entity_1, $this->roleName1); $this->addReference($this->entity_2, $this->roleName2); }
function __construct($datas = array()) { $this->tableName = 'possibilities'; $this->databaseFields = array('idea', 'name', 'code'); parent::__construct($datas); $this->votes = Database::getAll('votes', array('possibility' => $this->id)); }
public function __construct(ClassName $class, Identity $id, Repository $repository, Factory $factory, Alias $alias, RelationshipType $type, RelationshipEdge $startNode, RelationshipEdge $endNode) { parent::__construct($class, $id, $repository, $factory, $alias); $this->type = $type; $this->startNode = $startNode; $this->endNode = $endNode; }
public function __construct($aParam = null) { parent::__construct($aParam); if ($sName = $this->GetName()) { // задается идентификатор виджета $this->_checkId(); } if (is_null($this->GetPriority())) { $this->SetPriority(0); } if ($this->GetId()) { $aCfgData = Config::Get('widget.' . $this->GetId() . '.config'); if ($aCfgData) { $aCfgData = F::Array_Merge($this->getAllProps(), $aCfgData); $this->setProps($aCfgData); } } if ($sName && is_null($this->getType())) { $aTypeData = E::ModuleViewer()->DefineWidgetType($sName, $this->GetDir(), $this->GetPluginId()); if (isset($aTypeData['type'])) { $this->setType($aTypeData['type']); if ($aTypeData['type'] == 'template' && !empty($aTypeData['name'])) { $this->setTemplate($aTypeData['name']); $this->setName($aTypeData['name']); } /* LS-compatible */ if (!$this->getParam('plugin') && $this->getPluginId()) { $this->setParam('plugin', $this->getPluginId()); } } } }
public function __construct($str_SessionID) { // Sets entity reference code $this->entityCode = 'activity'; // Call parent constructor parent::__construct($str_SessionID); }
public function __construct($id, $name, $location, $beehives) { parent::__construct($id); $this->_name = $name; $this->_location = $location; $this->_beehives = $beehives; }
public function __construct() { parent::__construct(); $this->fields = array($this->idField, new Field(static::DESCRIPTION_FLD, TextType(), true), new Field(static::HEAD_FLD, StrType(100), true, 'Инициатор', array(Validate::IS_NUMERIC, Validate::IS_NOT_EMPTY)), new Field(static::OWNER_FLD, IntType(), false, 'Инициатор', array(Validate::IS_NUMERIC, Validate::IS_NOT_EMPTY)), new Field(static::TYPE_FLD, IntType(), true, 'Вид события', array(Validate::IS_NUMERIC, Validate::IS_NOT_EMPTY)), new Field(static::CREATION_DATE_FLD, TimestampType(), true, 'Время создания', array(Validate::IS_NOT_EMPTY)), new Field(static::DELETION_DATE_FLD, TimestampType()), new Field(static::UPDATED_DATE_FLD, TimestampType()), new Field(static::DUE_DATE_FLD, TimestampType(), true), new Field(static::PLACE_FLD, IntType(), true, 'Место', array(Validate::IS_NOT_EMPTY))); $this->dueDateKey = $this->ToPrfxNm(static::DUE_DATE_FLD); $this->createDateKey = $this->ToPrfxNm(static::CREATION_DATE_FLD); }
public function __construct($input = null) { parent::__construct($input); if (!empty($this->suppressedContact)) { $this->suppressedContact = new Contact($this->suppressedContact); } }
public function __construct($database, $name) { parent::__construct($database, $name); $this->setPresentation("name"); $this->addField("name", VARCHAR, 50); $this->addField("description", TEXT); }
/** * Определяем дополнительные правила валидации * * @param array */ public function __construct($aParam = false) { if (Config::Get('module.user.captcha_use_registration')) { $this->aValidateRules[] = array('captcha', 'captcha', 'on' => array('registration')); } parent::__construct($aParam); }
public function __construct(\WebPay\WebPay $client, array $data) { if (array_key_exists('data', $data) && !empty($data['data'])) { $data['data'] = new EventData($client, $data['data']); } parent::__construct($client, $data); }
public function __construct() { $this->type = "User"; $this->url = $this->getURL(); $this->avatar = $this->icon(); parent::__construct(); }
public function __construct($database, $name, $owner = "") { parent::__construct($database, $name, WITH_OWNER); $this->addField("filename", VARCHAR, 255, MANDATORY); $this->addField("size", INT, 5); $this->addField("filetype", VARCHAR, 255, MANDATORY); }
public function __construct($aParams) { $aDefault = array('driver' => $this->GetDriver(), 'width' => 0, 'height' => 0, 'color' => 0xffffff, 'opacity' => 0, 'filename' => '', 'image' => null); $aParams = F::Array_Merge($aDefault, $aParams); parent::__construct($aParams); $this->oPxImage = $this->_createPixieImage(); }
function __construct($datas = array()) { $this->tableName = 'visits'; $this->databaseFields = array('ip', 'user', 'date'); $this->fieldsToConvertIntoObject = array('user' => 'users'); parent::__construct($datas); }
public function __construct(\WebPay\WebPay $client, array $data) { if (array_key_exists('card', $data) && !empty($data['card'])) { $data['card'] = new Card($data['card']); } parent::__construct($client, $data); }
/** * construct */ public function __construct() { parent::__construct(); $this->channels = new ArrayCollection(); $this->children = new ArrayCollection(); $this->parents = new ArrayCollection(); }
function __construct($attributes = array()) { $defaults = array(); $defaults['center'] = array(0, 0, 0); $defaults['radius'] = 1; parent::__construct(array_merge($defaults, $attributes)); }
function __construct($id, $name = '', $country = '', $url = '') { parent::__construct($id); $this->name = $name; $this->country = $country; $this->url = $url; }
/** * Construct * @param array $data */ public function __construct(array $data = array()) { parent::__construct($data); if (isset($data['id'])) { $this->ID = $data['id']; } }
public function __construct($database, $name) { parent::__construct($database, $name); $this->setPresentation("name"); $this->addField("name", VARCHAR, 40); $this->addField("position", POSITION); }
public function __construct($content = '', $contentType = 'text/plain', $encoding = '8bit', $charset = 'UTF-8') { parent::__construct(); $this->content = $content; $this->charset = $charset; $this->setContentType($contentType, array('charset' => $charset)); $this->setEncoding($encoding); }
public function __construct($subtype = self::ALTERNATIVE, $parts = array(), $boundary = null) { parent::__construct(); $this->subtype = $subtype; $this->parts = $parts; $this->preamble = 'This is a multi-part message in MIME format.'; $this->setBoundary($boundary); }
public function __construct($database, $name) { parent::__construct($database, $name, WITH_OWNER); $this->setPresentation("owner"); $this->addField("titolo", VARCHAR, 255, MANDATORY); $this->addField("descrizione", VARCHAR, 255); $this->addField("sottotitolo", VARCHAR, 255); }
function __construct($entityId, $entityName, $objectIdColumnName, $stateIdColumnName, $mySQLi) { parent::__construct($entityId, $entityName, $stateIdColumnName, $mySQLi); $idProperty = $this->getProperty($objectIdColumnName, FALSE); if ($idProperty != NULL) { $this->objectIdColumnName = $idProperty->getName(); } }
function __construct($datas = array()) { $this->tableName = 'ideas'; $this->databaseFields = array('user', 'name', 'description'); $this->fieldsToConvertIntoObject = array('user' => 'users'); parent::__construct($datas); $this->updatePossibilities(); }
function __construct($attributes = array()) { $defaults = array(); $defaults['text'] = ''; $defaults['point'] = array(0, 0, 0); $defaults['height'] = 1; parent::__construct(array_merge($defaults, $attributes)); }
public function __construct($id, $firstName, $lastName, $username, $hashPassword) { parent::__construct($id); $this->firstName = $firstName; $this->lastName = $lastName; $this->username = $username; $this->hashPassword = $hashPassword; }