@Lusitanian what's wrong with it is, if you let subclasses have control over the fields, you lose a lot of ability to guarantee invariants
subclasses end up being able to break promises the superclass made
which violates LSP
about the only place subclasses should be able to do stuff like that is if you have fields specifically for them to fill in info the superclass will use. but even then, setting those fields can almost always be done by passing values to the parent's constructor
i do see a purpose for protected methods that the subclass is expected to override (event handlers come to mind). but fields should be private if the class depends on them at all. informational ones, like "count of bytes read so far" or whatever that are purely output, can be public
with explicit documentation that those fields are purely informational and can not be relied on
Can someone help explain how to query a DynamoDB table in php?
I am having trouble understanding the documentation
user895378
02:30
@LeviMorrison I like it. I'm thinking I'd like to submodule [PHP-Datastructures] in Artax and use some of its stuff as a basis for a lot of the code, including the HashingMediator. The mediator implementation I have is a bit overkill, I think, and was the result of my first stab at it. It includes many elements that are more appropriate to the Chain of Responsibility pattern.
user895378
Simplicity -- as long as it does what's necessary -- is always a better bet.
If you'd like to move forward without a framework like CodeIgniter, CakePHP, Symfony, etc., you can check out Smarty. It's super easy to use, and makes templates very readable. You can minimize logic, but it gives you enough leg-room to put logic in there if you need it.
http://www.smarty.net/
...
btw , morning everyone
user895378
morning. 1120pm here. There's some dangerous wine-soaked coding going on this side of the Atlantic :)
@tereško I'm curious. What makes you so generous and helpful to complete strangers like us? It always baffles me that there are honest helping hands asking for nothing in return... Very thankful though!
i honestly cannot explain , in the most "down-to earth" part i knowingly swallowed some pill that would make me feel sick and i spent some time dry-heaving
and that was the bit, which made sense (there was some sort of con/scam in progress)
While email editing mail body from 1 and half our also during this period a continuously searching other emails in account after completion of editing in click on email sender box immediately showing login screen ...
is it pssible session out during editing email and searching viewing email account
well, i made my search and add friends codes. but now i have a query. While creating images with php, the image was returned through the headers anywhere in the webpages, is there a way i can put the strings "Friend Request Sent" or "Friendship already Requested" in a similar way as with the images?
@iHungry , what ? This was not in English. I get a feeling that you are just replacing the words from your native language with English counterparts. Languages do not work this way.
Do you want to force user to sign out while viewing email ?
@tereško, how is it possible .... i continuously editing email and searching the mails and viewing ... with rest of 1 and more minute... after writing email i click on email sender address bar .... it showing me logout screen ... i mean i guess it occur due to session out .... then y it allow me writing mail and viewing other mails and searching emails if session expire ?
how is it possible while editing , searching and reviewing email with out rest a minute ... it shows me login screen while i click on sender email address box
really i frustrated i wasting my all writing effort along with time due to this
@blackbee ,are you talking about something like this ? php.net/manual/en/function.imagettftext.php . But i have a feeling that it would be a memory-intensive operation, which might be quite painful in anything but very small social networks.
ok leave it, i will do it with url's...... i will set a variable as $msg and give it a value 1, 2 or 3 and then check it and print the corresponding error mssg in the page where i want, i just wanted a safer way
nope my doubt is how session out while editing email and during editing i viewing and searching other mail for write main email .... after completed my writing it directly shows me logout screen when i click on sender email address bar for write his email id
if session is out during editing and viewing , searching email ... it have to shows me logout screen immediately logout screen
i think cookies can do the work..... hold the cookies until the user clicks log out and retrive the session variables for every page from the cookies, err, i may b wrong
well @tereško if i send the value with urls in the header, will the trim,striptags,stripslashes and htmlentities validators be enough for validation of the variable which will store the value of $_GET['id']
the header is not redirecting to the searchfriends.php page i put it like this if($reponse=="WAIT") { $msg=2; $url="/chatwhiz/searchfriends.php?respid=".$msg; header('Location: '.$url); } in the addfriends.php and in searchfriends.php i have $getmsg=striplashes(trim($_GET['respid'])); .... but its not redirecting from addfriends.php to the url
@Truth , because the factory caches initialized services for the model layer , i treat routing as a service , but it is service which is provided by a framework and has custom initialization process
@tereško I depends, but I will throw an exception in most cases. Opinions seem to differ, but imo a validation error should be an exception in most cases
@tereško In that specific case storing the errors will prove to be much more useful, because you may want to display the errors to the client. Which would be much cleaner when you simply have a list of errors instead of handling exceptions
@NikiC By default installation the postgres user is created. So you can just do su - postgres and psql to get in through command line. For PHP to access it you should create a new user in postgres
@NikiC By default installation the postgres user is created. So you can just do su - postgres and psql to get in through command line. For PHP to access it you should create a new user in postgres
@tereško On my system, basic plain Ubuntu desktop or server, from my non-root (but sudoer) user I can do su -l username (or su - username) for short, no need to sudo before it.
When I was setting up source engine servers (on the srcds) user, and sometimes I needed to apt-get install something, I just did su - whisperity, typed in my password and that's it.
hi guys, have some problems with rawurlencode. if i try to convert haroonahmad.co.uk?index.php?feed=xxx&aff=zzz using rawurlencode, i get http%3A%2F%2Fwww.haroonahmad.co.uk%3Findex.php%3Ffeed%3Dxxx%26aff%3Dzzz. it converts forward slashes and colon too. is there a way to prevent this?