Skip to content

Commit 489f1a4

Browse files
committed
updating api
1 parent 4dbd2ce commit 489f1a4

15 files changed

Lines changed: 761 additions & 420 deletions

docs/api/phalcon_acl.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ accessKey
290290
- `Phalcon\Acl\RoleInterface`
291291
- `ReflectionClass`
292292
- `ReflectionFunction`
293+
- `ReflectionNamedType`
293294

294295
- __Extends__
295296

docs/api/phalcon_cache.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,38 @@ protected $eventType = 'cache';
305305
Redis adapter
306306

307307

308+
### Properties
309+
```php
310+
//
311+
protected $eventType = 'cache';
312+
```
313+
314+
315+
## Cache\Adapter\RedisCluster
316+
317+
[Source on GitHub](https://github.com/phalcon/cphalcon/blob/5.0.x/phalcon/Cache/Adapter/RedisCluster.zep)
318+
319+
320+
- __Namespace__
321+
322+
- `Phalcon\Cache\Adapter`
323+
324+
- __Uses__
325+
326+
- `Phalcon\Cache\Adapter\AdapterInterface`
327+
- `Phalcon\Storage\Adapter\RedisCluster`
328+
329+
- __Extends__
330+
331+
`StorageRedisCluster`
332+
333+
- __Implements__
334+
335+
- `CacheAdapterInterface`
336+
337+
RedisCluster adapter
338+
339+
308340
### Properties
309341
```php
310342
//
@@ -709,3 +741,4 @@ Exceptions thrown in Phalcon\Cache will use this class
709741

710742

711743
Exceptions thrown in Phalcon\Cache will use this class
744+

docs/api/phalcon_cli.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ Sets the default task suffix
374374

375375
- __Implements__
376376

377-
- `RouterInterface`
378377

379378
Phalcon\Cli\Router is the standard framework router. Routing is the process
380379
of taking a command-line arguments and decomposing it into parameters to

docs/api/phalcon_db.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@ Generates SQL checking for the existence of a schema.view
12921292
- `Phalcon\Db\ResultInterface`
12931293
- `Phalcon\Db\Result\PdoResult`
12941294
- `Phalcon\Events\ManagerInterface`
1295+
- `Phalcon\Support\Settings`
12951296

12961297
- __Extends__
12971298

@@ -2170,9 +2171,9 @@ const TYPE_VARCHAR = 2;
21702171
/**
21712172
* Column Position
21722173
*
2173-
* @var string|null
2174+
* @var string
21742175
*/
2175-
protected $after;
2176+
protected $after = "";
21762177

21772178
/**
21782179
* Column is autoIncrement?
@@ -2292,7 +2293,7 @@ Phalcon\Db\Column constructor
22922293

22932294

22942295
```php
2295-
public function getAfterPosition(): string | null;
2296+
public function getAfterPosition(): string;
22962297
```
22972298
Check whether field absolute to position in table
22982299

@@ -2527,6 +2528,7 @@ Returns true if number column is unsigned
25272528

25282529
- __Uses__
25292530

2531+
- `Phalcon\Support\Settings`
25302532

25312533
- __Extends__
25322534

docs/api/phalcon_di.md

Lines changed: 57 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,18 @@ $request = $di->getRequest();
132132
### Properties
133133
```php
134134
/**
135-
* List of registered services
135+
* List of service aliases
136136
*
137-
* @var ServiceInterface[]
137+
* @var array
138138
*/
139-
protected $services;
139+
protected $aliases;
140140

141141
/**
142-
* List of shared instances
142+
* Latest DI build
143143
*
144-
* @var array
144+
* @var DiInterface|null
145145
*/
146-
protected $sharedInstances;
146+
protected static $defaultContainer;
147147

148148
/**
149149
* Events Manager
@@ -153,11 +153,18 @@ protected $sharedInstances;
153153
protected $eventsManager;
154154

155155
/**
156-
* Latest DI build
156+
* List of registered services
157157
*
158-
* @var DiInterface|null
158+
* @var ServiceInterface[]
159159
*/
160-
protected static $defaultDi;
160+
protected $services;
161+
162+
/**
163+
* List of shared instances
164+
*
165+
* @var array
166+
*/
167+
protected $sharedInstances;
161168

162169
```
163170

@@ -189,6 +196,13 @@ public function get( string $name, mixed $parameters = null ): mixed;
189196
Resolves the service based on its configuration
190197

191198

199+
```php
200+
public function getAlias( string $name ): string;
201+
```
202+
Return the alias based on a passed key. Returns an empty string if
203+
the alias does not exist
204+
205+
192206
```php
193207
public static function getDefault(): DiInterface | null;
194208
```
@@ -378,6 +392,12 @@ public function set( string $name, mixed $definition, bool $shared = bool ): Ser
378392
Registers a service in the services container
379393

380394

395+
```php
396+
public function setAlias( string $name, mixed $aliases ): Di;
397+
```
398+
Sets one or more aliases to the given name.
399+
400+
381401
```php
382402
public static function setDefault( DiInterface $container ): void;
383403
```
@@ -547,6 +567,33 @@ Registers an "always shared" service in the services container
547567
Exceptions thrown in Phalcon\Di will use this class
548568

549569

570+
### Methods
571+
572+
```php
573+
public static function serviceCannotBeResolved( string $name ): Exception;
574+
```
575+
576+
577+
578+
```php
579+
public static function serviceNotFound( string $name ): Exception;
580+
```
581+
582+
583+
584+
```php
585+
public static function undefinedMethod( string $method ): Exception;
586+
```
587+
588+
589+
590+
```php
591+
public static function unknownServiceInParameter( int $position ): Exception;
592+
```
593+
594+
595+
596+
550597

551598
## Di\Exception\ServiceResolutionException
552599

@@ -724,6 +771,7 @@ accessing a public property with the same name of a registered service
724771
@property \Phalcon\Mvc\Model\Manager|\Phalcon\Mvc\Model\ManagerInterface $modelsManager
725772
@property \Phalcon\Mvc\Model\MetaData\Memory|\Phalcon\Mvc\Model\MetadataInterface $modelsMetadata
726773
@property \Phalcon\Mvc\Model\Transaction\Manager|\Phalcon\Mvc\Model\Transaction\ManagerInterface $transactionManager
774+
@property \Phalcon\Support\Settings $settings
727775
@property \Phalcon\Assets\Manager $assets
728776
@property \Phalcon\Di\Di|\Phalcon\Di\DiInterface $di
729777
@property \Phalcon\Session\Bag|\Phalcon\Session\BagInterface $persistent

docs/api/phalcon_encryption.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,6 +2112,12 @@ public function validateAudience( mixed $audience ): Validator;
21122112
Validate the audience
21132113

21142114

2115+
```php
2116+
public function validateClaim( string $name, mixed $value ): Validator;
2117+
```
2118+
Validate a claim
2119+
2120+
21152121
```php
21162122
public function validateExpiration( int $timestamp ): Validator;
21172123
```
@@ -2236,11 +2242,10 @@ This class partially borrows SecureRandom library from Ruby
22362242
### Methods
22372243

22382244
```php
2239-
public function base58( int $len = null ): string;
2245+
public function base58( int $len = int ): string;
22402246
```
22412247
Generates a random base58 string
22422248

2243-
If $len is not specified, 16 is assumed. It may be larger in future.
22442249
The result may contain alphanumeric characters except 0, O, I and l.
22452250

22462251
It is similar to `Phalcon\Encryption\Security\Random::base64()` but has been
@@ -2259,12 +2264,10 @@ echo $random->base58(); // 4kUgL2pdQMSCQtjE
22592264

22602265

22612266
```php
2262-
public function base62( int $len = null ): string;
2267+
public function base62( int $len = int ): string;
22632268
```
22642269
Generates a random base62 string
22652270

2266-
If $len is not specified, 16 is assumed. It may be larger in future.
2267-
22682271
It is similar to `Phalcon\Encryption\Security\Random::base58()` but has been
22692272
modified to provide the largest value that can safely be used in URLs
22702273
without needing to take extra characters into consideration because it is
@@ -2281,11 +2284,10 @@ echo $random->base62(); // z0RkwHfh8ErDM1xw
22812284

22822285

22832286
```php
2284-
public function base64( int $len = null ): string;
2287+
public function base64( int $len = int ): string;
22852288
```
22862289
Generates a random base64 string
22872290

2288-
If $len is not specified, 16 is assumed. It may be larger in future.
22892291
The length of the result string is usually greater of $len.
22902292
Size formula: 4($len / 3) rounded up to a multiple of 4.
22912293

@@ -2299,11 +2301,10 @@ echo $random->base64(12); // 3rcq39QzGK9fUqh8
22992301

23002302

23012303
```php
2302-
public function base64Safe( int $len = null, bool $padding = bool ): string;
2304+
public function base64Safe( int $len = int, bool $padding = bool ): string;
23032305
```
23042306
Generates a random URL-safe base64 string
23052307

2306-
If $len is not specified, 16 is assumed. It may be larger in future.
23072308
The length of the result string is usually greater of $len.
23082309

23092310
By default, padding is not generated because "=" may be used as a URL
@@ -2344,11 +2345,10 @@ var_dump(bin2hex($bytes));
23442345

23452346

23462347
```php
2347-
public function hex( int $len = null ): string;
2348+
public function hex( int $len = int ): string;
23482349
```
23492350
Generates a random hex string
23502351

2351-
If $len is not specified, 16 is assumed. It may be larger in future.
23522352
The length of the result string is usually greater of $len.
23532353

23542354
```php
@@ -2402,13 +2402,11 @@ echo $random->uuid(); // 1378c906-64bb-4f81-a8d6-4ae1bfcdec22
24022402

24032403

24042404
```php
2405-
protected function base( string $alphabet, int $base, mixed $n = null ): string;
2405+
protected function base( string $alphabet, int $base, mixed $n = int ): string;
24062406
```
24072407
Generates a random string based on the number ($base) of characters
24082408
($alphabet).
24092409

2410-
If $n is not specified, 16 is assumed. It may be larger in future.
2411-
24122410
@throws Exception If secure random number generator is not available or unexpected partial read
24132411

24142412

docs/api/phalcon_events.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,6 @@ can create hooks or plugins that will offer monitoring of data, manipulation,
358358
conditional execution and much more.
359359

360360

361-
### Constants
362-
```php
363-
const DEFAULT_PRIORITY = 100;
364-
```
365-
366361
### Properties
367362
```php
368363
/**
@@ -506,10 +501,15 @@ public function isValidHandler( mixed $handler ): bool;
506501
Interface for Phalcon\Events managers.
507502

508503

504+
### Constants
505+
```php
506+
const DEFAULT_PRIORITY = 100;
507+
```
508+
509509
### Methods
510510

511511
```php
512-
public function attach( string $eventType, mixed $handler ): void;
512+
public function attach( string $eventType, mixed $handler, int $priority = 100 ): void;
513513
```
514514
Attach a listener to the events manager
515515

0 commit comments

Comments
 (0)