Control Signin Class - Remove Dependencies &lt;?php


/**
 *      Module  :       Control
 *      Name    :       ControlSigin
 *      Input   :       Text Array
 *      Output  :       Pass or Fail(w/responseText)
 *      Notes   :      
 *      Call    :
                        $instanceControlSignIn = new ControlSignIn();
                        $instanceControlSiginIn-&gt;invoke();

 */

class ControlSignIn extends Post
{
    private $databaseObject;
    private $textObject;
    private $messageObject;

    public function __construct()
    {
        parent::__construct();

        $this-&gt;databaseObject = new Database();
        $this-&gt;textObject = new Text($this-&gt;_postProtected);
        $this-&gt;messageObject = new Message();
    }

    public function invoke()
    {
        if(Constant::VALIDATE_ON==true)
        {
            $continue = $this-&gt;checkInput();
        }
        else
        {
            $continue = true;
        }

        if($continue==true)
        {
            if($this-&gt;validatePass())
            {
                $this-&gt;setSessionVariables();
                Control::send(Mark::pass);
            }
            else
            {
                $this-&gt;messageObject-&gt;display('validate');
                return false;
            }
        }
    }

    private function checkInput()
    {
        if(!$this-&gt;textObject-&gt;checkEmpty())
        {
            $this-&gt;messageObject-&gt;display('empty');
            return true;
        }
        if(!$this-&gt;textObject-&gt;checkPattern('email'))
        {
            $this-&gt;messageObject-&gt;display('email');
            return false;
        }
        if(!$this-&gt;textObject-&gt;checkPattern('pass'))
        {
            $this-&gt;messageObject-&gt;display('pass');
            return false;
        }
    return true;
    }

    private function validatePass()
    {
        $result=$this-&gt;databaseObject-&gt;_pdoQuery('single', 'signin_pass',array($this-&gt;_postProtected['email']));
        $pass=crypt($this-&gt;_postProtected['pass'], $result['pass']);        
        $result=$this-&gt;databaseObject-&gt;_pdoQuery('single', 'signin_validate',array($this-&gt;_postProtected['email'], $pass));
        return (count($result)==2) ? true : false;
    }

    private function setSessionVariables()
    {
        $result=$this-&gt;databaseObject-&gt;_pdoQuery('single', 'pull_session',array($this-&gt;_postProtected['email']));
        Session::activate($result['picture'],$result['id'],$result['name'],'bookmarks');
    }
}
Without a question there's no way to give a definitive answer.  Still, here's a few comments you might want to take on board. 


You're instantizing your dependencies in your constructor.  This means that your class is now irrevocably coupled to those dependencies.  This makes testing and reuse very difficult, as it's basically impossible to test your class in isolation and if you move the class over to another project then you'll have to move all the dependencies over as well.  You should use dependency injection instead and pass your dependencies to the constructor instead.  
It looks like you're statically invoking some static methods as well.  You should avoid doing this for the same reasons that you should inject dependencies.  A static dependency is still a dependency, and your class will now be coupled to those classes whose static methods you're using.  Furthermore, static methods tend to be frowned upon as they represent global state.  For reasons I'm sure you're familiar with, global state is a Bad Thing.  You'll be better off passing in instances of objects instead.  
Your header comment is non-standard.  Good to see you're including comments at all, but there are various automated tools out there (DocBlox for example) that are capable of generating documentation files for you, but only if your comments are in the right format.  If you look at the documentation for those tools they'll give you a rundown of how to format a comment and what tags are available to you.  IDEs like Netbeans and Eclipse can also use the docblocks to provide you with pop-up help, they'll show your comment when you type the class name so you'll be reminded of what it does.  
Aside from your header comment (which is good), you don't comment your code at all.  You should at the very least put a docblock comment at the start of all your methods to tell you what they do so that they can be documented by tools like DocBlox and so that you'll get help on your class from your IDE.  You should also provide a running commentary in plain-English comments as to what's going on in your code. 


One last tip. You can abbreviate the code at the start of your invoke() method as follows: 

    $continue = Constant::VALIDATE_ON==true?
        $this-&gt;checkInput():
        true;