traitã使ã£ã¦ä½ãä½ã£ã¦ã¿ããã¨æãç«ã¡ãèªã¿åãå°ç¨ã®é åãå®è£ ãã¦ã¿ã¾ãããé åã¨ãã¦æ±ãããï¼ä¾ãã°foreachã§åãããã¨ãï¼ãã©å¤å´ããã®å¤æ´ã¯åãä»ããããªãã¨ããã·ãã¥ã¨ã¼ã·ã§ã³ã§ä½¿ãã¾ãã <?php trait ReadOnlyArray { private $items = []; public function offsetGet($key) { if (!array_key_exists($key, $this->items)) { throw new OutOfRangeException(); } return $this->items[$key]; } public function offsetSet($key, $value) { throw new BadMethodCallException(); } public function offset
{{#tags}}- {{label}}
{{/tags}}