public function setRequired($keys)
    {
        if(is_string($keys))
        {
            $this->setRequired(explode(",",$keys));
        }
        else
        {
            foreach($keys as $key)
            {
                if(!in_array($key, $this->required))
                    $this->required[] = $key;
            }
        }

        return $this;
    }
public function setRequired($keys)
    {
        if(is_string($keys))
        {
            $this->setRequired(explode(",",$keys));
        }
        else
        {
            foreach($keys as $key)
            {
                if(!in_array($key, $this->required))
                    $this->required[] = $key;
            }
        }

        return $this;
    }
public function setRequired ( $ keys ) { if ( is_string ( $ keys ) ) { $ this -> setRequired ( explode ( "," , $ keys ) ) ; } else { foreach ( $ keys as $ key ) { if ( ! in_array ( $ key , $ this -> required ) ) $ this -> required [ ] = $ key ; } } return $ this ; }
Set required data for rendering.
@param array $keys
@return $this
Set required data for rendering .