public function setName($name)
    {
        $name = strtolower($name);

        //Check for everything except letters and dashes.  Throw exception if any are found.
        if (preg_match("/[^a-z\-0-9\.]/", $name)) {
            throw new InvalidArgumentException(
                'Page names can only contain letters, numbers, dots, and dashes.'
                . ' No spaces. This page name is invalid: ' . $name
            );
        }

        $this->name = $name;
    }
public function setName($name)
    {
        $name = strtolower($name);

        //Check for everything except letters and dashes.  Throw exception if any are found.
        if (preg_match("/[^a-z\-0-9\.]/", $name)) {
            throw new InvalidArgumentException(
                'Page names can only contain letters, numbers, dots, and dashes.'
                . ' No spaces. This page name is invalid: ' . $name
            );
        }

        $this->name = $name;
    }
public function setName ( $ name ) { $ name = strtolower ( $ name ) ; //Check for everything except letters and dashes.  Throw exception if any are found. if ( preg_match ( "/[^a-z\-0-9\.]/" , $ name ) ) { throw new InvalidArgumentException ( 'Page names can only contain letters, numbers, dots, and dashes.' . ' No spaces. This page name is invalid: ' . $ name ) ; } $ this -> name = $ name ; }
Sets the Name property

@param string $name Name of Page.  Should be URL friendly and should not
included spaces.

@return void

@throws InvalidArgumentException Exception thrown if name contains spaces.
Sets the Name property