Ben OOP PHP tabanlı olan bir dizi kurmak gerekir, bu bunu yapmak için doğru yolu olurdu?
class MyClass {
$array = array();
function addElement($value) {
$this->array[] = $value;
}
function fetch() {
$return = $this->memcached->getMulti($this->array);
return $return;
}
}
Kullanılacağı PHP dosyası:
<?php
$this->myClass->addElement('key1');
$this->myClass->addElement('key1');
$this->myClass->addElement('key1');
$var = $this->myClass->fetch();