public function setSha1($sha1)
    {
        $this->throwExceptionIfProtected();
        if (!is_string($sha1) || preg_match('/[A-Fa-f0-9]{40}/', $sha1) !== 1) {
            throw new \InvalidArgumentException('Specified invalid hash to setSha1()', 1362564220);
        }
        $this->sha1 = strtolower($sha1);
    }
public function setSha1($sha1)
    {
        $this->throwExceptionIfProtected();
        if (!is_string($sha1) || preg_match('/[A-Fa-f0-9]{40}/', $sha1) !== 1) {
            throw new \InvalidArgumentException('Specified invalid hash to setSha1()', 1362564220);
        }
        $this->sha1 = strtolower($sha1);
    }
public function setSha1 ( $ sha1 ) { $ this -> throwExceptionIfProtected ( ) ; if ( ! is_string ( $ sha1 ) || preg_match ( '/[A-Fa-f0-9]{40}/' , $ sha1 ) !== 1 ) { throw new \ InvalidArgumentException ( 'Specified invalid hash to setSha1()' , 1362564220 ) ; } $ this -> sha1 = strtolower ( $ sha1 ) ; }
Sets the SHA1 hash of the content of this resource

@param string $sha1 The sha1 hash
@return void
@api
Sets the SHA1 hash of the content of this resource