(c) 2008-2011 Romans Malinovskis Distributed under Affero General Public License v3 See http://agiletoolkit.org/about/license =====================================================ATK4=
 public function remove(AbstractObject $object)
 {
     $flag = false;
     foreach ($this->objects as $k => $v) {
         if ($v->getId() == $object->getId()) {
             unset($this->objects[$k]);
             $flag = !$flag;
             $k != $this->getCount() && $this->pushBackObjects($k);
             $this->index--;
             break;
         }
     }
     return $flag;
 }
 public function __construct($name, $publicName = NULL, $required = TRUE, $defaultValue = NULL) {
     parent::__construct();
     $this->name = $name;
     $this->publicName = t(isset($publicName) ? $publicName : $name);
     $this->required = $required;
     $this->defaultValue = $defaultValue;
 }
Пример #3
0
 /**
  * Destructor.
  */
 public function __destruct()
 {
     $this->dimesions = NULL;
     $this->factors = NULL;
     $this->data = NULL;
     parent::__destruct();
 }
 public function __construct(DataSourceHandler $datasourceHandler, AbstractQueryRequest $request, $columnName)
 {
     parent::__construct();
     $this->datasourceHandler = $datasourceHandler;
     $this->request = $request;
     $this->columnName = $columnName;
 }
Пример #5
0
 public function __construct($nType, $sSource, $nPostion = 0, $nLine = 0)
 {
     parent::__construct($sSource, $nPostion, $nLine);
     $this->nType = $nType;
     $this->setTokenType($nType);
     $this->sType = $this->tokenTypeName();
 }
Пример #6
0
 public function __construct($propertyName, $isSortAscending = TRUE)
 {
     parent::__construct();
     $this->propertyName = $propertyName;
     $this->isSortAscending = $isSortAscending;
     $this->checkPropertyName();
 }
Пример #7
0
 /**
  * Constructor.
  *
  * @param array $attributes
  */
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
     $this->setAttribute('value', 0);
     $this->setValueIfAttributeExists('SCRIPT', 1);
     $this->setValueIfAttributeExists('ACCOUNTDISABLE', 2);
     $this->setValueIfAttributeExists('HOMEDIR_REQUIRED', 8);
     $this->setValueIfAttributeExists('LOCKOUT', 16);
     $this->setValueIfAttributeExists('PASSWD_NOTREQD', 32);
     $this->setValueIfAttributeExists('ENCRYPTED_TEXT_PWD_ALLOWED', 128);
     $this->setValueIfAttributeExists('TEMP_DUPLICATE_ACCOUNT', 256);
     $this->setValueIfAttributeExists('NORMAL_ACCOUNT', 512);
     $this->setValueIfAttributeExists('INTERDOMAIN_TRUST_ACCOUNT', 2048);
     $this->setValueIfAttributeExists('WORKSTATION_TRUST_ACCOUNT', 4096);
     $this->setValueIfAttributeExists('SERVER_TRUST_ACCOUNT', 8192);
     $this->setValueIfAttributeExists('DONT_EXPIRE_PASSWORD', 65536);
     $this->setValueIfAttributeExists('MNS_LOGON_ACCOUNT', 131072);
     $this->setValueIfAttributeExists('SMARTCARD_REQUIRED', 262144);
     $this->setValueIfAttributeExists('TRUSTED_FOR_DELEGATION', 524288);
     $this->setValueIfAttributeExists('NOT_DELEGATED', 1048576);
     $this->setValueIfAttributeExists('USE_DES_KEY_ONLY', 2097152);
     $this->setValueIfAttributeExists('DONT_REQ_PREAUTH', 4194304);
     $this->setValueIfAttributeExists('PASSWORD_EXPIRED', 8388608);
     $this->setValueIfAttributeExists('TRUSTED_TO_AUTH_FOR_DELEGATION', 16777216);
 }
 public function __construct($array = null, $success = true)
 {
     parent::__construct($array, $success);
     $this->authenticated = false;
     $this->verified = false;
     $this->ibssoToken = '';
 }
Пример #9
0
 public function toArray()
 {
     uksort($this->operations, function ($a, $b) {
         return array_search($a, self::$methods) - array_search($b, self::$methods);
     });
     return self::array_filter_null(array_merge(self::array_toArray($this->operations), parent::toArray()));
 }
Пример #10
0
 /** Associate view with a model. Different models may behave differently. */
 function setModel($model, $actual_fields = undefined)
 {
     parent::setModel($model);
     // Some models will want default controller to be associated
     if ($this->model->default_controller) {
         $this->controller = $this->model->setController($this->model->default_controller);
     }
     // Use our default controller if present
     if ($this->default_controller) {
         $this->controller = $this->setController($this->default_controller);
     }
     if ($this->controller) {
         if ($this->controller->hasMethod('setActualFields')) {
             $this->controller->setActualFields($actual_fields);
         }
         if ($this->controller->hasMethod('_bindView')) {
             $this->controller->_bindView();
         }
     }
     if ($this->model instanceof Model_Table) {
         $this->dq = $this->model->_dsql();
     }
     // compatibility
     return $this->model;
 }
    public function __construct() {
        parent::__construct();
        $parameters = $this->initiateParameters();
        $this->checkParameters($parameters);

        $this->parameters = $parameters;
    }
Пример #12
0
 function __clone()
 {
     parent::__clone();
     if ($this->model) {
         $this->model = clone $this->model;
     }
 }
Пример #13
0
 /**
  * Constructor.
  *
  * @param array $attributes
  */
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
     $this->setAttribute('value', 0);
     $this->setValueIfAttributeExists('SCRIPT', 1);
     $this->setValueIfAttributeExists('ACCOUNTDISABLE', 2);
     $this->setValueIfAttributeExists('HOMEDIR_REQUIRED', 8);
     $this->setValueIfAttributeExists('LOCKOUT', 16);
     $this->setValueIfAttributeExists('PASSWD_NOTREQD', 32);
     //PASSWD_CANT_CHANGE Note You cannot assign this permission by directly modifying the UserAccountControl attribute.
     //For information about how to set the permission programmatically, see the "Property flag descriptions" section.
     $this->setValueIfAttributeExists('ENCRYPTED_TEXT_PWD_ALLOWED', 128);
     $this->setValueIfAttributeExists('TEMP_DUPLICATE_ACCOUNT', 256);
     $this->setValueIfAttributeExists('NORMAL_ACCOUNT', 512);
     $this->setValueIfAttributeExists('INTERDOMAIN_TRUST_ACCOUNT', 2048);
     $this->setValueIfAttributeExists('WORKSTATION_TRUST_ACCOUNT', 4096);
     $this->setValueIfAttributeExists('SERVER_TRUST_ACCOUNT', 8192);
     $this->setValueIfAttributeExists('DONT_EXPIRE_PASSWORD', 65536);
     $this->setValueIfAttributeExists('MNS_LOGON_ACCOUNT', 131072);
     $this->setValueIfAttributeExists('SMARTCARD_REQUIRED', 262144);
     $this->setValueIfAttributeExists('TRUSTED_FOR_DELEGATION', 524288);
     $this->setValueIfAttributeExists('NOT_DELEGATED', 1048576);
     $this->setValueIfAttributeExists('USE_DES_KEY_ONLY', 2097152);
     $this->setValueIfAttributeExists('DONT_REQ_PREAUTH', 4194304);
     $this->setValueIfAttributeExists('PASSWORD_EXPIRED', 8388608);
     $this->setValueIfAttributeExists('TRUSTED_TO_AUTH_FOR_DELEGATION', 16777216);
 }
 public function __construct($select, $from, $where, $groupBy, $having) {
     parent::__construct();
     $this->select = $select;
     $this->from = $from;
     $this->where = $where;
     $this->groupBy = $groupBy;
     $this->having = $having;
 }
Пример #15
0
 public function __construct(array $data = NULL, $keyColumnNames = NULL, $columnPrefix = NULL, $columnSuffix = NULL)
 {
     parent::__construct();
     $this->keyColumnNames = ArrayHelper::toArray($keyColumnNames);
     $this->columnPrefix = $columnPrefix;
     $this->columnSuffix = $columnSuffix;
     $this->data = $data;
 }
Пример #16
0
 public function __construct(DateTime $datetime)
 {
     parent::__construct();
     if ($datetime === FALSE) {
         throw new IllegalArgumentException(t('Invalid date and/or time value'));
     }
     $this->datetime = $datetime;
 }
Пример #17
0
 public function __clone()
 {
     parent::__clone();
     $this->cachedPropertyNameMappings = ArrayHelper::cloneArray($this->cachedPropertyNameMappings);
     if (isset($this->parent)) {
         $this->parent = clone $this->parent;
     }
 }
Пример #18
0
 public function __get($name)
 {
     switch ($name) {
         case 'name':
             return $this->description;
     }
     return parent::__get($name);
 }
Пример #19
0
 /**
  * Retrieve text to display
  * @return string
  */
 public function getTextToDisplay()
 {
     $text = parent::getTextToDisplay();
     if (substr($text, 0, 1) != '*' && substr($text, -1) != '*') {
         return '*' . $text . '*';
     }
     return $text;
 }
Пример #20
0
 public function __construct($attributes_)
 {
     parent::__construct($attributes_);
     if (!$this->is_valid()) {
         return;
     }
     $this->id = $attributes_['id'];
     $this->status = $attributes_['status'];
 }
Пример #21
0
 public function __construct($prefix, CacheHandler $handler, $allowCopyInLocalCache)
 {
     parent::__construct();
     $this->prefix = $prefix;
     $this->handler = $handler;
     if ($allowCopyInLocalCache) {
         $this->localCacheHandler = new InMemoryCacheHandler($prefix);
     }
 }
    public function __clone() {
        parent::__clone();

        $this->formattedColumnNames = ArrayHelper::copy($this->formattedColumnNames);

        if (isset($this->parent)) {
            $this->parent = clone $this->parent;
        }
    }
Пример #23
0
 /** Duplicate view and it's template. Will not duplicate children */
 function __clone()
 {
     parent::__clone();
     if ($this->template) {
         $this->template = clone $this->template;
     }
     if ($this->controller) {
         $this->controller = clone $this->controller;
     }
 }
Пример #24
0
 public function __construct($attributes_)
 {
     parent::__construct($attributes_);
     if (!$this->is_valid()) {
         return;
     }
     $this->id = $attributes_['id'];
     $this->name = $attributes_['name'];
     $this->description = $attributes_['description'];
     $this->published = $attributes_['published'];
 }
Пример #25
0
 public function __construct($attributes_)
 {
     parent::__construct($attributes_);
     if (!$this->is_valid()) {
         return;
     }
     $this->id = $attributes_['id'];
     $this->title = $attributes_['title'];
     $this->content = $attributes_['content'];
     $this->timestamp = $attributes_['timestamp'];
 }
Пример #26
0
 public function __construct($attributes_)
 {
     parent::__construct($attributes_);
     if (!$this->is_valid()) {
         return;
     }
     $this->id = $attributes_['id'];
     $this->name = $attributes_['name'];
     $this->type = $attributes_['type'];
     $this->os = $attributes_['os'];
     $this->data = $attributes_['data'];
 }
Пример #27
0
 public function __construct($attributes_)
 {
     parent::__construct($attributes_);
     if (!$this->is_valid()) {
         return;
     }
     $this->id = $attributes_['id'];
     $this->type = $attributes_['type'];
     $this->t_begin = $attributes_['t_begin'];
     $this->t_end = $attributes_['t_end'];
     $this->server = $attributes_['server'];
     $this->status = $attributes_['status'];
 }
Пример #28
0
 function init()
 {
     parent::init();
     $m = $this->results = $this->add('Model');
     $m->addField('name');
     $m->addField('is_success')->type('boolean');
     $m->addField('exception')->type('object');
     $m->addField('time')->type('float');
     $m->addField('memory')->type('int');
     $m->addField('ticks')->type('int');
     $m->addField('result')->type('object');
     $m->addfield('debug')->type('text');
     $a = array();
     $m->setSource('Array', $a);
 }
    public function __construct(
            $datatype, $isVisible = TRUE, $parentDataType = NULL,
            $isParentShownOnSelect = FALSE, $isAutomaticallyExpanded = FALSE,
            $isKeyCompatible = FALSE, $isFormulaExpressionCompatible = FALSE) {
        parent::__construct();

        $this->datatype = $datatype;
        $this->isVisible = $isVisible;

        $this->parentDataType = $parentDataType;
        $this->isParentShownOnSelect = $isParentShownOnSelect;
        $this->isAutomaticallyExpanded = $isAutomaticallyExpanded;

        $this->isKeyCompatible = $isKeyCompatible;
        $this->isFormulaExpressionCompatible = $isFormulaExpressionCompatible;
    }
Пример #30
0
 /**
  * Set model
  *
  * @param Model|string $model
  * @param string|bool $display_field
  *
  * @return Model|$this
  */
 public function setModel($model, $display_field = null)
 {
     if ($model instanceof Model) {
         return AbstractObject::setModel($model);
     }
     $this->model_name = is_string($model) ? $model : get_class($model);
     $this->model_name = (string) $this->app->normalizeClassName($this->model_name, 'Model');
     if ($display_field) {
         $this->display_field = (string) $display_field;
     }
     if ($display_field !== false) {
         $this->owner->addExpression($this->getDereferenced())->set(array($this, 'calculateSubQuery'))->caption((string) $this->caption());
     }
     $this->system(true);
     $this->editable(true);
     $this->visible(false);
     return $this;
 }