Oara\Network\Publisher\Belboon::login PHP Method

login() public method

public login ( $credentials )
$credentials
    public function login($credentials)
    {
        $user = $credentials['user'];
        $password = $credentials['apipassword'];
        //Setting the client.
        $oSmartFeed = new \SoapClient("http://smartfeeds.belboon.com/SmartFeedServices.php?wsdl");
        $oSessionHash = $oSmartFeed->login($user, $password);
        $this->_client = new \SoapClient('http://api.belboon.com/?wsdl', array('login' => $user, 'password' => $password, 'trace' => true));
        $this->_client->getAccountInfo();
        if (!$oSessionHash->HasError) {
            $sSessionHash = $oSessionHash->Records['sessionHash'];
            $aResult = $oSmartFeed->getPlatforms($sSessionHash);
            $platformList = array();
            foreach ($aResult->Records as $record) {
                if ($record['status'] == "active") {
                    $platformList[] = $record;
                }
            }
            $this->_platformList = $platformList;
        }
    }