phpQueryObject::data PHP 메소드

data() 공개 메소드

..
public data ( $key, $value = null )
$key
$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;
        }
    }