public function setContents($contents)
    {
        $contents_exist = file_exists($contents);

        if ($contents_exist) {
            $this->contents = file_get_contents($contents);

            $this->updateLog("info", "Page contents set from {$contents}");
        } else {
            $this->contents = false;
            
            $this->updateLog("alert", "File {$contents} not found");
        }

        return $contents_exist;
    }
public function setContents($contents)
    {
        $contents_exist = file_exists($contents);

        if ($contents_exist) {
            $this->contents = file_get_contents($contents);

            $this->updateLog("info", "Page contents set from {$contents}");
        } else {
            $this->contents = false;
            
            $this->updateLog("alert", "File {$contents} not found");
        }

        return $contents_exist;
    }
public function setContents ( $ contents ) { $ contents_exist = file_exists ( $ contents ) ; if ( $ contents_exist ) { $ this -> contents = file_get_contents ( $ contents ) ; $ this -> updateLog ( "info" , "Page contents set from {$contents}" ) ; } else { $ this -> contents = false ; $ this -> updateLog ( "alert" , "File {$contents} not found" ) ; } return $ contents_exist ; }
Sets the Page's contents to the contents of a file

@param string $contents  The path to the file containing the page's contents
@return bool             Returns true if the file exists
Returns false if the file does not exist
Sets the Page s contents to the contents of a file