ODTDataHandler::setAttribute PHP Méthode

setAttribute() public méthode

public setAttribute ( $obj )
    public function setAttribute($obj)
    {
        $args = func_get_args();
        $type = $obj->getObjType();
        $args = func_get_args();
        switch (count($args)) {
            case 2:
                if (is_array($args[1])) {
                    foreach ($args[1] as $name => $value) {
                        $obj->data[$name] = static::encodeTextForODT($value);
                    }
                }
                break;
            case 3:
                if (!is_array($args[1]) && !is_array($args[2])) {
                    $obj->data[$args[1]] = static::encodeTextForODT($args[2]);
                }
                break;
            default:
                throw new Exception('Invalid parameter list.');
        }
    }