Exemple #1
0
 function testCallUndefinedMethod()
 {
     $obj = new TBase();
     try {
         $obj->noMethod();
     } catch (Exception $e) {
         $this->assertEquals("TException", get_class($e));
     }
 }
 public function eliminar()
 {
     if ($this->getId() == '') {
         return false;
     }
     $db = TBase::conectaDB();
     return $db->Execute("delete from departamento where idDepartamento = " . $this->getId()) ? true : false;
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'start', 'type' => \TType::STRING), 2 => array('var' => 'finish', 'type' => \TType::STRING), 3 => array('var' => 'reversed', 'type' => \TType::BOOL), 4 => array('var' => 'count', 'type' => \TType::I32));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'keyspace', 'type' => \TType::STRING), 2 => array('var' => 'name', 'type' => \TType::STRING), 3 => array('var' => 'column_type', 'type' => \TType::STRING), 5 => array('var' => 'comparator_type', 'type' => \TType::STRING), 6 => array('var' => 'subcomparator_type', 'type' => \TType::STRING), 8 => array('var' => 'comment', 'type' => \TType::STRING), 12 => array('var' => 'read_repair_chance', 'type' => \TType::DOUBLE), 13 => array('var' => 'column_metadata', 'type' => \TType::LST, 'etype' => \TType::STRUCT, 'elem' => array('type' => \TType::STRUCT, 'class' => '\\cassandra\\ColumnDef')), 14 => array('var' => 'gc_grace_seconds', 'type' => \TType::I32), 15 => array('var' => 'default_validation_class', 'type' => \TType::STRING), 16 => array('var' => 'id', 'type' => \TType::I32), 17 => array('var' => 'min_compaction_threshold', 'type' => \TType::I32), 18 => array('var' => 'max_compaction_threshold', 'type' => \TType::I32), 24 => array('var' => 'replicate_on_write', 'type' => \TType::BOOL), 26 => array('var' => 'key_validation_class', 'type' => \TType::STRING), 28 => array('var' => 'key_alias', 'type' => \TType::STRING), 29 => array('var' => 'compaction_strategy', 'type' => \TType::STRING), 30 => array('var' => 'compaction_strategy_options', 'type' => \TType::MAP, 'ktype' => \TType::STRING, 'vtype' => \TType::STRING, 'key' => array('type' => \TType::STRING), 'val' => array('type' => \TType::STRING)), 32 => array('var' => 'compression_options', 'type' => \TType::MAP, 'ktype' => \TType::STRING, 'vtype' => \TType::STRING, 'key' => array('type' => \TType::STRING), 'val' => array('type' => \TType::STRING)), 33 => array('var' => 'bloom_filter_fp_chance', 'type' => \TType::DOUBLE), 34 => array('var' => 'caching', 'type' => \TType::STRING), 37 => array('var' => 'dclocal_read_repair_chance', 'type' => \TType::DOUBLE), 9 => array('var' => 'row_cache_size', 'type' => \TType::DOUBLE), 11 => array('var' => 'key_cache_size', 'type' => \TType::DOUBLE), 19 => array('var' => 'row_cache_save_period_in_seconds', 'type' => \TType::I32), 20 => array('var' => 'key_cache_save_period_in_seconds', 'type' => \TType::I32), 21 => array('var' => 'memtable_flush_after_mins', 'type' => \TType::I32), 22 => array('var' => 'memtable_throughput_in_mb', 'type' => \TType::I32), 23 => array('var' => 'memtable_operations_in_millions', 'type' => \TType::DOUBLE), 25 => array('var' => 'merge_shards_chance', 'type' => \TType::DOUBLE), 27 => array('var' => 'row_cache_provider', 'type' => \TType::STRING), 31 => array('var' => 'row_cache_keys_to_save', 'type' => \TType::I32));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'host', 'type' => \TType::STRING), 2 => array('var' => 'datacenter', 'type' => \TType::STRING), 3 => array('var' => 'rack', 'type' => \TType::STRING));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'column_or_supercolumn', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\ColumnOrSuperColumn'), 2 => array('var' => 'deletion', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\Deletion'));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'key', 'type' => \TType::STRING), 2 => array('var' => 'column_path', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\ColumnPath'), 3 => array('var' => 'consistency_level', 'type' => \TType::I32));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'svn_commit_id', 'type' => TType::STRING), 2 => array('var' => 'svn_dirty', 'type' => TType::STRING), 3 => array('var' => 'git_commit_id', 'type' => TType::STRING), 4 => array('var' => 'git_dirty', 'type' => TType::STRING), 5 => array('var' => 'git_tag', 'type' => TType::STRING), 6 => array('var' => 'build_time', 'type' => TType::STRING), 7 => array('var' => 'build_host', 'type' => TType::STRING), 8 => array('var' => 'build_user', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'cf_def', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\CfDef'));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'ire', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\InvalidRequestException'), 2 => array('var' => 'ue', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\UnavailableException'), 3 => array('var' => 'te', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\TimedOutException'));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(0 => array('var' => 'success', 'type' => \TType::MAP, 'ktype' => \TType::STRING, 'vtype' => \TType::LST, 'key' => array('type' => \TType::STRING), 'val' => array('type' => \TType::LST, 'etype' => \TType::STRUCT, 'elem' => array('type' => \TType::STRUCT, 'class' => '\\cassandra\\ColumnOrSuperColumn'))), 1 => array('var' => 'ire', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\InvalidRequestException'), 2 => array('var' => 'ue', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\UnavailableException'), 3 => array('var' => 'te', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\TimedOutException'));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'itemId', 'type' => \TType::I32), 2 => array('var' => 'count', 'type' => \TType::I32), 3 => array('var' => 'variable_types', 'type' => \TType::LST, 'etype' => \TType::STRING, 'elem' => array('type' => \TType::STRING)));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(0 => array('var' => 'success', 'type' => \TType::LST, 'etype' => \TType::STRING, 'elem' => array('type' => \TType::STRING)), 1 => array('var' => 'ire', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\InvalidRequestException'));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'query', 'type' => \TType::STRING), 2 => array('var' => 'compression', 'type' => \TType::I32));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'name', 'type' => \TType::STRING), 2 => array('var' => 'strategy_class', 'type' => \TType::STRING), 3 => array('var' => 'strategy_options', 'type' => \TType::MAP, 'ktype' => \TType::STRING, 'vtype' => \TType::STRING, 'key' => array('type' => \TType::STRING), 'val' => array('type' => \TType::STRING)), 4 => array('var' => 'replication_factor', 'type' => \TType::I32), 5 => array('var' => 'cf_defs', 'type' => \TType::LST, 'etype' => \TType::STRUCT, 'elem' => array('type' => \TType::STRUCT, 'class' => '\\cassandra\\CfDef')), 6 => array('var' => 'durable_writes', 'type' => \TType::BOOL));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'start_token', 'type' => \TType::STRING), 2 => array('var' => 'end_token', 'type' => \TType::STRING), 3 => array('var' => 'endpoints', 'type' => \TType::LST, 'etype' => \TType::STRING, 'elem' => array('type' => \TType::STRING)), 4 => array('var' => 'rpc_endpoints', 'type' => \TType::LST, 'etype' => \TType::STRING, 'elem' => array('type' => \TType::STRING)), 5 => array('var' => 'endpoint_details', 'type' => \TType::LST, 'etype' => \TType::STRUCT, 'elem' => array('type' => \TType::STRUCT, 'class' => '\\cassandra\\EndpointDetails')));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'mutation_map', 'type' => \TType::MAP, 'ktype' => \TType::STRING, 'vtype' => \TType::MAP, 'key' => array('type' => \TType::STRING), 'val' => array('type' => \TType::MAP, 'ktype' => \TType::STRING, 'vtype' => \TType::LST, 'key' => array('type' => \TType::STRING), 'val' => array('type' => \TType::LST, 'etype' => \TType::STRUCT, 'elem' => array('type' => \TType::STRUCT, 'class' => '\\cassandra\\Mutation')))), 2 => array('var' => 'consistency_level', 'type' => \TType::I32));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'timestamp', 'type' => \TType::I64), 2 => array('var' => 'super_column', 'type' => \TType::STRING), 3 => array('var' => 'predicate', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\SlicePredicate'));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'auth_request', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\AuthenticationRequest'));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'credentials', 'type' => \TType::MAP, 'ktype' => \TType::STRING, 'vtype' => \TType::STRING, 'key' => array('type' => \TType::STRING), 'val' => array('type' => \TType::STRING)));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'name', 'type' => \TType::STRING), 2 => array('var' => 'validation_class', 'type' => \TType::STRING), 3 => array('var' => 'index_type', 'type' => \TType::I32), 4 => array('var' => 'index_name', 'type' => \TType::STRING), 5 => array('var' => 'index_options', 'type' => \TType::MAP, 'ktype' => \TType::STRING, 'vtype' => \TType::STRING, 'key' => array('type' => \TType::STRING), 'val' => array('type' => \TType::STRING)));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'name_types', 'type' => \TType::MAP, 'ktype' => \TType::STRING, 'vtype' => \TType::STRING, 'key' => array('type' => \TType::STRING), 'val' => array('type' => \TType::STRING)), 2 => array('var' => 'value_types', 'type' => \TType::MAP, 'ktype' => \TType::STRING, 'vtype' => \TType::STRING, 'key' => array('type' => \TType::STRING), 'val' => array('type' => \TType::STRING)), 3 => array('var' => 'default_name_type', 'type' => \TType::STRING), 4 => array('var' => 'default_value_type', 'type' => \TType::STRING));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'cfName', 'type' => \TType::STRING), 2 => array('var' => 'start_token', 'type' => \TType::STRING), 3 => array('var' => 'end_token', 'type' => \TType::STRING), 4 => array('var' => 'keys_per_split', 'type' => \TType::I32));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'type', 'type' => \TType::I32), 2 => array('var' => 'rows', 'type' => \TType::LST, 'etype' => \TType::STRUCT, 'elem' => array('type' => \TType::STRUCT, 'class' => '\\cassandra\\CqlRow')), 3 => array('var' => 'num', 'type' => \TType::I32), 4 => array('var' => 'schema', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\CqlMetadata'));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'expressions', 'type' => \TType::LST, 'etype' => \TType::STRUCT, 'elem' => array('type' => \TType::STRUCT, 'class' => '\\cassandra\\IndexExpression')), 2 => array('var' => 'start_key', 'type' => \TType::STRING), 3 => array('var' => 'count', 'type' => \TType::I32));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'name', 'type' => \TType::STRING), 2 => array('var' => 'columns', 'type' => \TType::LST, 'etype' => \TType::STRUCT, 'elem' => array('type' => \TType::STRUCT, 'class' => '\\cassandra\\Column')));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'name', 'type' => \TType::STRING), 2 => array('var' => 'value', 'type' => \TType::I64));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'column_family', 'type' => \TType::STRING));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'column_parent', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\ColumnParent'), 2 => array('var' => 'predicate', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\SlicePredicate'), 3 => array('var' => 'range', 'type' => \TType::STRUCT, 'class' => '\\cassandra\\KeyRange'), 4 => array('var' => 'consistency_level', 'type' => \TType::I32));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }
Exemple #30
0
 public function guardar()
 {
     if (!parent::guardar()) {
         return false;
     }
     $db = TBase::conectaDB();
     $rs = $db->Execute("select idItem from servicio where idItem = " . $this->getId());
     if ($rs->EOF) {
         $rs = $db->Execute("INSERT INTO servicio (idItem, precio, impInc, imp) VALUES (" . $this->getId() . ", 0, 'S', 0)");
     }
     $rs = $db->Execute("UPDATE servicio\n\t\t\tSET\n\t\t\t\tprecio = " . $this->getPrecio() . ",\n\t\t\t\timpInc = '" . $this->impInc . "',\n\t\t\t\timp = " . $this->getImpuesto() . "\n\t\t\tWHERE idItem = " . $this->getId());
     return $rs ? true : false;
 }