Skip to content

Commit

Permalink
api updates
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Jul 23, 2024
1 parent 32f12e0 commit 32f95d2
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 21 deletions.
71 changes: 70 additions & 1 deletion docs/api/phalcon_cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ hide:
- `DateInterval`
- `Phalcon\Cache\Adapter\AdapterInterface`
- `Phalcon\Cache\Exception\InvalidArgumentException`
- `Phalcon\Events\EventsAwareInterface`
- `Phalcon\Events\ManagerInterface`
- `Traversable`

- __Extends__
Expand All @@ -31,7 +33,7 @@ hide:
- __Implements__

- `CacheInterface`
- `Phalcon\Events\EventsAwareInterface`
- `EventsAwareInterface`

This component offers caching capabilities for your application.

Expand All @@ -45,6 +47,13 @@ This component offers caching capabilities for your application.
*/
protected $adapter;

/**
* Event Manager
*
* @var ManagerInterface|null
*/
protected $eventsManager;

```

### Methods
Expand All @@ -61,6 +70,18 @@ public function getAdapter(): AdapterInterface;
Returns the current adapter


```php
public function getEventsManager(): ManagerInterface | null;
```
Get the event manager


```php
public function setEventsManager( ManagerInterface $eventsManager ): void;
```
Sets the event manager


```php
protected function checkKey( string $key ): void;
```
Expand Down Expand Up @@ -122,6 +143,12 @@ protected function doSetMultiple( mixed $values, mixed $ttl = null ): bool;
Persists a set of key => value pairs in the cache, with an optional TTL.


```php
protected function fire( string $eventName, mixed $keys ): void;
```
Trigger an event for the eventsManager.


```php
abstract protected function getExceptionClass(): string;
```
Expand Down Expand Up @@ -179,6 +206,13 @@ Interface for Phalcon\Cache adapters
Apcu adapter


### Properties
```php
//
protected $eventType = 'cache';

```


## Cache\Adapter\Libmemcached

Expand All @@ -205,6 +239,13 @@ Apcu adapter
Libmemcached adapter


### Properties
```php
//
protected $eventType = 'cache';

```


## Cache\Adapter\Memory

Expand All @@ -231,6 +272,13 @@ Libmemcached adapter
Memory adapter


### Properties
```php
//
protected $eventType = 'cache';

```


## Cache\Adapter\Redis

Expand All @@ -257,6 +305,13 @@ Memory adapter
Redis adapter


### Properties
```php
//
protected $eventType = 'cache';

```


## Cache\Adapter\Stream

Expand All @@ -283,6 +338,13 @@ Redis adapter
Stream adapter


### Properties
```php
//
protected $eventType = 'cache';

```


## Cache\Adapter\Weak

Expand All @@ -309,6 +371,13 @@ Stream adapter
* WeakCache implementation based on WeakReference
*/

### Properties
```php
//
protected $eventType = 'cache';

```


## Cache\AdapterFactory

Expand Down
10 changes: 5 additions & 5 deletions docs/api/phalcon_mvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2498,7 +2498,7 @@ $robot->save();


```php
public function serialize(): string;
public function serialize(): string | null;
```
Serializes the object ignoring connections, services, related objects or
static properties
Expand Down Expand Up @@ -2645,7 +2645,7 @@ print_r(


```php
public function unserialize( mixed $data );
public function unserialize( string $data ): void;
```
Unserializes the object from a serialized string

Expand Down Expand Up @@ -11352,7 +11352,7 @@ Returns the 'before match' callback if any


```php
public function getHostname(): string;
public function getHostname(): string | null;
```
Returns the hostname restriction

Expand Down Expand Up @@ -11558,7 +11558,7 @@ Returns the 'before match' callback if any


```php
public function getHostname(): string;
public function getHostname(): string | null;
```
Returns the hostname restriction

Expand Down Expand Up @@ -13950,7 +13950,7 @@ Set a unique prefix to be used as prefix for compiled variables


```php
protected function compileSource( string $viewCode, bool $extendsMode = bool ): string;
protected function compileSource( string $viewCode, bool $extendsMode = bool ): array | string;
```
Compiles a Volt source code returning a PHP plain version

Expand Down
18 changes: 9 additions & 9 deletions docs/api/phalcon_session.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ Close


```php
public function destroy( mixed $sessionId ): bool;
public function destroy( mixed $id ): bool;
```
Destroy


```php
public function gc( int $maxlifetime ): int | false;
public function gc( int $max_lifetime ): int | false;
```
Garbage Collector

Expand All @@ -74,7 +74,7 @@ Open


```php
public function read( mixed $sessionId ): string;
public function read( mixed $id ): string;
```
Read

Expand Down Expand Up @@ -209,13 +209,13 @@ Close


```php
public function destroy( mixed $sessionId ): bool;
public function destroy( mixed $id ): bool;
```
Destroy


```php
public function gc( int $maxlifetime ): int | false;
public function gc( int $max_lifetime ): int | false;
```
Garbage Collector

Expand All @@ -227,7 +227,7 @@ Open


```php
public function read( mixed $sessionId ): string;
public function read( mixed $id ): string;
```
Read

Expand Down Expand Up @@ -341,13 +341,13 @@ Constructor


```php
public function destroy( mixed $sessionId ): bool;
public function destroy( mixed $id ): bool;
```



```php
public function gc( int $maxlifetime ): int | false;
public function gc( int $max_lifetime ): int | false;
```
Garbage Collector

Expand All @@ -361,7 +361,7 @@ public function open( mixed $path, mixed $name ): bool;


```php
public function read( mixed $sessionId ): string;
public function read( mixed $id ): string;
```
Reads data from the adapter

Expand Down
41 changes: 39 additions & 2 deletions docs/api/phalcon_storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ hide:
- `DateInterval`
- `DateTime`
- `Exception`
- `Phalcon\Events\EventsAwareInterface`
- `Phalcon\Events\ManagerInterface`
- `Phalcon\Storage\SerializerFactory`
- `Phalcon\Storage\Serializer\SerializerInterface`
- `Phalcon\Support\Exception`
Expand All @@ -33,7 +35,7 @@ hide:
- __Implements__

- `AdapterInterface`
- `Phalcon\Events\EventsAwareInterface`
- `EventsAwareInterface`

Class AbstractAdapter

Expand Down Expand Up @@ -93,6 +95,20 @@ protected $serializer;
*/
protected $serializerFactory;

/**
* Event Manager
*
* @var ManagerInterface|null
*/
protected $eventsManager;

/**
* EventType prefix.
*
* @var string
*/
protected $eventType = storage;

```

### Methods
Expand Down Expand Up @@ -139,6 +155,12 @@ public function getDefaultSerializer(): string;
Name of the default serializer class


```php
public function getEventsManager(): ManagerInterface | null;
```
Get the event manager


```php
abstract public function getKeys( string $prefix = string ): array;
```
Expand Down Expand Up @@ -175,12 +197,27 @@ public function setDefaultSerializer( string $serializer ): void;



```php
public function setEventsManager( ManagerInterface $eventsManager ): void;
```
Sets the event manager


```php
protected function doGet( string $key );
```



```php
protected function fire( string $eventName, mixed $keys ): void;
```
Trigger an event for the eventsManager.

@var string $eventName
@var mixed $keys


```php
protected function getArrVal( array $collection, mixed $index, mixed $defaultValue = null, string $cast = null ): mixed;
```
Expand Down Expand Up @@ -974,7 +1011,7 @@ protected function phpUnlink( string $filename ): bool;
/**
*
*
* @var int|null
* @var string|null
*/
protected $fetching;

Expand Down
8 changes: 4 additions & 4 deletions docs/api/phalcon_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Delete the element from the collection


```php
public function serialize(): string;
public function serialize(): string | null;
```
String representation of object
See [serialize](https://php.net/manual/en/serializable.serialize.php)
Expand Down Expand Up @@ -244,7 +244,7 @@ See [rfc4627](https://www.ietf.org/rfc/rfc4627.txt)


```php
public function unserialize( string $serialized ): void;
public function unserialize( string $data ): void;
```
Constructs the object
See [unserialize](https://php.net/manual/en/serializable.unserialize.php)
Expand Down Expand Up @@ -3224,7 +3224,7 @@ Delete the element from the collection


```php
final public function serialize(): string;
final public function serialize(): string | null;
```
String representation of object

Expand Down Expand Up @@ -3256,7 +3256,7 @@ JSON_HEX_TAG, JSON_HEX_APOS, JSON_HEX_AMP, JSON_HEX_QUOT, JSON_UNESCAPED_SLASHES


```php
final public function unserialize( mixed $serialized ): void;
final public function unserialize( string $data ): void;
```
Constructs the object

Expand Down

0 comments on commit 32f95d2

Please sign in to comment.