Documentation

Markers

Table of Contents

_tests/test-cachefile.php 1
_tests/testdb.php 3
_tests/testjwt.php 9
config.php 52
Core/autoload.php 1
Core/Cache/CFileCache.class.php 9
Core/Cache/config.php 2
Core/Cache/CRedisCache.class.php 6
Core/Cache/redis-config.php 1
Core/DBMS/CDBMS.class.php 11
Core/DBMS/CMySqlComposer.class.php 20
Core/DBMS/CMySqlDB.class.php 19
Core/DBMS/CSqlComposerBase.class.php 3
Core/Logger/CLogger.class.php 3
Core/Request/CRequest.class.php 20
Core/Response/CResponse.class.php 5
Core/User/CUser.class.php 39
Modules/Base/CBaseController.class.php 54
Modules/Base/CBaseModel.class.php 28
Modules/Base/config.php 2
Modules/Example/CExampleController.class.php 12
Modules/Example/CExampleModel.class.php 11
Modules/Page/CPageController.class.php 2
Modules/Page/CPageModel.class.php 2
www/rest-api/index.php 23
vendor/autoload.php 1
vendor/composer/autoload_classmap.php 1
vendor/composer/autoload_namespaces.php 1
vendor/composer/autoload_psr4.php 1
vendor/composer/autoload_real.php 1
vendor/composer/autoload_static.php 1
vendor/composer/ClassLoader.php 21
vendor/composer/platform_check.php 1
vendor/firebase/php-jwt/src/JWK.php 7
vendor/firebase/php-jwt/src/JWT.php 28
vendor/predis/predis/examples/custom_cluster_distributor.php 3
vendor/predis/predis/examples/debuggable_connection.php 4
vendor/predis/predis/examples/dispatcher_loop.php 18
vendor/predis/predis/examples/executing_redis_commands.php 7
vendor/predis/predis/examples/key_prefixing.php 4
vendor/predis/predis/examples/lua_scripting_abstraction.php 8
vendor/predis/predis/examples/monitor_consumer.php 9
vendor/predis/predis/examples/pipelining_commands.php 3
vendor/predis/predis/examples/pubsub_consumer.php 13
vendor/predis/predis/examples/redis_collections_iterators.php 17
vendor/predis/predis/examples/replication_complex.php 16
vendor/predis/predis/examples/replication_sentinel.php 18
vendor/predis/predis/examples/replication_simple.php 13
vendor/predis/predis/examples/session_handler.php 14
vendor/predis/predis/examples/transaction_using_cas.php 14
vendor/predis/predis/src/Cluster/Distributor/HashRing.php 8
vendor/predis/predis/src/Cluster/Distributor/KetamaRing.php 2
vendor/predis/predis/src/Cluster/Hash/CRC16.php 1
vendor/predis/predis/src/Collection/Iterator/CursorBasedIterator.php 1
vendor/predis/predis/src/Collection/Iterator/HashKey.php 1
vendor/predis/predis/src/Collection/Iterator/Keyspace.php 1
vendor/predis/predis/src/Collection/Iterator/ListKey.php 1
vendor/predis/predis/src/Collection/Iterator/SetKey.php 1
vendor/predis/predis/src/Collection/Iterator/SortedSetKey.php 1
vendor/predis/predis/src/Command/ConnectionAuth.php 1
vendor/predis/predis/src/Command/ConnectionEcho.php 1
vendor/predis/predis/src/Command/ConnectionPing.php 1
vendor/predis/predis/src/Command/ConnectionQuit.php 1
vendor/predis/predis/src/Command/ConnectionSelect.php 1
vendor/predis/predis/src/Command/GeospatialGeoAdd.php 1
vendor/predis/predis/src/Command/GeospatialGeoDist.php 1
vendor/predis/predis/src/Command/GeospatialGeoHash.php 1
vendor/predis/predis/src/Command/GeospatialGeoPos.php 1
vendor/predis/predis/src/Command/GeospatialGeoRadius.php 1
vendor/predis/predis/src/Command/GeospatialGeoRadiusByMember.php 1
vendor/predis/predis/src/Command/HashDelete.php 1
vendor/predis/predis/src/Command/HashExists.php 1
vendor/predis/predis/src/Command/HashGet.php 1
vendor/predis/predis/src/Command/HashGetAll.php 1
vendor/predis/predis/src/Command/HashGetMultiple.php 1
vendor/predis/predis/src/Command/HashIncrementBy.php 1
vendor/predis/predis/src/Command/HashIncrementByFloat.php 1
vendor/predis/predis/src/Command/HashKeys.php 1
vendor/predis/predis/src/Command/HashLength.php 1
vendor/predis/predis/src/Command/HashScan.php 1
vendor/predis/predis/src/Command/HashSet.php 1
vendor/predis/predis/src/Command/HashSetMultiple.php 1
vendor/predis/predis/src/Command/HashSetPreserve.php 1
vendor/predis/predis/src/Command/HashStringLength.php 1
vendor/predis/predis/src/Command/HashValues.php 1
vendor/predis/predis/src/Command/HyperLogLogAdd.php 1
vendor/predis/predis/src/Command/HyperLogLogCount.php 1
vendor/predis/predis/src/Command/HyperLogLogMerge.php 1
vendor/predis/predis/src/Command/KeyDelete.php 1
vendor/predis/predis/src/Command/KeyDump.php 1
vendor/predis/predis/src/Command/KeyExists.php 1
vendor/predis/predis/src/Command/KeyExpire.php 1
vendor/predis/predis/src/Command/KeyExpireAt.php 1
vendor/predis/predis/src/Command/KeyKeys.php 1
vendor/predis/predis/src/Command/KeyMigrate.php 1
vendor/predis/predis/src/Command/KeyMove.php 1
vendor/predis/predis/src/Command/KeyPersist.php 1
vendor/predis/predis/src/Command/KeyPreciseExpire.php 1
vendor/predis/predis/src/Command/KeyPreciseExpireAt.php 1
vendor/predis/predis/src/Command/KeyPreciseTimeToLive.php 1
vendor/predis/predis/src/Command/KeyRandom.php 1
vendor/predis/predis/src/Command/KeyRename.php 1
vendor/predis/predis/src/Command/KeyRenamePreserve.php 1
vendor/predis/predis/src/Command/KeyRestore.php 1
vendor/predis/predis/src/Command/KeyScan.php 1
vendor/predis/predis/src/Command/KeySort.php 1
vendor/predis/predis/src/Command/KeyTimeToLive.php 1
vendor/predis/predis/src/Command/KeyType.php 1
vendor/predis/predis/src/Command/ListIndex.php 1
vendor/predis/predis/src/Command/ListInsert.php 1
vendor/predis/predis/src/Command/ListLength.php 1
vendor/predis/predis/src/Command/ListPopFirst.php 1
vendor/predis/predis/src/Command/ListPopFirstBlocking.php 1
vendor/predis/predis/src/Command/ListPopLast.php 1
vendor/predis/predis/src/Command/ListPopLastBlocking.php 1
vendor/predis/predis/src/Command/ListPopLastPushHead.php 1
vendor/predis/predis/src/Command/ListPopLastPushHeadBlocking.php 1
vendor/predis/predis/src/Command/ListPushHead.php 1
vendor/predis/predis/src/Command/ListPushHeadX.php 1
vendor/predis/predis/src/Command/ListPushTail.php 1
vendor/predis/predis/src/Command/ListPushTailX.php 1
vendor/predis/predis/src/Command/ListRange.php 1
vendor/predis/predis/src/Command/ListRemove.php 1
vendor/predis/predis/src/Command/ListSet.php 1
vendor/predis/predis/src/Command/ListTrim.php 1
vendor/predis/predis/src/Command/PubSubPublish.php 1
vendor/predis/predis/src/Command/PubSubPubsub.php 1
vendor/predis/predis/src/Command/PubSubSubscribe.php 1
vendor/predis/predis/src/Command/PubSubSubscribeByPattern.php 1
vendor/predis/predis/src/Command/PubSubUnsubscribe.php 1
vendor/predis/predis/src/Command/PubSubUnsubscribeByPattern.php 1
vendor/predis/predis/src/Command/ScriptCommand.php 1
vendor/predis/predis/src/Command/ServerBackgroundRewriteAOF.php 1
vendor/predis/predis/src/Command/ServerBackgroundSave.php 1
vendor/predis/predis/src/Command/ServerClient.php 4
vendor/predis/predis/src/Command/ServerCommand.php 1
vendor/predis/predis/src/Command/ServerConfig.php 4
vendor/predis/predis/src/Command/ServerDatabaseSize.php 1
vendor/predis/predis/src/Command/ServerEval.php 1
vendor/predis/predis/src/Command/ServerEvalSHA.php 1
vendor/predis/predis/src/Command/ServerFlushAll.php 1
vendor/predis/predis/src/Command/ServerFlushDatabase.php 1
vendor/predis/predis/src/Command/ServerInfo.php 2
vendor/predis/predis/src/Command/ServerInfoV26x.php 1
vendor/predis/predis/src/Command/ServerLastSave.php 1
vendor/predis/predis/src/Command/ServerMonitor.php 1
vendor/predis/predis/src/Command/ServerObject.php 1
vendor/predis/predis/src/Command/ServerSave.php 1
vendor/predis/predis/src/Command/ServerScript.php 1
vendor/predis/predis/src/Command/ServerSentinel.php 1
vendor/predis/predis/src/Command/ServerShutdown.php 1
vendor/predis/predis/src/Command/ServerSlaveOf.php 1
vendor/predis/predis/src/Command/ServerSlowlog.php 1
vendor/predis/predis/src/Command/ServerTime.php 1
vendor/predis/predis/src/Command/SetAdd.php 1
vendor/predis/predis/src/Command/SetCardinality.php 1
vendor/predis/predis/src/Command/SetDifference.php 1
vendor/predis/predis/src/Command/SetDifferenceStore.php 1
vendor/predis/predis/src/Command/SetIntersection.php 1
vendor/predis/predis/src/Command/SetIntersectionStore.php 1
vendor/predis/predis/src/Command/SetIsMember.php 1
vendor/predis/predis/src/Command/SetMembers.php 1
vendor/predis/predis/src/Command/SetMove.php 1
vendor/predis/predis/src/Command/SetPop.php 1
vendor/predis/predis/src/Command/SetRandomMember.php 1
vendor/predis/predis/src/Command/SetRemove.php 1
vendor/predis/predis/src/Command/SetScan.php 1
vendor/predis/predis/src/Command/SetUnion.php 1
vendor/predis/predis/src/Command/SetUnionStore.php 1
vendor/predis/predis/src/Command/StringAppend.php 1
vendor/predis/predis/src/Command/StringBitCount.php 1
vendor/predis/predis/src/Command/StringBitField.php 1
vendor/predis/predis/src/Command/StringBitOp.php 1
vendor/predis/predis/src/Command/StringBitPos.php 1
vendor/predis/predis/src/Command/StringDecrement.php 1
vendor/predis/predis/src/Command/StringDecrementBy.php 1
vendor/predis/predis/src/Command/StringGet.php 1
vendor/predis/predis/src/Command/StringGetBit.php 1
vendor/predis/predis/src/Command/StringGetMultiple.php 1
vendor/predis/predis/src/Command/StringGetRange.php 1
vendor/predis/predis/src/Command/StringGetSet.php 1
vendor/predis/predis/src/Command/StringIncrement.php 1
vendor/predis/predis/src/Command/StringIncrementBy.php 1
vendor/predis/predis/src/Command/StringIncrementByFloat.php 1
vendor/predis/predis/src/Command/StringPreciseSetExpire.php 1
vendor/predis/predis/src/Command/StringSet.php 1
vendor/predis/predis/src/Command/StringSetBit.php 1
vendor/predis/predis/src/Command/StringSetExpire.php 1
vendor/predis/predis/src/Command/StringSetMultiple.php 1
vendor/predis/predis/src/Command/StringSetMultiplePreserve.php 1
vendor/predis/predis/src/Command/StringSetPreserve.php 1
vendor/predis/predis/src/Command/StringSetRange.php 1
vendor/predis/predis/src/Command/StringStrlen.php 1
vendor/predis/predis/src/Command/StringSubstr.php 1
vendor/predis/predis/src/Command/TransactionDiscard.php 1
vendor/predis/predis/src/Command/TransactionExec.php 1
vendor/predis/predis/src/Command/TransactionMulti.php 1
vendor/predis/predis/src/Command/TransactionUnwatch.php 1
vendor/predis/predis/src/Command/TransactionWatch.php 1
vendor/predis/predis/src/Command/ZSetAdd.php 1
vendor/predis/predis/src/Command/ZSetCardinality.php 1
vendor/predis/predis/src/Command/ZSetCount.php 1
vendor/predis/predis/src/Command/ZSetIncrementBy.php 1
vendor/predis/predis/src/Command/ZSetIntersectionStore.php 1
vendor/predis/predis/src/Command/ZSetLexCount.php 1
vendor/predis/predis/src/Command/ZSetRange.php 2
vendor/predis/predis/src/Command/ZSetRangeByLex.php 1
vendor/predis/predis/src/Command/ZSetRangeByScore.php 1
vendor/predis/predis/src/Command/ZSetRank.php 1
vendor/predis/predis/src/Command/ZSetRemove.php 1
vendor/predis/predis/src/Command/ZSetRemoveRangeByLex.php 1
vendor/predis/predis/src/Command/ZSetRemoveRangeByRank.php 1
vendor/predis/predis/src/Command/ZSetRemoveRangeByScore.php 1
vendor/predis/predis/src/Command/ZSetReverseRange.php 1
vendor/predis/predis/src/Command/ZSetReverseRangeByLex.php 1
vendor/predis/predis/src/Command/ZSetReverseRangeByScore.php 1
vendor/predis/predis/src/Command/ZSetReverseRank.php 1
vendor/predis/predis/src/Command/ZSetScan.php 1
vendor/predis/predis/src/Command/ZSetScore.php 1
vendor/predis/predis/src/Command/ZSetUnionStore.php 1
vendor/predis/predis/src/Configuration/PrefixOption.php 1
vendor/predis/predis/src/Configuration/ProfileOption.php 4
vendor/predis/predis/src/Configuration/ReplicationOption.php 2
vendor/predis/predis/src/Connection/AbstractConnection.php 2
vendor/predis/predis/src/Connection/Aggregate/MasterSlaveReplication.php 6
vendor/predis/predis/src/Connection/Aggregate/PredisCluster.php 1
vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php 2
vendor/predis/predis/src/Connection/Aggregate/SentinelReplication.php 9
vendor/predis/predis/src/Connection/Parameters.php 6
vendor/predis/predis/src/Connection/PhpiredisSocketConnection.php 1
vendor/predis/predis/src/Connection/PhpiredisStreamConnection.php 1
vendor/predis/predis/src/Connection/StreamConnection.php 5
vendor/predis/predis/src/Connection/WebdisConnection.php 6
vendor/predis/predis/src/Monitor/Consumer.php 3
vendor/predis/predis/src/Pipeline/Atomic.php 1
vendor/predis/predis/src/Pipeline/ConnectionErrorProof.php 1
vendor/predis/predis/src/Pipeline/Pipeline.php 1
vendor/predis/predis/src/Profile/Factory.php 1
vendor/predis/predis/src/Profile/RedisUnstable.php 1
vendor/predis/predis/src/Protocol/Text/CompositeProtocolProcessor.php 1
vendor/predis/predis/src/Protocol/Text/Handler/BulkResponse.php 1
vendor/predis/predis/src/Protocol/Text/Handler/ErrorResponse.php 1
vendor/predis/predis/src/Protocol/Text/Handler/IntegerResponse.php 1
vendor/predis/predis/src/Protocol/Text/Handler/MultiBulkResponse.php 1
vendor/predis/predis/src/Protocol/Text/Handler/StatusResponse.php 1
vendor/predis/predis/src/Protocol/Text/Handler/StreamableMultiBulkResponse.php 1
vendor/predis/predis/src/Protocol/Text/ProtocolProcessor.php 1
vendor/predis/predis/src/Protocol/Text/RequestSerializer.php 1
vendor/predis/predis/src/Protocol/Text/ResponseReader.php 1
vendor/predis/predis/src/PubSub/AbstractConsumer.php 5
vendor/predis/predis/src/PubSub/Consumer.php 3
vendor/predis/predis/src/Response/Iterator/MultiBulkIterator.php 1
vendor/predis/predis/src/Session/Handler.php 3
vendor/predis/predis/src/Transaction/MultiExec.php 5
vendor/predis/predis/src/Transaction/MultiExecState.php 5

test-cachefile.php

Type Line Description
38 delete all file of Cache

testdb.php

Type Line Description
3 Autoloader dell'applicazione
11 In the future other DBMS as Oracle, PostgreSQL, MS SQL
16 Create connection

testjwt.php

Type Line Description
8 DressApi-rest", // definisce l’emittente del token. Può essere un nome di dominio e può essere utilizzato per eliminare i token da altre applicazioni.
9 DressApi-rest", // definisce il pubblico del token (un dominio)
10 the timestamp of token issuing.
12 Algoritmo usato per la cifratura del token
13 Tipo di Token
14 "exp": 3600 fornisce un tempo di scadenza al token. Una volta trascorso questo tempo di scadenza, il token
20 tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40
40 self-issued.info/docs/draft-ietf-oauth-json-web-token.html#nbfDef
42 $leeway in seconds

config.php

Type Line Description
4 Output
5 json, xml, plain (text/csv), debug
8 Level of log info
13 // Relations
16 // Convetional id primary key name for all tables
17 probable alternative: '[table]_id', '[table]ID', 'id_[table]'
19 Convetional related field id naming
20 to convert the indexes of related tables
21 with a more meaningful value, such as a name
24 Index to the same table i.e: "id_parent"
25 If the field name contains the same table is not necessary SAME_TABLE_ID
26 i.e: if the table is "page" and one field in the same table is id_page, then the SAME_TABLE_ID is not used
29 Date or datetime field that can be set automatically as current time
34 // RELATION OF FOREIGN KEY WITH OTHER TABLE
37 // id_page => page:title
38 id_[table] => [table]:name
39 NOTE: you can also set relationships in the controller with addRelatedFieldName()
40 the value can be an array of strings
42 or a simple string
45 REQUIRED ITEMS AND ACCEPTED INPUT VALUES (with rule expressions)
46 Input check valid for POST, PUT, PATCH
47 NOTE: you can also set required items in the controller with addItemRequired();
48 i.e: $this->addItemRequired('vote', ['name'=>'vote','min'=>18, 'max'=>30], 'student' );
49 table
50 item=>rules
60 if is omit "order-by/id", "order-by/id-ASC" or its abbreviation "ob/id-ASC"
61 DESC or ASC
63 Please, personalize it change me if you use it! crypt/decrypt by db
66 Default of total rows for each request
69 Max total rows for each request, if the value is greater it will be reset to MAX_ITEMS_PER_PAGE value
75 // DB CONFIGURATION
78 // server name or IP address of the server hosting the database
81 Port of DB, for mysql the default is 3306
84 name of DB
85 define('DB_NAME', 'dressapi-test');
88 Username of db user
91 Password of db user
94 For the moment you can use only MySql
95 Oracle, PostgreSQL,...
99 // USER DB
102 // Name of user table in your database
103 NOTE: if Empty string not use the user table
104 and the authentication is not necessary!
107 Name of user id in your database
110 Username name of user table in your database
113 Password name of user table in your database
116 User Token
119 minutes, hours, days, months, years
124 // CACHE ON FILE
127 // On Debian
128 Preferably create a memory virtual disk
129 Not used if you use Redis as cache

autoload.php

Type Line Description
19 Compositore di query

CFileCache.class.php

Type Line Description
10 dressapi.com
31 /dev/shm/
42 Crea la cartella cachefiles nella path indicata. Utile ad esempio se scrive in memoria tipo '/dev/shm/'
47 print $this->CACHE_PATH;
189 mkdir($this->CACHE_PATH,0777,true);
195 $this->WriteDebug("$zone $prefix_zone $domain");
196 $this->WriteDebug(debug_backtrace());
217 save only if it is below the maximum allowed size
255 For WINDOWS

config.php

Type Line Description
9 dressapi.com
16 64kb

CRedisCache.class.php

Type Line Description
10 dressapi.com
35 linuxize.com/post/how-to-install-and-configure-redis-on-debian-9/)
73 Set a unique prefix for the application
77 $this->redis->setOption(Redis::OPT_PREFIX, $this->CACHE_PATH);
172 die("Connessione a Redis non riuscita!");
222 base64_encode(serialize($value))

redis-config.php

Type Line Description
9 dressapi.com

CDBMS.class.php

Type Line Description
9 dressapi.com
26 possible enum in future
36 index of the current db
37 list of DB handles
38 DB names
39 pointer to the result of a DB
40 contains the name of a table
44 DB connection parameters
151 abstract protected static function _realConnection();
909 6=INFO, 7=DEBUG
921 6=INFO, 7=DEBUG

CMySqlComposer.class.php

Type Line Description
9 dressapi.com
32 print_r($this->params);
35 https://stackoverflow.com/questions/18581527/convert-query-from-mysql-to-oracle-using-match-against
37 // MySQL
38 SELECT table_id,
39 MATCH(title,body) AGAINST('grand hotel') AS score,
40 MATCH(title) AGAINST('grand') AS score0,
41 MATCH(title) AGAINST('hotel') AS score1
42 FROM tbl
43 WHERE MATCH(title,body) AGAINST('grand hotel')
44 ORDER BY score ASC
46 MySQL
47 SELECT table_id, MATCH (title, body) AGAINST ('english') AS score
48 FROM pictures
49 WHERE MATCH (title, body) AGAINST ('english')
50 ORDER BY score DESC;
68 JOINs
74 WHERE
88 ORDER BY
102 GROUP BY

CMySqlDB.class.php

Type Line Description
9 dressapi.com
267 "INSERT INTO test(id, label) VALUES (?, ?)"
311 Set valid Null
328 echo "\n$sql ($types) ".print_r($items_values,true)."\n";
448 var_dump( $last_id );
516 Tot. colonne
521 Nomi colonne
566 Per ogni colonna
609 "INSERT INTO test(id, label) VALUES (?, ?)"
616 get the mysqli result
797 It works for both numbers and strings
836 Tot. righe
847 Tutti i dati in un colpo solo
849 Dati della tabella
883 $db_tables = array_keys($this->getArrayByName(0));
994 Almeno i campi 'Field,Type,null' es. id,INT(11),YES - Field=[nome del campo], null=YES|NO
1019 se non è il nome del campo
1036 if it is not the name of the field
1061 || strpos($db_type,'TEXT')!==false

CSqlComposerBase.class.php

Type Line Description
9 dressapi.com
349 print_r($this->params);
352 JOINs

CLogger.class.php

Type Line Description
9 dressapi.com
57 if we use print or echo we could compromise the good result due to the log
58 where we can write the exception? :)

CRequest.class.php

Type Line Description
9 dressapi.com
21 name of the module (or table) to display
22 method get, head, post, puth, patch, delete OR options
24 input parameters
25 values ​​to register input / update
26 filters or input/update parameters
27 request table and filters
28 table with names instead of indexes
30 Order table by Item and type order (ASC or DESC) - i.e.: order-by/id-DESC
64 Virtual method: is a POST but with file in uploaded
70 curl -d "params...."
71 input');
92 request/table/filters
97 if only one filter is the module/table
104 first is an table/controller
106 second is an id ("*" for all id)
143 $this->response->output(null, CResponse::HTTP_STATUS_BAD_REQUEST);
163 only one order by
178 Other filters
182 must contain the operator

CResponse.class.php

Type Line Description
9 dressapi.com
26 Access Denied
34 OK as default
36 JSON, XML, PLAIN
102 $xml->asXML();

CUser.class.php

Type Line Description
9 dressapi.com
24 An alternative is CRedisCache
36 List of user permissions [usertype]
37 [string|int ROLE][string PERMISSION];
39 Current User Roles
74 echo "\n$sql\n";
90 Validate the credentials against a database, or other data store.
91 ...
92 For the purposes of this example, we'll assume that they're valid
103 Add TOKEN_DURATION time
105 Create the token as an array
107 Issued at: time when the token was generated
108 Json Token Id: an unique identifier for the token
109 Issuer
110 Start validate (Not before)
111 Expire
112 Data related to the signer user
113 User name
118 Encode the array to a JWT string.
120 Data to be encoded in the JWT
121 The signing key
122 Algorithm used to sign the token, see https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#section-3
143 Attempt to extract the token from the Bearer header
147 header('HTTP/1.0 400 Bad Request');
156 No token was able to be extracted from the authorization header
173 header('HTTP/1.1 401 Unauthorized');
206 Parameters
209 Method
212 Verifica del login
349 check if it can access all modules
411 All permissions for anonymous is valid for all user
421 Can make all
422 Can read page and comment
423 Full power: can read, update, delete or update a page or a comment
424 Can read, write, update a page
425 Can read a page and read or write a comment
586 normally the client loose his token for logout (like deleting cookies)
587 but if logout is necessary we can make a black list on file
588 not through the db because it would always require a connection and slow down the service

CBaseController.class.php

Type Line Description
9 dressapi.com
19 local module config
33 name of current table (derived from current module)
35 fields of the table to display
37 GET, PUT, PATCH, POST, OPTIONS, HEAD, DELETE
42 CBaseModel or sons
47 flag: if true, one cache foreach user, false: same cache for all
49 true set automatically the id value of user to current user
51 optional objects
52 CCache or sons
53 CUser or sons
55 CRequest
56 CResponse
77 Verify if the method (GET,POST,DELETE,...) is implemented
89 Reads and stores all the tables in the DB
90 it also excludes tables that are not to be managed
94 Check if the instantiated controller is a superclass of DressApi\Modules\Base\CBaseController
101 NOT exists
104 set a table of DB with "Base" Module
105 Tables of the DB
112 Fields to display, default '*' that is all
115 no errors
150 the unique element of filter is the module/table
154 the first element of filter is the module/table
269 Tabelle di default nel DB
315 resource is the table/controller, the internal_code and the name are items with a limitated quantity of characters
345 id_preference => [table:field] => preference:name
390 , *, "name,surname,private_email"';
401 0=nessuna cache
521 Force the id_user to current id user value
525 Force eventual creation_date to current_date
572 Force the id_user to current id user value
585 $this->bind_params_values, $this->bind_params_types
586 updateRecord(?string $table, string $conditions, array $items, array $conditions_values, array $types)
664 print "\n$path\n";
693 non puo' spostare il file
746 Elimina anche la cache nelle tabelle correlate
764 request new data
785 request new data
795 request new data
805 $s = (string)$sql;
860 $field = id_area
862 /^([\S]*)_id/
873 Reference to the same table (i.e: tree with parent)
879 array of related fields
912 simple table
924 print "$sql\n";
937 richiesta errata
939 print_r($result);
941 print_r($data); exit;
971 true=tutti i parametri devono essere presenti
995 true=tutti i parametri devono essere presenti
1080 Solo i parametri esplcitati, non sono necessari tutti
1183 end class

CBaseModel.class.php

Type Line Description
9 dressapi.com
24 array delle tabelle in cui è possibile effettuare operazioni
33 1621344928
34 2021-05-18 15:38:00
35 15:38:00
36 2021-05-18
37 2021
39 indici numerici separati da virgole
97 number with step='0.01'
106 1620344928
111 2020-05-18 15:38
116 15:38
121 2020-05-18
126 2020
131 red|green|yellow
136 red|green|yellow
148 case 'CHAR':
149 case 'VARCHAR':
150 case 'VARCHAR2':
151 textual type
158 SPECIAL HTML T$field(changed by name)
170 end switch
173 print_r($this->column_list);
254 Usable from derived class
309 filter_var("1.33", FILTER_VALIDATE_FLOAT);
399 if it is an index of an external record
497 POST/PUT(all_required=true), PATCH(all_required=false)
535 end class

config.php

Type Line Description
3 Upload destination path
6 Type accepted during upload file, the type is case insensitive

CExampleController.class.php

Type Line Description
9 dressapi.com
36 Default dbtable
54 Make your query here...for example a LEFT JOIN
64 Alternative you can use a normal SQL CODE
65 $sql = "SELECT * FROM `metadata` m ".
66 "LEFT JOIN `metadatadetail_article` a ON a.id_metadata=m.id ".
67 "WHERE (m.id=1) LIMIT 0,20";
71 print "$sql\n";
81 richiesta errata
83 print_r($result);
85 print_r($data); exit;
92 end class

CExampleModel.class.php

Type Line Description
9 dressapi.com
35 Other useful method:
36 public function getAdditionalConditions() : string
38 // public function setRequiredInt($item, $min = null, $max = null);
39 public function setRequiredFloat($item, $min = null, $max = null);
40 public function setRule($item, $pattern);
41 public function setRequired($item, bool $required, $min = null, $max = null);
42 public function setRequiredPattern($item, $pattern, $options = null);
45 Italian fiscal code (with predefined regular expression as a rule )
46 setRequiredPattern(string $field_name, string $pattern, string $options = null)
61 end class

CPageController.class.php

Type Line Description
31 from 'example' module to real table 'page'
35 end class

CPageModel.class.php

Type Line Description
9 dressapi.com
32 end class

index.php

Type Line Description
8 Autoloader dell'applicazione
10 In the future other DBMS as Oracle, PostgreSQL, MS SQL
11 An alternative is CRedisCache
21 Input manager (but the validations is the CBaseModel class)
22 Output manager
23 Cache manager
37 import user permissions directly from the DB
38 if the appropriate acl, moduletable and role tables exist
41 If there are no permissions to import then it allows you to do everything
42 Create a role ('all') and accept all permissions
43 This operation is for general purposes, if you have indicated the permissions
44 in the "acl" table then delete these instructions
47 // Add role "all" to current user
49 Role=all, All modules, all permission
52 Create an appropriate Controller for the request
53 (if you use additional modules besides CBaseController, i.e.: CExampleController)
58 // It excludes the management of the tables or modules listed below.
59 Not necessary if it is managed from ACL
60 if (!$imported_permission && !$user->hasRole('Administrator'))
61 $rest->setExcludedControllers(['user']);
66 sets all the related tables with an array and the method setRelatedFieldNames()
73 CDB::disconnect();
80 track request into log file by logger

autoload.php

Type Line Description
3 autoload.php @generated by Composer

autoload_classmap.php

Type Line Description
3 autoload_classmap.php @generated by Composer

autoload_namespaces.php

Type Line Description
3 autoload_namespaces.php @generated by Composer

autoload_psr4.php

Type Line Description
3 autoload_psr4.php @generated by Composer

autoload_real.php

Type Line Description
3 autoload_real.php @generated by Composer

autoload_static.php

Type Line Description
3 autoload_static.php @generated by Composer

ClassLoader.php

Type Line Description
20 register classes with namespaces
24 activate the autoloader
27 to enable searching the include path (eg. for PEAR packages)
40 www.php-fig.org/psr/psr-0/
41 www.php-fig.org/psr/psr-4/
47 PSR-4
52 PSR-0
168 Register directories for the root namespace.
181 Register directories for a new namespace.
189 Prepend directories for an already registered namespace.
195 Append directories for an already registered namespace.
361 class map lookup
377 Search for Hack files if we are running on HHVM
387 Remember that this class does not exist.
406 PSR-4 lookup
426 PSR-4 fallback dirs
433 PSR-0 lookup
435 namespaced class name
439 PEAR-like class name
455 PSR-0 fallback dirs
462 PSR-0 include paths.

platform_check.php

Type Line Description
3 platform_check.php @generated by Composer

JWK.php

Type Line Description
11 tools.ietf.org/html/draft-ietf-jose-json-web-key-41
18 opensource.org/licenses/BSD-3-Clause 3-clause BSD
19 github.com/firebase/php-jwt
101 Currently only RSA is supported
134 sequence(oid(1.2.840.113549.1.1.1), null)) = rsaEncryption.
135 hex version of MA0GCSqGSIb3DQEBAQUA
157 itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information.

JWT.php

Type Line Description
13 tools.ietf.org/html/rfc7519
21 opensource.org/licenses/BSD-3-Clause 3-clause BSD
22 github.com/firebase/php-jwt
110 OpenSSL expects an ASN.1 DER sequence for ES256/ES384 signatures
125 Check the signature
130 Check the nbf if it is defined. This is the time that the
131 token can actually be used. If it's not yet that time, abort.
138 Check that this token has been created before 'now'. This prevents
139 using tokens that have been created for later use (and haven't
140 correctly used the nbf claim).
147 Check if this token has expired.
231 The last non-empty line is used as the key.
269 returns 1 on success, 0 on failure, -1 on error.
278 The last non-empty line is used as the key.
401 PHP >= 5.3.3
433 Separate the signature into r-value and s-value
436 Trim leading zeros
440 Convert r-value and s-value from unsigned big-endian integers to
441 signed two's complement
470 Type
473 Length
488 OpenSSL returns the ECDSA signatures as a binary ASN.1 DER SEQUENCE
493 Convert r-value and s-value from signed two's compliment to unsigned
494 big-endian integers
498 Pad out r and s so that they are $keySize bits long
520 Length
530 Value
532 Skip the first contents octet (padding indicator)

custom_cluster_distributor.php

Type Line Description
14 Developers can implement Predis\Distribution\DistributorInterface to create
15 their own distributors used by the client to distribute keys among a cluster
16 of servers.

debuggable_connection.php

Type Line Description
14 This is an example of how you can easily extend an existing connection class
15 and trace the execution of commands for debugging purposes. This can be quite
16 useful as a starting poing to understand how your application interacts with
17 Redis.

dispatcher_loop.php

Type Line Description
14 This is a basic example on how to use the Predis\DispatcherLoop class.
16 // To see this example in action you can just use redis-cli and publish some
17 messages to the 'events' and 'control' channel, e.g.:
19 ./redis-cli
20 PUBLISH events first
21 PUBLISH events second
22 PUBLISH events third
23 PUBLISH control terminate_dispatcher
25 Create a client and disable r/w timeout on the socket
28 Return an initialized PubSub consumer instance from the client.
31 Create a dispatcher loop instance and attach a bunch of callbacks.
34 Demonstrate how to use a callable class as a callback for the dispatcher loop.
60 Attach our callable class to the dispatcher.
63 Attach a function to control the dispatcher loop termination with a message.
70 Run the dispatcher loop until the callback attached to the 'control' channel
71 receives 'terminate_dispatcher' as a message.
74 Display our achievements!
77 Say goodbye :-)

executing_redis_commands.php

Type Line Description
16 Plain old SET and GET example...
23 Redis has the MSET and MGET commands to set or get multiple keys in one go,
24 cases like this Predis accepts arguments for variadic commands both as a list
25 of arguments or an array containing all of the keys and/or values.
43 Predis can also send "raw" commands to Redis. The difference between sending
44 commands to Redis the usual way and the "raw" way is that in the latter case
45 their arguments are not filtered nor responses coming from Redis are parsed.

key_prefixing.php

Type Line Description
14 Predis can prefix keys found in commands arguments before sending commands to
15 Redis, even for complex commands such as SORT, ZUNIONSTORE and ZINTERSTORE.
16 Prefixing keys can be useful to create user-level namespaces for you keyspace
17 thus reducing the need for separate logical databases in certain scenarios.

lua_scripting_abstraction.php

Type Line Description
14 This example will not work with versions of Redis < 2.6.
16 // Additionally to the EVAL command defined in the current development profile,
17 the Predis\Command\ScriptCommand class can be used to build an higher level
18 abstraction for "scriptable" commands so that they will appear just like any
19 other command on the client-side. This is a quick example used to implement
20 INCREX.
28 Tell Predis to use all the arguments but the last one as arguments
29 for KEYS. The last one will be used to populate ARGV.

monitor_consumer.php

Type Line Description
14 This is a basic example on how to use the Predis\Monitor\Consumer class. You
15 can use redis-cli to send commands to the same Redis instance your client is
16 connected to, and then type "ECHO QUIT_MONITOR" in redis-cli when you want to
17 exit the monitor loop and terminate this script in a graceful way.
19 Create a client and disable r/w timeout on the socket.
22 Use only one instance of DateTime, we will update the timestamp later.
28 If we notice a ECHO command with the message QUIT_MONITOR, we stop the
29 monitor consumer and then break the loop.
42 Say goodbye :-)

pipelining_commands.php

Type Line Description
14 When you have a whole set of consecutive commands to send to a redis server,
15 you can use a pipeline to dramatically improve performances. Pipelines can
16 greatly reduce the effects of network round-trips.

pubsub_consumer.php

Type Line Description
14 Starting from Redis 2.0 clients can subscribe and listen for events published
15 on certain channels using a Publish/Subscribe (PUB/SUB) approach.
17 Create a client and disable r/w timeout on the socket
20 Initialize a new pubsub consumer.
23 Subscribe to your channels
26 Start processing the pubsup messages. Open a terminal and use redis-cli
27 to push messages to the channels. Examples:
28 ./redis-cli PUBLISH notifications "this is a test"
29 ./redis-cli PUBLISH control_channel quit_loop
52 Always unset the pubsub consumer instance when you are done! The
53 class destructor will take care of cleanups and prevent protocol
54 desynchronizations between the client and the server.
57 Say goodbye :-)

redis_collections_iterators.php

Type Line Description
16 Starting from Redis 2.8, clients can iterate incrementally over collections
17 without blocking the server like it happens when a command such as KEYS is
18 executed on a Redis instance storing millions of keys. These commands are:
20 // - SCAN (iterates over the keyspace)
21 - SSCAN (iterates over members of a set)
22 - ZSCAN (iterates over members and ranks of a sorted set)
23 - HSCAN (iterates over fields and values of an hash).
25 Predis provides a specialized abstraction for each command based on standard
26 SPL iterators making it possible to easily consume SCAN-based iterations in
27 your PHP code.
29 // See http://redis.io/commands/scan for more details.
32 // Create a client using `2.8` as a server profile (needs Redis 2.8!)
35 Prepare some keys for our example
43 === Keyspace iterator based on SCAN ===
56 === Set iterator based on SSCAN ===
71 === Sorted set iterator based on ZSCAN ===
86 === Hash iterator based on HSCAN ===

replication_complex.php

Type Line Description
14 Predis allows to set Lua scripts as read-only operations for replication.
15 This works for both EVAL and EVALSHA and also for the client-side abstraction
16 built upon them (Predis\Command\ScriptCommand). This example shows a slightly
17 more complex configuration that injects a new script command in the server
18 profile used by the new client instance and marks it marks it as a read-only
19 operation for replication so that it will be executed on slaves.
25 ------------------------------------------------------------------------- //
27 Define a new script command that returns all the fields of a variable number
28 of hashes with a single roundtrip.
47 ------------------------------------------------------------------------- //
50 127.0.0.1:6379/?alias=master',
51 127.0.0.1:6380/?alias=slave',
71 ------------------------------------------------------------------------- //
75 Execute the following commands on the master server using redis-cli:
76 $ ./redis-cli HMSET metavars foo bar hoge piyo
77 $ ./redis-cli HMSET servers master host1 slave host2

replication_sentinel.php

Type Line Description
14 Predis supports redis-sentinel to provide high availability in master / slave
15 scenarios. The only but relevant difference with a basic replication scenario
16 is that sentinel servers can manage the master server and its slaves based on
17 their state, which means that they are able to provide an authoritative and
18 updated configuration to clients thus avoiding static configurations for the
19 replication servers and their roles.
21 Instead of connection parameters pointing to redis nodes, we provide a list
22 of instances of redis-sentinel. Users should always provide a timeout value
23 low enough to not hinder operations just in case a sentinel is unreachable
24 but Predis uses a default value of 100 milliseconds for sentinel parameters
25 without an explicit timeout value.
27 // NOTE: in real-world scenarios sentinels should be running on different hosts!
29 127.0.0.1:5380?timeout=0.100',
30 127.0.0.1:5381?timeout=0.100',
31 127.0.0.1:5382?timeout=0.100',
39 Read operation.
44 Write operation.
49 Read operation.

replication_simple.php

Type Line Description
14 Predis supports master / slave replication scenarios where write operations
15 are performed on the master server and read operations are executed against
16 one of the slaves. The behavior of commands or EVAL scripts can be customized
17 at will. As soon as a write operation is performed the client switches to the
18 master server for all the subsequent requests (either reads and writes).
20 // This example must be executed using the second Redis server configured as the
21 slave of the first one (see the "SLAVEOF" command).
24 $parameters = array(
25 127.0.0.1:6379?database=15&alias=master',
26 127.0.0.1:6380?database=15&alias=slave',
33 Read operation.
38 Write operation.
43 Read operation.

session_handler.php

Type Line Description
14 This example demonstrates how to use Predis to save PHP sessions on Redis.
16 // The value of `session.gc_maxlifetime` in `php.ini` will be used by default as
17 the TTL for keys holding session data but this value can be overridden when
18 creating the session handler instance using the `gc_maxlifetime` option.
20 // NOTE: this class requires PHP >= 5.4 but can be used on PHP 5.3 if a polyfill
21 for SessionHandlerInterface is provided either by you or an external package
22 like `symfony/http-foundation`.
24 // See http://www.php.net/class.sessionhandlerinterface.php for more details.
27 if (!interface_exists('SessionHandlerInterface')) {
32 Instantiate a new client just like you would normally do. Using a prefix for
33 keys will effectively prefix all session keys with the specified string.
36 Set `gc_maxlifetime` to specify a time-to-live of 5 seconds for session keys.
39 Register the session handler.
42 We just set a fixed session ID only for the sake of our example.

transaction_using_cas.php

Type Line Description
14 This is an implementation of an atomic client-side ZPOP using the support for
15 check-and-set (CAS) operations with MULTI/EXEC transactions, as described in
16 "WATCH explained" from http://redis.io/topics/transactions
18 // First, populate your database with a tiny sample data set:
20 // ./redis-cli
21 SELECT 15
22 ZADD zset 1 a 2 b 3 c
24 // Then execute this script four times and see its output.
27 function zpop($client, $key)
31 Initialize with support for CAS operations
32 Key that needs to be WATCHed to detect changes
33 Number of retries on aborted transactions, after
34 which the client bails out with an exception.
41 With CAS, MULTI *must* be explicitly invoked.

HashRing.php

Type Line Description
54 In case of collisions in the hashes of the nodes, the node added
55 last wins, thus the order in which nodes are added is significant.
69 A node is removed by resetting the ring so that it's recreated from
70 scratch, in order to reassign possible hashes with collisions to the
71 right node according to the order in which they were added in the
72 first place.
258 Binary search for the last item in ringkeys with a value less or
259 equal to the key. If no such item exists, return the last item.

KetamaRing.php

Type Line Description
67 Binary search for the first item in ringkeys with a value greater
68 or equal to the key. If no such item exists, return the first item.

CRC16.php

Type Line Description
61 CRC-CCITT-16 algorithm

CursorBasedIterator.php

Type Line Description
26 redis.io/commands/scan

HashKey.php

Type Line Description
22 redis.io/commands/scan

Keyspace.php

Type Line Description
22 redis.io/commands/scan

ListKey.php

Type Line Description
29 redis.io/commands/lrange

SetKey.php

Type Line Description
22 redis.io/commands/scan

SortedSetKey.php

Type Line Description
22 redis.io/commands/scan

ConnectionAuth.php

Type Line Description
15 redis.io/commands/auth

ConnectionEcho.php

Type Line Description
15 redis.io/commands/echo

ConnectionPing.php

Type Line Description
15 redis.io/commands/ping

ConnectionQuit.php

Type Line Description
15 redis.io/commands/quit

ConnectionSelect.php

Type Line Description
15 redis.io/commands/select

GeospatialGeoAdd.php

Type Line Description
15 redis.io/commands/geoadd

GeospatialGeoDist.php

Type Line Description
15 redis.io/commands/geodist

GeospatialGeoHash.php

Type Line Description
15 redis.io/commands/geohash

GeospatialGeoPos.php

Type Line Description
15 redis.io/commands/geopos

GeospatialGeoRadius.php

Type Line Description
15 redis.io/commands/georadius

GeospatialGeoRadiusByMember.php

Type Line Description
15 redis.io/commands/georadiusbymember

HashDelete.php

Type Line Description
15 redis.io/commands/hdel

HashExists.php

Type Line Description
15 redis.io/commands/hexists

HashGet.php

Type Line Description
15 redis.io/commands/hget

HashGetAll.php

Type Line Description
15 redis.io/commands/hgetall

HashGetMultiple.php

Type Line Description
15 redis.io/commands/hmget

HashIncrementBy.php

Type Line Description
15 redis.io/commands/hincrby

HashIncrementByFloat.php

Type Line Description
15 redis.io/commands/hincrbyfloat

HashKeys.php

Type Line Description
15 redis.io/commands/hkeys

HashLength.php

Type Line Description
15 redis.io/commands/hlen

HashScan.php

Type Line Description
15 redis.io/commands/hscan

HashSet.php

Type Line Description
15 redis.io/commands/hset

HashSetMultiple.php

Type Line Description
15 redis.io/commands/hmset

HashSetPreserve.php

Type Line Description
15 redis.io/commands/hsetnx

HashStringLength.php

Type Line Description
15 redis.io/commands/hstrlen

HashValues.php

Type Line Description
15 redis.io/commands/hvals

HyperLogLogAdd.php

Type Line Description
15 redis.io/commands/pfadd

HyperLogLogCount.php

Type Line Description
15 redis.io/commands/pfcount

HyperLogLogMerge.php

Type Line Description
15 redis.io/commands/pfmerge

KeyDelete.php

Type Line Description
15 redis.io/commands/del

KeyDump.php

Type Line Description
15 redis.io/commands/dump

KeyExists.php

Type Line Description
15 redis.io/commands/exists

KeyExpire.php

Type Line Description
15 redis.io/commands/expire

KeyExpireAt.php

Type Line Description
15 redis.io/commands/expireat

KeyKeys.php

Type Line Description
15 redis.io/commands/keys

KeyMigrate.php

Type Line Description
15 redis.io/commands/migrate

KeyMove.php

Type Line Description
15 redis.io/commands/move

KeyPersist.php

Type Line Description
15 redis.io/commands/persist

KeyPreciseExpire.php

Type Line Description
15 redis.io/commands/pexpire

KeyPreciseExpireAt.php

Type Line Description
15 redis.io/commands/pexpireat

KeyPreciseTimeToLive.php

Type Line Description
15 redis.io/commands/pttl

KeyRandom.php

Type Line Description
15 redis.io/commands/randomkey

KeyRename.php

Type Line Description
15 redis.io/commands/rename

KeyRenamePreserve.php

Type Line Description
15 redis.io/commands/renamenx

KeyRestore.php

Type Line Description
15 redis.io/commands/restore

KeyScan.php

Type Line Description
15 redis.io/commands/scan

KeySort.php

Type Line Description
15 redis.io/commands/sort

KeyTimeToLive.php

Type Line Description
15 redis.io/commands/ttl

KeyType.php

Type Line Description
15 redis.io/commands/type

ListIndex.php

Type Line Description
15 redis.io/commands/lindex

ListInsert.php

Type Line Description
15 redis.io/commands/linsert

ListLength.php

Type Line Description
15 redis.io/commands/llen

ListPopFirst.php

Type Line Description
15 redis.io/commands/lpop

ListPopFirstBlocking.php

Type Line Description
15 redis.io/commands/blpop

ListPopLast.php

Type Line Description
15 redis.io/commands/rpop

ListPopLastBlocking.php

Type Line Description
15 redis.io/commands/brpop

ListPopLastPushHead.php

Type Line Description
15 redis.io/commands/rpoplpush

ListPopLastPushHeadBlocking.php

Type Line Description
15 redis.io/commands/brpoplpush

ListPushHead.php

Type Line Description
15 redis.io/commands/lpush

ListPushHeadX.php

Type Line Description
15 redis.io/commands/lpushx

ListPushTail.php

Type Line Description
15 redis.io/commands/rpush

ListPushTailX.php

Type Line Description
15 redis.io/commands/rpushx

ListRange.php

Type Line Description
15 redis.io/commands/lrange

ListRemove.php

Type Line Description
15 redis.io/commands/lrem

ListSet.php

Type Line Description
15 redis.io/commands/lset

ListTrim.php

Type Line Description
15 redis.io/commands/ltrim

PubSubPublish.php

Type Line Description
15 redis.io/commands/publish

PubSubPubsub.php

Type Line Description
15 redis.io/commands/pubsub

PubSubSubscribe.php

Type Line Description
15 redis.io/commands/subscribe

PubSubSubscribeByPattern.php

Type Line Description
15 redis.io/commands/psubscribe

PubSubUnsubscribe.php

Type Line Description
15 redis.io/commands/unsubscribe

PubSubUnsubscribeByPattern.php

Type Line Description
15 redis.io/commands/punsubscribe

ScriptCommand.php

Type Line Description
18 redis.io/commands/eval

ServerBackgroundRewriteAOF.php

Type Line Description
15 redis.io/commands/bgrewriteaof

ServerBackgroundSave.php

Type Line Description
15 redis.io/commands/bgsave

ServerClient.php

Type Line Description
15 redis.io/commands/client-list
16 redis.io/commands/client-kill
17 redis.io/commands/client-getname
18 redis.io/commands/client-setname

ServerCommand.php

Type Line Description
15 redis.io/commands/command

ServerConfig.php

Type Line Description
15 redis.io/commands/config-set
16 redis.io/commands/config-get
17 redis.io/commands/config-resetstat
18 redis.io/commands/config-rewrite

ServerDatabaseSize.php

Type Line Description
15 redis.io/commands/dbsize

ServerEval.php

Type Line Description
15 redis.io/commands/eval

ServerEvalSHA.php

Type Line Description
15 redis.io/commands/evalsha

ServerFlushAll.php

Type Line Description
15 redis.io/commands/flushall

ServerFlushDatabase.php

Type Line Description
15 redis.io/commands/flushdb

ServerInfo.php

Type Line Description
15 redis.io/commands/info
100 hack to prevent incorrect values when parsing the >=256 key

ServerInfoV26x.php

Type Line Description
15 redis.io/commands/info

ServerLastSave.php

Type Line Description
15 redis.io/commands/lastsave

ServerMonitor.php

Type Line Description
15 redis.io/commands/monitor

ServerObject.php

Type Line Description
15 redis.io/commands/object

ServerSave.php

Type Line Description
15 redis.io/commands/save

ServerScript.php

Type Line Description
15 redis.io/commands/script

ServerSentinel.php

Type Line Description
15 redis.io/topics/sentinel

ServerShutdown.php

Type Line Description
15 redis.io/commands/shutdown

ServerSlaveOf.php

Type Line Description
15 redis.io/commands/slaveof

ServerSlowlog.php

Type Line Description
15 redis.io/commands/slowlog

ServerTime.php

Type Line Description
15 redis.io/commands/time

SetAdd.php

Type Line Description
15 redis.io/commands/sadd

SetCardinality.php

Type Line Description
15 redis.io/commands/scard

SetDifference.php

Type Line Description
15 redis.io/commands/sdiff

SetDifferenceStore.php

Type Line Description
15 redis.io/commands/sdiffstore

SetIntersection.php

Type Line Description
15 redis.io/commands/sinter

SetIntersectionStore.php

Type Line Description
15 redis.io/commands/sinterstore

SetIsMember.php

Type Line Description
15 redis.io/commands/sismember

SetMembers.php

Type Line Description
15 redis.io/commands/smembers

SetMove.php

Type Line Description
15 redis.io/commands/smove

SetPop.php

Type Line Description
15 redis.io/commands/spop

SetRandomMember.php

Type Line Description
15 redis.io/commands/srandmember

SetRemove.php

Type Line Description
15 redis.io/commands/srem

SetScan.php

Type Line Description
15 redis.io/commands/sscan

SetUnion.php

Type Line Description
15 redis.io/commands/sunion

SetUnionStore.php

Type Line Description
15 redis.io/commands/sunionstore

StringAppend.php

Type Line Description
15 redis.io/commands/append

StringBitCount.php

Type Line Description
15 redis.io/commands/bitcount

StringBitField.php

Type Line Description
15 redis.io/commands/bitfield

StringBitOp.php

Type Line Description
15 redis.io/commands/bitop

StringBitPos.php

Type Line Description
15 redis.io/commands/bitpos

StringDecrement.php

Type Line Description
15 redis.io/commands/decr

StringDecrementBy.php

Type Line Description
15 redis.io/commands/decrby

StringGet.php

Type Line Description
15 redis.io/commands/get

StringGetBit.php

Type Line Description
15 redis.io/commands/getbit

StringGetMultiple.php

Type Line Description
15 redis.io/commands/mget

StringGetRange.php

Type Line Description
15 redis.io/commands/getrange

StringGetSet.php

Type Line Description
15 redis.io/commands/getset

StringIncrement.php

Type Line Description
15 redis.io/commands/incr

StringIncrementBy.php

Type Line Description
15 redis.io/commands/incrby

StringIncrementByFloat.php

Type Line Description
15 redis.io/commands/incrbyfloat

StringPreciseSetExpire.php

Type Line Description
15 redis.io/commands/psetex

StringSet.php

Type Line Description
15 redis.io/commands/set

StringSetBit.php

Type Line Description
15 redis.io/commands/setbit

StringSetExpire.php

Type Line Description
15 redis.io/commands/setex

StringSetMultiple.php

Type Line Description
15 redis.io/commands/mset

StringSetMultiplePreserve.php

Type Line Description
15 redis.io/commands/msetnx

StringSetPreserve.php

Type Line Description
15 redis.io/commands/setnx

StringSetRange.php

Type Line Description
15 redis.io/commands/setrange

StringStrlen.php

Type Line Description
15 redis.io/commands/strlen

StringSubstr.php

Type Line Description
15 redis.io/commands/substr

TransactionDiscard.php

Type Line Description
15 redis.io/commands/discard

TransactionExec.php

Type Line Description
15 redis.io/commands/exec

TransactionMulti.php

Type Line Description
15 redis.io/commands/multi

TransactionUnwatch.php

Type Line Description
15 redis.io/commands/unwatch

TransactionWatch.php

Type Line Description
15 redis.io/commands/watch

ZSetAdd.php

Type Line Description
15 redis.io/commands/zadd

ZSetCardinality.php

Type Line Description
15 redis.io/commands/zcard

ZSetCount.php

Type Line Description
15 redis.io/commands/zcount

ZSetIncrementBy.php

Type Line Description
15 redis.io/commands/zincrby

ZSetIntersectionStore.php

Type Line Description
15 redis.io/commands/zinterstore

ZSetLexCount.php

Type Line Description
15 redis.io/commands/zlexcount

ZSetRange.php

Type Line Description
15 redis.io/commands/zrange
38 Used for compatibility with older versions

ZSetRangeByLex.php

Type Line Description
15 redis.io/commands/zrangebylex

ZSetRangeByScore.php

Type Line Description
15 redis.io/commands/zrangebyscore

ZSetRank.php

Type Line Description
15 redis.io/commands/zrank

ZSetRemove.php

Type Line Description
15 redis.io/commands/zrem

ZSetRemoveRangeByLex.php

Type Line Description
15 redis.io/commands/zremrangebylex

ZSetRemoveRangeByRank.php

Type Line Description
15 redis.io/commands/zremrangebyrank

ZSetRemoveRangeByScore.php

Type Line Description
15 redis.io/commands/zremrangebyscore

ZSetReverseRange.php

Type Line Description
15 redis.io/commands/zrevrange

ZSetReverseRangeByLex.php

Type Line Description
15 redis.io/commands/zrevrangebylex

ZSetReverseRangeByScore.php

Type Line Description
15 redis.io/commands/zrevrangebyscore

ZSetReverseRank.php

Type Line Description
15 redis.io/commands/zrevrank

ZSetScan.php

Type Line Description
15 redis.io/commands/zscan

ZSetScore.php

Type Line Description
15 redis.io/commands/zscore

ZSetUnionStore.php

Type Line Description
15 redis.io/commands/zunionstore

PrefixOption.php

Type Line Description
42 NOOP

ProfileOption.php

Type Line Description
35 NOTE: directly using __get('prefix') is actually a workaround for
36 HHVM 2.3.0. It's correct and respects the options interface, it's
37 just ugly. We will remove this hack when HHVM will fix re-entrant
38 calls to __get() once and for all.

ReplicationOption.php

Type Line Description
30 bugs.php.net/bug.php?id=49510 and different
TODO 33 There's more code than needed due to a bug in filter_var() as discussed here https://bugs.php.net/bug.php?id=49510 and different behaviours when encountering NULL values on PHP 5.3.

AbstractConnection.php

Type Line Description
140 [$parameters->host]:$parameters->port]";
143 $parameters->host:$parameters->port]";

MasterSlaveReplication.php

Type Line Description
446 Throw immediately when master connection is failing, even
447 when the command represents a read-only operation, unless
448 automatic discovery has been enabled.
451 Otherwise remove the failing slave and attempt to execute
452 the command again on one of the remaining slaves...
456 ... that is, unless we have no more connections to use.

PredisCluster.php

Type Line Description
TODO 28 Add the ability to remove connections from pool.

RedisCluster.php

Type Line Description
263 We only support master servers for now, so we ignore subsequent
264 elements in the $slots array identifying slaves.

SentinelReplication.php

Type Line Description
242 NOTE: sentinels do not accept AUTH and SELECT commands so we must
243 explicitly set them to NULL to avoid problems when using default
244 parameters set via client options. Actually AUTH is supported for
245 sentinels starting with Redis 5 but we have to differentiate from
246 sentinels passwords and nodes passwords, this will be implemented
247 in a later release.
297 NOTE: sentinel server does not return itself, so we add it back.
546 When we do not have any available slave in the pool we can expect
547 read-only operations to hit the master server.

Parameters.php

Type Line Description
75 www.iana.org/assignments/uri-schemes/prov/redis
76 www.iana.org/assignments/uri-schemes/prov/rediss
86 ') === 0) {
87 parse_url() can parse unix:/path/to/sock so we do not need the
88 unix:///path/to/sock hack, we will support it anyway until 2.0.
89 ', 'unix:', $uri);

PhpiredisSocketConnection.php

Type Line Description
43 github.com/nrk/phpiredis

PhpiredisStreamConnection.php

Type Line Description
45 github.com/nrk/phpiredis

StreamConnection.php

Type Line Description
32 php.net/manual/en/context.ssl.php)
157 $parameters->host:$parameters->port";
159 [$parameters->host]:$parameters->port";
210 {$parameters->path}", $flags);
227 Detect if crypto mode is already enabled for this stream (PHP >= 7.0.0).

WebdisConnection.php

Type Line Description
40 webd.is
41 github.com/nicolasff/webdis
42 github.com/seppo0010/phpiredis
129 $host:$parameters->port",
215 NOOP
223 NOOP

Consumer.php

Type Line Description
96 NOOP
149 Redis <= 2.4
154 Redis >= 2.6

Atomic.php

Type Line Description
83 TODO: should be throwing a more appropriate exception.

ConnectionErrorProof.php

Type Line Description
TODO 28 Awful naming!

Pipeline.php

Type Line Description
216 NOOP

Factory.php

Type Line Description
40 NOOP

RedisUnstable.php

Type Line Description
35 EMPTY

CompositeProtocolProcessor.php

Type Line Description
24 redis.io/topics/protocol

BulkResponse.php

Type Line Description
22 redis.io/topics/protocol

ErrorResponse.php

Type Line Description
21 redis.io/topics/protocol

IntegerResponse.php

Type Line Description
22 redis.io/topics/protocol

MultiBulkResponse.php

Type Line Description
22 redis.io/topics/protocol

StatusResponse.php

Type Line Description
22 redis.io/topics/protocol

StreamableMultiBulkResponse.php

Type Line Description
26 redis.io/topics/protocol

ProtocolProcessor.php

Type Line Description
26 redis.io/topics/protocol

RequestSerializer.php

Type Line Description
20 redis.io/topics/protocol

ResponseReader.php

Type Line Description
22 redis.io/topics/protocol

AbstractConsumer.php

Type Line Description
29 0b0001
30 0b0010
31 0b0100
156 NOOP
209 0b0000;

Consumer.php

Type Line Description
127 The missing break here is intentional as we must process
128 subscriptions and unsubscriptions as standard messages.
129 no break

MultiBulkIterator.php

Type Line Description
39 NOOP

Handler.php

Type Line Description
70 NOOP
79 NOOP
88 NOOP

MultiExec.php

Type Line Description
433 NOOP
435 NOOP
454 Since a MULTI/EXEC block cannot be initialized when using aggregate
455 connections we can safely assume that Predis\Client::getConnection()
456 will return a Predis\Connection\NodeConnectionInterface instance.

MultiExecState.php

Type Line Description
21 0b00001
22 0b00010
23 0b00100
24 0b01000
25 0b10000

Search results