/** * Enter description here... * * @param <type> $key * @param <type> $value */ public function data($key, $value = null) { if (!isset($value)) { // TODO? implement specific jQuery behavior od returning parent values // is child which we look up doesn't exist return phpQuery::data($this->get(0), $key, $value, $this->getDocumentID()); } else { foreach ($this as $node) { phpQuery::data($node, $key, $value, $this->getDocumentID()); } return $this; } }