Skip to content

Instantly share code, notes, and snippets.

@geovanerocha
Created September 24, 2012 17:34
Show Gist options
  • Save geovanerocha/3777194 to your computer and use it in GitHub Desktop.
Save geovanerocha/3777194 to your computer and use it in GitHub Desktop.
Declaring namespaces @ PHP.
<?php
namespace Foo;
class FooClass
{
protected $name;
protected $userName;
protected $password;
public function setData($name, $userName, $password)
{
$this->name = $name;
$this->userName = $userName;
$this->password = $password;
return true;
}
public function getName()
{
return $this->name;
}
public function getUserName()
{
return $this->userName;
}
public function getPassword()
{
return $this->password;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment