コード例 #1
0
 public function __construct($markup)
 {
     parent::__construct("");
     $this->markup = $markup;
     $this->validator(NULL);
     // Can't really validate this.
 }
コード例 #2
0
 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);
 }
コード例 #3
0
ファイル: Relation.php プロジェクト: patriziopezzilli/Fusion
 /**
  * @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);
 }
コード例 #4
0
 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));
 }
コード例 #5
0
ファイル: Relationship.php プロジェクト: innmind/neo4j-onm
 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;
 }
コード例 #6
0
 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());
             }
         }
     }
 }
コード例 #7
0
ファイル: Activity.php プロジェクト: steromano87/Gawain
 public function __construct($str_SessionID)
 {
     // Sets entity reference code
     $this->entityCode = 'activity';
     // Call parent constructor
     parent::__construct($str_SessionID);
 }
コード例 #8
0
ファイル: apiary.php プロジェクト: leloulight/didapi
 public function __construct($id, $name, $location, $beehives)
 {
     parent::__construct($id);
     $this->_name = $name;
     $this->_location = $location;
     $this->_beehives = $beehives;
 }
コード例 #9
0
ファイル: class.Event.php プロジェクト: koninka/Hackathon
 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);
 }
コード例 #10
0
 public function __construct($input = null)
 {
     parent::__construct($input);
     if (!empty($this->suppressedContact)) {
         $this->suppressedContact = new Contact($this->suppressedContact);
     }
 }
コード例 #11
0
 public function __construct($database, $name)
 {
     parent::__construct($database, $name);
     $this->setPresentation("name");
     $this->addField("name", VARCHAR, 50);
     $this->addField("description", TEXT);
 }
コード例 #12
0
 /**
  * Определяем дополнительные правила валидации
  *
  * @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);
 }
コード例 #13
0
ファイル: Event.php プロジェクト: jphacks/KB_10
 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);
 }
コード例 #14
0
 public function __construct()
 {
     $this->type = "User";
     $this->url = $this->getURL();
     $this->avatar = $this->icon();
     parent::__construct();
 }
コード例 #15
0
 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);
 }
コード例 #16
0
 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();
 }
コード例 #17
0
ファイル: Visit.php プロジェクト: xdidx/demago-webservices
 function __construct($datas = array())
 {
     $this->tableName = 'visits';
     $this->databaseFields = array('ip', 'user', 'date');
     $this->fieldsToConvertIntoObject = array('user' => 'users');
     parent::__construct($datas);
 }
コード例 #18
0
ファイル: Token.php プロジェクト: jphacks/KB_10
 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);
 }
コード例 #19
0
ファイル: DDC719Test.php プロジェクト: Herriniaina/iVarotra
 /**
  * construct
  */
 public function __construct()
 {
     parent::__construct();
     $this->channels = new ArrayCollection();
     $this->children = new ArrayCollection();
     $this->parents = new ArrayCollection();
 }
コード例 #20
0
ファイル: Circle.php プロジェクト: g105b/dxfwriter
 function __construct($attributes = array())
 {
     $defaults = array();
     $defaults['center'] = array(0, 0, 0);
     $defaults['radius'] = 1;
     parent::__construct(array_merge($defaults, $attributes));
 }
コード例 #21
0
ファイル: Manufacturer.php プロジェクト: blackneck/EcoStore
 function __construct($id, $name = '', $country = '', $url = '')
 {
     parent::__construct($id);
     $this->name = $name;
     $this->country = $country;
     $this->url = $url;
 }
コード例 #22
0
ファイル: EntityWithID.php プロジェクト: guancio/Runalyze
 /**
  * Construct
  * @param array $data
  */
 public function __construct(array $data = array())
 {
     parent::__construct($data);
     if (isset($data['id'])) {
         $this->ID = $data['id'];
     }
 }
コード例 #23
0
 public function __construct($database, $name)
 {
     parent::__construct($database, $name);
     $this->setPresentation("name");
     $this->addField("name", VARCHAR, 40);
     $this->addField("position", POSITION);
 }
コード例 #24
0
ファイル: Part.php プロジェクト: vincenta/stato
 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);
 }
コード例 #25
0
ファイル: Multipart.php プロジェクト: vincenta/stato
 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);
 }
コード例 #26
0
 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);
 }
コード例 #27
0
 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();
     }
 }
コード例 #28
0
ファイル: Idea.php プロジェクト: xdidx/demago-webservices
 function __construct($datas = array())
 {
     $this->tableName = 'ideas';
     $this->databaseFields = array('user', 'name', 'description');
     $this->fieldsToConvertIntoObject = array('user' => 'users');
     parent::__construct($datas);
     $this->updatePossibilities();
 }
コード例 #29
0
ファイル: Text.php プロジェクト: k3rn3l3rr0r/dxfwriter
 function __construct($attributes = array())
 {
     $defaults = array();
     $defaults['text'] = '';
     $defaults['point'] = array(0, 0, 0);
     $defaults['height'] = 1;
     parent::__construct(array_merge($defaults, $attributes));
 }
コード例 #30
0
ファイル: User.php プロジェクト: amigobv/chat
 public function __construct($id, $firstName, $lastName, $username, $hashPassword)
 {
     parent::__construct($id);
     $this->firstName = $firstName;
     $this->lastName = $lastName;
     $this->username = $username;
     $this->hashPassword = $hashPassword;
 }