« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 63 for ArrayAccess (0.002 sec.)
ArrayAccess::offsetSet — 指定したオフセットに値を設定する | PHP 8.3 12733
ArrayAccess::offsetSet (PHP 5, PHP 7, PHP 8) ArrayAccess::offsetSet — 指定したオフセットに値を設定する 説明 public function ArrayAccess::offsetSet ( mixed $offset , mixed $value ): void 指定したオフセットに値を代入します。 パラメータ offset ... を返しません。 注意 注意 : 下記の例のように、もし他の値が利用できなければ、 offset パラメータは null に設定されます。 <?php $arrayaccess [] = "first value" ; $arrayaccess [] = "second value" ; print_r ( $arrayaccess ); ?> 上の例の出力は以下となります。 Array ... ( [0] => first value [1] => second value ) 注意 : この関数は、参照による代入の場合にはコールされません。また、 ArrayAccess でオーバーロードした配列の次元への間接的な変更 (間接的な変更とは、その次元を直接変更するのではなく 下位の次元やプロパティを ... 変更したり、配列の次元を別の変数に参照で代入したりすることです) の場合にもコールされません。これらの場合は、かわりに ArrayAccess::offsetGet() がコールされます。 この操作が成功するのはメソッドが参照を返せるようになっているときだけです。 他のマニュアルの ...
https://man.mtool.work/php/8.3/arrayaccess.offsetset.html
ArrayAccess::offsetGet — オフセットを取得する | PHP 8.3 12315
ArrayAccess::offsetGet (PHP 5, PHP 7, PHP 8) ArrayAccess::offsetGet — オフセットを取得する 説明 public function ArrayAccess::offsetGet ( mixed $offset ): mixed 指定したオフセットの値を返します。 このメソッドは、オフセットが empty() かどうか ... セット。 戻り値 すべての型の値を返すことができます。 注意 注意 : このメソッドの実装で参照を返すことができます。 これにより、 ArrayAccess オブジェクトのオーバーロードされた配列に対する間接的な変更ができます。 直接的な変更とは、 $obj[6] = 7 のように配列のその次 ... す。 ++ によるインクリメントや -- によるデクリメントもまた、ある意味では間接的な変更を要するものです。 直接的な変更の際には ArrayAccess::offsetSet() がコールされますが、間接的な変更の際には ArrayAccess::offsetGet() がコールされます。この場合は ArrayAccess::o ... ffsetGet() の実装が参照を返せるようにしておく必要があります。 そうしなければ E_NOTICE メッセージが発生します。 参考 ArrayAccess::offsetExists() - オフセットが存在するかどうか 他のマニュアルの関連ページ Linux JM filefrag(8) Linux JM magic(4) Linux JM ...
https://man.mtool.work/php/8.3/arrayaccess.offsetget.html
ArrayAccess::offsetExists — オフセットが存在するかどうか | PHP 8.3 12070
ArrayAccess::offsetExists (PHP 5, PHP 7, PHP 8) ArrayAccess::offsetExists — オフセットが存在するかどうか 説明 public function ArrayAccess::offsetExists ( mixed $offset ): bool オフセットが存在するかどうかを返します。 このメソッドが実行される ... のは、 ArrayAccess を実装したオブジェクト上で isset() あるいは empty() を使用した場合です。 注意 : empty() を使用すると ArrayAccess::offsetGe ... t() がコールされ、 ArrayAccess::offsetExists() が true を返すかどうかで空かどうかを判断します。 パラメータ offset 調べたいオフセット。 戻り値 成功した場合 ... に true を、失敗した場合に false を返します。 注意 : 非 boolean 値が返された場合は bool にキャストして返します。 例 例1 ArrayAccess::offsetExists() の例 <?php class obj implements ArrayAccess { public function offsetSet ( $offset , $value ): void { var_d ...
https://man.mtool.work/php/8.3/arrayaccess.offsetexists.html
ArrayAccess インターフェイス | PHP 8.3 11249
ArrayAccess インターフェイス (PHP 5, PHP 7, PHP 8) はじめに 配列としてオブジェクトにアクセスするための機能のインターフェイスです。 インターフェイス概要 interface ArrayAccess { /* メソッド */ public function offsetExists ( mixed $offset ): b ... ixed $value ): void public function offsetUnset ( mixed $offset ): void } 例 例1 基本的な使用法 <?php class Obj implements ArrayAccess { public $container = [ "one" => 1 , "two" => 2 , "three" => 3 , ]; public function offsetSet ( $offset , $value ): void { ... ( [container] => Array ( [one] => 1 [three] => 3 [two] => A value [0] => Append 1 [1] => Append 2 [2] => Append 3 ) ) 目次 ArrayAccess::offsetExists — オフセットが存在するかどうか ArrayAccess::offsetGet — オフセットを取得する ArrayAccess::offsetSet — 指定し ... たオフセットに値を設定する ArrayAccess::offsetUnset — オフセットの設定を解除する 他のマニュアルの関連ページ Docker docker container Django 3.2.7 Docker docker co ...
https://man.mtool.work/php/8.3/class.arrayaccess.html
The Sequence interface | PHP 8.3 9592
The Sequence interface (PECL ds >= 1.0.0) はじめに A Sequence describes the behaviour of values arranged in a single, linear dimension. Some languages refer to this as a "List". It's similar to an array that uses incremental integer keys, w ... alternative to SplDoublyLinkedList and SplFixedArray . インターフェイス概要 interface Ds\Sequence extends Ds\Collection , ArrayAccess { /* メソッド */ abstract public function allocate ( int $capacity ): void abstract public function apply ( callable $call ... n IteratorAggregate::getIterator (): Traversable public function JsonSerializable::jsonSerialize (): mixed public function ArrayAccess::offsetExists ( mixed $offset ): bool public function ArrayAccess::offsetGet ( mixed $offset ): mixed public function Arra ... yAccess::offsetSet ( mixed $offset , mixed $value ): void public function ArrayAccess::offsetUnset ( mixed $offset ): void } 変更履歴 バージョン 説明 PECL ds 1.3.0 The interface now extends ArrayAccess . 目次 ...
https://man.mtool.work/php/8.3/class.ds-sequence.html
ArrayAccess::offsetUnset — オフセットの設定を解除する | PHP 8.3 9434
ArrayAccess::offsetUnset (PHP 5, PHP 7, PHP 8) ArrayAccess::offsetUnset — オフセットの設定を解除する 説明 public function ArrayAccess::offsetUnset ( mixed $offset ): void オフセットの設定を解除します。 注意 : このメソッドは、 (unset) による ...
https://man.mtool.work/php/8.3/arrayaccess.offsetunset.html
The MongoDB\BSON\PackedArray class | PHP 8.3 8282
The MongoDB\BSON\PackedArray class (mongodb >=1.16.0) はじめに Represents a BSON array. This class is used when reading data as raw BSON and cannot be modified. クラス概要 final class MongoDB\BSON\PackedArray implements MongoDB\BSON\Type , ... ackedArray::offsetGet — Returns the value of an index in the array MongoDB\BSON\PackedArray::offsetSet — Implementation of ArrayAccess MongoDB\BSON\PackedArray::offsetUnset — Implementation of ArrayAccess MongoDB\BSON\PackedArray::toCanonicalExtendedJSON — ...
https://man.mtool.work/php/8.3/class.mongodb-bson-packedarray.html
The MongoDB\BSON\Document class | PHP 8.3 8195
The MongoDB\BSON\Document class (mongodb >=1.16.0) はじめに Represents a BSON document. This class is used when reading data as raw BSON and cannot be modified. クラス概要 final class MongoDB\BSON\Document implements MongoDB\BSON\Type , ArrayAccess ... BSON\Document::offsetGet — Returns the value of a key in the document MongoDB\BSON\Document::offsetSet — Implementation of ArrayAccess MongoDB\BSON\Document::offsetUnset — Implementation of ArrayAccess MongoDB\BSON\Document::toCanonicalExtendedJSON — Return ...
https://man.mtool.work/php/8.3/class.mongodb-bson-document.html
The Stack class | PHP 8.3 7706
The Stack class (PECL ds >= 1.0.0) はじめに A Stack is a “last in, first out” or “LIFO” collection that only allows access to the value at the top of the structure and iterates in that order, destructively. Uses a Ds\Vector internally. クラ ... ス概要 class Ds\Stack implements Ds\Collection , ArrayAccess { /* メソッド */ public function allocate ( int $capacity ): void public function capacity (): int public function clear ( ... xed ...$values ): void public function toArray (): array } 変更履歴 バージョン 説明 PECL ds 1.3.0 The class now implements ArrayAccess . 目次 Ds\Stack::allocate — Allocates enough memory for a required capacity Ds\Stack::capacity — Returns the current capac ...
https://man.mtool.work/php/8.3/class.ds-stack.html
The Queue class | PHP 8.3 7619
The Queue class (PECL ds >= 1.0.0) はじめに A Queue is a “first in, first out” or “FIFO” collection that only allows access to the value at the front of the queue and iterates in that order, destructively. クラス概要 class Ds\Queue implemen ... ts Ds\Collection , ArrayAccess { /* 定数 */ const int MIN_CAPACITY = 8 ; /* メソッド */ public function allocate ( int $capacity ): void public function ... on toArray (): array } 定義済み定数 Ds\Queue::MIN_CAPACITY 変更履歴 バージョン 説明 PECL ds 1.3.0 The class now implements ArrayAccess . 目次 Ds\Queue::allocate — Allocates enough memory for a required capacity Ds\Queue::capacity — Returns the current capac ...
https://man.mtool.work/php/8.3/class.ds-queue.html
PREV 1 2 3 4 5 6 7 NEXT